From ac594775c659b0f4030ca153d608e5a75812a374 Mon Sep 17 00:00:00 2001 From: "juvenal.diaz" Date: Tue, 29 Sep 2026 08:26:31 -0600 Subject: [PATCH] feat: manage Grafana Authentik SSO --- lib/jeannie/pipeline.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/jeannie/pipeline.sh b/lib/jeannie/pipeline.sh index 6b9eebc..7a12dce 100644 --- a/lib/jeannie/pipeline.sh +++ b/lib/jeannie/pipeline.sh @@ -576,14 +576,21 @@ grafana_sso() { local action="${1:-plan}" local stack="bootstrap/sso-grafana" local bootstrap_token + local authentik_url="${LAB_AUTHENTIK_PUBLIC_URL:-}" require_debian_server "sso-grafana" + if [[ "${authentik_url}" != https://* ]]; then + echo "LAB_AUTHENTIK_PUBLIC_URL must be an HTTPS URL in homelab.yml." >&2 + return 1 + fi + # Authentik creates this API token for akadmin on its first startup. Using # the SOPS-encrypted bootstrap value makes the identity stack reproducible # after an Authentik database destroy/recreate cycle. bootstrap_token="$(authentik_bootstrap_api_token)" || return 1 export TF_VAR_authentik_token="${bootstrap_token}" + export TF_VAR_authentik_url="${authentik_url}" case "${action}" in plan)