Set up authentik config for traefik

This commit is contained in:
Colin Hebert
2023-01-07 10:18:54 +01:00
parent eacaa06c1c
commit ffd1a60b23
2 changed files with 22 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ services:
target: /etc/traefik/dynamic/tls.yml
- source: traefik_hsts
target: /etc/traefik/dynamic/hsts.yml
- source: traefik_authentik
target: /etc/traefik/dynamic/authentik.yml
secrets:
- traefik_password # TODO: Replace with SSO
- traefik_tls_cert
@@ -104,6 +106,8 @@ configs:
file: ${NASCOMPOSE_SERVICES?}/configs/traefik/dynamic/tls.yml
traefik_hsts:
file: ${NASCOMPOSE_SERVICES?}/configs/traefik/dynamic/hsts.yml
traefik_authentik:
file: ${NASCOMPOSE_SERVICES?}/configs/traefik/dynamic/authentik.yml
secrets:
traefik_password:

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