Fix forward-auth middleware address for hostNetwork Traefik (#137) - #181
Merged
Conversation
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.
This was referenced Jun 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfix for the #137 cutover. The gate 500'd because Traefik runs
hostNetwork: trueand resolves DNS via gandalf's host resolver (Tailscale MagicDNS100.100.100.100), which returns NXDOMAIN forauthentik-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, butauthentik.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. Inforward_domainmode the outpost selects the app from the forwarded host (trustForwardHeader), so one external address serves every protected host. No Ansible/Traefik-chart change;allowCrossNamespacestays off.Verification of the live gate (302 / member-load / forged-header) follows after merge + reconcile.