Skip to content

ACR_token_changes#4506

Closed
aichanda-png wants to merge 6 commits intomasterfrom
ARO-22665-ACR_token_minting
Closed

ACR_token_changes#4506
aichanda-png wants to merge 6 commits intomasterfrom
ARO-22665-ACR_token_minting

Conversation

@aichanda-png
Copy link
Collaborator

Which issue this PR addresses:

https://issues.redhat.com/browse/ARO-22665

What this PR does / why we need it:

We need to use the RP's managed identity credential instead of the 1p credential for ACR token minting in order to fix INT env

How do you know this will function as expected in production?

Its there to fix INT env.

Copy link
Collaborator

@mociarain mociarain left a comment

Choose a reason for hiding this comment

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

The diff here seems to include a bunch of commits that are already merged. I think you have brought commits from master into this instead of rebasing. Is this possible?

@aichanda-png aichanda-png force-pushed the ARO-22665-ACR_token_minting branch from 17ec250 to 8b9f5de Compare December 9, 2025 10:15
@aichanda-png
Copy link
Collaborator Author

The diff here seems to include a bunch of commits that are already merged. I think you have brought commits from master into this instead of rebasing. Is this possible?

I’ve now rebased ARO-22665-ACR_token_minting on top of the latest master and force-pushed, so the PR should now only show the ACR token minting changes

Copy link
Collaborator

@mrWinston mrWinston left a comment

Choose a reason for hiding this comment

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

Looks good! just one small naming issue.

return nil, err
}

msiAuthorizer := azidext.NewTokenCredentialAdapter(
Copy link
Member

Choose a reason for hiding this comment

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

Can we use env.NewMSIAuthorizer()

@bennerv
Copy link
Member

bennerv commented Dec 9, 2025

How are we removing the role assignments against the ACR to the 1p application?

@aichanda-png
Copy link
Collaborator Author

How are we removing the role assignments against the ACR to the 1p application?

Thanks, @bennerv
Just to clarify - Marius and I had discussed this earlier, and the plan was not to remove the existing ACR role assignments yet. We first want to verify that the updated RP token-minting flow works end-to-end without breaking anything in the current deployment path.

Once that validation is complete, we’ll handle the cleanup of the old role assignments as a separate step.

Tagging @mrWinston here as well to confirm we're aligned.

@aichanda-png
Copy link
Collaborator Author

@microsoft-github-policy-service agree [company="{your company}"]

@microsoft-github-policy-service agree [company="Red Hat"]

@aichanda-png
Copy link
Collaborator Author

@microsoft-github-policy-service agree [company="Red Hat"]

@microsoft-github-policy-service agree company="Red Hat"

@ehvs ehvs added the temea label Jan 23, 2026
@tuxerrante tuxerrante requested review from tuxerrante and removed request for fahlmant and pepedocs February 3, 2026 11:20
Copy link
Collaborator

@tuxerrante tuxerrante left a comment

Choose a reason for hiding this comment

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

The file pkg/cluster/delete.go:612 still uses m.localFpAuthorizer for ACR token deletion:
acrManager, err := acrtoken.NewManager(m.env, m.localFpAuthorizer)

This should likely also be changed to m.rpMIAuthorizer for consistency and to ensure deletion works with the new credential.
Is that right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please add unit tests?

]
},
{
"name": "[concat(substring(parameters('acrResourceId'), add(lastIndexOf(parameters('acrResourceId'), '/'), 1)), '/', '/Microsoft.Authorization/', guid(concat(parameters('acrResourceId'), 'RP / ARO v4 ContainerRegistry Token Contributor')))]",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is that right to have consequent '/' in the names?
... , '/', '/Microsoft ...

@mrWinston
Copy link
Collaborator

This PR has been superseded by #4582

@mrWinston mrWinston closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants