-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Conversation
sdk/core/Azure.Core/src/Shared/BearerTokenChallengeAuthenticationPolicy.cs
Outdated
Show resolved
Hide resolved
...rregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryRecordedTestSanitizer.cs
Show resolved
Hide resolved
...rregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryRecordedTestSanitizer.cs
Outdated
Show resolved
Hide resolved
...rregistry/Azure.Containers.ContainerRegistry/tests/ContainerRegistryRecordedTestSanitizer.cs
Show resolved
Hide resolved
.../Azure.Containers.ContainerRegistry/src/Authentication/ContainerRegistryCredentialsPolicy.cs
Outdated
Show resolved
Hide resolved
bd06741
to
2ab0387
Compare
2ab0387
to
a5bf384
Compare
.../Azure.Containers.ContainerRegistry/src/Authentication/ContainerRegistryCredentialsPolicy.cs
Outdated
Show resolved
Hide resolved
/// Step 5: GET /api/v1/acr/repositories | ||
/// Request Header: { Bearer acrTokenAccess } | ||
/// </summary> | ||
internal class ContainerRegistryCredentialsPolicy : BearerTokenChallengeAuthenticationPolicy |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Many thanks to @pallavit for her work on ACR's challenge-based authentication for Java!
This is the corresponding implementation for .NET.
Fixes #19469