Skip to content

For Publish operation to ACR, non-anonymous access token should be retrieved#1918

Merged
anamnavi merged 11 commits into
masterfrom
acr-anonymous-access
Dec 5, 2025
Merged

For Publish operation to ACR, non-anonymous access token should be retrieved#1918
anamnavi merged 11 commits into
masterfrom
acr-anonymous-access

Conversation

@anamnavi

@anamnavi anamnavi commented Dec 1, 2025

Copy link
Copy Markdown
Member

If a Container Registry has anonymous pull enabled, PSResourceGet was using that alone to determine that the registry is unauthenticated and therefore retrieving an anonymous access token. However, that doesn't account for push operation which would require permissions. This was causing registries with anonymous pull that had push operation being performed on it to result in a 401 error even if the user had ACRPush permissions.

PR Summary

PR Context

Fixes #1906 #1828

PR Checklist

@anamnavi

anamnavi commented Dec 1, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 2, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 3, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

Comment thread src/code/ContainerRegistryServerAPICalls.cs
Comment thread test/PublishPSResourceTests/PublishPSResourceContainerRegistryServer.Tests.ps1 Outdated
@anamnavi

anamnavi commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi anamnavi force-pushed the acr-anonymous-access branch from 19be08e to 10bb9a8 Compare December 4, 2025 21:00
@anamnavi

anamnavi commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi

anamnavi commented Dec 4, 2025

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

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

@anamnavi anamnavi merged commit 5da84fa into master Dec 5, 2025
12 checks passed
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.

Publish-PSResource uses anonymous token for push when anonymousPull is enabled on ACR

2 participants