Skip to content

Conversation

@imjasonh
Copy link
Contributor

  • only pass RegistryStr, since helpers don't expect to see repo paths,
    and might not handle them correctly
  • if the returned username is "", interpret the returned password
    as an identity token
  • add unit tests to cover both of these behaviors

This builds on the excellent work done by @simongottschlag in #1256, and adds unit tests.

- only pass RegistryStr, since helpers don't expect to see repo paths,
  and might not handle them correctly
- if the returned username is "<token>", interpret the returned password
  as an identity token
- add unit tests to cover both of these behaviors
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2022

Codecov Report

Merging #1265 (f047a6a) into main (3a2a6f1) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1265   +/-   ##
=======================================
  Coverage   73.77%   73.78%           
=======================================
  Files         111      111           
  Lines        8286     8289    +3     
=======================================
+ Hits         6113     6116    +3     
  Misses       1571     1571           
  Partials      602      602           
Impacted Files Coverage Δ
pkg/authn/keychain.go 86.15% <100.00%> (+0.66%) ⬆️

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 3a2a6f1...f047a6a. Read the comment docs.

return Anonymous, nil
}
// If the secret being stored is an identity token, the Username should be set to <token>
// ref: https://docs.docker.com/engine/reference/commandline/login/#credential-helper-protocol
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the link!

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.

3 participants