From 8bbd2a4893d901399b664f82af6774b6a5c8d14f Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Wed, 2 Oct 2024 11:10:48 +0200 Subject: [PATCH 1/7] feat: init --- .../edc/logic/service/EdcAdapterService.java | 2 +- .../config/customer/control-plane.properties | 87 +++++++++++-------- .../config/customer/data-plane.properties | 36 +++++--- .../config/supplier/control-plane.properties | 26 ++++-- .../config/supplier/data-plane.properties | 9 ++ local/tractus-x-edc/docker-compose.yaml | 4 +- 6 files changed, 107 insertions(+), 57 deletions(-) diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java index 51960410..460799be 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java @@ -954,7 +954,7 @@ private EdrDto getEdrForTransferProcessId(String transferProcessId, int retries) if (retries < 0) return null; boolean failed = true; try (Response response = sendGetRequest( - List.of("v2", "edrs", transferProcessId, "dataaddress"), + List.of("v3", "edrs", transferProcessId, "dataaddress"), Map.of("auto_refresh", "true")) ) { if (response.isSuccessful() && response.body() != null) { diff --git a/local/tractus-x-edc/config/customer/control-plane.properties b/local/tractus-x-edc/config/customer/control-plane.properties index 370afae3..71f71537 100644 --- a/local/tractus-x-edc/config/customer/control-plane.properties +++ b/local/tractus-x-edc/config/customer/control-plane.properties @@ -10,7 +10,14 @@ web.http.control.path=/api/controlplane/control # PROTOCOL (replaced IDS in 0.3.0) web.http.protocol.port=8184 web.http.protocol.path=/api/v1/dsp + +web.http.catalog.port=8196 +web.http.catalog.path=/catalog +web.http.catalog.auth.type=tokenbased +web.http.catalog.auth.key=${EDC_API_PW} + edc.participant.id=BPNL4444444444XX +edc.component.id=customer-controlplane-component-id edc.api.auth.key=${EDC_API_PW} edc.dsp.callback.address=http://customer-control-plane:8184/api/v1/dsp edc.hostname=customer-control-plane @@ -46,60 +53,68 @@ edc.transfer.proxy.token.signer.privatekey.alias=${CUSTOMER_PRIVATE_KEY_ALIAS} edc.transfer.proxy.token.verifier.publickey.alias=${CUSTOMER_PUBLIC_KEY_ALIAS} # Data-Plane selector configuration edc.dataplane.selector.edchttp.url=http://customer-data-plane:8283/api/signaling/v1/dataflows + +web.http.dataplane.port=8185 +web.http.dataplane.path=/api/v2/dataplane +edc.dataplane.api.public.baseurl=http://customer-data-plane:8285/api/public/ + # HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH -edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH -edc.dataplane.selector.edchttp.sourcetypes=HttpData -edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy -edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://customer-data-plane:8285/api/public"} +#edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH +#edc.dataplane.selector.edchttp.sourcetypes=HttpData +#edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy +#edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://customer-data-plane:8285/api/public"} # backend receiver for static Endpoint Data References edc.receiver.http.dynamic.endpoint=http://customer-backend:8081/catena/edrendpoint edc.receiver.http.dynamic.auth-key=X-API-KEY edc.receiver.http.dynamic.auth-code=${CUSTOMER_BACKEND_API_KEY} # Postgresql related configuration -edc.datasource.asset.name=asset -edc.datasource.asset.url=jdbc:postgresql://postgres-all:5432/edc_customer +edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_customer +edc.datasource.default.user=${PG_USER} +edc.datasource.default.password=${PG_PW} +#edc.datasource.asset.name=asset +#edc.datasource.asset.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.asset.user and edc.datasource.asset.password are set via .env -edc.datasource.asset.user=${PG_USER} -edc.datasource.asset.password=${PG_PW} -edc.datasource.contractdefinition.name=contractdefinition -edc.datasource.contractdefinition.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.asset.user=${PG_USER} +#edc.datasource.asset.password=${PG_PW} +#edc.datasource.contractdefinition.name=contractdefinition +#edc.datasource.contractdefinition.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.contractdefinition.user and edc.datasource.contractdefinition.password are set via .env -edc.datasource.contractdefinition.user=${PG_USER} -edc.datasource.contractdefinition.password=${PG_PW} -edc.datasource.contractnegotiation.name=contractnegotiation -edc.datasource.contractnegotiation.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.contractdefinition.user=${PG_USER} +#edc.datasource.contractdefinition.password=${PG_PW} +#edc.datasource.contractnegotiation.name=contractnegotiation +#edc.datasource.contractnegotiation.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.contractnegotiation.user and edc.datasource.contractnegotiation.password are set via .env -edc.datasource.contractnegotiation.user=${PG_USER} -edc.datasource.contractnegotiation.password=${PG_PW} -edc.datasource.policy.name=policy -edc.datasource.policy.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.contractnegotiation.user=${PG_USER} +#edc.datasource.contractnegotiation.password=${PG_PW} +#edc.datasource.policy.name=policy +#edc.datasource.policy.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.policy.user and edc.datasource.policy.password are set via .env -edc.datasource.policy.user=${PG_USER} -edc.datasource.policy.password=${PG_PW} -edc.datasource.transferprocess.name=transferprocess -edc.datasource.transferprocess.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.policy.user=${PG_USER} +#edc.datasource.policy.password=${PG_PW} +#edc.datasource.transferprocess.name=transferprocess +#edc.datasource.transferprocess.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.transferprocess.user and edc.datasource.transferprocess.password are set via .env -edc.datasource.transferprocess.user=${PG_USER} -edc.datasource.transferprocess.password=${PG_PW} -edc.datasource.policy-monitor.name=policy-monitor -edc.datasource.policy-monitor.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.transferprocess.user=${PG_USER} +#edc.datasource.transferprocess.password=${PG_PW} +#edc.datasource.policy-monitor.name=policy-monitor +#edc.datasource.policy-monitor.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -edc.datasource.policy-monitor.user=${PG_USER} -edc.datasource.policy-monitor.password=${PG_PW} +#edc.datasource.policy-monitor.user=${PG_USER} +#edc.datasource.policy-monitor.password=${PG_PW} # see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/bpn-validation/business-partner-store-sql -edc.datasource.bpn.name=policy-monitor -edc.datasource.bpn.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.bpn.name=policy-monitor +#edc.datasource.bpn.url=jdbc:postgresql://postgres-all:5432/edc_customer # edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -edc.datasource.bpn.user=${PG_USER} -edc.datasource.bpn.password=${PG_PW} +#edc.datasource.bpn.user=${PG_USER} +#edc.datasource.bpn.password=${PG_PW} # new in 0.4.x # see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/common/store/sql/edr-index-sql -edc.datasource.edr.name=edr -edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.edr.name=edr +#edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer #edc.datasource.edr.user and edc.datasource.edr.password are set via .env #org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -edc.datasource.edr.user=${PG_USER} -edc.datasource.edr.password=${PG_PW} +#edc.datasource.edr.user=${PG_USER} +#edc.datasource.edr.password=${PG_PW} # Data Encryption edc-extensions/data-encryption edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/config/customer/data-plane.properties b/local/tractus-x-edc/config/customer/data-plane.properties index 2201bdc9..a81ec753 100644 --- a/local/tractus-x-edc/config/customer/data-plane.properties +++ b/local/tractus-x-edc/config/customer/data-plane.properties @@ -17,27 +17,34 @@ web.http.management.path=/api/v1/data edc.dataplane.token.validation.endpoint=http://customer-control-plane:8183/api/controlplane/control/token # EDC hostname edc.hostname=customer-data-plane +edc.component.id=customer-dataplane-component-id # HashiCorp vault related configuration edc.vault.hashicorp.url=http://vault:8200 edc.vault.hashicorp.health.check.enabled=false edc.vault.hashicorp.token=${VAULT_DEV_ROOT_TOKEN_ID} -# EDR exentions -edc.datasource.edr.name=edr -edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer + + +edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_customer +edc.datasource.default.user=${PG_USER} +edc.datasource.default.password=${PG_PW} + +# EDR extensions +#edc.datasource.edr.name=edr +#edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer #edc.datasource.edr.user and edc.datasource.edr.password are set via .env #org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -edc.datasource.edr.user=${PG_USER} -edc.datasource.edr.password=${PG_PW} +#edc.datasource.edr.user=${PG_USER} +#edc.datasource.edr.password=${PG_PW} # see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/data-plane-store-sql -edc.datasource.dataplane.name=edr -edc.datasource.dataplane.url=jdbc:postgresql://postgres-all:5432/edc_customer -edc.datasource.dataplane.user=${PG_USER} -edc.datasource.dataplane.password=${PG_PW} +#edc.datasource.dataplane.name=edr +#edc.datasource.dataplane.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.dataplane.user=${PG_USER} +#edc.datasource.dataplane.password=${PG_PW} # extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/accesstokendata-store-sql -edc.datasource.accesstokendata.name=edr -edc.datasource.accesstokendata.url=jdbc:postgresql://postgres-all:5432/edc_customer -edc.datasource.accesstokendata.user=${PG_USER} -edc.datasource.accesstokendata.password=${PG_PW} +#edc.datasource.accesstokendata.name=edr +#edc.datasource.accesstokendata.url=jdbc:postgresql://postgres-all:5432/edc_customer +#edc.datasource.accesstokendata.user=${PG_USER} +#edc.datasource.accesstokendata.password=${PG_PW} # token refresh edc.dataplane.token.expiry=300 edc.dataplane.token.expiry.tolerance=10 @@ -59,3 +66,6 @@ tx.iam.credentialservice.url=http://mock-util-service:80 edc.iam.did.web.use.https=false edc.dpf.selector.url=http://customer-control-plane:8183/api/controlplane/control/v1/dataplanes +edc.control.endpoint=http://customer-control-plane:8183/api/controlplane/control/ +edc.dataplane.api.public.baseurl=http://customer-data-plane:8285/api/public/ +edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/config/supplier/control-plane.properties b/local/tractus-x-edc/config/supplier/control-plane.properties index b3c134b4..e75dd20e 100644 --- a/local/tractus-x-edc/config/supplier/control-plane.properties +++ b/local/tractus-x-edc/config/supplier/control-plane.properties @@ -10,8 +10,15 @@ web.http.control.path=/api/controlplane/control # PROTOCOL (replaced IDS in 0.3.0) web.http.protocol.port=9184 web.http.protocol.path=/api/v1/dsp + +web.http.catalog.port=9196 +web.http.catalog.path=/catalog +web.http.catalog.auth.type=tokenbased +web.http.catalog.auth.key=${EDC_API_PW} + JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:1044 edc.participant.id=BPNL1234567890ZZ +edc.component.id=supplier-controlplane-component-id edc.api.auth.key=${EDC_API_PW} edc.dsp.callback.address=http://supplier-control-plane:9184/api/v1/dsp edc.hostname=supplier-control-plane @@ -46,17 +53,26 @@ edc.transfer.proxy.endpoint=http://supplier-data-plane:9285/api/public/ edc.transfer.proxy.token.signer.privatekey.alias=${SUPPLIER_PRIVATE_KEY_ALIAS} edc.transfer.proxy.token.verifier.publickey.alias=${SUPPLIER_PUBLIC_KEY_ALIAS} # Data-Plane selector configuration -edc.dataplane.selector.edchttp.url=http://supplier-data-plane:9283/api/signaling/v1/dataflows +#edc.dataplane.selector.edchttp.url=http://supplier-data-plane:9283/api/signaling/v1/dataflows + +#web.http.dataplane.port=9185 +#web.http.dataplane.path=/api/v2/dataplane +#edc.dataplane.api.public.baseurl=http://supplier-data-plane:9285/api/public/ + + # HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH -edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH -edc.dataplane.selector.edchttp.sourcetypes=HttpData -edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy -edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://supplier-data-plane:9285/api/public"} +#edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH +#edc.dataplane.selector.edchttp.sourcetypes=HttpData +#edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy +#edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://supplier-data-plane:9285/api/public"} # puris backend receiver for dynamic Endpoint Data References edc.receiver.http.dynamic.endpoint=http://supplier-backend:8082/catena/edrendpoint edc.receiver.http.dynamic.auth-key=X-API-KEY edc.receiver.http.dynamic.auth-code=${SUPPLIER_BACKEND_API_KEY} # Postgresql related configuration +edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_supplier +edc.datasource.default.user=${PG_USER} +edc.datasource.default.password=${PG_PW} edc.datasource.asset.name=asset edc.datasource.asset.url=jdbc:postgresql://postgres-all:5432/edc_supplier # edc.datasource.asset.user and edc.datasource.asset.password are set via .env diff --git a/local/tractus-x-edc/config/supplier/data-plane.properties b/local/tractus-x-edc/config/supplier/data-plane.properties index c9acc4bc..b8403b4d 100644 --- a/local/tractus-x-edc/config/supplier/data-plane.properties +++ b/local/tractus-x-edc/config/supplier/data-plane.properties @@ -17,6 +17,7 @@ web.http.management.path=/api/v1/data edc.dataplane.token.validation.endpoint=http://supplier-control-plane:9183/api/controlplane/control/token # EDC hostname edc.hostname=supplier-data-plane +edc.component.id=supplier-dataplane-component-id # HashiCorp vault related configuration edc.vault.hashicorp.url=http://vault:8200 # set via docker-compose .env @@ -30,6 +31,11 @@ edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_supplier edc.datasource.edr.user=${PG_USER} edc.datasource.edr.password=${PG_PW} # see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/data-plane-store-sql + +edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_supplier +edc.datasource.default.user=${PG_USER} +edc.datasource.default.password=${PG_PW} + edc.datasource.dataplane.name=edr edc.datasource.dataplane.url=jdbc:postgresql://postgres-all:5432/edc_supplier edc.datasource.dataplane.user=${PG_USER} @@ -60,3 +66,6 @@ tx.iam.credentialservice.url=http://mock-util-service:80 edc.iam.did.web.use.https=false edc.dpf.selector.url=http://supplier-control-plane:9183/api/controlplane/control/v1/dataplanes +edc.control.endpoint=http://supplier-control-plane:9183/api/controlplane/control/ +edc.dataplane.api.public.baseurl=http://supplier-data-plane:9285/api/public/ +edc.data.encryption.keys.alias=${SUPPLIER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/docker-compose.yaml b/local/tractus-x-edc/docker-compose.yaml index cbd9a5c2..cc3a5f21 100644 --- a/local/tractus-x-edc/docker-compose.yaml +++ b/local/tractus-x-edc/docker-compose.yaml @@ -21,13 +21,13 @@ version: "3" services: control-plane: - image: tractusx/edc-controlplane-postgresql-hashicorp-vault:0.7.3 + image: tractusx/edc-controlplane-postgresql-hashicorp-vault:0.8.0-rc3 volumes: - ./config/default/opentelemetry.properties:/app/opentelemetry.properties - ./config/default/logging.properties:/app/logging.properties data-plane: - image: tractusx/edc-dataplane-hashicorp-vault:0.7.3 + image: tractusx/edc-dataplane-hashicorp-vault:0.8.0-rc3 volumes: - ./config/default/opentelemetry.properties:/app/opentelemetry.properties - ./config/default/logging.properties:/app/logging.properties From aadc483b8ce062e4a5142e4c7061c9fdad6f46eb Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Wed, 2 Oct 2024 15:50:41 +0200 Subject: [PATCH 2/7] feat: cleanup --- local/docker-compose.yaml | 14 +++++ .../config/customer/control-plane.properties | 58 +----------------- .../config/customer/data-plane.properties | 21 +------ .../config/supplier/control-plane.properties | 61 +------------------ .../config/supplier/data-plane.properties | 21 +------ 5 files changed, 19 insertions(+), 156 deletions(-) diff --git a/local/docker-compose.yaml b/local/docker-compose.yaml index 5aada181..a39f36e7 100644 --- a/local/docker-compose.yaml +++ b/local/docker-compose.yaml @@ -152,6 +152,11 @@ services: - "127.0.0.1:8182:8182" - "127.0.0.1:8183:8183" - "127.0.0.1:8184:8184" + healthcheck: + test: [ "CMD-SHELL", "wget -q --spider http://customer-control-plane:8180/api/check/health" ] + interval: 4s + timeout: 3s + retries: 20 networks: - miw-net extra_hosts: @@ -161,6 +166,8 @@ services: depends_on: postgres-all: condition: service_healthy + edc-customer-control-plane: + condition: service_healthy restart: on-failure extends: file: ./tractus-x-edc/docker-compose.yaml @@ -283,6 +290,11 @@ services: - "127.0.0.1:9183:9183" - "127.0.0.1:9184:9184" - "127.0.0.1:1044:1044" + healthcheck: + test: [ "CMD-SHELL", "wget -q --spider http://supplier-control-plane:9180/api/check/health" ] + interval: 4s + timeout: 3s + retries: 20 env_file: - ./tractus-x-edc/config/supplier/control-plane.properties networks: @@ -294,6 +306,8 @@ services: depends_on: postgres-all: condition: service_healthy + edc-supplier-control-plane: + condition: service_healthy restart: on-failure extends: file: ./tractus-x-edc/docker-compose.yaml diff --git a/local/tractus-x-edc/config/customer/control-plane.properties b/local/tractus-x-edc/config/customer/control-plane.properties index 71f71537..96b107f6 100644 --- a/local/tractus-x-edc/config/customer/control-plane.properties +++ b/local/tractus-x-edc/config/customer/control-plane.properties @@ -51,70 +51,14 @@ edc.vault.hashicorp.token=${VAULT_DEV_ROOT_TOKEN_ID} edc.transfer.proxy.endpoint=http://customer-data-plane:8285/api/public/ edc.transfer.proxy.token.signer.privatekey.alias=${CUSTOMER_PRIVATE_KEY_ALIAS} edc.transfer.proxy.token.verifier.publickey.alias=${CUSTOMER_PUBLIC_KEY_ALIAS} -# Data-Plane selector configuration -edc.dataplane.selector.edchttp.url=http://customer-data-plane:8283/api/signaling/v1/dataflows -web.http.dataplane.port=8185 -web.http.dataplane.path=/api/v2/dataplane edc.dataplane.api.public.baseurl=http://customer-data-plane:8285/api/public/ -# HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH -#edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH -#edc.dataplane.selector.edchttp.sourcetypes=HttpData -#edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy -#edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://customer-data-plane:8285/api/public"} -# backend receiver for static Endpoint Data References -edc.receiver.http.dynamic.endpoint=http://customer-backend:8081/catena/edrendpoint -edc.receiver.http.dynamic.auth-key=X-API-KEY -edc.receiver.http.dynamic.auth-code=${CUSTOMER_BACKEND_API_KEY} # Postgresql related configuration edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_customer edc.datasource.default.user=${PG_USER} edc.datasource.default.password=${PG_PW} -#edc.datasource.asset.name=asset -#edc.datasource.asset.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.asset.user and edc.datasource.asset.password are set via .env -#edc.datasource.asset.user=${PG_USER} -#edc.datasource.asset.password=${PG_PW} -#edc.datasource.contractdefinition.name=contractdefinition -#edc.datasource.contractdefinition.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.contractdefinition.user and edc.datasource.contractdefinition.password are set via .env -#edc.datasource.contractdefinition.user=${PG_USER} -#edc.datasource.contractdefinition.password=${PG_PW} -#edc.datasource.contractnegotiation.name=contractnegotiation -#edc.datasource.contractnegotiation.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.contractnegotiation.user and edc.datasource.contractnegotiation.password are set via .env -#edc.datasource.contractnegotiation.user=${PG_USER} -#edc.datasource.contractnegotiation.password=${PG_PW} -#edc.datasource.policy.name=policy -#edc.datasource.policy.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.policy.user and edc.datasource.policy.password are set via .env -#edc.datasource.policy.user=${PG_USER} -#edc.datasource.policy.password=${PG_PW} -#edc.datasource.transferprocess.name=transferprocess -#edc.datasource.transferprocess.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.transferprocess.user and edc.datasource.transferprocess.password are set via .env -#edc.datasource.transferprocess.user=${PG_USER} -#edc.datasource.transferprocess.password=${PG_PW} -#edc.datasource.policy-monitor.name=policy-monitor -#edc.datasource.policy-monitor.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -#edc.datasource.policy-monitor.user=${PG_USER} -#edc.datasource.policy-monitor.password=${PG_PW} -# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/bpn-validation/business-partner-store-sql -#edc.datasource.bpn.name=policy-monitor -#edc.datasource.bpn.url=jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -#edc.datasource.bpn.user=${PG_USER} -#edc.datasource.bpn.password=${PG_PW} -# new in 0.4.x -# see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/common/store/sql/edr-index-sql -#edc.datasource.edr.name=edr -#edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer -#edc.datasource.edr.user and edc.datasource.edr.password are set via .env -#org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -#edc.datasource.edr.user=${PG_USER} -#edc.datasource.edr.password=${PG_PW} + # Data Encryption edc-extensions/data-encryption edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/config/customer/data-plane.properties b/local/tractus-x-edc/config/customer/data-plane.properties index a81ec753..85011711 100644 --- a/local/tractus-x-edc/config/customer/data-plane.properties +++ b/local/tractus-x-edc/config/customer/data-plane.properties @@ -23,28 +23,10 @@ edc.vault.hashicorp.url=http://vault:8200 edc.vault.hashicorp.health.check.enabled=false edc.vault.hashicorp.token=${VAULT_DEV_ROOT_TOKEN_ID} - edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_customer edc.datasource.default.user=${PG_USER} edc.datasource.default.password=${PG_PW} -# EDR extensions -#edc.datasource.edr.name=edr -#edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_customer -#edc.datasource.edr.user and edc.datasource.edr.password are set via .env -#org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -#edc.datasource.edr.user=${PG_USER} -#edc.datasource.edr.password=${PG_PW} -# see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/data-plane-store-sql -#edc.datasource.dataplane.name=edr -#edc.datasource.dataplane.url=jdbc:postgresql://postgres-all:5432/edc_customer -#edc.datasource.dataplane.user=${PG_USER} -#edc.datasource.dataplane.password=${PG_PW} -# extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/accesstokendata-store-sql -#edc.datasource.accesstokendata.name=edr -#edc.datasource.accesstokendata.url=jdbc:postgresql://postgres-all:5432/edc_customer -#edc.datasource.accesstokendata.user=${PG_USER} -#edc.datasource.accesstokendata.password=${PG_PW} # token refresh edc.dataplane.token.expiry=300 edc.dataplane.token.expiry.tolerance=10 @@ -66,6 +48,5 @@ tx.iam.credentialservice.url=http://mock-util-service:80 edc.iam.did.web.use.https=false edc.dpf.selector.url=http://customer-control-plane:8183/api/controlplane/control/v1/dataplanes -edc.control.endpoint=http://customer-control-plane:8183/api/controlplane/control/ -edc.dataplane.api.public.baseurl=http://customer-data-plane:8285/api/public/ +tx.edc.dpf.consumer.proxy.auth.apikey=${EDC_API_PW} edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/config/supplier/control-plane.properties b/local/tractus-x-edc/config/supplier/control-plane.properties index e75dd20e..4523d29a 100644 --- a/local/tractus-x-edc/config/supplier/control-plane.properties +++ b/local/tractus-x-edc/config/supplier/control-plane.properties @@ -52,71 +52,14 @@ edc.vault.hashicorp.token=${VAULT_DEV_ROOT_TOKEN_ID} edc.transfer.proxy.endpoint=http://supplier-data-plane:9285/api/public/ edc.transfer.proxy.token.signer.privatekey.alias=${SUPPLIER_PRIVATE_KEY_ALIAS} edc.transfer.proxy.token.verifier.publickey.alias=${SUPPLIER_PUBLIC_KEY_ALIAS} -# Data-Plane selector configuration -#edc.dataplane.selector.edchttp.url=http://supplier-data-plane:9283/api/signaling/v1/dataflows -#web.http.dataplane.port=9185 -#web.http.dataplane.path=/api/v2/dataplane -#edc.dataplane.api.public.baseurl=http://supplier-data-plane:9285/api/public/ +edc.dataplane.api.public.baseurl=http://supplier-data-plane:9285/api/public/ - -# HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH -#edc.dataplane.selector.edchttp.transfertypes=HttpData-PULL,HttpData-PUSH -#edc.dataplane.selector.edchttp.sourcetypes=HttpData -#edc.dataplane.selector.edchttp.destinationtypes=HttpData,HttpProxy -#edc.dataplane.selector.edchttp.properties={"publicApiUrl" : "http://supplier-data-plane:9285/api/public"} -# puris backend receiver for dynamic Endpoint Data References -edc.receiver.http.dynamic.endpoint=http://supplier-backend:8082/catena/edrendpoint -edc.receiver.http.dynamic.auth-key=X-API-KEY -edc.receiver.http.dynamic.auth-code=${SUPPLIER_BACKEND_API_KEY} # Postgresql related configuration edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_supplier edc.datasource.default.user=${PG_USER} edc.datasource.default.password=${PG_PW} -edc.datasource.asset.name=asset -edc.datasource.asset.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.asset.user and edc.datasource.asset.password are set via .env -edc.datasource.asset.user=${PG_USER} -edc.datasource.asset.password=${PG_PW} -edc.datasource.contractdefinition.name=contractdefinition -edc.datasource.contractdefinition.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.contractdefinition.user and edc.datasource.contractdefinition.password are set via .env -edc.datasource.contractdefinition.user=${PG_USER} -edc.datasource.contractdefinition.password=${PG_PW} -edc.datasource.contractnegotiation.name=contractnegotiation -edc.datasource.contractnegotiation.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.contractnegotiation.user and edc.datasource.contractnegotiation.password are set via .env -edc.datasource.contractnegotiation.user=${PG_USER} -edc.datasource.contractnegotiation.password=${PG_PW} -edc.datasource.policy.name=policy -edc.datasource.policy.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.policy.user and edc.datasource.policy.password are set via .env -edc.datasource.policy.user=${PG_USER} -edc.datasource.policy.password=${PG_PW} -edc.datasource.transferprocess.name=transferprocess -edc.datasource.transferprocess.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.transferprocess.user and edc.datasource.transferprocess.password are set via .env -edc.datasource.transferprocess.user=${PG_USER} -edc.datasource.transferprocess.password=${PG_PW} -edc.datasource.policy-monitor.name=policy-monitor -edc.datasource.policy-monitor.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -edc.datasource.policy-monitor.user=${PG_USER} -edc.datasource.policy-monitor.password=${PG_PW} -# see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/bpn-validation/business-partner-store-sql -edc.datasource.bpn.name=policy-monitor -edc.datasource.bpn.url=jdbc:postgresql://postgres-all:5432/edc_supplier -# edc.datasource.policy-monitor.user and edc.datasource.policy-monitor.password are set via .env -edc.datasource.bpn.user=${PG_USER} -edc.datasource.bpn.password=${PG_PW} -# new in 0.4.x -# see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/common/store/sql/edr-index-sql -edc.datasource.edr.name=edr -edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_supplier -#edc.datasource.edr.user and edc.datasource.edr.password are set via .env -#org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -edc.datasource.edr.user=${PG_USER} -edc.datasource.edr.password=${PG_PW} + # Data Encryption edc.data.encryption.keys.alias=${SUPPLIER_ENCRYPTION_KEYS_ALIAS} diff --git a/local/tractus-x-edc/config/supplier/data-plane.properties b/local/tractus-x-edc/config/supplier/data-plane.properties index b8403b4d..495656c5 100644 --- a/local/tractus-x-edc/config/supplier/data-plane.properties +++ b/local/tractus-x-edc/config/supplier/data-plane.properties @@ -20,31 +20,13 @@ edc.hostname=supplier-data-plane edc.component.id=supplier-dataplane-component-id # HashiCorp vault related configuration edc.vault.hashicorp.url=http://vault:8200 -# set via docker-compose .env edc.vault.hashicorp.health.check.enabled=false edc.vault.hashicorp.token=${VAULT_DEV_ROOT_TOKEN_ID} -# EDR extensions -edc.datasource.edr.name=edr -edc.datasource.edr.url=jdbc:postgresql://postgres-all:5432/edc_supplier -#edc.datasource.edr.user and edc.datasource.edr.password are set via .env -#org.eclipse.tractusx.edc.postgresql.migration.edr.enabled=false -edc.datasource.edr.user=${PG_USER} -edc.datasource.edr.password=${PG_PW} -# see extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/data-plane-store-sql edc.datasource.default.url=jdbc:postgresql://postgres-all:5432/edc_supplier edc.datasource.default.user=${PG_USER} edc.datasource.default.password=${PG_PW} -edc.datasource.dataplane.name=edr -edc.datasource.dataplane.url=jdbc:postgresql://postgres-all:5432/edc_supplier -edc.datasource.dataplane.user=${PG_USER} -edc.datasource.dataplane.password=${PG_PW} -# extension https://github.com/eclipse-edc/Connector/tree/main/extensions/data-plane/store/sql/accesstokendata-store-sql -edc.datasource.accesstokendata.name=edr -edc.datasource.accesstokendata.url=jdbc:postgresql://postgres-all:5432/edc_supplier -edc.datasource.accesstokendata.user=${PG_USER} -edc.datasource.accesstokendata.password=${PG_PW} # token refresh edc.dataplane.token.expiry=300 edc.dataplane.token.expiry.tolerance=10 @@ -66,6 +48,5 @@ tx.iam.credentialservice.url=http://mock-util-service:80 edc.iam.did.web.use.https=false edc.dpf.selector.url=http://supplier-control-plane:9183/api/controlplane/control/v1/dataplanes -edc.control.endpoint=http://supplier-control-plane:9183/api/controlplane/control/ -edc.dataplane.api.public.baseurl=http://supplier-data-plane:9285/api/public/ +tx.edc.dpf.consumer.proxy.auth.apikey=${EDC_API_PW} edc.data.encryption.keys.alias=${SUPPLIER_ENCRYPTION_KEYS_ALIAS} From 7193799e57c3ec5dc94eb65ceb13ad8c52430ec0 Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Wed, 2 Oct 2024 16:05:00 +0200 Subject: [PATCH 3/7] chore: remove deprecated assetid --- .../edc/logic/service/EdcAdapterService.java | 15 +++++++-------- .../edc/logic/util/EdcRequestBodyBuilder.java | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java index 460799be..04193046 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/service/EdcAdapterService.java @@ -423,12 +423,11 @@ public Response getAllNegotiations() throws IOException { * * @param partner The partner * @param contractId The contract id - * @param assetId The asset id * @return The response object * @throws IOException If the connection to your control plane fails */ - public JsonNode initiateProxyPullTransfer(Partner partner, String contractId, String assetId, String partnerEdcUrl) throws IOException { - var body = edcRequestBodyBuilder.buildProxyPullRequestBody(partner, contractId, assetId, partnerEdcUrl); + public JsonNode initiateProxyPullTransfer(Partner partner, String contractId, String partnerEdcUrl) throws IOException { + var body = edcRequestBodyBuilder.buildProxyPullRequestBody(partner, contractId, partnerEdcUrl); try (var response = sendPostRequest(body, List.of("v3", "transferprocesses"))) { String data = response.body().string(); JsonNode result = objectMapper.readTree(data); @@ -437,8 +436,8 @@ public JsonNode initiateProxyPullTransfer(Partner partner, String contractId, St } } - public JsonNode initiateProxyPullTransfer(Partner partner, String contractId, String assetId) throws IOException { - return initiateProxyPullTransfer(partner, contractId, assetId, partner.getEdcUrl()); + public JsonNode initiateProxyPullTransfer(Partner partner, String contractId) throws IOException { + return initiateProxyPullTransfer(partner, contractId, partner.getEdcUrl()); } /** @@ -551,7 +550,7 @@ private JsonNode postNotificationToPartner(Partner partner, AssetType type, Json } } // Request EdrToken - var transferResp = initiateProxyPullTransfer(partner, contractId, assetId, partnerDspUrl); + var transferResp = initiateProxyPullTransfer(partner, contractId, partnerDspUrl); log.debug("Transfer Request {}", transferResp.toPrettyString()); String transferId = transferResp.get("@id").asText(); // try proxy pull and terminate request @@ -620,7 +619,7 @@ private JsonNode getSubmodelFromPartner(MaterialPartnerRelation mpr, AssetType t log.warn("URL from AAS: " + partnerDspUrl); } // Request EdrToken - var transferResp = initiateProxyPullTransfer(partner, submodelContractId, assetId, partnerDspUrl); + var transferResp = initiateProxyPullTransfer(partner, submodelContractId, partnerDspUrl); log.debug("Transfer Request {}", transferResp.toPrettyString()); String transferId = transferResp.get("@id").asText(); // try proxy pull and terminate request @@ -853,7 +852,7 @@ private JsonNode getAasSubmodelDescriptors(String manufacturerPartId, String man assetId = dtrContractData[0]; contractId = dtrContractData[1]; } - var transferResp = initiateProxyPullTransfer(partner, contractId, assetId); + var transferResp = initiateProxyPullTransfer(partner, contractId); String transferId = transferResp.get("@id").asText(); try { EdrDto edrDto = getAndAwaitEdrDto(transferId); diff --git a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/util/EdcRequestBodyBuilder.java b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/util/EdcRequestBodyBuilder.java index 50fc37ba..13366699 100644 --- a/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/util/EdcRequestBodyBuilder.java +++ b/backend/src/main/java/org/eclipse/tractusx/puris/backend/common/edc/logic/util/EdcRequestBodyBuilder.java @@ -328,12 +328,11 @@ public JsonNode buildAssetNegotiationBody(Partner partner, JsonNode dcatCatalogI * @param assetId The assetId * @return The request body */ - public JsonNode buildProxyPullRequestBody(Partner partner, String contractID, String assetId, String partnerEdcUrl) { + public JsonNode buildProxyPullRequestBody(Partner partner, String contractID, String partnerEdcUrl) { var body = getEdcContextObject(); body.put("connectorId", partner.getBpnl()); body.put("counterPartyAddress", partnerEdcUrl); body.put("contractId", contractID); - body.put("assetId", assetId); body.put("protocol", "dataspace-protocol-http"); body.put("managedResources", false); body.put("transferType", "HttpData-PULL"); From f5d0d27d623ec9f13b85064086a9bc614c9545fc Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Thu, 5 Dec 2024 10:25:33 +0100 Subject: [PATCH 4/7] chore: initial --- local/bdrs/application.properties | 1 - local/docker-compose-infrastructure.yaml | 2 +- local/docker-compose.yaml | 25 ++++++++++++++++++- .../config/customer/control-plane.properties | 1 - .../config/customer/data-plane.properties | 1 - .../config/customer/puris-backend.properties | 5 ---- .../config/supplier/control-plane.properties | 1 - .../config/supplier/data-plane.properties | 1 - .../config/supplier/puris-backend.properties | 5 ---- local/tractus-x-edc/docker-compose.yaml | 6 ++--- 10 files changed, 28 insertions(+), 20 deletions(-) diff --git a/local/bdrs/application.properties b/local/bdrs/application.properties index 917fae8b..3fd7b4c8 100644 --- a/local/bdrs/application.properties +++ b/local/bdrs/application.properties @@ -5,5 +5,4 @@ web.http.directory.port=8582 web.http.directory.path=/api/directory # looking up DIDs should not use https edc.iam.did.web.use.https=false -edc.iam.trusted-issuer.issuer.id=did:web:mock-util-service/trusted-issuer _level=DEBUG diff --git a/local/docker-compose-infrastructure.yaml b/local/docker-compose-infrastructure.yaml index f0ac241f..411f9a8c 100644 --- a/local/docker-compose-infrastructure.yaml +++ b/local/docker-compose-infrastructure.yaml @@ -17,7 +17,6 @@ # # SPDX-License-Identifier: Apache-2.0 # -version: "3" services: # Outcommented as not updated for R24.05 but scheduled for R24.08 @@ -104,6 +103,7 @@ services: environment: WEB_HTTP_PORT: 8580 WEB_HTTP_PATH: /api + edc.iam.trusted-issuer.issuer.id: did:web:mock-util-service/trusted-issuer ports: - "127.0.0.1:8580:8580" - "127.0.0.1:8581:8581" diff --git a/local/docker-compose.yaml b/local/docker-compose.yaml index a39f36e7..cabad613 100644 --- a/local/docker-compose.yaml +++ b/local/docker-compose.yaml @@ -18,7 +18,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -version: "3" + services: puris-frontend-customer: @@ -73,6 +73,11 @@ services: SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/puris_customer SPRING_DATASOURCE_USERNAME: ${PG_USER} SPRING_DATASOURCE_PASSWORD: ${PG_PW} + puris.dtr.idp.edc-client.id: ${KC_MANAGE_CLIENT_ID} + puris.dtr.idp.edc-client.secret.alias: ${CUSTOMER_KC_DTR_PURIS_CLIENT_ALIAS} + puris.dtr.idp.puris-client.id: ${KC_MANAGE_CLIENT_ID} + puris.dtr.idp.puris-client.secret: ${CUSTOMER_KC_DTR_PURIS_CLIENT_SECRET} + networks: - miw-net extra_hosts: @@ -146,6 +151,13 @@ services: container_name: customer-control-plane env_file: - ./tractus-x-edc/config/customer/control-plane.properties + environment: +# edc.datasource.policy-monitor.name: policy-monitor +# edc.datasource.policy-monitor.url: jdbc:postgresql://postgres-all:5432/edc_customer +# edc.datasource.policy-monitor.user: ${PG_USER} +# edc.datasource.policy-monitor.password: ${PG_PW} + edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer + ports: - "127.0.0.1:8180:8180" - "127.0.0.1:8181:8181" @@ -181,6 +193,8 @@ services: - "127.0.0.1:8299:8299" env_file: - ./tractus-x-edc/config/customer/data-plane.properties + environment: + edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer networks: - miw-net extra_hosts: @@ -238,6 +252,11 @@ services: SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/puris_supplier SPRING_DATASOURCE_USERNAME: ${PG_USER} SPRING_DATASOURCE_PASSWORD: ${PG_PW} + server.error.include-message: always + puris.dtr.idp.edc-client.id: ${KC_MANAGE_CLIENT_ID} + puris.dtr.idp.edc-client.secret.alias: ${SUPPLIER_KC_DTR_PURIS_CLIENT_ALIAS} + puris.dtr.idp.puris-client.id: ${KC_MANAGE_CLIENT_ID} + puris.dtr.idp.puris-client.secret: ${SUPPLIER_KC_DTR_PURIS_CLIENT_SECRET} networks: - miw-net extra_hosts: @@ -297,6 +316,8 @@ services: retries: 20 env_file: - ./tractus-x-edc/config/supplier/control-plane.properties + environment: + edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer networks: - miw-net extra_hosts: @@ -321,6 +342,8 @@ services: - "127.0.0.1:9299:9299" env_file: - ./tractus-x-edc/config/supplier/data-plane.properties + environment: + edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer networks: - miw-net extra_hosts: diff --git a/local/tractus-x-edc/config/customer/control-plane.properties b/local/tractus-x-edc/config/customer/control-plane.properties index 96b107f6..c8439a3b 100644 --- a/local/tractus-x-edc/config/customer/control-plane.properties +++ b/local/tractus-x-edc/config/customer/control-plane.properties @@ -31,7 +31,6 @@ edc.iam.sts.oauth.token.url=http://keycloak:8080/realms/miw_test/protocol/openid edc.iam.sts.oauth.client.id=${CUSTOMER_OAUTH_CLIENT_ID} edc.iam.sts.oauth.client.secret.alias=${CUSTOMER_OAUTH_SECRET_ALIAS} tx.edc.iam.sts.dim.url=http://mock-util-service:80/sts -edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer # configure one Credential service for all (else pulled from did, nevertheless done) tx.iam.iatp.credentialservice.url=http://mock-util-service:80 # don't use https during did resolving diff --git a/local/tractus-x-edc/config/customer/data-plane.properties b/local/tractus-x-edc/config/customer/data-plane.properties index 85011711..f900f95e 100644 --- a/local/tractus-x-edc/config/customer/data-plane.properties +++ b/local/tractus-x-edc/config/customer/data-plane.properties @@ -41,7 +41,6 @@ edc.iam.sts.oauth.token.url=http://keycloak:8080/realms/miw_test/protocol/openid edc.iam.sts.oauth.client.id=${CUSTOMER_OAUTH_CLIENT_ID} edc.iam.sts.oauth.client.secret.alias=${CUSTOMER_OAUTH_SECRET_ALIAS} edc.iam.sts.dim.url=http://mock-util-service:80/sts -edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer # configure one Credential service for all (else pulled from did): https://github.com/eclipse-tractusx/tractusx-edc/blob/d7d3586ffc4ef03c858e38fde6bfa8687efa50c9/edc-extensions/bdrs-client/src/main/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtension.java#L50 tx.iam.credentialservice.url=http://mock-util-service:80 # don't use https during did resolving in catalog request diff --git a/local/tractus-x-edc/config/customer/puris-backend.properties b/local/tractus-x-edc/config/customer/puris-backend.properties index 0731a0be..9c07c7e6 100644 --- a/local/tractus-x-edc/config/customer/puris-backend.properties +++ b/local/tractus-x-edc/config/customer/puris-backend.properties @@ -1,5 +1,4 @@ server.port=8081 -server.error.include-message=always puris.demonstrator.role=customer puris.baseurl=http://customer-backend:8081/ puris.itemstocksubmodel.apiassetid=itemstocksubmodel-api-asset @@ -19,10 +18,6 @@ puris.generatematerialcatenaxid=true puris.dtr.idp.enabled=true puris.dtr.idp.tokenurl=http://keycloak:8080/realms/Customer/protocol/openid-connect/token # Note: Currently DTR only allows one client, thus manage client must be used for all. -puris.dtr.idp.edc-client.id=${KC_MANAGE_CLIENT_ID} -puris.dtr.idp.edc-client.secret.alias=${CUSTOMER_KC_DTR_PURIS_CLIENT_ALIAS} -puris.dtr.idp.puris-client.id=${KC_MANAGE_CLIENT_ID} -puris.dtr.idp.puris-client.secret=${CUSTOMER_KC_DTR_PURIS_CLIENT_SECRET} puris.erpadapter.enabled=false puris.erpadapter.url=http://host.docker.internal:5555/ diff --git a/local/tractus-x-edc/config/supplier/control-plane.properties b/local/tractus-x-edc/config/supplier/control-plane.properties index 4523d29a..5acdf231 100644 --- a/local/tractus-x-edc/config/supplier/control-plane.properties +++ b/local/tractus-x-edc/config/supplier/control-plane.properties @@ -32,7 +32,6 @@ edc.iam.sts.oauth.token.url=http://keycloak:8080/realms/miw_test/protocol/openid edc.iam.sts.oauth.client.id=${SUPPLIER_OAUTH_CLIENT_ID} edc.iam.sts.oauth.client.secret.alias=${SUPPLIER_OAUTH_SECRET_ALIAS} tx.edc.iam.sts.dim.url=http://mock-util-service:80/sts -edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer # configure one Credential service for all (else pulled from did, nevertheless done) tx.iam.iatp.credentialservice.url=http://mock-util-service:80 # don't use https during did resolving diff --git a/local/tractus-x-edc/config/supplier/data-plane.properties b/local/tractus-x-edc/config/supplier/data-plane.properties index 495656c5..1383f18d 100644 --- a/local/tractus-x-edc/config/supplier/data-plane.properties +++ b/local/tractus-x-edc/config/supplier/data-plane.properties @@ -41,7 +41,6 @@ edc.iam.sts.oauth.token.url=http://keycloak:8080/realms/miw_test/protocol/openid edc.iam.sts.oauth.client.id=${SUPPLIER_OAUTH_CLIENT_ID} edc.iam.sts.oauth.client.secret.alias=${SUPPLIER_OAUTH_SECRET_ALIAS} edc.iam.sts.dim.url=http://mock-util-service:80/sts -edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer # configure one Credential service for all (else pulled from did): https://github.com/eclipse-tractusx/tractusx-edc/blob/d7d3586ffc4ef03c858e38fde6bfa8687efa50c9/edc-extensions/bdrs-client/src/main/java/org/eclipse/tractusx/edc/identity/mapper/BdrsClientExtension.java#L50 tx.iam.credentialservice.url=http://mock-util-service:80 # don't use https during did resolving in catalog request diff --git a/local/tractus-x-edc/config/supplier/puris-backend.properties b/local/tractus-x-edc/config/supplier/puris-backend.properties index 7f672909..d596ff39 100644 --- a/local/tractus-x-edc/config/supplier/puris-backend.properties +++ b/local/tractus-x-edc/config/supplier/puris-backend.properties @@ -1,5 +1,4 @@ server.port=8082 -server.error.include-message=always puris.demonstrator.role=supplier puris.baseurl=http://supplier-backend:8082/ puris.itemstocksubmodel.apiassetid=itemstocksubmodel-api-asset @@ -19,10 +18,6 @@ puris.generatematerialcatenaxid=true puris.dtr.idp.enabled=true puris.dtr.idp.tokenurl=http://keycloak:8080/realms/Supplier/protocol/openid-connect/token # Note: Currently DTR only allows one client, thus manage client must be used for all. -puris.dtr.idp.edc-client.id=${KC_MANAGE_CLIENT_ID} -puris.dtr.idp.edc-client.secret.alias=${SUPPLIER_KC_DTR_PURIS_CLIENT_ALIAS} -puris.dtr.idp.puris-client.id=${KC_MANAGE_CLIENT_ID} -puris.dtr.idp.puris-client.secret=${SUPPLIER_KC_DTR_PURIS_CLIENT_SECRET} puris.erpadapter.enabled=false puris.erpadapter.url=http://host.docker.internal:5555/ diff --git a/local/tractus-x-edc/docker-compose.yaml b/local/tractus-x-edc/docker-compose.yaml index cc3a5f21..fbb18222 100644 --- a/local/tractus-x-edc/docker-compose.yaml +++ b/local/tractus-x-edc/docker-compose.yaml @@ -18,16 +18,16 @@ # # SPDX-License-Identifier: Apache-2.0 # -version: "3" + services: control-plane: - image: tractusx/edc-controlplane-postgresql-hashicorp-vault:0.8.0-rc3 + image: tractusx/edc-controlplane-postgresql-hashicorp-vault:0.8.0 volumes: - ./config/default/opentelemetry.properties:/app/opentelemetry.properties - ./config/default/logging.properties:/app/logging.properties data-plane: - image: tractusx/edc-dataplane-hashicorp-vault:0.8.0-rc3 + image: tractusx/edc-dataplane-hashicorp-vault:0.8.0 volumes: - ./config/default/opentelemetry.properties:/app/opentelemetry.properties - ./config/default/logging.properties:/app/logging.properties From 98db7614c1a34377a2fda4cbd42d827695e2e0ef Mon Sep 17 00:00:00 2001 From: Ernst-Christoph Schrewe Date: Wed, 11 Dec 2024 13:10:45 +0100 Subject: [PATCH 5/7] fix: review issues --- .github/workflows/trufflehog.yml | 2 +- .thignore | 1 + local/bdrs/application.properties | 4 ++++ local/docker-compose.yaml | 5 ----- .../tractus-x-edc/config/customer/control-plane.properties | 4 ++++ local/tractus-x-edc/config/customer/data-plane.properties | 4 ++++ .../tractus-x-edc/config/customer/puris-backend.properties | 7 +++++++ .../tractus-x-edc/config/supplier/control-plane.properties | 4 ++++ local/tractus-x-edc/config/supplier/data-plane.properties | 4 ++++ .../tractus-x-edc/config/supplier/puris-backend.properties | 7 +++++++ 10 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 .thignore diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml index 6d9ff5cb..6f18c37a 100644 --- a/.github/workflows/trufflehog.yml +++ b/.github/workflows/trufflehog.yml @@ -53,7 +53,7 @@ jobs: with: path: ./ # Scan the entire repository base: "${{ github.event.repository.default_branch }}" # Set base branch for comparison (pull requests) - extra_args: --filter-entropy=4 --results=verified,unknown --debug + extra_args: --filter-entropy=4 --results=verified,unknown --debug --exlude-paths=.thignore - name: Scan Results Status if: steps.trufflehog.outcome == 'failure' diff --git a/.thignore b/.thignore new file mode 100644 index 00000000..0d3e395c --- /dev/null +++ b/.thignore @@ -0,0 +1 @@ +local/.* diff --git a/local/bdrs/application.properties b/local/bdrs/application.properties index 3fd7b4c8..8437549b 100644 --- a/local/bdrs/application.properties +++ b/local/bdrs/application.properties @@ -6,3 +6,7 @@ web.http.directory.path=/api/directory # looking up DIDs should not use https edc.iam.did.web.use.https=false _level=DEBUG + +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer diff --git a/local/docker-compose.yaml b/local/docker-compose.yaml index cabad613..aa51752b 100644 --- a/local/docker-compose.yaml +++ b/local/docker-compose.yaml @@ -152,10 +152,6 @@ services: env_file: - ./tractus-x-edc/config/customer/control-plane.properties environment: -# edc.datasource.policy-monitor.name: policy-monitor -# edc.datasource.policy-monitor.url: jdbc:postgresql://postgres-all:5432/edc_customer -# edc.datasource.policy-monitor.user: ${PG_USER} -# edc.datasource.policy-monitor.password: ${PG_PW} edc.iam.trusted-issuer.portal.id: did:web:mock-util-service/trusted-issuer ports: @@ -252,7 +248,6 @@ services: SPRING_DATASOURCE_URL: jdbc:postgresql://postgres-all:5432/puris_supplier SPRING_DATASOURCE_USERNAME: ${PG_USER} SPRING_DATASOURCE_PASSWORD: ${PG_PW} - server.error.include-message: always puris.dtr.idp.edc-client.id: ${KC_MANAGE_CLIENT_ID} puris.dtr.idp.edc-client.secret.alias: ${SUPPLIER_KC_DTR_PURIS_CLIENT_ALIAS} puris.dtr.idp.puris-client.id: ${KC_MANAGE_CLIENT_ID} diff --git a/local/tractus-x-edc/config/customer/control-plane.properties b/local/tractus-x-edc/config/customer/control-plane.properties index c8439a3b..edc932ab 100644 --- a/local/tractus-x-edc/config/customer/control-plane.properties +++ b/local/tractus-x-edc/config/customer/control-plane.properties @@ -61,3 +61,7 @@ edc.datasource.default.password=${PG_PW} # Data Encryption edc-extensions/data-encryption edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer + diff --git a/local/tractus-x-edc/config/customer/data-plane.properties b/local/tractus-x-edc/config/customer/data-plane.properties index f900f95e..262d2720 100644 --- a/local/tractus-x-edc/config/customer/data-plane.properties +++ b/local/tractus-x-edc/config/customer/data-plane.properties @@ -49,3 +49,7 @@ edc.iam.did.web.use.https=false edc.dpf.selector.url=http://customer-control-plane:8183/api/controlplane/control/v1/dataplanes tx.edc.dpf.consumer.proxy.auth.apikey=${EDC_API_PW} edc.data.encryption.keys.alias=${CUSTOMER_ENCRYPTION_KEYS_ALIAS} + +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer diff --git a/local/tractus-x-edc/config/customer/puris-backend.properties b/local/tractus-x-edc/config/customer/puris-backend.properties index 9c07c7e6..f8be569c 100644 --- a/local/tractus-x-edc/config/customer/puris-backend.properties +++ b/local/tractus-x-edc/config/customer/puris-backend.properties @@ -37,3 +37,10 @@ own.bpna=BPNA4444444444AA own.streetandnumber=13th Street 47 own.zipcodeandcity=10011 New York own.country=USA + +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#puris.dtr.idp.edc-client.id=${KC_MANAGE_CLIENT_ID} +#puris.dtr.idp.edc-client.secret.alias=${CUSTOMER_KC_DTR_PURIS_CLIENT_ALIAS} +#puris.dtr.idp.puris-client.id=${KC_MANAGE_CLIENT_ID} +#puris.dtr.idp.puris-client.secret=${CUSTOMER_KC_DTR_PURIS_CLIENT_SECRET} diff --git a/local/tractus-x-edc/config/supplier/control-plane.properties b/local/tractus-x-edc/config/supplier/control-plane.properties index 5acdf231..fae03bad 100644 --- a/local/tractus-x-edc/config/supplier/control-plane.properties +++ b/local/tractus-x-edc/config/supplier/control-plane.properties @@ -62,3 +62,7 @@ edc.datasource.default.password=${PG_PW} # Data Encryption edc.data.encryption.keys.alias=${SUPPLIER_ENCRYPTION_KEYS_ALIAS} +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer + diff --git a/local/tractus-x-edc/config/supplier/data-plane.properties b/local/tractus-x-edc/config/supplier/data-plane.properties index 1383f18d..c14a60f0 100644 --- a/local/tractus-x-edc/config/supplier/data-plane.properties +++ b/local/tractus-x-edc/config/supplier/data-plane.properties @@ -49,3 +49,7 @@ edc.iam.did.web.use.https=false edc.dpf.selector.url=http://supplier-control-plane:9183/api/controlplane/control/v1/dataplanes tx.edc.dpf.consumer.proxy.auth.apikey=${EDC_API_PW} edc.data.encryption.keys.alias=${SUPPLIER_ENCRYPTION_KEYS_ALIAS} + +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#edc.iam.trusted-issuer.portal.id=did:web:mock-util-service/trusted-issuer diff --git a/local/tractus-x-edc/config/supplier/puris-backend.properties b/local/tractus-x-edc/config/supplier/puris-backend.properties index d596ff39..1a3d293d 100644 --- a/local/tractus-x-edc/config/supplier/puris-backend.properties +++ b/local/tractus-x-edc/config/supplier/puris-backend.properties @@ -38,4 +38,11 @@ own.streetandnumber=Wall Street 101 own.zipcodeandcity=10001 New York own.country=USA +# The following property was moved to the docker-compose.yaml file's "environment" due to some technical docker compose issues: +# https://github.com/docker/compose/issues/12123#issuecomment-2529442716 +#puris.dtr.idp.edc-client.id=${KC_MANAGE_CLIENT_ID} +#puris.dtr.idp.edc-client.secret.alias=${SUPPLIER_KC_DTR_PURIS_CLIENT_ALIAS} +#puris.dtr.idp.puris-client.id=${KC_MANAGE_CLIENT_ID} +#puris.dtr.idp.puris-client.secret=${SUPPLIER_KC_DTR_PURIS_CLIENT_SECRET} + From 661a93666d7abc4d020dfce9f2cc4d874e76160f Mon Sep 17 00:00:00 2001 From: --show-origin Date: Wed, 11 Dec 2024 09:05:46 -0800 Subject: [PATCH 6/7] fix(trufflehog.yml): fixed typo in exclude-paths argument --- .github/workflows/trufflehog.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/trufflehog.yml b/.github/workflows/trufflehog.yml index 6f18c37a..051c68df 100644 --- a/.github/workflows/trufflehog.yml +++ b/.github/workflows/trufflehog.yml @@ -53,7 +53,7 @@ jobs: with: path: ./ # Scan the entire repository base: "${{ github.event.repository.default_branch }}" # Set base branch for comparison (pull requests) - extra_args: --filter-entropy=4 --results=verified,unknown --debug --exlude-paths=.thignore + extra_args: --filter-entropy=4 --results=verified,unknown --debug --exclude-paths=.thignore - name: Scan Results Status if: steps.trufflehog.outcome == 'failure' From c40e0cd50e94a4e23b89221b5a103ac0dffb806b Mon Sep 17 00:00:00 2001 From: --show-origin Date: Wed, 11 Dec 2024 09:56:22 -0800 Subject: [PATCH 7/7] chore(README.md): bump edc version dependency --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c0d3ab72..e799542b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Beside the dependencies provided in the Helm Chart, the following dependencies h | Application | App Version | Chart Version | |-------------------------------------------------------------------------------------------------------------------|-------------|---------------| -| [Tractus-X Connector](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector) | 0.7.3 | 0.7.3 | +| [Tractus-X Connector](https://github.com/eclipse-tractusx/tractusx-edc/tree/main/charts/tractusx-connector) | 0.8.0 | 0.8.0 | | [Digital Twin Registry](https://github.com/eclipse-tractusx/sldt-digital-twin-registry/tree/main/charts/registry) | 0.5.0 | 0.5.0 | ## Overview of Implemented Standards