-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
User access control in Docker daemon #14674
Comments
I've been looking into authorization support for Docker, so I'll chime in here. On initial inspection, I agree with the principles you've laid down, and the proposed architecture for plugins. However, I don't think the user's request alone is enough to authorize an action. As an administrator, I'd like to be able to permit or deny a request based on specific attributes of the container and/or image it targets --- for example, permit a user to attach to any container except a privileged one. To do this, commands operating on images or containers should pass the container configuration and other relevant information along to the plugin. You may have meant this when you said the arguments of a command are passed in, but I'd like to see it made explicit. |
@mheon I completely agree and this is indeed what I referred to in "command arguments". Thanks for making this explicit. |
@NathanMcCauley, @thaJeztah, @nalind we've created a PR that contains a code skeleton for this feature. Please review #15365. You comments are very welcome. |
Thanks @liron-l ! I'll have a look and try to get some of the "core" maintainers to have a look as well 👍 |
@icecrime @crosbymichael @NathanMcCauley @diogomonica We have added a detailed design document for this feature here: https://docs.google.com/document/d/1hJPEKzyL7CC8r4qRObeXixY_V3v1-QCMsdIvEGLkAsM/edit You comments are very welcome. Added detailed design document for the authorization feature here. |
…ctionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted. Each plug-in operates as a separate service, and registers with Docker through general (plug-ins API) [https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No Docker daemon recompilation is required in order to add / remove an authentication plug-in. Each plug-in is notified twice for each operation: 1) before the operation is performed and, 2) before the response is returned to the client. The plug-ins can modify the response that is returned to the client. The authorization depends on the authorization effort that takes place in parallel [moby#13697]. This is the official issue of the authorization effort: moby#14674 (Here)[https://github.com/rhatdan/docker-rbac] you can find an open document that discusses a default RBAC plug-in for Docker.
…ctionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted. Each plug-in operates as a separate service, and registers with Docker through general (plug-ins API) [https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No Docker daemon recompilation is required in order to add / remove an authentication plug-in. Each plug-in is notified twice for each operation: 1) before the operation is performed and, 2) before the response is returned to the client. The plug-ins can modify the response that is returned to the client. The authorization depends on the authorization effort that takes place in parallel [moby#13697]. This is the official issue of the authorization effort: moby#14674 (Here)[https://github.com/rhatdan/docker-rbac] you can find an open document that discusses a default RBAC plug-in for Docker. Signed-off-by: Liron Levin <liron@twistlock.com> Added container create flow test and extended the verification for ps
…ctionality of the Docker daemon with respect to user authorization. The infrastructure enables registering a set of external authorization plug-in. Each plug-in receives information about the user and the request and decides whether to allow or deny the request. Only in case all plug-ins allow accessing the resource the access is granted. Each plug-in operates as a separate service, and registers with Docker through general (plug-ins API) [https://blog.docker.com/2015/06/extending-docker-with-plugins/]. No Docker daemon recompilation is required in order to add / remove an authentication plug-in. Each plug-in is notified twice for each operation: 1) before the operation is performed and, 2) before the response is returned to the client. The plug-ins can modify the response that is returned to the client. The authorization depends on the authorization effort that takes place in parallel [moby#13697]. This is the official issue of the authorization effort: moby#14674 (Here)[https://github.com/rhatdan/docker-rbac] you can find an open document that discusses a default RBAC plug-in for Docker. Signed-off-by: Liron Levin <liron@twistlock.com> Added container create flow test and extended the verification for ps
I'm cross-posting #19213 (Proposal: Rename |
This would indeed be the best solution to #13490 as I stated in #13490 (comment). However, we must keep in mind that as long as a Docker daemon user can mount |
@yajo authorization is already supported, and you can block such a mount request. |
@cpuguy83 But you can only block it globally. |
@cyphar Well yes, we need authentication. |
I know, that was my point. ;) |
@cyphar @cpuguy83, if you configure Docker daemon with TLS settings, the common name is used as the username in the authorization request. |
Yeah I think this is wrong. We shouldn't be providing authn guarantees to the authz framework without actual authn... |
Thanks for pointing that out, I had not noticed there is an authorization plugin API since Docker 1.10. However that feels like out of scope from Docker's philosophy of batteries included but swappable. There is nothing "included". Some LDAP plugin would be awesome, given it is the default auth standard nowadays, but any other kind of plugin would do the trick, given the "swappable" part of the sentence. |
@NathanMcCauley, @thaJeztah, @nalind,
As discussed in #13697 I'd like to start a separate discussion on the access control model in Docker daemon.
Below is the list of core principles that I think the model should be build upon:
Below is the high level list of the information that each plug-in should receive and the set of possible output values for each plug-in.
Plug-in inputs:
Plug-in outputs:
Improvements that I think should be done at the later stage, after the initial framework is implemented.
Your comments are, of course, very welcome. In case the above makes sense, I'd be glad to share a more in depth design of each component and continue the discussion at a lower level.
The text was updated successfully, but these errors were encountered: