Skip to content

[flux/v2.8.x] auth/azure: use ACR-scoped token for registry authentication#1139

Merged
matheuscscp merged 1 commit intoflux/v2.8.xfrom
backport-1130-to-flux/v2.8.x
Feb 26, 2026
Merged

[flux/v2.8.x] auth/azure: use ACR-scoped token for registry authentication#1139
matheuscscp merged 1 commit intoflux/v2.8.xfrom
backport-1130-to-flux/v2.8.x

Conversation

@fluxcdbot
Copy link
Copy Markdown
Member

Automated backport to flux/v2.8.x, triggered by a label in #1130.

The access token scope for Azure Container Registry was derived
from cloud.ResourceManager, which resolves to the ARM endpoint
(e.g. https://management.azure.com/.default\). This is an ARM-scoped
token, not an ACR-scoped one.

Microsoft recommends disabling ARM audience authentication on ACR
registries for enhanced security and least-privilege compliance.
When organizations follow this recommendation and disable
authentication-as-arm, Flux's ARM-scoped tokens are rejected,
causing unauthorized errors for workload identity users.

Use azcontainerregistry.ServiceName audience instead, which
resolves to https://containerregistry.azure.net/.default -- the
correct ACR scope as documented by Microsoft:
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-disable-authentication-as-arm

Signed-off-by: Lukáš Kubín <lukas.kubin@gmail.com>
(cherry picked from commit 68b8866)
@matheuscscp matheuscscp merged commit 72ab2be into flux/v2.8.x Feb 26, 2026
12 checks passed
@matheuscscp matheuscscp deleted the backport-1130-to-flux/v2.8.x branch February 26, 2026 16:30
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.

3 participants