policies: let terraform-authentik read oauth client secrets from kv #81

Merged
benvin merged 1 commits from benvin/authentik-oauth-kv into master 2026-07-06 23:05:21 +10:00
Owner

Why

terraform-authentik now reads OAuth2 client secrets from Vault (data.vault_kv_secret_v2) rather than committing them (terraform-authentik #2). But the terraform_authentik approle / woodpecker_terraform_authentik k8s role only had the consul-creds policy, so plan fails with permission denied on the grafana oauth path.

Change

Add policies/kv/service/terraform/authentik.yaml granting read on kv/data/kubernetes/namespace/+/default/oauth-credentials for both the approle and the woodpecker k8s role.

## Why terraform-authentik now reads OAuth2 client secrets from Vault (`data.vault_kv_secret_v2`) rather than committing them (terraform-authentik #2). But the `terraform_authentik` approle / `woodpecker_terraform_authentik` k8s role only had the consul-creds policy, so `plan` fails with permission denied on the grafana oauth path. ## Change Add `policies/kv/service/terraform/authentik.yaml` granting read on `kv/data/kubernetes/namespace/+/default/oauth-credentials` for both the approle and the woodpecker k8s role.
unkinben added 1 commit 2026-07-06 22:20:42 +10:00
policies: let terraform-authentik read oauth client secrets from kv
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
e01deb13d6
The terraform-authentik module now reads OAuth2 client secrets from Vault
(data.vault_kv_secret_v2) instead of committing them, but the
terraform_authentik approle / woodpecker_terraform_authentik k8s role only
had the consul creds policy, so plan failed with permission denied.

Grant read on kv/data/kubernetes/namespace/+/default/oauth-credentials so
the runner can read the client secret for any namespace's OIDC provider
(e.g. grafana).
benvin merged commit f2c54888de into master 2026-07-06 23:05:21 +10:00
benvin deleted branch benvin/authentik-oauth-kv 2026-07-06 23:05:21 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/terraform-vault#81