fix(ci-lease): role-chaining=true on lease-account assume#395
Merged
Conversation
Council-chatbot proved out the auth chain (acquire works through
Lambda relay). Re-adding the rest of the scenarios so the user's goal
("see a workflow run for each scenario") is achievable in one step.
Path filters scoped to each scenario's own directory plus shared CI
infra. Permissions block included (id-token: write) so the reusable
scenario-ci.yml's OIDC step gets propagated correctly.
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.
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.
Without this, configure-aws-credentials@v6 tries OIDC against the leased pool account (which has no GitHub OIDC provider) and fails.