Repository: OAEBUDT/oaebudt-dataspace
Pull request #58: 56 dockerize the api authentication extension
Author: login: mohamedkhalilbeldi
Created: 2025-03-17T07:42:50Z | Merged: 2025-03-18T12:31:41Z

## Description

Add Keycloak to dependencies in Docker Compose for the IDE environment and Docker Stack environment. Make the necessary changes to build the new extension api-auth within the connector and to run the full stack within Docker Compose.


Diff:
diff --git a/connector/deployment/docker/docker-compose.yml b/connector/deployment/docker/docker-compose.yml
index cb4bc7a6..90dbb93a 100644
--- a/connector/deployment/docker/docker-compose.yml
+++ b/connector/deployment/docker/docker-compose.yml
@@ -49,13 +49,14 @@ services:
     image: postgres:17.4
     container_name: participant-a-db
     environment:
-      POSTGRES_DB: participant_a
-      POSTGRES_USER: participant_a
-      POSTGRES_PASSWORD: participant_a
+      POSTGRES_DB: connector_a
+      POSTGRES_USER: connector_a
+      POSTGRES_PASSWORD: connector_a
     ports:
       - "5432:5432"
     volumes:
       - participant-a-db-data:/var/lib/postgresql/data
+      - ./init/participant-a-init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
     restart: unless-stopped
     networks:
       - oaebudt-mvd
@@ -65,13 +66,14 @@ services:
     image: postgres:17.4
     container_name: participant-b-db
     environment:
-      POSTGRES_DB: participant_b
-      POSTGRES_USER: participant_b
-      POSTGRES_PASSWORD: participant_b
+      POSTGRES_DB: connector_b
+      POSTGRES_USER: connector_b
+      POSTGRES_PASSWORD: connector_b
     ports:
       - "6432:5432"
     volumes:
       - participant-b-db-data:/var/lib/postgresql/data
+      - ./init/participant-b-init-db.sql:/docker-entrypoint-initdb.d/init-db.sql
     restart: unless-stopped
     networks:
       - oaebudt-mvd
@@ -116,6 +118,50 @@ services:
       - -c
       - 'apk add --no-cache openssl && vault server -dev & sleep 5 && sh /seed-vault.sh participant-b && tail -f /dev/null'
 
+  # Keycloak instance for participant A
+  participant-a-auth-api:
+    image: quay.io/keycloak/keycloak:26.1.4
+    container_name: participant-a-auth-api
+    environment:
+      KC_BOOTSTRAP_ADMIN_USERNAME: participant_a
+      KC_BOOTSTRAP_ADMIN_PASSWORD: participant_a
+      KC_DB: postgres
+      KC_DB_URL: jdbc:postgresql://participant-a-db/keycloak_a
+      KC_DB_USERNAME: keycloak_a
+      KC_DB_PASSWORD: keycloak_a
+    ports:
+      - "6060:8080"
+    volumes:
+      - ./init/participant-a-keycloak-realm.json:/opt/keycloak/data/import/realm-config.json
+    restart: unless-stopped
+    depends_on:
+      - participant-a-db
+    networks:
+      - oaebudt-mvd
+    command: ["start-dev", "--import-realm"]
+
+  # Keycloak instance for participant B
+  participant-b-auth-api:
+    image: quay.io/keycloak/keycloak:26.1.4
+    container_name: participant-b-auth-api
+    environment:
+      KC_BOOTSTRAP_ADMIN_USERNAME: participant_b
+      KC_BOOTSTRAP_ADMIN_PASSWORD: participant_b
+      KC_DB: postgres
+      KC_DB_URL: jdbc:postgresql://participant-b-db/keycloak_b
+      KC_DB_USERNAME: keycloak_b
+      KC_DB_PASSWORD: keycloak_b
+    ports:
+      - "7070:8080"
+    volumes:
+      - ./init/participant-b-keycloak-realm.json:/opt/keycloak/data/import/realm-config.json
+    restart: unless-stopped
+    depends_on:
+      - participant-b-db
+    networks:
+      - oaebudt-mvd
+    command: ["start-dev", "--import-realm"]
+
 volumes:
   participant-a-db-data:
   participant-b-db-data:
diff --git a/connector/deployment/docker/env/participant-a-connector.env b/connector/deployment/docker/env/participant-a-connector.env
index be71b25d..d50d64ea 100644
--- a/connector/deployment/docker/env/participant-a-connector.env
+++ b/connector/deployment/docker/env/participant-a-connector.env
@@ -32,7 +32,10 @@ WEB_HTTP_PUBLIC_PATH="/api/public"
 # persistence data config
 EDC_VAULT_HASHICORP_URL="http://participant-a-vault:8200"
 EDC_VAULT_HASHICORP_TOKEN="participant_a"
-EDC_DATASOURCE_DEFAULT_URL="jdbc:postgresql://participant-a-db:5432/participant_a"
-EDC_DATASOURCE_DEFAULT_USER="participant_a"
-EDC_DATASOURCE_DEFAULT_PASSWORD="participant_a"
+EDC_DATASOURCE_DEFAULT_URL="jdbc:postgresql://participant-a-db:5432/connector_a"
+EDC_DATASOURCE_DEFAULT_USER="connector_a"
+EDC_DATASOURCE_DEFAULT_PASSWORD="connector_a"
 EDC_SQL_SCHEMA_AUTOCREATE=true
+
+# keycloak config
+WEB_HTTP_AUTH_JWK_URL="http://participant-a-auth-api:8080/realms/participant-a-realm/protocol/openid-connect/certs"
diff --git a/connector/deployment/docker/env/participant-b-connector.env b/connector/deployment/docker/env/participant-b-connector.env
index 4734b806..2e1b6e79 100644
--- a/connector/deployment/docker/env/participant-b-connector.env
+++ b/connector/deployment/docker/env/participant-b-connector.env
@@ -33,7 +33,11 @@ WEB_HTTP_PUBLIC_PATH="/api/public"
 EDC_VAULT_HASHICORP_URL="http://participant-b-vault:8200"
 EDC_VAULT_HASHICORP_TOKEN="participant_b"
 EDC_VAULT_HASHICORP_API_SECRET_PATH="/v1/secret"
-EDC_DATASOURCE_DEFAULT_URL="jdbc:postgresql://participant-b-db:5432/participant_b"
-EDC_DATASOURCE_DEFAULT_USER="participant_b"
-EDC_DATASOURCE_DEFAULT_PASSWORD="participant_b"
+EDC_DATASOURCE_DEFAULT_URL="jdbc:postgresql://participant-b-db:5432/connector_b"
+EDC_DATASOURCE_DEFAULT_USER="connector_b"
+EDC_DATASOURCE_DEFAULT_PASSWORD="connector_b"
 EDC_SQL_SCHEMA_AUTOCREATE=true
+
+
+# keycloak config
+WEB_HTTP_AUTH_JWK_URL="http://participant-b-auth-api:8080/realms/participant-b-realm/protocol/openid-connect/certs"
diff --git a/connector/deployment/docker/init/participant-a-init-db.sql b/connector/deployment/docker/init/participant-a-init-db.sql
new file mode 100644
index 00000000..db78df56
--- /dev/null
+++ b/connector/deployment/docker/init/participant-a-init-db.sql
@@ -0,0 +1,3 @@
+CREATE USER keycloak_a WITH PASSWORD 'keycloak_a';
+CREATE DATABASE keycloak_a OWNER keycloak_a;
+GRANT ALL PRIVILEGES ON DATABASE keycloak_a TO keycloak_a;
diff --git a/connector/deployment/docker/init/participant-a-keycloak-realm.json b/connector/deployment/docker/init/participant-a-keycloak-realm.json
new file mode 100644
index 00000000..d9d1140a
--- /dev/null
+++ b/connector/deployment/docker/init/participant-a-keycloak-realm.json
@@ -0,0 +1,37 @@
+{
+  "realm": "participant-a-realm",
+  "enabled": true,
+  "accessTokenLifespan": 1500,
+  "users": [
+    {
+      "username": "participant-a",
+      "email": "participant-a@participant-a",
+      "emailVerified": false,
+      "firstName": "participant-a",
+      "lastName": "participant-a",
+      "enabled": true,
+      "credentials": [
+        {
+          "type": "password",
+          "value": "participant-a",
+          "temporary": false
+        }
+      ],
+      "realmRoles": ["user"]
+    }
+  ],
+  "clients": [
+    {
+      "clientId": "participant-a-connector",
+      "enabled": true,
+      "protocol": "openid-connect",
+      "redirectUris": ["http://participant-a-connector:8290/*"],
+      "webOrigins": ["http://participant-a-connector:8290"],
+      "standardFlowEnabled": true,
+      "directAccessGrantsEnabled": true,
+      "serviceAccountsEnabled": true,
+      "clientAuthenticatorType": "client-secret",
+      "secret": "Ii8ya1wMHAzZQOPvVfTTlsIWauc8NFCb"
+    }
+  ]
+}
diff --git a/connector/deployment/docker/init/participant-b-init-db.sql b/connector/deployment/docker/init/participant-b-init-db.sql
new file mode 100644
index 00000000..35165f42
--- /dev/null
+++ b/connector/deployment/docker/init/participant-b-init-db.sql
@@ -0,0 +1,3 @@
+CREATE USER keycloak_b WITH PASSWORD 'keycloak_b';
+CREATE DATABASE keycloak_b OWNER keycloak_b;
+GRANT ALL PRIVILEGES ON DATABASE keycloak_b TO keycloak_b;
diff --git a/connector/deployment/docker/init/participant-b-keycloak-realm.json b/connector/deployment/docker/init/participant-b-keycloak-realm.json
new file mode 100644
index 00000000..5daeb96f
--- /dev/null
+++ b/connector/deployment/docker/init/participant-b-keycloak-realm.json
@@ -0,0 +1,37 @@
+{
+  "realm": "participant-b-realm",
+  "enabled": true,
+  "accessTokenLifespan": 1500,
+  "users": [
+    {
+      "username": "participant-b",
+      "email": "participant-b@participant-b",
+      "emailVerified": false,
+      "firstName": "participant-b",
+      "lastName": "participant-b",
+      "enabled": true,
+      "credentials": [
+        {
+          "type": "password",
+          "value": "participant-b",
+          "temporary": false
+        }
+      ],
+      "realmRoles": ["user"]
+    }
+  ],
+  "clients": [
+    {
+      "clientId": "participant-b-connector",
+      "enabled": true,
+      "protocol": "openid-connect",
+      "redirectUris": ["http://participant-b-connector:9290/*"],
+      "webOrigins": ["http://participant-b-connector:9290"],
+      "standardFlowEnabled": true,
+      "directAccessGrantsEnabled": true,
+      "serviceAccountsEnabled": true,
+      "clientAuthenticatorType": "client-secret",
+      "secret": "bKE6qbAz8Eugwvloklc03yikLDXHO2Qs"
+    }
+  ]
+}
diff --git a/connector/deployment/ide/dependencies/docker-compose.yml b/connector/deployment/ide/dependencies/docker-compose.yml
index baceda74..1ad561cb 100644
--- a/connector/deployment/ide/dependencies/docker-compose.yml
+++ b/connector/deployment/ide/dependencies/docker-compose.yml
@@ -3,7 +3,7 @@ services:
   # PostgreSQL instance for participant A
   participants-db:
     image: postgres:17.4
-    container_name: participant-a-db
+    container_name: participants-db
     environment:
       POSTGRES_DB: participant_a
       POSTGRES_USER: participant_a
@@ -39,6 +39,28 @@ services:
       - -c
       - 'apk add --no-cache openssl && vault server -dev & sleep 5 && sh /seed-vault.sh && tail -f /dev/null'
 
+  # Keycloak instance for participant A and B
+  participants-auth-api:
+    image: quay.io/keycloak/keycloak:26.1.4
+    container_name: participants-auth-api
+    environment:
+      KC_BOOTSTRAP_ADMIN_USERNAME: participant_a_b
+      KC_BOOTSTRAP_ADMIN_PASSWORD: participant_a_b
+      KC_DB: postgres
+      KC_DB_URL: jdbc:postgresql://participants-db/keycloak
+      KC_DB_USERNAME: keycloak
+      KC_DB_PASSWORD: keycloak
+    ports:
+      - "8080:8080"
+    volumes:
+      - ./init/keycloak-realm.json:/opt/keycloak/data/import/realm-config.json
+    restart: unless-stopped
+    depends_on:
+      - participants-db
+    networks:
+      - oaebudt-mvd
+    command: ["start-dev", "--import-realm"]
+
 volumes:
   participants-db-data:
   participants-vault-data:
diff --git a/connector/deployment/ide/dependencies/init/init-db.sql b/connector/deployment/ide/dependencies/init/init-db.sql
index 6ba0d203..707b8606 100644
--- a/connector/deployment/ide/dependencies/init/init-db.sql
+++ b/connector/deployment/ide/dependencies/init/init-db.sql
@@ -1,3 +1,7 @@
 CREATE USER participant_b WITH PASSWORD 'participant_b';
 CREATE DATABASE participant_b OWNER participant_b;
 GRANT ALL PRIVILEGES ON DATABASE participant_b TO participant_b;
+
+CREATE USER keycloak WITH PASSWORD 'keycloak';
+CREATE DATABASE keycloak OWNER keycloak;
+GRANT ALL PRIVILEGES ON DATABASE keycloak TO keycloak;
diff --git a/connector/deployment/ide/dependencies/init/keycloak-realm.json b/connector/deployment/ide/dependencies/init/keycloak-realm.json
new file mode 100644
index 00000000..22630bd3
--- /dev/null
+++ b/connector/deployment/ide/dependencies/init/keycloak-realm.json
@@ -0,0 +1,76 @@
+[
+  {
+  "realm": "participant-a-realm",
+  "enabled": true,
+  "accessTokenLifespan": 1500,
+  "users": [
+    {
+      "username": "participant-a",
+      "email": "participant-a@localhost",
+      "emailVerified": false,
+      "firstName": "participant-a",
+      "lastName": "participant-a",
+      "enabled": true,
+      "credentials": [
+        {
+          "type": "password",
+          "value": "participant-a",
+          "temporary": false
+        }
+      ],
+      "realmRoles": ["user"]
+    }
+  ],
+  "clients": [
+    {
+      "clientId": "participant-a-connector",
+      "enabled": true,
+      "protocol": "openid-connect",
+      "redirectUris": ["http://localhost:8290/*"],
+      "webOrigins": ["http://localhost:8290"],
+      "standardFlowEnabled": true,
+      "directAccessGrantsEnabled": true,
+      "serviceAccountsEnabled": true,
+      "clientAuthenticatorType": "client-secret",
+      "secret": "Ii8ya1wMHAzZQOPvVfTTlsIWauc8NFCb"
+    }
+  ]
+},
+  {
+    "realm": "participant-b-realm",
+    "enabled": true,
+    "accessTokenLifespan": 1500,
+    "users": [
+      {
+        "username": "participant-b",
+        "enabled": true,
+        "email": "participant-b@localhost",
+        "emailVerified": false,
+        "firstName": "participant-b",
+        "lastName": "participant-b",
+        "credentials": [
+          {
+            "type": "password",
+            "value": "participant-b",
+            "temporary": false
+          }
+        ],
+        "realmRoles": ["user"]
+      }
+    ],
+    "clients": [
+      {
+        "clientId": "participant-b-connector",
+        "enabled": true,
+        "protocol": "openid-connect",
+        "redirectUris": ["http://localhost:9290/*"],
+        "webOrigins": ["http://localhost:9290"],
+        "standardFlowEnabled": true,
+        "directAccessGrantsEnabled": true,
+        "serviceAccountsEnabled": true,
+        "clientAuthenticatorType": "client-secret",
+        "secret": "bKE6qbAz8Eugwvloklc03yikLDXHO2Qs"
+      }
+    ]
+  }
+]
diff --git a/connector/deployment/ide/env/participant-a-connector.env b/connector/deployment/ide/env/participant-a-connector.env
index 78b3a653..edeb7248 100644
--- a/connector/deployment/ide/env/participant-a-connector.env
+++ b/connector/deployment/ide/env/participant-a-connector.env
@@ -38,4 +38,4 @@ EDC_DATASOURCE_DEFAULT_PASSWORD="participant_a"
 EDC_SQL_SCHEMA_AUTOCREATE=true
 
 # keycloak config
-WEB_HTTP_AUTH_JWK_URL="http://localhost:8080/realms/myrealm/protocol/openid-connect/certs"
+WEB_HTTP_AUTH_JWK_URL="http://localhost:8080/realms/participant-a-realm/protocol/openid-connect/certs"
diff --git a/connector/deployment/ide/env/participant-b-connector.env b/connector/deployment/ide/env/participant-b-connector.env
index 47018192..4639b7da 100644
--- a/connector/deployment/ide/env/participant-b-connector.env
+++ b/connector/deployment/ide/env/participant-b-connector.env
@@ -39,4 +39,4 @@ EDC_DATASOURCE_DEFAULT_PASSWORD="participant_b"
 EDC_SQL_SCHEMA_AUTOCREATE=true
 
 # keycloak config
-WEB_HTTP_AUTH_JWK_URL="http://localhost:8080/realms/myrealm/protocol/openid-connect/certs"
\ No newline at end of file
+WEB_HTTP_AUTH_JWK_URL="http://localhost:8080/realms/participant-b-realm/protocol/openid-connect/certs"
diff --git a/connector/extensions/keycloak-auth/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension b/connector/extensions/keycloak-auth/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
index 8a51bb26..db4a2c41 100644
--- a/connector/extensions/keycloak-auth/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
+++ b/connector/extensions/keycloak-auth/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension
@@ -1,2 +1 @@
-
-org.oaebudt.edc.keycloak.KeyCloakAuthenticationExtension
\ No newline at end of file
+org.oaebudt.edc.keycloak.KeyCloakAuthenticationExtension
diff --git a/connector/launchers/runtime-embedded/Dockerfile b/connector/launchers/runtime-embedded/Dockerfile
index 68af27a4..a9c32188 100644
--- a/connector/launchers/runtime-embedded/Dockerfile
+++ b/connector/launchers/runtime-embedded/Dockerfile
@@ -15,6 +15,10 @@ COPY ./launchers/controlplane ./launchers/controlplane
 COPY ./launchers/dataplane ./launchers/dataplane
 COPY ./launchers/runtime-embedded ./launchers/runtime-embedded
 
+# Copy connector extension
+COPY ./extensions/keycloak-auth ./extensions/keycloak-auth
+
+
 # Run Gradle to build the JAR with parallel execution for faster builds
 RUN ./gradlew clean :launchers:runtime-embedded:build --parallel --no-daemon
 
diff --git a/connector/launchers/runtime-embedded/build.gradle.kts b/connector/launchers/runtime-embedded/build.gradle.kts
index a9132699..45b519c4 100644
--- a/connector/launchers/runtime-embedded/build.gradle.kts
+++ b/connector/launchers/runtime-embedded/build.gradle.kts
@@ -20,6 +20,7 @@ dependencies {
         exclude(group = "org.eclipse.edc", "data-plane-selector-client")
     }
     runtimeOnly(project(":extensions:keycloak-auth"))
+
     runtimeOnly(libs.edc.vault.hashicorp)
     runtimeOnly(libs.edc.bom.controlplane.sql)
     runtimeOnly(libs.edc.bom.dataplane.sql)


Reviews:
user: login: WassimKallel
body: Looks good, I left very few comments 
state: CHANGES_REQUESTED
author_association: NONE
submitted_at: 2025-03-17T15:45:01Z
user: login: ndr-brt
body: what would be a way to test this automatically?
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-17T17:24:46Z
user: login: mohamedkhalilbeldi
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T21:46:34Z
user: login: mohamedkhalilbeldi
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-17T21:51:50Z
user: login: WassimKallel
state: COMMENTED
author_association: NONE
submitted_at: 2025-03-18T11:52:02Z
user: login: WassimKallel
state: APPROVED
author_association: NONE
submitted_at: 2025-03-18T11:52:12Z

Review comments:
diff_hunk: @@ -0,0 +1,76 @@
+[
+  {
+  "realm": "participant-a-realm",
+  "enabled": true,
+  "accessTokenLifespan": 1500,
+  "users": [
+    {
+      "username": "participant-a",
+      "email": "participant-a@localhost",
+      "emailVerified": false,
+      "firstName": "participant-a",
+      "lastName": "participant-a",
+      "enabled": true,
+      "credentials": [
+        {
+          "type": "password",
+          "value": "participant-a",
+          "temporary": false
+        }
+      ],
+      "realmRoles": ["user"]
+    }
+  ],
+  "clients": [
+    {
+      "clientId": "participant-a-connector",
+      "enabled": true,
+      "protocol": "openid-connect",
+      "redirectUris": ["http://localhost:8290/*"],
+      "webOrigins": ["http://localhost:8290"],
+      "standardFlowEnabled": true,
+      "directAccessGrantsEnabled": true,
+      "serviceAccountsEnabled": true,
+      "clientAuthenticatorType": "client-secret",
+      "secret": "Ii8ya1wMHAzZQOPvVfTTlsIWauc8NFCb"
+    }
+  ]
+},
+  {
+    "realm": "participant-b-realm",
+    "enabled": true,
+    "accessTokenLifespan": 1500,
+    "users": [
+      {
+        "username": "participant-b",
+        "enabled": true,
+        "email": "participant-a@localhost",
path: connector/deployment/ide/dependencies/init/keycloak-realm.json
user: login: WassimKallel
body: participant-b*
created_at: 2025-03-17T15:28:03Z
author_association: NONE
diff_hunk: @@ -1,3 +1,7 @@
 CREATE USER participant_b WITH PASSWORD 'participant_b';
 CREATE DATABASE participant_b OWNER participant_b;
 GRANT ALL PRIVILEGES ON DATABASE participant_b TO participant_b;
path: connector/deployment/ide/dependencies/init/init-db.sql
user: login: WassimKallel
body: We don't need this anymore
created_at: 2025-03-17T15:44:40Z
author_association: NONE
diff_hunk: @@ -0,0 +1,76 @@
+[
+  {
+  "realm": "participant-a-realm",
+  "enabled": true,
+  "accessTokenLifespan": 1500,
+  "users": [
+    {
+      "username": "participant-a",
+      "email": "participant-a@localhost",
+      "emailVerified": false,
+      "firstName": "participant-a",
+      "lastName": "participant-a",
+      "enabled": true,
+      "credentials": [
+        {
+          "type": "password",
+          "value": "participant-a",
+          "temporary": false
+        }
+      ],
+      "realmRoles": ["user"]
+    }
+  ],
+  "clients": [
+    {
+      "clientId": "participant-a-connector",
+      "enabled": true,
+      "protocol": "openid-connect",
+      "redirectUris": ["http://localhost:8290/*"],
+      "webOrigins": ["http://localhost:8290"],
+      "standardFlowEnabled": true,
+      "directAccessGrantsEnabled": true,
+      "serviceAccountsEnabled": true,
+      "clientAuthenticatorType": "client-secret",
+      "secret": "Ii8ya1wMHAzZQOPvVfTTlsIWauc8NFCb"
+    }
+  ]
+},
+  {
+    "realm": "participant-b-realm",
+    "enabled": true,
+    "accessTokenLifespan": 1500,
+    "users": [
+      {
+        "username": "participant-b",
+        "enabled": true,
+        "email": "participant-a@localhost",
path: connector/deployment/ide/dependencies/init/keycloak-realm.json
user: login: mohamedkhalilbeldi
body: fixed
created_at: 2025-03-17T21:46:34Z
author_association: COLLABORATOR
diff_hunk: @@ -1,3 +1,7 @@
 CREATE USER participant_b WITH PASSWORD 'participant_b';
 CREATE DATABASE participant_b OWNER participant_b;
 GRANT ALL PRIVILEGES ON DATABASE participant_b TO participant_b;
path: connector/deployment/ide/dependencies/init/init-db.sql
user: login: mohamedkhalilbeldi
body: I think I didn't understand your point well. In the IDE environment, we’re using the same database instance for both connector A and B, so we need to initialize the participant_a and participant_b databases. (participant_a is initialized from the environment vars container) For the participant_b database, I’m required to create it using an init script. Could you clarify why this is no longer needed?
created_at: 2025-03-17T21:51:50Z
author_association: COLLABORATOR
diff_hunk: @@ -1,3 +1,7 @@
 CREATE USER participant_b WITH PASSWORD 'participant_b';
 CREATE DATABASE participant_b OWNER participant_b;
 GRANT ALL PRIVILEGES ON DATABASE participant_b TO participant_b;
path: connector/deployment/ide/dependencies/init/init-db.sql
user: login: WassimKallel
body: I understand now, I thought this is also for the docker setup. In there the initialization already exists
created_at: 2025-03-18T11:52:02Z
author_association: NONE

PR comments:
user: login: sonarqubecloud[bot]
created_at: 2025-03-17T22:19:25Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=OAEBUDT_oaebudt-dataspace&pullRequest=58) **Quality Gate passed for 'connector'**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=OAEBUDT_oaebudt-dataspace&pullRequest=58&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=OAEBUDT_oaebudt-dataspace&pullRequest=58&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=OAEBUDT_oaebudt-dataspace&pullRequest=58&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=OAEBUDT_oaebudt-dataspace&pullRequest=58&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=OAEBUDT_oaebudt-dataspace&pullRequest=58&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=OAEBUDT_oaebudt-dataspace&pullRequest=58)


author_association: NONE
user: login: mohamedkhalilbeldi
created_at: 2025-03-17T22:35:05Z
body: > what would be a way to test this automatically?
>
I believe JUnit 5 can be used for this type of testing, enabling us to automatically test the entire Docker Compose stack. However, the complexity comes when testing the full workflow end-to-end, which could become quite involved. As a starting point, I suggest we first focus on validating the health of the services in the Docker stack and ensuring they respond correctly to requests. Once we've confirmed that each service is working as expected, we can proceed with developing more comprehensive E2E tests for the entire stack. While this will require significant effort, we can tackle it incrementally. I have created a new [task](https://github.com/OAEBUDT/oaebudt-dataspace/issues/61) to break down this process.


author_association: COLLABORATOR
user: login: ndr-brt
created_at: 2025-03-18T07:47:11Z
body: > > what would be a way to test this automatically?
> 
> I believe JUnit 5 can be used for this type of testing, enabling us to automatically test the entire Docker Compose stack. However, the complexity comes when testing the full workflow end-to-end, which could become quite involved. As a starting point, I suggest we first focus on validating the health of the services in the Docker stack and ensuring they respond correctly to requests. Once we've confirmed that each service is working as expected, we can proceed with developing more comprehensive E2E tests for the entire stack. While this will require significant effort, we can tackle it incrementally. I have created a new [task](https://github.com/OAEBUDT/oaebudt-dataspace/issues/61) to break down this process.

> I'd propose to not consider testing as a big task "to be done later" but instead to consider it as a tiny part of every change to the code. Have a script that spins up the environment and verifies that's working should be like 10 lines of bash, the framework could eventually be introduced in the next PRs. 
This would make you more confident about your PR and the reviewers more relieved because reviews will be easier.
By the way I'm ok with merging this, I just wanted to stimulate reflection. :raised_hands: 

I fully agree, testing should be a continuous part of development rather than something to be done later. Moving forward, any PRs involving the Docker setup will include a testing workflow. Tasks have also been created to ensure this is addressed for previous work on Docker. I'm sure this was meant for reflection since you didn’t require a change. Reflection is always beneficial and valuable, just like this discussion. I really appreciate it! 🙌
author_association: NONE