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

Kubernetes Security Feature Request: support for user namespaces/id mapped mounts #818

Open
Lennie opened this issue Oct 3, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed needs-discussion No outline on the feature, discussion is welcome

Comments

@Lennie
Copy link

Lennie commented Oct 3, 2023

This is maybe more of a long term vision question/idea. Maybe it's out-of-scope.

For better security for tenants, the recommendation is to have user namespace:

https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/127-user-namespaces/README.md#motivation

That's important for security, so extra important for multi-tenant environments.

If you have a workload which has to share volumes for example, you will need something like this to be efficient/effective:

https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/127-user-namespaces/README.md#handling-of-volumes

Also if you want root inside of the container, which isn't root 'on the outside', then you also want this. So you can have a limited 'fake privileged' container.

Seems like the Linux kernel, the container runtimes and other parts in between and Kubernetes are getting these features now (they've been in development for a few years, with what seems like slow progress).

I wondered how would it best fit in with Capsule ? Does Capsule need to keep track of user IDs per tenant or something like that ?

@Lennie Lennie added the blocked-needs-validation Issue need triage and validation label Oct 3, 2023
@prometherion prometherion added enhancement New feature or request needs-discussion No outline on the feature, discussion is welcome and removed blocked-needs-validation Issue need triage and validation labels Oct 3, 2023
@prometherion
Copy link
Member

Thanks for opening this feature request, @Lennie!

Of course, this feature is definitely interesting for the multi-tenancy scope, and Capsule aims to cover the use-cases.

If I understood correctly, v1.29 will introduce this feature via Pod Security Standard and Pod Security Admission.

We need to think how we'd like to implement this, such as:

  • blocking any Pod which is not running with the desired value
  • enforcing any pod by running with the desired value (thanks to Mutating Webhook?)
  • anything else

@MaxFedotov @oliverbaehler @bsctl please, jump in the discussion, and also remember Lennie that we can book a community call to elaborate a bit more: as a community, we're open hearing to new proposals!

@prometherion prometherion self-assigned this Nov 14, 2023
@oliverbaehler
Copy link
Collaborator

Freature will be landing in Kubernetes 1.30!

@oliverbaehler oliverbaehler added the help wanted Extra attention is needed label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed needs-discussion No outline on the feature, discussion is welcome
Projects
None yet
Development

No branches or pull requests

3 participants