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

Add ACR challenge-based authentication and remove basic auth policy #19696

Merged
merged 10 commits into from
Mar 24, 2021

Conversation

annelo-msft
Copy link
Member

@annelo-msft annelo-msft commented Mar 22, 2021

Many thanks to @pallavit for her work on ACR's challenge-based authentication for Java!

This is the corresponding implementation for .NET.

Fixes #19469

@ghost ghost added the Azure.Core label Mar 22, 2021
@annelo-msft annelo-msft force-pushed the acr-add-auth branch 2 times, most recently from bd06741 to 2ab0387 Compare March 23, 2021 15:34
@annelo-msft annelo-msft marked this pull request as ready for review March 23, 2021 19:50
/// Step 5: GET /api/v1/acr/repositories
/// Request Header: { Bearer acrTokenAccess }
/// </summary>
internal class ContainerRegistryCredentialsPolicy : BearerTokenChallengeAuthenticationPolicy
Copy link
Member

Choose a reason for hiding this comment

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

Do we have tests for this policy?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes! see: sdk/containerregistry/Azure.Containers.ContainerRegistry/tests/Authentication/ContainerRegistryChallengeAuthenticationPolicyTest.cs

@annelo-msft annelo-msft enabled auto-merge (squash) March 24, 2021 20:30
@annelo-msft annelo-msft merged commit 00da31e into Azure:master Mar 24, 2021
@annelo-msft annelo-msft mentioned this pull request Mar 25, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants