Skip to content

Commit

Permalink
chore: Make hostname configureable in realm
Browse files Browse the repository at this point in the history
  • Loading branch information
clepski committed Sep 17, 2024
1 parent fb844cd commit 5230e48
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
2 changes: 0 additions & 2 deletions compas/docker-compose-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ services:
- KC_HTTP_RELATIVE_PATH=auth
- KC_HTTP_ENABLED=true
- KC_PROXY_HEADERS=xforwarded
volumes:
- ./keycloak/realms:/opt/keycloak/data/import
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/auth/"]
interval: 30s
Expand Down
4 changes: 4 additions & 0 deletions compas/keycloak/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ FROM quay.io/keycloak/keycloak:latest

ARG COMPAS_HOSTNAME

# Copy the demo realm configuration to /opt/keycloak/data/import inside the container, this is the default import path
COPY --chown=keycloak:keycloak keycloak_compas_realm.json /opt/keycloak/data/import/keycloak_compas_realm.json
RUN sed -i "s/##COMPAS_HOSTNAME##/${COMPAS_HOSTNAME}/g" /opt/keycloak/data/import/keycloak_compas_realm.json

# Creating an Admin account
ENV KC_DB_USERNAME admin
ENV KC_DB_PASSWORD admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1248,17 +1248,17 @@
"clientId": "cim-mapping",
"name": "CIM Mapping",
"description": "CIM Mapping Service to convert CIM Data to SCL Data",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down Expand Up @@ -1328,17 +1328,17 @@
{
"id": "ace17366-e696-4821-9f24-89b797acb736",
"clientId": "openscd",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down Expand Up @@ -1447,17 +1447,17 @@
"clientId": "scl-auto-alignment",
"name": "SCL Auto Alignment Service",
"description": "The SCL Auto Alignment Service for calculating XY Coordinates",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down Expand Up @@ -1529,17 +1529,17 @@
"clientId": "scl-data-service",
"name": "SCL Data Service",
"description": "The SCL Data Service for storing / retrieving SCLs",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down Expand Up @@ -1611,17 +1611,17 @@
"clientId": "scl-validator",
"name": "SCL Validator Service",
"description": "The SCL Validator Service to validate SCL Files",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down Expand Up @@ -1693,17 +1693,17 @@
"clientId": "sitipe-service",
"name": "Sitipe Service",
"description": "The Sitipe Service to retrieve Sitipe related data",
"rootUrl": "http://127.0.0.1/",
"adminUrl": "http://127.0.0.1/",
"rootUrl": "http://##COMPAS_HOSTNAME##/",
"adminUrl": "http://##COMPAS_HOSTNAME##/",
"surrogateAuthRequired": false,
"enabled": true,
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"redirectUris": [
"http://127.0.0.1/*"
"http://##COMPAS_HOSTNAME##/*"
],
"webOrigins": [
"http://127.0.0.1"
"http://##COMPAS_HOSTNAME##"
],
"notBefore": 0,
"bearerOnly": false,
Expand Down

0 comments on commit 5230e48

Please sign in to comment.