Grant terraform-rancher read on rancher/creds/ci #143
Reference in New Issue
Block a user
Delete Branch "benvin/rancher-creds-ci-policy"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
terraform-rancherauthenticates the rancher2 provider with a static 90-day admin API token stored inkv/service/terraform/rancher— the repo carries its own Makefile TODO to retire it. The Rancher secrets engine is already mounted atrancher/with acirole (seededadminservice account, ttl 1h / max 8h), but no policy grants read onrancher/creds/*, so nothing can use it yet.What
Adds
policies/rancher/creds/ci.yaml:readonrancher/creds/ci, bound to the same runner identities as the existing kv policy — approleterraform_rancherand k8s/au/syd1 rolewoodpecker_terraform_rancher.Minted tokens are lease-bound and deleted from Rancher on revoke. They inherit the seeded admin service account's RBAC, so this is the same privilege as the static token it replaces, just short-lived.
Follow-up
A terraform-rancher Makefile PR swapping
vault kv get kv/service/terraform/rancherforvault read -field=token rancher/creds/cimust merge only after this one applies.