-
Notifications
You must be signed in to change notification settings - Fork 68
Add DockerAdditionalTrustedBundle for custom CAs #595
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
base: main
Are you sure you want to change the base?
Conversation
Introduces a new SystemContext field DockerAdditionalTrustedBundle to allow callers to provide additional PEM-encoded certificates that should be trusted when connecting to Docker registries. This is useful for environments with custom or internal certificate authorities, particularly when host-specific certificates are provided but a common CA is required across all hosts. Signed-off-by: Pablo Rodriguez Nava <git@amail.pablintino.com>
|
✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6642 |
mtrmac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There is a parallel TLS setting discussion motivated by OpenShift needs, so this needs to be coordinated with that — probably land afterwards or at the very least it needs to not prevent the other work.
| } | ||
|
|
||
| // If the non-host-specific trust bundle is given add it to the RootCAs pool | ||
| if sys.DockerAdditionalTrustedBundle != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sys can be nil.
|
|
||
| // If the non-host-specific trust bundle is given add it to the RootCAs pool | ||
| if sys.DockerAdditionalTrustedBundle != "" { | ||
| tlsClientConfig.RootCAs.AppendCertsFromPEM([]byte(sys.DockerAdditionalTrustedBundle)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder whether the input wouldn’t be better as native Go Certificate, not forcing the client to serialize to text if the input is not originally text.
I don’t have a strong opinion at this point.
Summary
Adds
DockerAdditionalTrustedBundlefield toSystemContextfor providing additional PEM-encoded CA certificates when connecting to Docker registries.Use case
Useful when host-specific certificates are configured but a common CA is needed across all registry connections.
Changes
DockerAdditionalTrustedBundlefield toSystemContextRootCAspool innewDockerClient()