Skip to content

Commit 713c48a

Browse files
author
Dennis Labordus
committed
Added SCL Auto Alignment Service and updated existing backend.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent a51bba9 commit 713c48a

File tree

3 files changed

+68
-4
lines changed

3 files changed

+68
-4
lines changed

compas/docker-compose-basex.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ services:
3939
scl-data-service:
4040
labels:
4141
compas: true
42-
image: "lfenergy/compas-scl-data-service:0.9.0-basex"
42+
image: "lfenergy/compas-scl-data-service:0.9.1-basex"
4343
environment:
4444
- BASEX_HOST=basex
4545
- BASEX_PORT=1984
@@ -67,7 +67,7 @@ services:
6767
cim-mapping:
6868
labels:
6969
compas: true
70-
image: "lfenergy/compas-cim-mapping:0.7.6"
70+
image: "lfenergy/compas-cim-mapping:0.7.7"
7171
environment:
7272
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
7373
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
@@ -86,6 +86,28 @@ services:
8686
depends_on:
8787
- keycloak
8888

89+
scl-auto-alignment:
90+
labels:
91+
compas: true
92+
image: "lfenergy/compas-scl-auto-alignment:0.0.2"
93+
environment:
94+
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
95+
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
96+
- JWT_VERIFY_CLIENT_ID=scl-auto-alignment
97+
- JWT_GROUPS_PATH=resource_access/scl-auto-alignment/roles
98+
- USERINFO_WHO_CLAIMNAME=name
99+
deploy:
100+
restart_policy:
101+
condition: on-failure
102+
max_attempts: 3
103+
healthcheck:
104+
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-auto-alignment/q/health/ready"]
105+
interval: 15s
106+
timeout: 10s
107+
retries: 5
108+
depends_on:
109+
- keycloak
110+
89111
open-scd:
90112
labels:
91113
compas: true

compas/docker-compose-postgresql.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ services:
4646
scl-data-service:
4747
labels:
4848
compas: true
49-
image: "lfenergy/compas-scl-data-service:0.9.0-postgresql"
49+
image: "lfenergy/compas-scl-data-service:0.9.1-postgresql"
5050
environment:
5151
- POSTGRESQL_HOST=postgresql
5252
- POSTGRESQL_DB=compas
@@ -74,7 +74,7 @@ services:
7474
cim-mapping:
7575
labels:
7676
compas: true
77-
image: "lfenergy/compas-cim-mapping:0.7.6"
77+
image: "lfenergy/compas-cim-mapping:0.7.7"
7878
environment:
7979
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
8080
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
@@ -93,6 +93,28 @@ services:
9393
depends_on:
9494
- keycloak
9595

96+
scl-auto-alignment:
97+
labels:
98+
compas: true
99+
image: "lfenergy/compas-scl-auto-alignment:0.0.2"
100+
environment:
101+
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
102+
- JWT_VERIFY_ISSUER=http://${COMPAS_HOSTNAME}/auth/realms/compas
103+
- JWT_VERIFY_CLIENT_ID=scl-auto-alignment
104+
- JWT_GROUPS_PATH=resource_access/scl-auto-alignment/roles
105+
- USERINFO_WHO_CLAIMNAME=name
106+
deploy:
107+
restart_policy:
108+
condition: on-failure
109+
max_attempts: 3
110+
healthcheck:
111+
test: ["CMD", "curl", "-f", "http://localhost:8080/compas-scl-auto-alignment/q/health/ready"]
112+
interval: 15s
113+
timeout: 10s
114+
retries: 5
115+
depends_on:
116+
- keycloak
117+
96118
open-scd:
97119
labels:
98120
compas: true

compas/reverse-proxy/nginx.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,26 @@ http {
106106
proxy_redirect off;
107107
}
108108

109+
# Forwarding to the SCL Auto Alignment Service container.
110+
location /compas-scl-auto-alignment/ {
111+
include /etc/nginx/include/authenticate.include;
112+
113+
proxy_set_header X-Real-IP $remote_addr;
114+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
115+
proxy_set_header X-Forwarded-Proto $scheme;
116+
proxy_set_header X-Forwarded-Port $server_port;
117+
proxy_set_header Authorization "Bearer ${access_token}";
118+
119+
# Added Header back to browser to get JWT Content for Debugging, should not do this in production.
120+
add_header X-Debug-Bearer "Bearer ${access_token}" always;
121+
122+
proxy_pass http://scl-auto-alignment:8080/compas-scl-auto-alignment/;
123+
124+
proxy_set_header Host $http_host;
125+
proxy_cache_bypass $http_upgrade;
126+
proxy_redirect off;
127+
}
128+
109129
# redirect server error pages to the static page /40x.html
110130
error_page 404 /404.html;
111131
location = /40x.html {

0 commit comments

Comments
 (0)