What's the right way to use multi-tenancy with Forward Auth across multiple Kubernetes clusters? #2728
Unanswered
duckfullstop
asked this question in
Q&A
Replies: 1 comment
-
I have a similar scenario with multiple docker hosts and domains (e.g. example.com and example.co.uk). Deployments:
Config:
Docker1/.com works fine and domain level forward auth is working Traefik on Docker1 uses the following rule for access:
Both Traefik middlewares are setup the same way for forward auth with the address being:
Can anyone confirm this concept is possible? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My primary Authentik instance is running on a cloud-based cluster (let's call it
cluster1.org
). This instance provides all the auth services for stuff under thecluster1.org
domain, and has a number of outposts deployed with the local Kubernetes Outpost Integration. This all works absolutely perfectly - the cluster's Træfik instance has a middleware configured to point to the embedded outpost (athttp://ak-outpost-authentik-embedded-outpost.identity.svc.cluster.local:9000/outpost.goauthentik.io/auth/traefik
), and redirection works fine, with end users going toid.cluster1.org
to authenticate and being redirected back to the application (with the appropriate headers being injected to the app via forwardauth).However, I also have an on-premises cluster (let's call it
cluster2.org
). The users ofcluster2
have their own tenancy with custom branding, etcetera. This works absolutely fine when using OAuth / SAML / etcetera.What I can't for the life of me figure out is how to implement forwardauth on
cluster2.org
. I have tried the following:cluster2
, point DNS forid.cluster2.org
atcluster2
, authentik_host set toid.cluster2.org
id.cluster1.org
cluster2
, point DNS forid.cluster2.org
atcluster1
's core / embedded outpost, authentik_host set toid.cluster2.org
cluster2
's proxy application definition, in which case auth works but I get dropped atid.cluster2.org
without a redirectcluster1
What am I missing here? The documentation isn't particularly helpful for this setup - quite happy to write some docs if someone can enlighten me on the right way to do this!
TL;DR: Multiple tenants, multiple K8s clusters, multiple forward-auth proxies. What's the right DNS / ingress / proxy deployment configuration?
Beta Was this translation helpful? Give feedback.
All reactions