Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunAsUserName Policy Constraint for windows pods #4

Closed
jsturtevant opened this issue Aug 5, 2020 · 1 comment
Closed

RunAsUserName Policy Constraint for windows pods #4

jsturtevant opened this issue Aug 5, 2020 · 1 comment
Labels

Comments

@jsturtevant
Copy link

Describe the solution you'd like
A policy that blocks ContainerAdministrator from being set on the WindowsOptions podspec. It is generally a good idea to run your containers with ContainerUser for windows pods. The users are not shared between the Container and host but the ContainerAdministrator does have additional privileges with in the container. In the PR for kubernetes/kubernetes#92355 an agree was made block ContainerAdministrator if RunAsNonRoot was specified.

The pod sec looks like (can also be set per container):

spec:
  securityContext:
    windowsOptions:
      runAsUserName: "ContainerUser"

There are also username limitations to be aware of: https://kubernetes.io/docs/tasks/configure-pod-container/configure-runasusername/#windows-username-limitations

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

The following has more information on Windows Security Policies which are currently being defined:
kubernetes/kubernetes#64801 (comment)

Environment:

  • Gatekeeper version:
  • Kubernetes version: (use kubectl version):
@sozercan sozercan transferred this issue from open-policy-agent/gatekeeper Sep 14, 2020
@stale
Copy link

stale bot commented Feb 1, 2023

This issue/PR has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 1, 2023
@stale stale bot closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant