File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,11 @@ services:
132132 - traefik.http.middlewares.ops_ratelimit.ratelimit.average=${TRAEFIK_RATELIMIT_AVG}
133133 - traefik.http.middlewares.ops_ratelimit.ratelimit.burst=${TRAEFIK_RATELIMIT_BURST}
134134 - traefik.http.middlewares.ops_ratelimit.ratelimit.sourcecriterion.ipstrategy.depth=1
135-
135+ # Platform user auth: Use this middleware to enforce only authenticated users
136+ # https://doc.traefik.io/traefik/middlewares/http/forwardauth
137+ - traefik.http.middlewares.authenticated_platform_user.forwardauth.address=http://${WEBSERVER_HOST}:${WEBSERVER_PORT}/v0/auth:check
138+ - traefik.http.middlewares.authenticated_platform_user.forwardauth.trustForwardHeader=true
139+ - traefik.http.middlewares.authenticated_platform_user.forwardauth.authResponseHeaders=Set-Cookie,osparc-sc2
136140 networks:
137141 public: null
138142 monitored: null
Original file line number Diff line number Diff line change @@ -34,3 +34,6 @@ OPS_TRAEFIK_LOGLEVEL=${OPS_TRAEFIK_LOGLEVEL}
3434
3535PUBLIC_NETWORK = ${ PUBLIC_NETWORK }
3636MONITORED_NETWORK = ${ MONITORED_NETWORK }
37+
38+ WEBSERVER_HOST = ${ WEBSERVER_HOST }
39+ WEBSERVER_PORT = ${ WEBSERVER_PORT }
Original file line number Diff line number Diff line change @@ -10,16 +10,11 @@ services:
1010 labels :
1111 - traefik.enable=true
1212 - traefik.docker.network=${PUBLIC_NETWORK}
13- # auth: https://doc.traefik.io/traefik/middlewares/http/forwardauth
14- - traefik.http.middlewares.vendor_manual_auth.forwardauth.address=http://${WEBSERVER_HOST}:${WEBSERVER_PORT}/v0/auth:check
15- - traefik.http.middlewares.vendor_manual_auth.forwardauth.trustForwardHeader=true
16- - traefik.http.middlewares.vendor_manual_auth.forwardauth.authResponseHeaders=Set-Cookie,osparc-sc2
17- # routing
1813 - traefik.http.services.vendor_manual.loadbalancer.server.port=80
1914 - traefik.http.routers.vendor_manual.entrypoints=https
2015 - traefik.http.routers.vendor_manual.tls=true
2116 - traefik.http.routers.vendor_manual.rule=Host(`${VENDOR_MANUAL_DOMAIN}`)
22- - traefik.http.routers.vendor_manual.middlewares=ops_gzip@swarm, vendor_manual_auth
17+ - traefik.http.routers.vendor_manual.middlewares=ops_gzip@swarm, authenticated_platform_user@swarm
2318 networks :
2419 - public
2520
Original file line number Diff line number Diff line change @@ -2,5 +2,3 @@ VENDOR_MANUAL_IMAGE=${VENDOR_MANUAL_IMAGE}
22VENDOR_MANUAL_REPLICAS = ${ VENDOR_MANUAL_REPLICAS }
33VENDOR_MANUAL_DOMAIN = ${ VENDOR_MANUAL_DOMAIN }
44PUBLIC_NETWORK = ${ PUBLIC_NETWORK }
5- WEBSERVER_HOST = ${ WEBSERVER_HOST }
6- WEBSERVER_PORT = ${ WEBSERVER_PORT }
You can’t perform that action at this time.
0 commit comments