chore(deploy): fetch INFRA_PR_TOKEN from Vault via vault-pull-secrets - #101
Merged
Conversation
Match the pattern in the Gaucho-Racing/Vault deploy workflow: use Gaucho-Racing/vault-pull-secrets@v1 with GitHub OIDC to fetch the infra PR token at runtime from the `infrastructure.pr_token` app-secret in Vault, instead of storing it as a long-lived repo secret. Advantages: - One less place a token has to live (single source of truth in Vault) - Rotate the token via Vault UI without touching every consuming repo - Ephemeral: token only exists in the workflow's runtime process, not in GitHub's secret store The workflow's `id-token: write` permission is what lets vault-pull-secrets exchange the GitHub OIDC token for a Vault-issued auth. The Vault-side kubernetes/OIDC rule that already permits this pattern from the vault repo's deploy workflow needs to also permit the sentinel repo — if not already covered by a wildcard rule, the sentinel workflow will fail on the vault fetch step until a rule is added.
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.
Follow-up to #100. Matches the pattern in Gaucho-Racing/Vault's deploy workflow: fetch the infra PR token from Vault at runtime using GitHub OIDC via `Gaucho-Racing/vault-pull-secrets@v1`, instead of a long-lived `INFRA_PR_TOKEN` repo secret.
Changes
Prereq
The Vault-side kubernetes/OIDC rule that already permits the vault repo's deploy workflow to fetch this secret must also cover the sentinel repo. If it's scoped to a specific repo/actor, extend to include Gaucho-Racing/Sentinel. If it's a wildcard, no change needed.
If the workflow fails on the `Pull secrets` step after merge, that's the fix — grant sentinel's actor access to the `infrastructure.pr_token` selector in Vault.
After merge