[ML] Pass explicit vault-role for the Backstage-registered backport token policy#3105
Closed
edsavage wants to merge 1 commit into
Closed
[ML] Pass explicit vault-role for the Backstage-registered backport token policy#3105edsavage wants to merge 1 commit into
edsavage wants to merge 1 commit into
Conversation
…oken policy Co-authored-by: Cursor <[email protected]>
|
Pinging @elastic/ml-core (Team:ML) |
Contributor
Author
|
Not needed: #4297 registers the token policy with name token-policy-e51e59ad2806, which is exactly the role fetch-github-token@v1 auto-derives from the workflow ref hash. So the merged backport.yml (no explicit vault-role) already matches. Closing. |
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.
Summary
Follow-up to #3094. The backport workflow's ephemeral-token step needs an explicit
vault-roleto match the Token Policy registered via the Backstage self-service template.elastic/ci-gh-actions/fetch-github-token@v1, when novault-roleis given, derives the Vault role from a SHA-256 hash of the workflow ref:The Token Policy was registered through the blessed Backstage template (
github-token-policy-registration), which names the Vault role after the AppRole name (ml-cpp-backport) →token-policy-ml-cpp-backport, not the hash. So the default lookup (github/token/token-policy-e51e59ad2806) would miss, the fetch would fail, and the workflow would silently fall back togithub-actions[bot]authoring (no auto-approval).This passes the role explicitly, which is exactly the action's documented escape hatch:
Notes
Test plan
token-policy-ml-cpp-backport) is merged inelastic/catalog-info, merge a>bugPR carrying version +auto-backportlabels.elastic-vault-github-plugin-prod[bot](ephemeral fetch succeeded), get CI (via theallowed_list), are approved bygithub-actions[bot], and auto-merge.Made with Cursor