feat: add validated Traefik ForwardAuth alternative

This commit is contained in:
donghyeon-ka
2026-07-25 16:50:52 +09:00
parent 7c72abdfed
commit 4f93a5c92a
4 changed files with 99 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
http:
routers:
oauth:
entryPoints:
- web
rule: PathPrefix(`/oauth2/`)
service: oauth2-proxy
priority: 100
application:
entryPoints:
- web
rule: PathPrefix(`/`)
middlewares:
- keycloak-forward-auth
service: application
middlewares:
keycloak-forward-auth:
forwardAuth:
address: http://oauth2-proxy:4180/oauth2/auth
trustForwardHeader: false
authResponseHeaders:
- X-Auth-Request-User
- X-Auth-Request-Email
- Set-Cookie
services:
oauth2-proxy:
loadBalancer:
servers:
- url: http://oauth2-proxy:4180
application:
loadBalancer:
servers:
- url: http://app:8081