Skip to content

feat(authn): hide Authentik host — reverse-proxy IdP under app.fuzefront.com - #247

Merged
izzywdev merged 4 commits into
masterfrom
claude/authn-ingress-boundary
Jul 15, 2026
Merged

feat(authn): hide Authentik host — reverse-proxy IdP under app.fuzefront.com#247
izzywdev merged 4 commits into
masterfrom
claude/authn-ingress-boundary

Conversation

@izzywdev

Copy link
Copy Markdown
Owner

Deploy/ingress slice of the AuthN boundary fix (contract PR #243)

Makes Authentik's host invisible to the browser. Deploy/Helm/values only — no app code, UI, or tests.

Changes

  • Removed the public auth.fuzefront.com Ingress (templates/authentik.yaml). Authentik is now ClusterIP-only (authentik-server Service unchanged). Kept the authentik-forwarded-proto middleware and added an authentik-idp-stripprefix middleware (traefik) for the reverse-proxy path.
  • App Ingress reverse-proxy (templates/ingress.yaml): dedicated fuzefront-authentik-idp Ingress routes app.fuzefront.com/api/auth/idp/*authentik-server:9000 (ClusterIP). Separate Ingress so the strip-prefix/forwarded-proto middlewares are scoped to the IdP proxy only. Traefik strips /api/auth/idp (+ X-Forwarded-Prefix); nginx/local uses rewrite-target.
  • Added /api/v1/security routefuzefront-security (the provider-neutral Security API); /api/auth + /api/organizations kept as deprecated shims. Longest-prefix-match keeps /api/auth/idp winning over /api/auth.
  • values-prod.yaml: OIDC issuerUrl moved to https://app.fuzefront.com/api/auth/idp/application/o/fuzefront/; redirectUri unchanged (already app-hosted). authentik.host retained only as an internal/legacy label (no Ingress binds it).

Verified

  • helm lint (prod values): 0 failed.
  • helm template prod + local render clean; no auth.fuzefront.com Ingress rule remains; /api/v1/securityfuzefront-security; /api/auth/idpauthentik-server.
  • kubeconform -strict -ignore-missing-schemas: prod 31 valid / 0 invalid, local 23 valid / 0 invalid (skips = Traefik Middleware CRD, expected).

Coordination / follow-ups (out of this slice)

  • FuzeInfra @claude issue filed to drop the auth.fuzefront.com public CF-tunnel route (link added in comment).
  • Google OAuth source callback (authentik blueprint comment still names auth.fuzefront.com/source/oauth/callback/google/) must be re-pointed to the app-hosted path + the Google console redirect URI updated — backend/blueprint scope.
  • Backend builds authorize URLs against /api/auth/idp/; FuzeSocial re-point is a separate @claude issue post-deploy.

🤖 Generated with Claude Code

fuzeone-bot Bot and others added 3 commits July 14, 2026 13:42
…wares [skip ci]

Co-Authored-By: Claude claude-opus-4-8 <noreply@anthropic.com>
Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7
…pp.fuzefront.com [skip ci]

- app Ingress: /api/auth/idp/* -> authentik-server (ClusterIP); /api/v1/security -> fuzefront-security
- dedicated IdP Ingress with strip-prefix + forwarded-proto middlewares
- values-prod: OIDC issuer now app.fuzefront.com/api/auth/idp/...

Co-Authored-By: Claude claude-opus-4-8 <noreply@anthropic.com>
Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7
Co-Authored-By: Claude claude-opus-4-8 <noreply@anthropic.com>
Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7
@izzywdev izzywdev added the auto-merge Enable squash auto-merge once CI passes label Jul 14, 2026
@github-actions
github-actions Bot enabled auto-merge (squash) July 14, 2026 10:48
@github-actions

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

Credit balance is too low

Report-only — this check never blocks merge.

@github-actions

Copy link
Copy Markdown
Contributor

Automated code review (gate-code-review)

  • deploy/helm/fuzefront/templates/ingress.yaml:191 — nginx branch strips the /api/auth/idp prefix via rewrite-target: /$2 but never sets nginx.ingress.kubernetes.io/x-forwarded-prefix, so (unlike the traefik stripPrefix which sets X-Forwarded-Prefix) Authentik builds its OIDC discovery/issuer URLs at https://app.fuzefront.com/application/o/fuzefront/ without the /api/auth/idp prefix, mismatching the configured issuerUrl and breaking iss validation under nginx (local).

Report-only — this check never blocks merge.

@izzywdev izzywdev removed the hold label Jul 15, 2026
@izzywdev
izzywdev merged commit 2a1f259 into master Jul 15, 2026
48 checks passed
@izzywdev
izzywdev deleted the claude/authn-ingress-boundary branch July 15, 2026 05:41
izzywdev added a commit that referenced this pull request Jul 15, 2026
…C (prod outage) (#256)

#247's reverse-proxy stripped /api/auth/idp and relied on X-Forwarded-Prefix,
but Authentik IGNORES it — so discovery advertised app.fuzefront.com/application/o/authorize/
(no prefix), an unrouted path → the browser authorize redirect 404'd → prod login broke.

Fix: route Authentik's native root paths (/application,/if,/source,/flows,/ws,/-,
/outpost.goauthentik.io,/static/dist,/static/authentik) straight to authentik-server
under app.fuzefront.com (no strip); issuer -> https://app.fuzefront.com/application/o/fuzefront/.
Boundary intact: browser stays on app.fuzefront.com, never sees the IdP host.
Chart-only — deploys via Argo, no image build. helm template renders clean.


Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7

Co-authored-by: fuzeone-bot[bot] <fuzeone-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude claude-opus-4-8 <noreply@anthropic.com>
izzywdev added a commit that referenced this pull request Jul 15, 2026
* fix(authn): route Authentik native paths under app host — restore OIDC (prod outage)

#247's reverse-proxy stripped /api/auth/idp and relied on X-Forwarded-Prefix,
but Authentik IGNORES it — so discovery advertised app.fuzefront.com/application/o/authorize/
(no prefix), an unrouted path → the browser authorize redirect 404'd → prod login broke.

Fix: route Authentik's native root paths (/application,/if,/source,/flows,/ws,/-,
/outpost.goauthentik.io,/static/dist,/static/authentik) straight to authentik-server
under app.fuzefront.com (no strip); issuer -> https://app.fuzefront.com/application/o/fuzefront/.
Boundary intact: browser stays on app.fuzefront.com, never sees the IdP host.
Chart-only — deploys via Argo, no image build. helm template renders clean.

Co-Authored-By: Claude claude-opus-4-8 <noreply@anthropic.com>
Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7

* ci(release): add workflow_dispatch — enable manual image builds

Auto-merged PRs push to master under GITHUB_TOKEN, which GitHub does not let
trigger push-workflows — so release.yml never ran after #247/#253/#256 and the
security-service/frontend images never built. workflow_dispatch gives a reliable
manual build+GitOps-bump path (durable fix: switch auto-merge to a PAT — needs a
RELEASE_PAT secret, tracked separately).

Co-Authored-By: Claude claude-opus-4-8 <noreply@anthropic.com>
Claude-Session-Id: cf830721-b1ef-4fe0-a024-035ad280dcf7

---------

Co-authored-by: fuzeone-bot[bot] <fuzeone-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude claude-opus-4-8 <noreply@anthropic.com>
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