-
Notifications
You must be signed in to change notification settings - Fork 24
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
plugincontainer: Support plugins in rootless runtime with nonroot user #107
Conversation
Note: After some offline feedback, this is still a bit of a work in progress. @mickael-hc pointed out the 0o777 folder could be taken over, so I tried to fix that by ensuring it's inside a more limited folder in ce76700, but for some reason that broke the rootless mlock tests. |
… partial set of skipped tests
Just pushed some updates that switch from a 0o777 folder to using the DAC_OVERRIDE capability instead. I don't think I'd want to support that for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! It took me a while to fully convince myself of the need for GroupAdd and Rootless together. For reference, this paper (attached for posterity) had the most thorough explanation I could find for putting the full picture together. |
Support running as non-root container users under rootless container runtimes.
Config.Rootless
, which should be used when both the runtime and the container user are running as non-root. It sets up default ACLs on the host socket directory, and gives the container the DAC_OVERRIDE capability to ensure each side can write to the shared Unix socket and folder despite each being owned by one side and the other side being a different user on the host.GRPCBrokerMultiplexing
option to eliminate host-side sockets and reduce the--host-uds
flag fromall
tocreate
, which means no Unix domain sockets from the host will ever be available inside gVisor containers.podman
tests for now - they are different enough to be a pain but we don't currently have strong requirements to support podman. It could still get re-added at a later date though.