Grant terraform-authentik write on the kv/service/authentik subtree #140
Reference in New Issue
Block a user
Delete Branch "benvin/tf-authentik-kv-write"
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
kv/service/authentik/agent-api-tokenis seeded by hand today. terraform-authentik should own it as IaC (vault_kv_secret_v2), along with any future Authentik automation tokens, but its runner identities only hold read onkv/service/terraform/authentikand the per-namespace oauth-credentials paths.This must land and apply first: an AppRole/k8s token's capabilities are fixed at login, so the companion terraform-authentik PR would fail its very first plan against a policy that is not yet live.
How
policies/kv/service/authentik/write.yaml, granting:kv/data/service/authentik/*— create, read, update, deletekv/metadata/service/authentik/*— read, list, deleteterraform_authentikandk8s/au/syd1rolewoodpecker_terraform_authentik.deleteis included (unlike thekv/kubernetesagents grant) soterraform destroyand resource replacement clean up both the data and the metadata; metadataread/listis whatvault_kv_secret_v2hits on every plan.*-tokenpaths, but Vault ACL paths only support a trailing glob, so the wholekv/service/authentik/subtree is granted. terraform-authentik is the owner of everything under that prefix.policies/kv/service/authentik/agent-api-token/read.yaml(agents approle) is untouched.Order
Merge + apply this first; the companion terraform-authentik PR merges only afterwards.