Move authentik middleware definition to authentik.yaml traefik dynamic config

This commit is contained in:
Joey Hafner 2022-07-06 15:08:19 -07:00
parent f0e62fe483
commit d3d49d6d2f
2 changed files with 18 additions and 3 deletions

View File

@ -63,9 +63,6 @@ services:
traefik.http.routers.authentik.rule: Host(`authentik.jafner.net`)
traefik.http.routers.authentik.tls.certresolver: lets-encrypt
traefik.http.services.authentik.loadbalancer.server.port: 9000
traefik.http.middlewares.authentik.forwardauth.address: http://authentik:9000/outpost.goauthentik.io/auth/traefik
traefik.http.middlewares.authentik.forwardauth.trustForwardHeader: true
traefik.http.middlewares.authentik.forwardauth.authResponseHeaders: X-authentik-username,X-authentik-groups,X-authentik-email,X-authentik-name,X-authentik-uid,X-authentik-jwt,X-authentik-meta-jwks,X-authentik-meta-outpost,X-authentik-meta-provider,X-authentik-meta-app,X-authentik-meta-version
worker:
image: ${AUTHENTIK_IMAGE:-ghcr.io/goauthentik/server}:${AUTHENTIK_TAG:-2022.1.3}

View File

@ -0,0 +1,18 @@
http:
middlewares:
authentik:
forwardauth:
address: http://authentik:9000/outpost.goauthentik.io/auth/traefik
trustForwardHeader: true
authResponseHeaders:
- X-authentik-username
- X-authentik-groups
- X-authentik-email
- X-authentik-name
- X-authentik-uid
- X-authentik-jwt
- X-authentik-meta-jwks
- X-authentik-meta-outpost
- X-authentik-meta-provider
- X-authentik-meta-app
- X-authentik-meta-version