Manually define forward auth middleware

This commit is contained in:
2024-12-26 20:21:41 +01:00
parent 95aab7608f
commit 5a62bce5af
3 changed files with 17 additions and 9 deletions

View File

@@ -0,0 +1,15 @@
# /apps/prod/authelia/forward-auth-middleware.yaml
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: authelia
namespace: auth
spec:
forwardAuth:
address: 'http://authelia.auth.svc.cluster.local/api/authz/forward-auth?authelia_url=https%3A%2F%2Fauth.example.com'
trustForwardHeader: true
authResponseHeaders:
- "Remote-User"
- "Remote-Groups"
- "Remote-Email"
- "Remote-Name"

View File

@@ -5,8 +5,9 @@ namespace: auth
resources:
- ../../base/authelia
- release.yaml
- users-database.enc.yaml
- release.yaml
- forward-auth-middleware.yaml
configMapGenerator:
- name: authelia-prod-values

View File

@@ -51,14 +51,6 @@ ingress:
ingressClassName: "traefik"
traefikCRD:
enabled: true
middlewares:
auth:
nameOverride: "authelia"
authResponseHeaders:
- "Remote-User"
- "Remote-Groups"
- "Remote-Email"
- "Remote-Name"
matchOverride: Host(`auth.example.com`)
entryPoints:
- "websecure"