How to configure a second traefik-forward-auth on the same traefik instance? #30
Reference in New Issue
Block a user
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?
Let's say we have swarm.example.com, running:
id.project.org(Keycloak)secret.project.org(custom-html)id.otherproject.org(Keycloak)secret.otherproject.org(custom-html)We want
secret.project.orgto requireid.project.orglogin, andsecret.otherproject.orgto requireid.otherproject.orglogin.Currently, we can deploy two coop-cloud/traefik-forward-auth instances with different stack names, and configure them to point at the two Keycloak instances.
But! There's no way to tell Traefik about the second instance, because we only have one "slot" for an auth middleware.
One approach could be to duplicate that section, and have e.g.
KEYCLOAK_MIDDLEWARE_2_ENABLEDvariable,keycloak2middleware. This would (I think!) work fine for this specific case, but scaling to supporting a 3rd, 4th etctraefik-forward-authwould be increasingly annoying.Is there any better way to define a variable set of auth middlewares?