Skip to content

Commit 700cab3

Browse files
Dennis LabordusRob Tjalma
authored andcommitted
Changed port to 80 and made the logout work.
Signed-off-by: Dennis Labordus <[email protected]> Signed-off-by: Rob Tjalma <[email protected]>
1 parent 3d2ee62 commit 700cab3

File tree

5 files changed

+26
-23
lines changed

5 files changed

+26
-23
lines changed

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ When interacting with the SCL Data Service, a JWT token needs to have certain ro
3030
- **A SCL Data Reader**: A user with the role 'Read'. This way, it only has reading access to the SCL Data Service.
3131
- Username: scl-data-reader
3232
- Password: reader
33+
- **A SCD Reader**: A user with the role 'Read' only on the SCD Type.
34+
- Username: scd-reader
35+
- Password: reader
3336

3437
## Docker Compose
3538
There is a pre configured [Docker Compose](docker/docker-compose.yml) file, which starts all the given CoMPAS services.
@@ -42,11 +45,15 @@ To start all configured services, go to the `docker` directory and run the follo
4245
This first command builds 2 containers (keycloak and reverse proxy) and next command starts all CoMPAS services at the same time.
4346
Now, the following services are available:
4447

45-
- open-scd, available at [http://localhost:8080/](http://localhost:8080/). **Not fully working yet, can't communicate with Data Service yet.**
46-
- scl-data-service, available at [http://localhost:8080/compas-scl-data-service](http://localhost:8080/compas-scl-data-service).
48+
- open-scd, available at [http://localhost/](http://localhost/). **Not fully working yet, can't communicate with Data Service yet.**
49+
- scl-data-service, available at [http://localhost/compas-scl-data-service](http://localhost/compas-scl-data-service).
4750
- basex, available at [http://localhost:1984/](http://localhost:1984/)
48-
- Added an extra volume (binding) for saving files in directory docker/basex-data.
49-
- cim-mapping - IEC 61850 mapping, available at [http://localhost:8080/compas-cim-mapping/](http://localhost:8080/compas-cim-mapping/).
50-
- keycloak, available at [http://localhost:8080/auth/](http://localhost:8080/auth/).
51+
- cim-mapping - IEC 61850 mapping, available at [http://localhost/compas-cim-mapping/](http://localhost/compas-cim-mapping/).
52+
- keycloak, available at [http://localhost/auth/](http://localhost/auth/) or direclty if needed [http://localhost:8080/auth/](http://localhost:8080/auth/).
5153
- Imports the demo configuration.
5254
- reverse-proxy, OpenResty instance that works as a reverse proxy so all services are available through a single port.
55+
- The JWT Access Token is added to the header for all Services, like the SCL Data Service.
56+
57+
To stop and remove all the containers run the command:
58+
59+
`docker-compose down`

docker/docker-compose.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,22 @@ services:
1717
keycloak:
1818
build: keycloak
1919
ports:
20-
- "8089:8080"
20+
- "8080:8080"
2121
environment:
22-
- KEYCLOAK_FRONTEND_URL=http://localhost:8080/auth/
22+
- KEYCLOAK_FRONTEND_URL=http://localhost/auth/
2323

2424
scl-data-service:
2525
image: "lfenergycompas/compas-scl-data-service:0.3.0"
26-
ports:
27-
- "9090:8080"
2826
environment:
2927
- BASEX_HOST=basex
3028
- BASEX_PORT=1984
3129
- JWT_VERIFY_KEY=http://keycloak:8080/auth/realms/compas/protocol/openid-connect/certs
32-
- JWT_VERIFY_ISSUER=http://localhost:8080/auth/realms/compas
30+
- JWT_VERIFY_ISSUER=http://localhost/auth/realms/compas
3331
- JWT_VERIFY_CLIENT_ID=scl-data-service
3432
- JWT_GROUPS_PATH=resource_access/scl-data-service/roles
3533
depends_on:
3634
- basex
35+
- keycloak
3736

3837
cim-mapping:
3938
image: "lfenergycompas/compas-cim-mapping:0.1.0"
@@ -47,7 +46,7 @@ services:
4746
reverse-proxy:
4847
build: reverse-proxy
4948
ports:
50-
- "8080:80"
49+
- "80:80"
5150
depends_on:
5251
- keycloak
5352
- scl-data-service

docker/keycloak/keycloak_compas_realm.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -907,14 +907,14 @@
907907
}, {
908908
"id" : "ace17366-e696-4821-9f24-89b797acb736",
909909
"clientId" : "openscd",
910-
"rootUrl" : "http://localhost:8080/",
911-
"adminUrl" : "http://localhost:8080/",
910+
"rootUrl" : "http://localhost/",
911+
"adminUrl" : "http://localhost/",
912912
"surrogateAuthRequired" : false,
913913
"enabled" : true,
914914
"alwaysDisplayInConsole" : false,
915915
"clientAuthenticatorType" : "client-secret",
916-
"redirectUris" : [ "http://localhost:8080/*" ],
917-
"webOrigins" : [ "http://localhost:8080" ],
916+
"redirectUris" : [ "http://localhost/*" ],
917+
"webOrigins" : [ "http://localhost" ],
918918
"notBefore" : 0,
919919
"bearerOnly" : false,
920920
"consentRequired" : false,
@@ -996,14 +996,14 @@
996996
"clientId" : "scl-data-service",
997997
"name" : "SCL Data Service",
998998
"description" : "The SCL Data Service for storing / retrieving SCLs",
999-
"rootUrl" : "http://localhost:9090/",
1000-
"adminUrl" : "http://localhost:9090/",
999+
"rootUrl" : "http://localhost/",
1000+
"adminUrl" : "http://localhost/",
10011001
"surrogateAuthRequired" : false,
10021002
"enabled" : true,
10031003
"alwaysDisplayInConsole" : false,
10041004
"clientAuthenticatorType" : "client-secret",
1005-
"redirectUris" : [ "http://localhost:9090/*" ],
1006-
"webOrigins" : [ "http://localhost:9090" ],
1005+
"redirectUris" : [ "http://localhost/*" ],
1006+
"webOrigins" : [ "http://localhost" ],
10071007
"notBefore" : 0,
10081008
"bearerOnly" : false,
10091009
"consentRequired" : false,

docker/reverse-proxy/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ RUN mkdir /var/log/nginx
88
RUN apk add --no-cache openssl-dev
99
RUN apk add --no-cache git
1010
RUN apk add --no-cache gcc
11-
RUN luarocks install lua-resty-http
12-
RUN luarocks install lua-resty-session
13-
RUN luarocks install lua-resty-jwt
1411
RUN luarocks install lua-resty-openidc
1512

1613
RUN mkdir -p /etc/nginx/include

docker/reverse-proxy/authenticate.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ access_by_lua_block {
55
client_id = "openscd",
66
redirect_uri_scheme = "http",
77
logout_path = "/logout",
8-
redirect_after_logout_uri = "http://keycloak:8080/auth/realms/compas/protocol/openid-connect/logout?redirect_uri=http%3A%2F%2Flocalhost%2F",
8+
redirect_after_logout_uri = "http://localhost/auth/realms/compas/protocol/openid-connect/logout?redirect_uri=http%3A%2F%2Flocalhost%2F",
99
redirect_after_logout_with_id_token_hint = false,
1010
session_contents = {id_token=true, access_token=true},
1111
renew_access_token_on_expiry = true,

0 commit comments

Comments
 (0)