Use default keychain to resolve OCI credentials#8274
Merged
Conversation
f8e2edb to
265f52f
Compare
0829811 to
9957a14
Compare
9957a14 to
63309df
Compare
iain-macdonald
approved these changes
Jan 31, 2025
tylerwilliams
approved these changes
Jan 31, 2025
b87612a to
e8573d5
Compare
e8573d5 to
f71a0f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ECR credential helper stopped working for one of our on-prem users after they switched from podman to OCI. This is because
oci.Resolve()doesn't respect credential helpers.This PR enables the default keychain in
oci.Resolve()(behind a flag) so that credential helpers will work. The default keychain respects commonly used container auth config files, including.docker/config.jsonand podman's$XDG_RUNTIME_DIR/containers/auth.json.The customer was specifically trying to use
~/.config/containers/auth.jsonwhich doesn't quite work after this PR, but will work if we either patch google/go-containerregistry#2052 or if the customer switches to~/.docker/config.jsoninstead (that file is generally the least common denominator and is supported by docker, podman, and now oci after this PR).The plan is to either enable this new flag by default (but make sure it's disabled for our cloud executors), or just enable it in the helm charts.