providers/proxy: include auth headers

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-20 21:37:22 +01:00
parent 621773c1ea
commit 577b7ee515
4 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ class TraefikMiddlewareReconciler(KubernetesObjectReconciler[TraefikMiddleware])
forwardAuth=TraefikMiddlewareSpecForwardAuth( forwardAuth=TraefikMiddlewareSpecForwardAuth(
address=f"http://{self.name}.{self.namespace}:9000/akprox/auth/traefik", address=f"http://{self.name}.{self.namespace}:9000/akprox/auth/traefik",
authResponseHeaders=[], authResponseHeaders=[],
authResponseHeadersRegex="^(Remote|X).*$", authResponseHeadersRegex="^(Auth|Remote|X).*$",
trustForwardHeader=True, trustForwardHeader=True,
) )
), ),

View File

@ -34,7 +34,7 @@ services:
# `authentik-proxy` refers to the service name in the compose file. # `authentik-proxy` refers to the service name in the compose file.
traefik.http.middlewares.authentik.forwardauth.address: http://authentik-proxy:9000/akprox/auth/traefik traefik.http.middlewares.authentik.forwardauth.address: http://authentik-proxy:9000/akprox/auth/traefik
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true
traefik.http.middlewares.authentik.forwardauth.authResponseHeadersRegex: ^(Remote|X).*$$ traefik.http.middlewares.authentik.forwardauth.authResponseHeadersRegex: ^(Auth|Remote|X).*$$
restart: unless-stopped restart: unless-stopped
whoami: whoami:

View File

@ -9,7 +9,7 @@ spec:
forwardAuth: forwardAuth:
address: http://outpost.company:9000/akprox/auth/traefik address: http://outpost.company:9000/akprox/auth/traefik
trustForwardHeader: true trustForwardHeader: true
authResponseHeadersRegex: ^(Remote|X).*$ authResponseHeadersRegex: ^(Auth|Remote|X).*$
``` ```
Add the following settings to your IngressRoute Add the following settings to your IngressRoute

View File

@ -5,7 +5,7 @@ http:
forwardAuth: forwardAuth:
address: http://outpost.company:9000/akprox/auth/traefik address: http://outpost.company:9000/akprox/auth/traefik
trustForwardHeader: true trustForwardHeader: true
authResponseHeadersRegex: ^(Remote|X).*$ authResponseHeadersRegex: ^(Auth|Remote|X).*$
routers: routers:
default-router: default-router:
rule: "Host(`app.company`)" rule: "Host(`app.company`)"