Skip to content

Fix authentication priority: AWS-native -> docker login -> credHelpers -> credsStore #211

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

Merged
merged 4 commits into from
Jun 13, 2025

Conversation

rasmusfaber
Copy link
Contributor

When multiple auth mechanisms are present in docker.json, the priority should be:

  1. Docker login
  2. credHelpers
  3. credsStore

Currently credsStore is chosen above credHelpers, which is not correct.

Similarly, when using AWS ECR auth, the priority of the auths should be:

  1. AWS native
  2. Docker login
  3. credHelpers
  4. credsStore

Currently credHelpers/credsStore will take priority.

Also, if a configured credHelper or credsStore fails, we now just warn and continue down the priority list.

Signed-off-by: Rasmus Faber-Espensen rfaber@gmail.com

…s -> credsStore

Signed-off-by: Rasmus Faber-Espensen <rfaber@gmail.com>
Signed-off-by: Rasmus Faber-Espensen <rfaber@gmail.com>
Signed-off-by: Rasmus Faber-Espensen <rfaber@gmail.com>
Copy link
Contributor

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

Thanks @rasmusfaber. You will again need a bump to the version since this changes behavior of the library.

Signed-off-by: Rasmus Faber-Espensen <rfaber@gmail.com>
@rasmusfaber
Copy link
Contributor Author

Thanks @rasmusfaber. You will again need a bump to the version since this changes behavior of the library.

Yes, of course. Sorry for forgetting that. Done.

@rasmusfaber rasmusfaber requested a review from vsoch June 13, 2025 15:08
@vsoch vsoch merged commit 385f138 into oras-project:main Jun 13, 2025
5 checks passed
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.

2 participants