Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use authentication challenge for unauthenticated container registry repository #1797

Merged
merged 10 commits into from
Feb 21, 2025

Conversation

adityapatwardhan
Copy link
Member

@adityapatwardhan adityapatwardhan commented Feb 19, 2025

PR Summary

This pull request includes several changes to improve the handling and testing of unauthenticated access tokens for container registries. The most important changes include updating token templates, modifying access token retrieval logic, and adding new tests for unauthenticated repositories.

Improvements to token handling:

Modifications to access token retrieval logic:

Code simplification:

Testing improvements:

PR Context

Unauthenticated ACR other than MCR respond with an auth challenge to acquire an anonymous token. This token is required for further operations.

PR Checklist

Fix NRE when getting scope

Fix call to realm

Fix scope

Add content to the webrequest

Remove extra debug

Fix error message
@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@anamnavi anamnavi left a comment

Choose a reason for hiding this comment

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

LGTM

@adityapatwardhan adityapatwardhan merged commit 9c741e4 into master Feb 21, 2025
12 checks passed
@adityapatwardhan adityapatwardhan deleted the MCRAuthChallenge branch February 21, 2025 18:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants