From 3bfe276c9fd13baf04dd5f6f6795b7483ce86bce Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 24 Oct 2024 10:08:48 +0200 Subject: [PATCH 01/18] fix local deploy and update keycloak --- charts/data-space-connector/Chart.yaml | 2 +- charts/data-space-connector/values.yaml | 60 ++++++++----------------- k3s/consumer.yaml | 22 ++------- 3 files changed, 24 insertions(+), 60 deletions(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 38086ed..c9e6485 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -48,7 +48,7 @@ dependencies: # issuance - name: keycloak condition: keycloak.enabled - version: 21.1.1 + version: 24.0.1 repository: https://charts.bitnami.com/bitnami # contract management - name: tm-forum-api diff --git a/charts/data-space-connector/values.yaml b/charts/data-space-connector/values.yaml index 7f65475..b84b84c 100644 --- a/charts/data-space-connector/values.yaml +++ b/charts/data-space-connector/values.yaml @@ -194,10 +194,10 @@ apisix: config_provider: yaml apisix: extra_lua_path: /extra/apisix/plugins/?.lua - # -- configuration in regard to the apisix dashboard - dashboard: - # -- should it be enabled - enabled: true + # -- configuration in regard to the apisix dashboard + dashboard: + # -- should it be enabled + enabled: true # -- resource preset to have sufficient memory resourcesPreset: small # -- extra volumes @@ -248,6 +248,13 @@ apisix: volumeMounts: - name: opa-config mountPath: /config + # -- configuration in regard to the apisix dashboard + dashboard: + # -- should it be enabled + enabled: false + # -- resource preset to have sufficient memory + resourcesPreset: small + # -- configuration of a catchAll-route(e.g. /*) catchAllRoute: # -- should it be enabled @@ -369,13 +376,7 @@ keycloak: # -- disable the security context, required by the current quarkus container, will be solved in the future chart versions of keycloak containerSecurityContext: enabled: false - # -- keycloak image to be used - set to preview version of 25.0.0, since no other is available yet - image: - registry: quay.io - # until 25 is released, we have to use a snapshot version - repository: wi_stefan/keycloak - tag: 25.0.0-PRE - pullPolicy: Always + command: - /bin/bash # -- we need the did of the participant here. when its generated with the did-helper, we have to get it first and replace inside the realm.json through env-vars @@ -384,7 +385,8 @@ keycloak: - | #!/bin/sh export $(cat /did-material/did.env) - /opt/keycloak/bin/kc.sh start --features oid4vc-vci --import-realm + /opt/bitnami/scripts/keycloak/entrypoint.sh + /opt/bitnami/scripts/keycloak/run.sh service: ports: http: 8080 @@ -400,41 +402,32 @@ keycloak: externalDatabase: host: postgresql - # -- the default init container is deactivated, since it conflicts with the non-bitnami image - enableDefaultInitContainers: false - # -- extra volumes to be mounted extraVolumeMounts: - - name: empty-dir - mountPath: /opt/keycloak/lib/quarkus - subPath: app-quarkus-dir - - name: qtm-temp - mountPath: /qtm-tmp - name: did-material mountPath: /did-material - name: did-material mountPath: "/etc/env" readOnly: true - name: realms - mountPath: /opt/keycloak/data/import + mountPath: /opt/bitnami/keycloak/data/import extraVolumes: - name: did-material emptyDir: { } - - name: qtm-temp - emptyDir: { } - name: realms configMap: name: test-realm-realm # -- extra env vars to be set. we require them at the moment, since some of the chart config mechanisms only work with the bitnami-image extraEnvVars: + - name: KEYCLOAK_EXTRA_ARGS + value: "--import-realm" + - name: KC_FEATURES + value: "oid4vc-vci" # indicates ssl is terminated at the edge - name: KC_PROXY value: "edge" - # point the transaction store to the (writeable!) empty volume - - name: QUARKUS_TRANSACTION_MANAGER_OBJECT_STORE_DIRECTORY - value: /qtm-tmp # config for the db connection - name: KC_DB_URL_HOST value: postgresql @@ -462,21 +455,6 @@ keycloak: # -- init containers to be run with keycloak initContainers: - # workaround required by the current quarkus distribution, to make keycloak working - - name: read-only-workaround - image: quay.io/wi_stefan/keycloak:25.0.0-PRE - command: - - /bin/bash - args: - - -ec - - | - #!/bin/bash - cp -r /opt/keycloak/lib/quarkus/* /quarkus - volumeMounts: - - name: empty-dir - mountPath: /quarkus - subPath: app-quarkus-dir - # retrieve all did material required for the realm and store it to a shared folder - name: get-did image: ubuntu diff --git a/k3s/consumer.yaml b/k3s/consumer.yaml index a72f472..8235c17 100644 --- a/k3s/consumer.yaml +++ b/k3s/consumer.yaml @@ -31,29 +31,17 @@ keycloak: ingress: enabled: true hostname: keycloak-consumer.127.0.0.1.nip.io + command: + - /bin/bash args: - -ec - | #!/bin/sh export $(cat /did-material/did.env) export KC_HOSTNAME=keycloak-consumer.127.0.0.1.nip.io - env | grep DID - /opt/keycloak/bin/kc.sh start --features oid4vc-vci --import-realm + /opt/bitnami/scripts/keycloak/entrypoint.sh + /opt/bitnami/scripts/keycloak/run.sh initContainers: - - name: read-only-workaround - image: quay.io/wi_stefan/keycloak:25.0.0-PRE - command: - - /bin/bash - args: - - -ec - - | - #!/bin/bash - cp -r /opt/keycloak/lib/quarkus/* /quarkus - volumeMounts: - - name: empty-dir - mountPath: /quarkus - subPath: app-quarkus-dir - - name: get-did image: ubuntu command: @@ -113,8 +101,6 @@ keycloak: extraVolumes: - name: did-material emptyDir: { } - - name: qtm-temp - emptyDir: { } - name: realms configMap: name: test-realm-realm From 74744cb75e19a9f84688cc2a2beed8fd9d1953cc Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Thu, 24 Oct 2024 10:12:19 +0200 Subject: [PATCH 02/18] fix config --- charts/data-space-connector/values.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/charts/data-space-connector/values.yaml b/charts/data-space-connector/values.yaml index b84b84c..11577c2 100644 --- a/charts/data-space-connector/values.yaml +++ b/charts/data-space-connector/values.yaml @@ -194,12 +194,6 @@ apisix: config_provider: yaml apisix: extra_lua_path: /extra/apisix/plugins/?.lua - # -- configuration in regard to the apisix dashboard - dashboard: - # -- should it be enabled - enabled: true - # -- resource preset to have sufficient memory - resourcesPreset: small # -- extra volumes # we need `routes` to declaratively configure the routes # and the config for the opa sidecar From f0c82ae8ba87ff402689d697f560aa6e05b1f1dc Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 15:23:05 +0100 Subject: [PATCH 03/18] Update values.yaml --- charts/data-space-connector/values.yaml | 57 ------------------------- 1 file changed, 57 deletions(-) diff --git a/charts/data-space-connector/values.yaml b/charts/data-space-connector/values.yaml index 11577c2..bf3591a 100644 --- a/charts/data-space-connector/values.yaml +++ b/charts/data-space-connector/values.yaml @@ -371,16 +371,6 @@ keycloak: containerSecurityContext: enabled: false - command: - - /bin/bash - # -- we need the did of the participant here. when its generated with the did-helper, we have to get it first and replace inside the realm.json through env-vars - args: - - -ec - - | - #!/bin/sh - export $(cat /did-material/did.env) - /opt/bitnami/scripts/keycloak/entrypoint.sh - /opt/bitnami/scripts/keycloak/run.sh service: ports: http: 8080 @@ -398,21 +388,9 @@ keycloak: # -- extra volumes to be mounted extraVolumeMounts: - - name: did-material - mountPath: /did-material - - name: did-material - mountPath: "/etc/env" - readOnly: true - name: realms mountPath: /opt/bitnami/keycloak/data/import - extraVolumes: - - name: did-material - emptyDir: { } - - name: realms - configMap: - name: test-realm-realm - # -- extra env vars to be set. we require them at the moment, since some of the chart config mechanisms only work with the bitnami-image extraEnvVars: - name: KEYCLOAK_EXTRA_ARGS @@ -447,41 +425,6 @@ keycloak: name: issuance-secret key: keycloak-admin - # -- init containers to be run with keycloak - initContainers: - # retrieve all did material required for the realm and store it to a shared folder - - name: get-did - image: ubuntu - command: - - /bin/bash - args: - - -ec - - | - #!/bin/bash - apt-get -y update; apt-get -y install wget - cd /did-material - wget http://did-helper:3000/did-material/cert.pfx - wget http://did-helper:3000/did-material/did.env - volumeMounts: - - name: did-material - mountPath: /did-material - - # register the issuer at the trusted issuers registry - will only work if that one is publicly accessible - - name: register-at-tir - image: ubuntu - command: - - /bin/bash - args: - - -ec - - | - #!/bin/bash - source /did-material/did.env - apt-get -y update; apt-get -y install curl - curl -X 'POST' 'http://tir.trust-anchor.svc.cluster.local:8080/issuer' -H 'Content-Type: application/json' -d "{\"did\": \"${DID}\", \"credentials\": []}" - volumeMounts: - - name: did-material - mountPath: /did-material - # -- configuration of the realm to be imported realm: # -- should the realm be imported From 28c23a3c12086c24cb41fb4b999c2e126e6b1344 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:26:23 +0000 Subject: [PATCH 04/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index c9e6485..1c3b6a5 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.3.4 +version: 7.4.0 dependencies: - name: postgresql condition: postgresql.enabled From 1491bb7891585ed276694ecd97ae486caf88d0ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:26:27 +0000 Subject: [PATCH 05/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 1c3b6a5..98403ec 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.4.0 +version: 7.5.0 dependencies: - name: postgresql condition: postgresql.enabled From ede8f714484abb1954d75f8fe98533fc3ab67cb6 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 15:51:49 +0100 Subject: [PATCH 06/18] Update pom.xml --- it/pom.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/it/pom.xml b/it/pom.xml index c2ccfcd..133c6fa 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -94,6 +94,12 @@ javax.annotation-api ${version.javax.annotation} + + com.github.java-json-tools + jackson-coreutils + 2.0 + + @@ -397,4 +403,4 @@ - \ No newline at end of file + From b07ddd3712d45c9bf62ca2775244a005d8e149c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:54:36 +0000 Subject: [PATCH 07/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 98403ec..f7b9cca 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.5.0 +version: 7.6.0 dependencies: - name: postgresql condition: postgresql.enabled From e208d5579e7bf6d4554f4a43393d6ac7900b7807 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 15:56:53 +0100 Subject: [PATCH 08/18] Update pom.xml --- it/pom.xml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/it/pom.xml b/it/pom.xml index 133c6fa..ddad3eb 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -51,12 +51,6 @@ - - - jitpack.io - https://jitpack.io - - @@ -94,12 +88,6 @@ javax.annotation-api ${version.javax.annotation} - - com.github.java-json-tools - jackson-coreutils - 2.0 - - From f4cc0aef2fb0bf77c91ea640cf24b853fac8d66e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:59:39 +0000 Subject: [PATCH 09/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index f7b9cca..76c33bb 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.6.0 +version: 7.7.0 dependencies: - name: postgresql condition: postgresql.enabled From 599563c730d898fcd56e9ca8ebf3ad48f2961ccd Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 16:00:31 +0100 Subject: [PATCH 10/18] Update pom.xml --- it/pom.xml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/it/pom.xml b/it/pom.xml index ddad3eb..8111e6a 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -51,7 +51,19 @@ - + + + central + Maven Central + default + https://repo1.maven.org/maven2 + + + jitpack.io + https://jitpack.io + + + org.projectlombok From 96f37d10444a6761262c10f7cf1bf240995f08e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:03:05 +0000 Subject: [PATCH 11/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 76c33bb..5a69400 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.7.0 +version: 7.8.0 dependencies: - name: postgresql condition: postgresql.enabled From 0de3a3d671cbce216f469b64777e715ec765cfcc Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 16:03:16 +0100 Subject: [PATCH 12/18] Update pom.xml --- it/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/it/pom.xml b/it/pom.xml index 8111e6a..7a3778b 100644 --- a/it/pom.xml +++ b/it/pom.xml @@ -51,6 +51,7 @@ + central From c8e6200c7898be07f00a676d5b78b54a9ae92520 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:05:58 +0000 Subject: [PATCH 13/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 5a69400..21e7627 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.8.0 +version: 7.9.0 dependencies: - name: postgresql condition: postgresql.enabled From 95048320d8302afaff7e33459861d6e0c63471d2 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Fri, 8 Nov 2024 16:25:45 +0100 Subject: [PATCH 14/18] fix did loading --- k3s/consumer.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/k3s/consumer.yaml b/k3s/consumer.yaml index 8235c17..5a35e75 100644 --- a/k3s/consumer.yaml +++ b/k3s/consumer.yaml @@ -98,6 +98,15 @@ keycloak: - name: did-material mountPath: /did-material + extraVolumeMounts: + - name: did-material + mountPath: /did-material + - name: did-material + mountPath: "/etc/env" + readOnly: true + - name: realms + mountPath: /opt/keycloak/data/import + extraVolumes: - name: did-material emptyDir: { } From 12185ada7940b50e38e1b5a2d18d36542dac39d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:28:19 +0000 Subject: [PATCH 15/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 21e7627..4db0c4d 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.9.0 +version: 7.10.0 dependencies: - name: postgresql condition: postgresql.enabled From 747a0bd440f7d01a30b6dfdc958b3fc7791a8f69 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Mon, 18 Nov 2024 08:13:12 +0100 Subject: [PATCH 16/18] fix import path --- k3s/consumer.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k3s/consumer.yaml b/k3s/consumer.yaml index 5a35e75..3f38c4b 100644 --- a/k3s/consumer.yaml +++ b/k3s/consumer.yaml @@ -105,7 +105,7 @@ keycloak: mountPath: "/etc/env" readOnly: true - name: realms - mountPath: /opt/keycloak/data/import + mountPath: /opt/bitnami/keycloak/data/import extraVolumes: - name: did-material From 1ae7583dd6900408a20354cb658cfd525ed87c3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:15:59 +0000 Subject: [PATCH 17/18] Update helm chart versions --- charts/data-space-connector/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/data-space-connector/Chart.yaml b/charts/data-space-connector/Chart.yaml index 4db0c4d..f3e911e 100644 --- a/charts/data-space-connector/Chart.yaml +++ b/charts/data-space-connector/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: data-space-connector description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant. type: application -version: 7.10.0 +version: 7.11.0 dependencies: - name: postgresql condition: postgresql.enabled From 978cb099b43a24ac5a7611b98c0b06259133feb3 Mon Sep 17 00:00:00 2001 From: Stefan Wiedemann Date: Mon, 18 Nov 2024 08:35:02 +0100 Subject: [PATCH 18/18] fix token type --- it/src/test/java/org/fiware/dataspace/it/components/Wallet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/src/test/java/org/fiware/dataspace/it/components/Wallet.java b/it/src/test/java/org/fiware/dataspace/it/components/Wallet.java index 28241ef..a31ef30 100644 --- a/it/src/test/java/org/fiware/dataspace/it/components/Wallet.java +++ b/it/src/test/java/org/fiware/dataspace/it/components/Wallet.java @@ -226,7 +226,7 @@ private String requestOffer(String token, String credentialEndpoint, SupportedCo public String getAccessToken(String tokenEndpoint, String preAuthorizedCode) throws Exception { RequestBody requestBody = new FormEncodingBuilder() .add("grant_type", PRE_AUTHORIZED_GRANT_TYPE) - .add("code", preAuthorizedCode) + .add("pre-authorized_code", preAuthorizedCode) .build(); Request tokenRequest = new Request.Builder() .url(tokenEndpoint)