my-homelab-configs/bootstrap/sso-grafana/README.md

25 lines
971 B
Markdown

# 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:
```bash
./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.