Skip to content

Fix forward-auth middleware address for hostNetwork Traefik (#137) - #181

Merged
nickvigilante merged 1 commit into
mainfrom
fix/forward-auth-middleware-dns
Jun 27, 2026
Merged

Fix forward-auth middleware address for hostNetwork Traefik (#137)#181
nickvigilante merged 1 commit into
mainfrom
fix/forward-auth-middleware-dns

Conversation

@nickvigilante

Copy link
Copy Markdown
Owner

Hotfix for the #137 cutover. The gate 500'd because Traefik runs hostNetwork: true and resolves DNS via gandalf's host resolver (Tailscale MagicDNS 100.100.100.100), which returns NXDOMAIN for authentik-server.auth.svc.cluster.local.

Root cause (from Traefik logs): Error calling http://authentik-server.auth.svc.cluster.local/... : lookup ... no such host. Verified with a hostNetwork DNS probe: the cluster name → NXDOMAIN, but authentik.vigihome.net → gandalf.

Fix: point the forwardAuth address at https://authentik.vigihome.net/outpost.goauthentik.io/auth/traefik (resolvable from the host resolver, LE-valid cert) and hairpin back through Traefik to the embedded outpost. In forward_domain mode the outpost selects the app from the forwarded host (trustForwardHeader), so one external address serves every protected host. No Ansible/Traefik-chart change; allowCrossNamespace stays off.

Verification of the live gate (302 / member-load / forged-header) follows after merge + reconcile.

Traefik runs hostNetwork: true, so its forwardAuth client resolves DNS via
gandalf's host resolver (Tailscale MagicDNS), which returns NXDOMAIN for
*.svc.cluster.local -- the in-cluster outpost address 500'd the gate. Point
the middleware at the external authentik.vigihome.net host (resolvable from
the host resolver, LE-valid cert) and hairpin back through Traefik to the
embedded outpost. forward_domain selects the app from the forwarded host, so
one external address serves every protected host.
@nickvigilante
nickvigilante merged commit a648a14 into main Jun 27, 2026
2 checks passed
@nickvigilante
nickvigilante deleted the fix/forward-auth-middleware-dns branch June 27, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant