问题
I want to add Authentication and Authorization for the docker daemon for more security.
use case :-
Any command can be issued to the docker daemon by only valid user and that the user has the rights to execute the command. Here I want to use LDAP for user authentication.
Q :- Does docker has integration with LDAP for above use case ? If not then any work around to do this ?
I want help how to proceed on this. some starters will help.
Please advise me. Thanks for answer !
回答1:
One way to protect docker daemon is to give access to the socket file only to users who should have access. Docker uses a group called docker
, so adding a user to this group gives access to all docker commands gpasswd -a user docker
. This however does not restrict the commands a user can run.
If you'd prefer LDAP authentication and restriction on commands, take a look at Docker remote API which is used internally by docker client as well. You can use it to control docker daemon, add your own authentication, restriction on commands, etc.
来源:https://stackoverflow.com/questions/33754278/docker-user-authentication-against-ldap-over-ssl