From 17591a1d6686615e0f00027573f6faf01acf4592 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Wed, 17 Jul 2024 17:48:57 -0400 Subject: [PATCH] middleware --- k8s/apps/ingresses/templates/authentik.yaml | 26 +++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/k8s/apps/ingresses/templates/authentik.yaml b/k8s/apps/ingresses/templates/authentik.yaml index 7eaeb5b..7bd7ae8 100644 --- a/k8s/apps/ingresses/templates/authentik.yaml +++ b/k8s/apps/ingresses/templates/authentik.yaml @@ -10,7 +10,7 @@ spec: match: "Host(`authentik.core.home.{{ .Values.global.domain }}`)" middlewares: - name: forwardauth-authentik - namespace: "{{ .Release.Namespace }}" + namespace: chart-authentik priority: 10 services: - kind: Service @@ -28,4 +28,26 @@ spec: tls: secretName: tls-authentik.core.home.{{ .Values.global.domain }} domains: - - main: authentik.core.home.{{ .Values.global.domain }} \ No newline at end of file + - main: authentik.core.home.{{ .Values.global.domain }} +--- +apiVersion: traefik.containo.us/v1alpha1 +kind: Middleware +metadata: + name: forwardauth-authentik + namespace: chart-authentik +spec: + forwardAuth: + address: http://authentik.core.home.{{ .Values.global.domain }}/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 \ No newline at end of file