Skip to content

Commit 9e734f2

Browse files
committed
Updates
1 parent aa5bfff commit 9e734f2

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

services/traefik/docker-compose.yml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

services/traefik/template.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ OPS_TRAEFIK_LOGLEVEL=${OPS_TRAEFIK_LOGLEVEL}
3434

3535
PUBLIC_NETWORK=${PUBLIC_NETWORK}
3636
MONITORED_NETWORK=${MONITORED_NETWORK}
37+
38+
WEBSERVER_HOST=${WEBSERVER_HOST}
39+
WEBSERVER_PORT=${WEBSERVER_PORT}

services/vendors/docker-compose.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff 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

services/vendors/template.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@ VENDOR_MANUAL_IMAGE=${VENDOR_MANUAL_IMAGE}
22
VENDOR_MANUAL_REPLICAS=${VENDOR_MANUAL_REPLICAS}
33
VENDOR_MANUAL_DOMAIN=${VENDOR_MANUAL_DOMAIN}
44
PUBLIC_NETWORK=${PUBLIC_NETWORK}
5-
WEBSERVER_HOST=${WEBSERVER_HOST}
6-
WEBSERVER_PORT=${WEBSERVER_PORT}

0 commit comments

Comments
 (0)