Repository navigation
fix(iam): accept immutable OIDC subjects on ci-infra, ci-infra-plan and ci-registry - #178
Merged
Merged
Conversation
…nd ci-registry The platform and registry roles only matched repo:javaBin/<repo>:..., so switching either repo to GitHub's immutable subject format would lock CI out. Accept repo:javaBin@95047/<repo>@<repo_id>:... too, pinned to the repo IDs via new github_platform_repo_id / github_registry_repo_id variables, with the same ref/environment restrictions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Terraform Plan🚧 Changes detected — Plan: 0 to add, 3 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🔴 HIGH Plan updates the trust policies (assume_role_policy) of three existing CI IAM roles (ci_infra, ci_infra_plan, ci_registry) to add GitHub OIDC subject claims for a repo path "javaBin@95047/..." that does not look like a legitimate javaBin repository, which would let that external-looking GitHub identity assume deploy-capable roles. |
This was referenced Oct 31, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #168 made the org-wide CI roles accept GitHub's immutable OIDC subject (
repo:javaBin@95047/<repo>@<repo_id>:...). The platform and registry roles were not changed and still match only the legacy subject:javabin-ci-infra-plan:repo:javaBin/platform:*javabin-ci-infra:repo:javaBin/platform:ref:refs/heads/main/:environment:productionjavabin-ci-registry:repo:javaBin/registry:ref:refs/heads/mainBoth repos use the legacy format today (
use_immutable_subject: falseaccording togh api repos/javaBin/{platform,registry}/actions/oidc/customization/sub). If either repo opts in, or is ever recreated (new repos can't opt out), platform plan/apply and team provisioning stop withNot authorized to perform sts:AssumeRoleWithWebIdentity.Change
github_platform_repo_id(default1175354559) andgithub_registry_repo_id(default1175355770) variables iniam/variables.tf, fromgh api repos/javaBin/<repo> --jq .id.job_workflow_refpin onci-infrais unchanged.docs/platform-modules.mddescribes the two subject formats and where the IDs are pinned.I also searched the rest of the repo (workflows, scripts, Lambdas,
terraform/org) for code that parses or matchessub. Nothing else needs a change.slack_alertalready strips the IDs (#168), andci_broker/apply_gate(shared/github_oidc.py) check therepository_owner,repositoryandjob_workflow_refclaims, notsub. The other"sub"hits are Google service-account JWTs and Cognito, which have nothing to do with GitHub OIDC.Verification
terraform fmt -recursive -checkandterraform validateinterraform/platformpass.-lock=false, targeting the three roles) shows0 to add, 3 to change, 0 to destroy. The only change is thesubcondition, which becomes a list with the legacy and the immutable form, for examplerepo:javaBin@95047/platform@1175354559:*.python3 -m unittest discover -s terraform/lambda-src/testspasses (no Lambda changes).🤖 Generated with Claude Code