fix: immutable subject claim - #138
Conversation
|
It looks as if #135 is in a similar but unrelated area. I suggest that the two changes are combined. (Daniel's change is compensating for variance in username / org name case, as opposed to the immutable claim format, but they both change the subject.) |
Use data.github_organization.alz.login instead of var.organization_name when constructing OIDC subject claims for federated credentials. This preserves exact org casing in the repo: segment to match GitHub token assertions and avoid AADSTS7002138 case-sensitive matching failures. Also lower-case the org in job_workflow_ref template composition to align with observed GitHub token behavior for reusable workflow refs.
Generate both legacy name-based and immutable ID-based GitHub Actions OIDC subject claims for each workflow and environment mapping. Keep the legacy subject on the existing key and add an immutable subject with a distinct key. This preserves authentication for existing repositories while supporting repositories that use GitHub's immutable OIDC subject format.
|
@Zhangqi910 & @Y1ngJ1eChen - note that ALZ Accelerator's GitHub workflows are currently failing for release v7.2.1 without this fix. When will a new release be created? Example error message: In the meantime, users can work around this by running: gh api repos/<org>/<repo> --jq '"repo:" + .owner.login + "@" + (.owner.id|tostring) + "/" + .name + "@" + (.id|tostring)'Example output Then manually update the repo section of the subject in the federated credentials for the managed identities. Or update using the GitHub account details fields as per the image below.
There are three federated credentials across the plan and apply managed identities. |
@richeney , we're planning to create a new release today. |
|
I see that is is live: https://github.com/Azure/accelerator-bootstrap-modules/releases/tag/7.3.0. I'll retest a new deployment for Management Only. |
|
@Zhangqi910 would you retag the release? It is set to The accelerator is hitting https://api.github.com/repos/Azure/accelerator-bootstrap-modules/releases/tags/v7.3.0 and is getting a 404. |
@richeney thanks for catching this, I retagged the release. |


Overview/Summary
Updated federated credential subjects for immutable organization and repo references, meeting the requirement for the GitHub platform change in https://github.blog/changelog/2026-04-23-immutable-subject-claims-for-github-actions-oidc-tokens
This PR fixes/adds/changes/removes
Breaking Changes
Testing Evidence
As part of this Pull Request I have
mainbranch