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

Authentication tokens from credential helpers incorrectly used as passwords #1348

Closed
wrosenuance opened this issue Jun 13, 2020 · 0 comments · Fixed by #1349
Closed

Authentication tokens from credential helpers incorrectly used as passwords #1348

wrosenuance opened this issue Jun 13, 2020 · 0 comments · Fixed by #1349

Comments

@wrosenuance
Copy link
Contributor

Description

The documentation for docker login at https://github.com/docker/docker-ce/blob/master/components/cli/docs/reference/commandline/login.md says:

If the secret being stored is an identity token, the Username should be set to <token>

This means that when a credential helper response is returned with the username equal to <token>, the AuthConfig constructed should use the identity token constructor instead of the username/password constructor.

This is similar to #1249, except there the credentials were stored in config.json, while here they are returned from a credential helper.

  • d-m-p version : 0.33-SNAPSHOT

  • Maven version (mvn -v) : 3.6.3 (and others, I expect)

  • If it's a bug, how to reproduce :

When using an Azure Container Registry and a credential helper, run az acr login -n <acr-name> to retrieve an authentication token and store in the credential helper.

Then, run a docker-maven-plugin:push that needs to use the credentials. It will fail with message like Unable to push 'example-image:latest' to registry 'acrname.azurecr.io' : unauthorized: aad access token with sp failed unknown error [unauthorized: aad access token with sp failed unknown error ].

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 a pull request may close this issue.

1 participant