Skip to content

Use authentication challenge for unauthenticated container registry repository - #1797

Merged
Aditya Patwardhan (adityapatwardhan) merged 10 commits into
masterfrom
MCRAuthChallenge
Feb 21, 2025
Merged

Aditya Patwardhan (adityapatwardhan) merged 10 commits into
masterfrom
MCRAuthChallenge

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Feb 19, 2025 •

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@adityapatwardhan

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@anamnavi Anam Navied (anamnavi) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants