Skip to content

Commit 44e099f

Browse files
authored
Merge branch 'main' into addStartReqs
2 parents 458e8c1 + b60bbb2 commit 44e099f

File tree

9 files changed

+69
-156
lines changed

9 files changed

+69
-156
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- uses: zwaldowski/semver-release-action@v2
4949
with:
5050
dry_run: true
51-
bump: ${{ steps.match-label-bash.outputs.RELEASE_LABEL }}
51+
bump: minor
5252
github_token: ${{ secrets.GITHUB_TOKEN }}
5353

5454
- name: Set version output

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,21 @@ Connector.
8585

8686
Precisely, the connector bundles the following components:
8787

88-
| Component | Role | Link |
89-
|-----------------|-----------------|------|
90-
| VCVerifier | Verifier | https://github.com/FIWARE/VCVerifier |
91-
| credentials-config-service | Credentials Config provider for the verifier | https://github.com/FIWARE/credentials-config-service |
92-
| Keycloak | Issuer of VCs | https://www.keycloak.org |
93-
| Scorpio | Context Broker | https://github.com/ScorpioBroker/ScorpioBroker |
94-
| trusted-issuers-list | Acts as Trusted Issuers List by providing an [EBSI Trusted Issuers Registry](https://api-pilot.ebsi.eu/docs/apis/trusted-issuers-registry) API | https://github.com/FIWARE/trusted-issuers-list |
95-
| APISIX | APISIX as API-Gateway with a sidecar OPA as PEP | https://apisix.apache.org/ / https://www.openpolicyagent.org/ |
96-
| odrl-pap | PAP allowing to configure ODRL policies to be used by the OPA | https://github.com/wistefan/odrl-pap |
97-
| tmforum-api | [TMForum APIs](https://www.tmforum.org/oda/open-apis/) for contract management | https://github.com/FIWARE/tmforum-api |
98-
| contract-management | Notification listener for contract management events out of TMForum | https://github.com/FIWARE/contract-management |
99-
| MySQL | Database | https://www.mysql.com |
100-
| PostgreSQL | Database | https://www.postgresql.org |
101-
| PostGIS | PostgreSQL Database with PostGIS extensions | https://postgis.net/ |
88+
| Component | Role | Diagram field | Link |
89+
|-----------------|-----------------|---|------|
90+
| VCVerifier | Validates VCs and exchanges them for tokens |Verifier | https://github.com/FIWARE/VCVerifier |
91+
| credentials-config-service | Holds the information which VCs are required for accessing a service |PRP/PAP (authentication)| https://github.com/FIWARE/credentials-config-service |
92+
| Keycloak | Issuer of VCs on the Consumer side | | https://www.keycloak.org |
93+
| Scorpio | Context Broker | | https://github.com/ScorpioBroker/ScorpioBroker |
94+
| trusted-issuers-list | Acts as Trusted Issuers List by providing an [EBSI Trusted Issuers Registry](https://api-pilot.ebsi.eu/docs/apis/trusted-issuers-registry) API |Local Trusted Issuers List| https://github.com/FIWARE/trusted-issuers-list |
95+
| APISIX | APISIX as API-Gateway with a OPA plugin |PEP| https://apisix.apache.org/ / https://apisix.apache.org/docs/apisix/plugins/opa/ |
96+
| OPA | OpenPolicyAgent as the API Gateway's Sidecar |PDP | https://www.openpolicyagent.org/ |
97+
| odrl-pap | Allowing to configure ODRL policies to be used by the OPA | PRP/PAP (authorization) | https://github.com/wistefan/odrl-pap |
98+
| tmforum-api | Implementation of the [TMForum APIs](https://www.tmforum.org/oda/open-apis/) for handling contracts|Contract Management| https://github.com/FIWARE/tmforum-api |
99+
| contract-management | Notification listener for contract management events out of TMForum |Contract Management | https://github.com/FIWARE/contract-management |
100+
| MySQL | Database | | https://www.mysql.com |
101+
| PostgreSQL | Database | | https://www.postgresql.org |
102+
| PostGIS | PostgreSQL Database with PostGIS extensions | | https://postgis.net/ |
102103

103104
**Note,** that some of the components shown in the diagram above are not implemented yet.
104105

charts/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ This directory provides the actual charts of the connector.
66
## Data Space Connector
77

88
The folder [data-space-connector](./data-space-connector) contains the actual FIWARE
9-
Data Space Connector as a [Helm Umbrella Chart](https://helm.sh/docs/howto/charts_tips_and_tricks/#complex-charts-with-many-dependencies).
10-
This includes the `Chart.yaml` with the different depending charts for the components, a `values.yaml` providing default values for the
11-
configuration parameters of the different components, and additional Helm templates.
9+
Data Space Connector as a [Helm Umbrella Chart](https://helm.sh/docs/howto/charts_tips_and_tricks/#complex-charts-with-many-dependencies). This includes the `Chart.yaml` with the different depending charts for the components, a `values.yaml` providing default values for the configuration parameters of the different components, and additional Helm templates.
1210

1311

1412
## Trust Anchor
1513

1614
The folder [trust-anchor](./trust-anchor) contains a minimal example of a Trust Anchor, provided as
17-
a [Helm Umbrella Chart](https://helm.sh/docs/howto/charts_tips_and_tricks/#complex-charts-with-many-dependencies).
18-
Basically it consists of a Trusted Issuers Registry with an attached database. This is also used
19-
in the local deployment of a Minimal Viable Dataspace described [here](../doc/local-deployment/LOCAL.MD).
15+
a [Helm Umbrella Chart](https://helm.sh/docs/howto/charts_tips_and_tricks/#complex-charts-with-many-dependencies). Basically it consists of a Trusted Issuers Registry with an attached database. This is also used in the local deployment of a Minimal Viable Dataspace described [here](../doc/deployment-integration/local-deployment/LOCAL.MD).
2016

charts/data-space-connector/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: data-space-connector
33
description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant.
44
type: application
5-
version: 7.3.4
5+
version: 7.17.2
66
dependencies:
77
- name: postgresql
88
condition: postgresql.enabled
@@ -48,7 +48,7 @@ dependencies:
4848
# issuance
4949
- name: keycloak
5050
condition: keycloak.enabled
51-
version: 21.1.1
51+
version: 24.0.1
5252
repository: https://charts.bitnami.com/bitnami
5353
# contract management
5454
- name: tm-forum-api

charts/data-space-connector/values.yaml

Lines changed: 23 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ credentials-config-service:
9797
postgresql:
9898
# -- should it be enabled? set to false if one outside the chart is used.
9999
enabled: true
100+
image:
101+
# -- fixes the unpullable image referenced in the chart
102+
tag: 13.18.0
100103
# -- allows to set a fixed name for the services
101104
fullnameOverride: postgresql
102105
generatePasswords:
@@ -194,12 +197,6 @@ apisix:
194197
config_provider: yaml
195198
apisix:
196199
extra_lua_path: /extra/apisix/plugins/?.lua
197-
# -- configuration in regard to the apisix dashboard
198-
dashboard:
199-
# -- should it be enabled
200-
enabled: true
201-
# -- resource preset to have sufficient memory
202-
resourcesPreset: small
203200
# -- extra volumes
204201
# we need `routes` to declaratively configure the routes
205202
# and the config for the opa sidecar
@@ -248,6 +245,13 @@ apisix:
248245
volumeMounts:
249246
- name: opa-config
250247
mountPath: /config
248+
# -- configuration in regard to the apisix dashboard
249+
dashboard:
250+
# -- should it be enabled
251+
enabled: false
252+
# -- resource preset to have sufficient memory
253+
resourcesPreset: small
254+
251255
# -- configuration of a catchAll-route(e.g. /*)
252256
catchAllRoute:
253257
# -- should it be enabled
@@ -282,6 +286,9 @@ apisix:
282286
postgis:
283287
# -- should it be enabled? set to false if one outside the chart is used.
284288
enabled: true
289+
image:
290+
# -- fixes the unpullable image referenced in the chart
291+
tag: 13.18.0
285292
# -- overrides the generated name, provides stable service names - this should be avoided if multiple instances are available in the same namespace
286293
fullnameOverride: data-service-postgis
287294
# -- overrides the generated name, provides stable service names - this should be avoided if multiple instances are available in the same namespace
@@ -369,22 +376,7 @@ keycloak:
369376
# -- disable the security context, required by the current quarkus container, will be solved in the future chart versions of keycloak
370377
containerSecurityContext:
371378
enabled: false
372-
# -- keycloak image to be used - set to preview version of 25.0.0, since no other is available yet
373-
image:
374-
registry: quay.io
375-
# until 25 is released, we have to use a snapshot version
376-
repository: wi_stefan/keycloak
377-
tag: 25.0.0-PRE
378-
pullPolicy: Always
379-
command:
380-
- /bin/bash
381-
# -- 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
382-
args:
383-
- -ec
384-
- |
385-
#!/bin/sh
386-
export $(cat /did-material/did.env)
387-
/opt/keycloak/bin/kc.sh start --features oid4vc-vci --import-realm
379+
388380
service:
389381
ports:
390382
http: 8080
@@ -399,54 +391,25 @@ keycloak:
399391
# -- host of the external db to be used
400392
externalDatabase:
401393
host: postgresql
402-
403-
# -- the default init container is deactivated, since it conflicts with the non-bitnami image
404-
enableDefaultInitContainers: false
394+
database: keycloak
395+
user: postgres
396+
existingSecret: database-secret
397+
existingSecretPasswordKey: postgres-admin-password
405398

406399
# -- extra volumes to be mounted
407400
extraVolumeMounts:
408-
- name: empty-dir
409-
mountPath: /opt/keycloak/lib/quarkus
410-
subPath: app-quarkus-dir
411-
- name: qtm-temp
412-
mountPath: /qtm-tmp
413-
- name: did-material
414-
mountPath: /did-material
415-
- name: did-material
416-
mountPath: "/etc/env"
417-
readOnly: true
418-
- name: realms
419-
mountPath: /opt/keycloak/data/import
420-
421-
extraVolumes:
422-
- name: did-material
423-
emptyDir: { }
424-
- name: qtm-temp
425-
emptyDir: { }
426401
- name: realms
427-
configMap:
428-
name: test-realm-realm
402+
mountPath: /opt/bitnami/keycloak/data/import
429403

430404
# -- 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
431405
extraEnvVars:
406+
- name: KEYCLOAK_EXTRA_ARGS
407+
value: "--import-realm"
408+
- name: KC_FEATURES
409+
value: "oid4vc-vci"
432410
# indicates ssl is terminated at the edge
433411
- name: KC_PROXY
434412
value: "edge"
435-
# point the transaction store to the (writeable!) empty volume
436-
- name: QUARKUS_TRANSACTION_MANAGER_OBJECT_STORE_DIRECTORY
437-
value: /qtm-tmp
438-
# config for the db connection
439-
- name: KC_DB_URL_HOST
440-
value: postgresql
441-
- name: KC_DB_URL_DATABASE
442-
value: keycloak
443-
- name: KC_DB_USERNAME
444-
value: postgres
445-
- name: KC_DB_PASSWORD
446-
valueFrom:
447-
secretKeyRef:
448-
name: database-secret
449-
key: postgres-admin-password
450413
# password for reading the key store connected to the did
451414
- name: STORE_PASS
452415
valueFrom:
@@ -460,56 +423,6 @@ keycloak:
460423
name: issuance-secret
461424
key: keycloak-admin
462425

463-
# -- init containers to be run with keycloak
464-
initContainers:
465-
# workaround required by the current quarkus distribution, to make keycloak working
466-
- name: read-only-workaround
467-
image: quay.io/wi_stefan/keycloak:25.0.0-PRE
468-
command:
469-
- /bin/bash
470-
args:
471-
- -ec
472-
- |
473-
#!/bin/bash
474-
cp -r /opt/keycloak/lib/quarkus/* /quarkus
475-
volumeMounts:
476-
- name: empty-dir
477-
mountPath: /quarkus
478-
subPath: app-quarkus-dir
479-
480-
# retrieve all did material required for the realm and store it to a shared folder
481-
- name: get-did
482-
image: ubuntu
483-
command:
484-
- /bin/bash
485-
args:
486-
- -ec
487-
- |
488-
#!/bin/bash
489-
apt-get -y update; apt-get -y install wget
490-
cd /did-material
491-
wget http://did-helper:3000/did-material/cert.pfx
492-
wget http://did-helper:3000/did-material/did.env
493-
volumeMounts:
494-
- name: did-material
495-
mountPath: /did-material
496-
497-
# register the issuer at the trusted issuers registry - will only work if that one is publicly accessible
498-
- name: register-at-tir
499-
image: ubuntu
500-
command:
501-
- /bin/bash
502-
args:
503-
- -ec
504-
- |
505-
#!/bin/bash
506-
source /did-material/did.env
507-
apt-get -y update; apt-get -y install curl
508-
curl -X 'POST' 'http://tir.trust-anchor.svc.cluster.local:8080/issuer' -H 'Content-Type: application/json' -d "{\"did\": \"${DID}\", \"credentials\": []}"
509-
volumeMounts:
510-
- name: did-material
511-
mountPath: /did-material
512-
513426
# -- configuration of the realm to be imported
514427
realm:
515428
# -- should the realm be imported

doc/deployment-integration/local-deployment/LOCAL.MD

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Issues revealed by the script are most likely due to incompatibility of your sys
1919
## Quick Start
2020

2121
> :warning: The local deployment uses [k3s](https://k3s.io/) and is currently only tested on linux.
22+
> Its not recommended to use it on Windows or Mac Systems.
2223
2324
To start the Data Space, just use:
2425

@@ -168,7 +169,7 @@ Exchange the pre-authorized code from the offer with an AccessToken at the autho
168169
--header 'Accept: */*' \
169170
--header 'Content-Type: application/x-www-form-urlencoded' \
170171
--data grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code \
171-
--data code=${PRE_AUTHORIZED_CODE} | jq '.access_token' -r); echo ${CREDENTIAL_ACCESS_TOKEN}
172+
--data pre-authorized_code=${PRE_AUTHORIZED_CODE} | jq '.access_token' -r); echo ${CREDENTIAL_ACCESS_TOKEN}
172173
```
173174

174175
Use the returned access token to get the actual credential:
@@ -891,4 +892,4 @@ In order to build a concrete deployment, [maven](https://maven.apache.org/) exec
891892
3. Execute `helm template` on the charts, with the local values provided for each participant(e.g. [trust-anchor](../k3s/trust-anchor.yaml), [provider](../k3s/provider.yaml) and [consumer](../k3s/consumer.yaml)) and copy the manifests to the target folder(e.g. `target/k3s`)
892893
4. Spin up the cluster
893894
5. Apply the infrastructure resources to the cluster, via `kubectl apply`
894-
6. Apply the charts to the cluster, via `kubectl apply`
895+
6. Apply the charts to the cluster, via `kubectl apply`

it/pom.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,20 @@
5151
</dependency>
5252
</dependencies>
5353
</dependencyManagement>
54+
<!-- workaround for https://github.com/java-json-tools/jackson-coreutils/issues/59 -->
5455
<repositories>
56+
<repository>
57+
<id>central</id>
58+
<name>Maven Central</name>
59+
<layout>default</layout>
60+
<url>https://repo1.maven.org/maven2</url>
61+
</repository>
5562
<repository>
5663
<id>jitpack.io</id>
5764
<url>https://jitpack.io</url>
5865
</repository>
5966
</repositories>
60-
67+
6168
<dependencies>
6269
<dependency>
6370
<groupId>org.projectlombok</groupId>
@@ -397,4 +404,4 @@
397404
</build>
398405
</profile>
399406
</profiles>
400-
</project>
407+
</project>

it/src/test/java/org/fiware/dataspace/it/components/Wallet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private String requestOffer(String token, String credentialEndpoint, SupportedCo
226226
public String getAccessToken(String tokenEndpoint, String preAuthorizedCode) throws Exception {
227227
RequestBody requestBody = new FormEncodingBuilder()
228228
.add("grant_type", PRE_AUTHORIZED_GRANT_TYPE)
229-
.add("code", preAuthorizedCode)
229+
.add("pre-authorized_code", preAuthorizedCode)
230230
.build();
231231
Request tokenRequest = new Request.Builder()
232232
.url(tokenEndpoint)

k3s/consumer.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,17 @@ keycloak:
3131
ingress:
3232
enabled: true
3333
hostname: keycloak-consumer.127.0.0.1.nip.io
34+
command:
35+
- /bin/bash
3436
args:
3537
- -ec
3638
- |
3739
#!/bin/sh
3840
export $(cat /did-material/did.env)
3941
export KC_HOSTNAME=keycloak-consumer.127.0.0.1.nip.io
40-
env | grep DID
41-
/opt/keycloak/bin/kc.sh start --features oid4vc-vci --import-realm
42+
/opt/bitnami/scripts/keycloak/entrypoint.sh
43+
/opt/bitnami/scripts/keycloak/run.sh
4244
initContainers:
43-
- name: read-only-workaround
44-
image: quay.io/wi_stefan/keycloak:25.0.0-PRE
45-
command:
46-
- /bin/bash
47-
args:
48-
- -ec
49-
- |
50-
#!/bin/bash
51-
cp -r /opt/keycloak/lib/quarkus/* /quarkus
52-
volumeMounts:
53-
- name: empty-dir
54-
mountPath: /quarkus
55-
subPath: app-quarkus-dir
56-
5745
- name: get-did
5846
image: ubuntu
5947
command:
@@ -110,11 +98,18 @@ keycloak:
11098
- name: did-material
11199
mountPath: /did-material
112100

101+
extraVolumeMounts:
102+
- name: did-material
103+
mountPath: /did-material
104+
- name: did-material
105+
mountPath: "/etc/env"
106+
readOnly: true
107+
- name: realms
108+
mountPath: /opt/bitnami/keycloak/data/import
109+
113110
extraVolumes:
114111
- name: did-material
115112
emptyDir: { }
116-
- name: qtm-temp
117-
emptyDir: { }
118113
- name: realms
119114
configMap:
120115
name: test-realm-realm

0 commit comments

Comments
 (0)