File tree Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Expand file tree Collapse file tree 3 files changed +33
-5
lines changed Original file line number Diff line number Diff line change @@ -33,10 +33,10 @@ services:
33
33
compas : true
34
34
ports :
35
35
- " 8089:8080"
36
- - " 8080:8080"
36
+ # - "8080:8080"
37
37
environment :
38
- - KC_HOSTNAME=${COMPAS_HOSTNAME}
39
- - KC_HTTP_RELATIVE_PATH=auth
38
+ - KC_HOSTNAME=http:// ${COMPAS_HOSTNAME}
39
+ # - KC_HTTP_RELATIVE_PATH=auth
40
40
- KC_HTTP_ENABLED=true
41
41
- KC_PROXY_HEADERS=xforwarded
42
42
volumes :
Original file line number Diff line number Diff line change 1
1
access_by_lua_block {
2
2
local opts = {
3
3
redirect_uri = "http://##COMPAS_HOSTNAME##/redirect_uri",
4
- discovery = "http://keycloak:8080/auth/ realms/compas/.well-known/openid-configuration",
4
+ discovery = "http://keycloak:8080/realms/compas/.well-known/openid-configuration",
5
5
client_id = "openscd",
6
6
redirect_uri_scheme = "http",
7
7
logout_path = "/logout",
8
- redirect_after_logout_uri = "http://##COMPAS_HOSTNAME##/auth/ realms/compas/protocol/openid-connect/logout?redirect_uri=http%3A%2F%2F##COMPAS_HOSTNAME##%2F",
8
+ redirect_after_logout_uri = "http://##COMPAS_HOSTNAME##/realms/compas/protocol/openid-connect/logout?redirect_uri=http%3A%2F%2F##COMPAS_HOSTNAME##%2F",
9
9
redirect_after_logout_with_id_token_hint = false,
10
10
session_contents = {id_token=true, access_token=true},
11
11
renew_access_token_on_expiry = true,
Original file line number Diff line number Diff line change @@ -63,6 +63,34 @@ http {
63
63
proxy_redirect off;
64
64
}
65
65
66
+ # Forwarding to KeyCloak container 2.
67
+ location /realms/ {
68
+ proxy_set_header X-Real-IP $remote_addr ;
69
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
70
+ proxy_set_header X-Forwarded-Proto $scheme ;
71
+ proxy_set_header X-Forwarded-Port $server_port ;
72
+
73
+ proxy_pass http ://keycloak:8080 /realms/;
74
+
75
+ proxy_set_header Host $http_host ;
76
+ proxy_cache_bypass $http_upgrade ;
77
+ proxy_redirect off;
78
+ }
79
+
80
+ # Forwarding to KeyCloak container resources.
81
+ location /resources/ {
82
+ proxy_set_header X-Real-IP $remote_addr ;
83
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
84
+ proxy_set_header X-Forwarded-Proto $scheme ;
85
+ proxy_set_header X-Forwarded-Port $server_port ;
86
+
87
+ proxy_pass http ://keycloak:8080 /resources/;
88
+
89
+ proxy_set_header Host $http_host ;
90
+ proxy_cache_bypass $http_upgrade ;
91
+ proxy_redirect off;
92
+ }
93
+
66
94
# Forwarding to the SCL Validator Service container (websockets).
67
95
location /compas-scl-data-service/scl-ws/ {
68
96
include /etc/nginx/include /authenticate.include ;
You can’t perform that action at this time.
0 commit comments