my-homelab-configs/bootstrap/sso-grafana
juvenal.diaz efd7da7f4f
Homelab Main / validate (push) Successful in 17s Details
Homelab Main / debian-ops (push) Successful in 3s Details
Homelab Main / running-update (push) Successful in 9s Details
fix: allow Grafana OAuth code grant
2026-09-29 15:27:45 -06:00
..
README.md feat: manage Grafana Authentik SSO 2026-09-29 08:31:00 -06:00
main.tf fix: allow Grafana OAuth code grant 2026-09-29 15:27:45 -06:00
variables.tf feat: manage Grafana Authentik SSO 2026-09-29 08:31:00 -06:00

README.md

Grafana SSO

This OpenTofu stack creates the Authentik OIDC provider/application for Grafana, the grafana-users and grafana-admins access groups, and the Kubernetes Secret consumed by the Grafana Helm chart.

Run it from the Debian homelab server:

./jeannie sso-grafana plan
./jeannie sso-grafana apply

Jeannie reads AUTHENTIK_BOOTSTRAP_TOKEN from the existing SOPS-encrypted Authentik secret. Authentik creates this as an API token for akadmin on its first startup, so the same encrypted bootstrap secret can recreate this stack after an Authentik database destroy/recreate cycle. Add your login account to grafana-users; add it to grafana-admins only if it needs Grafana administrator access.

The OAuth client secret is not committed. It is generated by OpenTofu and written to the monitoring/grafana-authentik-oauth Kubernetes Secret. OpenTofu state contains this secret, so keep the state directory and its backups owner-readable only.