Authentik Integration.
Private service access with MFA, application roles and recovery.
Problem.
A shared service homepage did not provide shared authentication: applications had separate logins, permissions and client requirements. Protecting the homepage alone would leave direct links outside that gate. I wanted consistent sign-in and explicit access rules without replacing application permissions, breaking machine clients or losing recovery access when the identity service was unavailable.
Implementation.
- 01
Deployed pinned Authentik server, worker and PostgreSQL images with private listeners and separately stored secrets. Integrated split DNS, DNS-validated TLS certificates and private reverse-proxy enforcement. DNS selects the destination; peer checks and application authentication enforce access.
- 02
Built a versioned service catalog with validation, rendering and idempotent API reconciliation for per-application policies, proxy routes and identity providers. Required explicit group bindings, password plus TOTP or passkey authentication, and bounded sessions. Kept membership changes attended and added recurring read-only policy audits to Prometheus.
- 03
Used native OIDC where appropriate, including Grafana, autobrr, Seerr, Proxmox and Home Assistant. Linked existing accounts using immutable identity subjects and preserved their permissions. Verified Grafana Viewer and Admin separately; Proxmox retained the existing scoped privileges rather than receiving blanket administrator access. Seerr used an explicitly reviewed and tested preview build; Home Assistant required a pinned community integration.
- 04
Used Caddy forward authentication for applicable browser interfaces, stripping caller-supplied identity headers and restricting backend bypass paths. Removed redundant application logins only after verifying each integration. Retained application API credentials and local recovery accounts; a proxy login does not automatically supply a native application identity.
- 05
Repaired an OIDC regression after maintenance changed dynamically assigned container addresses. Reserved the approved backchannel addresses, validated them against the catalog and extended audits to test issuer discovery from the actual application containers. Unrelated containers remained denied instead of opening the entire network.
- 06
Removed a redundant proxy gate from Home Assistant when it redirected token and companion-app requests into an interactive login. Tested native OIDC, API and websocket authentication, and a separate read-only dashboard identity. Diagnosed background dashboard failures at proxy-session expiry and bounded the service-specific session setting, accepting the corresponding delay in revocation for an open session.
- 07
Added WZP login and application-dashboard presentation with local fonts, persistent SVG assets and repeatable, guarded presentation changes. Fixed duplicate launcher tiles by invalidating only the affected application-list cache. Extended logical database/configuration backups to include native media and retained independent presentation rollback receipts.
Result.
Deployed shared MFA-backed sign-in and application-specific authorization across the selected private services, with verified native identity mapping, proxy gates and recurring policy evidence. The login and application library received a consistent WZP presentation. Applications still differ in their SSO support, role model and client behavior; this is an integration around Authentik, not a new identity provider or a claim of universal seamless login.
Recorded disposable password/MFA/OIDC and PKCE flows verified expected identities without owner credentials. Tests covered ungranted users, forged headers, backend bypass, invalid callback state, Viewer write denial, scoped hypervisor permissions, Home Assistant API/websocket identity and read-only widget permissions. Temporary identities and grants were removed. Twelve access-catalog tests, policy audits, desktop/mobile/narrow login and dashboard checks, owner-scoped launcher-list checks and validated database/configuration/media snapshots are documented. The complete isolated identity-service restore was not exercised; instant global session revocation and every end-user client are not established.
What I learned.
A successful sign-in is only one acceptance test. A container restart can preserve the web page while breaking OIDC discovery; a proxy can allow a browser while blocking a companion app. Denial tests, stable account mapping and checks from the real client path caught failures that service health checks missed. Session expiry also sets a real tradeoff between uninterrupted use and revocation speed, while local recovery remains essential when the identity service depends on the platform it protects.
Questions about this project?
Email Binh ↗