-
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
Store client certificates in config.json #31295
Comments
I do not think we want to store actual certificates in this file, and also these certificates are not used to talk to a registry in any case (unless there's some feature somewhere I don't know about, which is possible!). |
@cpuguy83 Am I misunderstanding the user guide that specifies putting client.cert and client.key within
It looks like the credential store/helper is a much better solution, but lightly documented - I seem to only locate a small mention with the docker login CLI reference without a link to documentation for the helpers, is there a more comprehensive guide? Could you help me understand how a client.cert and client.key are used with the credential helper? It doesn't look like the Credential structure accommodates certificates. |
I'd prefer to keep the certificates out of the |
As much as I'd love to be able to use a single file, Credentials would help: Being able to store client certs at least encrypted would be excellent. That's a good start to actually using say the Keychain on the Mac, or something. |
I think the real issue here is that on Kubernetes for example, a user can provide a docker registry ImagePullSecret using username/password that is tied to a service account but cannot provide using TLS certificate. A user of Kubernetes is often unlikely able to inject tls certificates onto each node at /etc/docker/certs.d/{domain}/client.crt but can provide a username/password in the image pull secret to pull from a private registry. The ability to dynamically specify a client tls cert/key to use or config.json would enable this ability. This issue seems to be partly a Kubernetes issue as well (see kubernetes/kubernetes#41965 and kubernetes/kubernetes#91413) |
I agree with @taemon1337. Seems there is no way for Kubernetes to be able to provide the client certificates necessary to pull images from a private registry requiring client certs. |
Description
As a user, it would enhance the user experience if all repository credential and connection information were stored within
~/.docker/config.json
. Currently username/password or token are stored within the config.json file. I propose that CA certificate (ca.crt), client.cert, and client.key are also stored in this file, replacing the current storage mechanism in/etc/docker/certs.d/{registry}/
on each host.Storing the client certificates within the configuration file would enhance the usability with Mesos, Kubernetes, OpenShift, Docker Swarm, and others. The alternative which requires installation of the certificates on each docker daemon separates two parts of the registry credentials between different responsibilities.
docker swarm join
does not mention client certificatesdocker service create --with-registry-auth
also does not mention or handle client certificatesThe security implications of storing private keys (and passwords) within a file on each host should not be ignored.
config.json
should not be stored as an unprotected file and should be directly provided to the docker daemon.Related issues
This is similar to #30591 which is requesting that certs for the docker daemon be stored in
.docker/config.json
This is related to docker/for-mac#1320 which outlines how the host access requirement to inject client certificates is not practical with the Docker for Mac approach. The same limitation may exist on Docker for Windows.
The text was updated successfully, but these errors were encountered: