Authentik¶
Authentik is the centralized identity provider for the homelab, handling SSO via forward-auth (for arr apps and Homepage) and native OIDC (for Grafana and ArgoCD).
Details¶
| Field | Value |
|---|---|
| Chart | authentik |
| Repository | https://charts.goauthentik.io |
| Version | 2026.2.1 |
| Namespace | auth |
| Sync Wave | 0 |
Architecture¶
Authentik uses two authentication mechanisms depending on the application:
Forward Auth (Domain-Level)¶
Apps that lack native SSO support are protected via Authentik's embedded outpost using forward-auth. When a user visits a protected app, the gateway checks the session with Authentik before allowing access.
User -> Cilium Gateway -> forward-auth -> Authentik outpost
| |
|<-- 200 (authenticated) -|
|-> proxy to backend app
Protected apps: Sonarr, Radarr, Prowlarr, Bazarr, Tdarr, qBittorrent, Homepage
Native OIDC¶
Apps with built-in OAuth2/OIDC support authenticate directly with Authentik as an identity provider.
OIDC apps: Grafana, ArgoCD
Unprotected (with rationale)¶
- Jellyfin -- has its own user auth; media clients (Roku, Apple TV, mobile) can't do browser-based SSO
- Prometheus/Alertmanager -- internal monitoring; forward-auth would break Grafana datasource scraping
Key Configuration¶
- PostgreSQL persistence via
nfs-client(5Gi) - Redis in standalone mode with
nfs-clientpersistence (1Gi) - HTTPRoute at
auth.homelab.localvia thehomelab-gatewaywith TLS viahomelab-ca-issuer - Outpost cookie domain:
.homelab.local(enables cross-subdomain SSO sessions) - Forward-auth uses the embedded outpost's internal service URL (
http://ak-outpost-authentik-embedded-outpost.auth.svc.cluster.local:9000/...)
Secrets¶
| Secret | Namespace | Keys |
|---|---|---|
authentik-credentials |
auth |
secret-key, postgresql-password, bootstrap-password, bootstrap-token |
grafana-oidc-secret |
monitoring |
GRAFANA_OIDC_CLIENT_SECRET |
argocd-secret (merge) |
argocd |
oidc.authentik.clientSecret |
All managed via External Secrets Operator (synced from Vault). See the corresponding *-external-secret.yml manifests for the full key structure.
Post-Deploy Setup¶
Prerequisites: Authentik pods running in auth namespace, auth.homelab.local DNS configured in UniFi gateway, secrets populated in Vault.
- Navigate to
https://auth.homelab.local/if/flow/initial-setup/and set theakadminpassword. - Log in to the admin interface at
https://auth.homelab.local/if/admin/. - Create a Kubernetes Service-Connection in System > Outpost Integrations (name:
local-cluster, leave kubeconfig empty). - Edit the authentik Embedded Outpost -- set integration to
local-cluster. In Advanced settings, setauthentik_hosttohttps://auth.homelab.localandauthentik_host_browsertohttps://auth.homelab.local. - Create a Proxy Provider (Applications > Providers):
- Name:
homelab-forward-auth - Mode: Forward auth (domain level)
- External host:
https://auth.homelab.local - Cookie domain:
homelab.local
- Name:
- Create an Application (name:
Homelab Forward Auth, provider:homelab-forward-auth). - Edit the embedded outpost, add the
Homelab Forward Authapplication. -
Create OAuth2/OpenID Provider for Grafana (client ID:
grafana, redirect URI:https://grafana.homelab.local/login/generic_oauth). Write the client secret to Vault:vault kv put homelab/infrastructure/grafana-oidc \ GRAFANA_OIDC_CLIENT_SECRET=your_client_secret -
Create OAuth2/OpenID Provider for ArgoCD (client ID:
argocd, redirect URI:https://argocd.homelab.local/auth/callback). Write the client secret to Vault:vault kv put homelab/infrastructure/argocd-oidc \ oidc.authentik.clientSecret=your_client_secret -
The built-in
authentik Adminsgroup maps to Grafana Admin and ArgoCDrole:admin. Ensure your user is a member. - Create additional user accounts in Directory > Users as needed.
Backups¶
The auth namespace is included in the Velero daily stateful backup schedule. The weekly full-cluster backup ("*") also covers it.