tenant-converge should set/verify Authentik external_url after provisioning #11
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
authentik.nixmodule does not setAUTHENTIK_EXTERNAL_URL, so every tenant's Authentik falls back tohttp://0.0.0.0:9000for redirect URLs. This breaks all forward_auth flows — apps behindenable-forward-authredirect tohttp://0.0.0.0:9000instead ofhttps://auth.<domain>.Fix committed in infra-template (authentik.nix now sets the env var). But
dito tenant-convergeshould ALSO set/verify theexternal_urlin Authentik's system settings during thessoorauthentik-admin-tokenphase, as defense-in-depth.Suggested fix
After provisioning Authentik (authentik-admin-token phase), the converge should:
external_urltohttps://auth.<clientDomain>via the Authentik API orak-shellThis catches the case where the NixOS env var isn't set (e.g., older module versions) or where someone manually cleared it.
Related
Fixed in dit-operator PR #266 (merged). The authentik_admin_token phase now probes, converges, and verifies external_url = https://auth..