Skip to content
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

Mount host's certificate bundles #42856

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DavidTorresOcana
Copy link

Add support for usage of REQUESTS_CA_BUNDLE env. variable

Certificates might not always be in /etc/ssl but users might setup variable REQUESTS_CA_BUNDLE to other directory.
Documentation update might be needed.

Add support for usage of `REQUESTS_CA_BUNDLE` env. variable
@thaJeztah thaJeztah added the area/rootless Rootless mode label Sep 15, 2021
@AkihiroSuda
Copy link
Member

Why only for rootless, and why alter the namespace?

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “REQUESTS_CA_BUNDLE” env var seems specific to Python requests, which isn’t related to Moby.

https://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification

NOTLGTM

@DavidTorresOcana
Copy link
Author

DavidTorresOcana commented Sep 15, 2021

How do we handle then situations like:

  • Users cannot write to /etc/ssl (the main purpose of rootless docker) and have to use certificates (stored somewhere else than /etc/ssl)?
  • Users cannot write to /etc/ssl which contains an expired certificate: this prevents the daemon from pulling images

Maybe I am missing something.

If the problem is the name of the variable REQUESTS_CA_BUNDLE what should be used?

This PR builds on top of rootless-containers/rootlesskit#225 to solve the above cases

@AkihiroSuda
Copy link
Member

Why not just use ~/.config/docker/certs.d? (equivalent of /etc/docker/certs.d)

@DavidTorresOcana
Copy link
Author

As I understand ~/.config/docker/certs.d is where keys/certificates are placed for encrypting (SSL) daemon-client and daemon-registry communication.
These are not certificates to be used by daemon when pulling from public registries.
Am I missing something?

If not using the fix of this PR users might get the error expired certificates errors as in rootless-containers/rootlesskit#225 if host did not updated tat certificate.

If this is really not a feature we want, I would suggest to revert fix for rootless-containers/rootlesskit#225 as it is the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rootless Rootless mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants