-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement runInContainer #37
Comments
I would be nice if VK would give the user in the context, right now there isn't a lot there... |
doing an exec /bin/bash as the current user is a Bad Idea (tm) because we run as root currently. |
this might be problematic:
|
this will also impact #5 |
In Kubernetes the only way to define UID/GID is in a Pod spec. Kubernetes is not opinionated when it comes to validate that: some security firms sell container runtime integrations that validate/enforce during container startup; and/or admission plug-ins for doing it while the request to create a Pod is in-flight. The Kubernetes API also doesn't mandate for user information other than an identity proof that can be validated by the authorization layer, and even that is not expected to carry UID/GID. For starters, I'd run containers either as specified UID/GID or, if unspecified, use a default one, eg |
I thinking of implementing run-in-container, but I'm wondering about auth. I don't fully understand it yet from the k8s side, but I do think it makes sense to have a defense in depth and also check the local user on the system.
So I'm thinking of utilizing ssh and using the user ID from the kubectl call (how to get that though?) and then performing a
ssh USER@localhost
and dropping you in the /var/run/systemk/UID directory; which you can escape as you are free to roam the system; just like normal ssh. And commands given are dropped for the time being, but we may just want to go with garbage in; garbage out.The text was updated successfully, but these errors were encountered: