Skip to content

Commit de62f83

Browse files
committed
fix(ci-lease): add role-chaining=true on the leased-account assume step
The configure-aws-credentials@v6 action's default credential resolution preferentially uses OIDC when an id-token is available. For the second step in scenario-ci.yml (assuming CIDeployRole inside the leased pool account), this caused: Could not assume role with OIDC: No OpenIDConnect provider found in your account for https://token.actions.githubusercontent.com The leased pool account has no GitHub OIDC provider — we want the action to sigv4-sign from the already-loaded hub credentials instead. role-chaining: true forces that behavior. The third step (switching BACK to the hub role for the release call) keeps the default OIDC resolution: GitHub still emits an id-token (thanks to permissions: id-token: write), and the hub role trusts the GHA OIDC provider but not the leased-account principal.
1 parent 7629a5d commit de62f83

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/scenario-ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,18 @@ jobs:
9191
--template '${{ inputs.lease_template }}' \
9292
--user-email '${{ inputs.ci_lease_email }}'
9393
94-
# Now assume the in-lease CIDeployRole using the account_id we just got.
94+
# Now assume the in-lease CIDeployRole. role-chaining=true tells
95+
# configure-aws-credentials to sigv4-sign from the already-loaded
96+
# hub creds (sts:AssumeRole) instead of trying OIDC against the
97+
# leased account (which has no OIDC provider).
9598
- uses: aws-actions/configure-aws-credentials@v6
9699
id: lease-creds
97100
with:
98101
role-to-assume: arn:aws:iam::${{ steps.lease.outputs.account_id }}:role/InnovationSandbox-ndx-CIDeployRole
99102
role-session-name: scenario-ci-deploy-${{ github.run_id }}
100103
aws-region: us-east-1
101104
role-duration-seconds: 21600
105+
role-chaining: true
102106

103107
- name: Deploy scenario stack
104108
id: deploy

0 commit comments

Comments
 (0)