Skip to content

Fix up ContainerRegistry Authentication for OCI#1971

Open
anamnavi wants to merge 1 commit intomasterfrom
oci-auth
Open

Fix up ContainerRegistry Authentication for OCI#1971
anamnavi wants to merge 1 commit intomasterfrom
oci-auth

Conversation

@anamnavi
Copy link
Copy Markdown
Member

Opening this PR off jborean's branch, to run tests (which need to be run on upstream).

Updates the ContainerRegistry authentication logic to work with OCI compliant registries like ghcr.io. The changes skip using the Azure environment credentials unless the bearer service ends with .azurecr.io as these tokens are only useful for ACR. The Azure AccessToken to Bearer token exchange is also simplified with an unecessary step removed.

A new special prefix is used for the username when a credential represents an Azure AccessToken. This is necessary to ensure that only these specific types of credentials will use the Azure specific steps for authentication.

PR Summary

PR Context

PR Checklist

Updates the ContainerRegistry authentication logic to work with OCI
compliant registries like `ghcr.io`. The changes skip using the Azure
environment credentials unless the bearer service ends with
`.azurecr.io` as these tokens are only useful for ACR. The Azure
AccessToken to Bearer token exchange is also simplified with an
unecessary step removed.

A new special prefix is used for the username when a credential
represents an Azure AccessToken. This is necessary to ensure that only
these specific types of credentials will use the Azure specific steps
for authentication.
@anamnavi
Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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