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

Add docker cred helper adapter in pkg/authn #1227

Merged
merged 6 commits into from
Jan 5, 2022

Conversation

imjasonh
Copy link
Collaborator

@imjasonh imjasonh commented Jan 3, 2022

See #1225 (comment)

This adapts an implementation of Docker's credentials.Helper to be used as an authn.Keychain, e.g.:

kc := authn.NewMultiKeychain(
    authn.DefaultKeychain,
    google.Keychain,
    authn.NewKeychainFromHelper(ecr.ECRHelper{ClientFactory: api.DefaultClientFactory{}}),
    authn.NewKeychainFromHelper(credhelper.NewACRCredentialsHelper()),
    ...
)

@codecov-commenter
Copy link

codecov-commenter commented Jan 3, 2022

Codecov Report

Merging #1227 (d3e6457) into main (7adcade) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1227      +/-   ##
==========================================
+ Coverage   73.76%   73.79%   +0.02%     
==========================================
  Files         111      111              
  Lines        8181     8188       +7     
==========================================
+ Hits         6035     6042       +7     
  Misses       1549     1549              
  Partials      597      597              
Impacted Files Coverage Δ
pkg/authn/keychain.go 81.25% <100.00%> (+2.30%) ⬆️
pkg/v1/remote/transport/error.go 100.00% <0.00%> (ø)

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 7adcade...d3e6457. Read the comment docs.

pkg/authn/keychain.go Outdated Show resolved Hide resolved
@imjasonh imjasonh merged commit c636644 into google:main Jan 5, 2022
@imjasonh imjasonh mentioned this pull request Jan 5, 2022
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