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

Fix Azure auth failure from not using identity token in docker.config auths section #2489

Merged
merged 11 commits into from
May 27, 2020

Conversation

chanseokoh
Copy link
Member

Fixes #2488.

Copy link
Member

@loosebazooka loosebazooka left a comment

Choose a reason for hiding this comment

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

Is this really only an issue with azure? Can no one else use identity tokens?

@@ -138,15 +139,25 @@ public Path getDockerConfigFile() {
}

// Lastly, find defined auth.
String auth = dockerConfig.getAuthFor(registryAlias);
AuthTemplate auth = dockerConfig.getAuthFor(registryAlias);
if (auth != null) {
Copy link
Member

Choose a reason for hiding this comment

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

then we check if present here?

@chanseokoh
Copy link
Member Author

Is this really only an issue with azure? Can no one else use identity tokens?

Maybe not only an issue with Azure. But because we've not heard any error report, I think it's safer to keep using auth when both auth and identityToken are given and try to keep the current behavior as much as possible. That is, I'm just fixing the error in this Azure case.

@chanseokoh chanseokoh changed the base branch from master to upgrade-jib-core May 21, 2020 21:07
Base automatically changed from upgrade-jib-core to master May 21, 2020 21:24
@chanseokoh chanseokoh merged commit 9a8932d into master May 27, 2020
@chanseokoh chanseokoh deleted the i2488-azure-identityToken branch May 27, 2020 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pushing to Azure Container Registry fails with "401 Unauthorized" even though "docker push" works
3 participants