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

Check docker config auths for repo and registry #1280

Merged
merged 2 commits into from
Feb 14, 2022

Conversation

imjasonh
Copy link
Collaborator

@imjasonh imjasonh commented Feb 8, 2022

This enables the case where a config's auth section can specify different auth per repository within the same registry.

This seems to be the root cause of GoogleContainerTools/kaniko#687

This enables the case where a config's auth section can specify
different auth per repository within the same registry.
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2022

Codecov Report

Merging #1280 (66f8c7b) into main (33725d2) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1280      +/-   ##
==========================================
+ Coverage   74.01%   74.03%   +0.01%     
==========================================
  Files         112      112              
  Lines        8374     8379       +5     
==========================================
+ Hits         6198     6203       +5     
  Misses       1573     1573              
  Partials      603      603              
Impacted Files Coverage Δ
pkg/authn/keychain.go 87.14% <100.00%> (+0.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33725d2...66f8c7b. Read the comment docs.

@jonjohnsonjr
Copy link
Collaborator

I'm a bit reluctant to diverge from docker's behavior -- do they support anything like this? Does the red hat stuff?

@jonjohnsonjr
Copy link
Collaborator

Related FR: docker/cli#2928

@imjasonh
Copy link
Collaborator Author

imjasonh commented Feb 8, 2022

Oh, I incorrectly thought this was already how Docker worked 😢

I'll close this, and point folks up to that FR. Thanks!

@imjasonh
Copy link
Collaborator Author

imjasonh commented Feb 9, 2022

Sounds like Podman supports per-registry auths: GoogleContainerTools/kaniko#687 (comment)

wdyt?

@imjasonh imjasonh reopened this Feb 9, 2022
@jonjohnsonjr
Copy link
Collaborator

wdyt?

I think ideally we could upstream this to docker/cli?

@imjasonh
Copy link
Collaborator Author

I think ideally we could upstream this to docker/cli?

I'm willing to try. I think we might have a better case if we can say Podman, and all tools using authn.DefaultKeychain have this behavior. Want me to merge and update all these tools with this behavior? I know Tekton has expressed interest in supporting this before.

return nil, err
cfg, err = cf.GetAuthConfig(key)
if err != nil {
return nil, err
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants