diff --git a/DEPENDENCIES b/DEPENDENCIES index c89d1789d..6d360dfbc 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -363,6 +363,7 @@ maven/mavencentral/org.eclipse.edc/callback-static-endpoint/0.7.2-20240709-SNAPS maven/mavencentral/org.eclipse.edc/catalog-api/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/catalog-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/catalog-spi/0.7.2-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/catalog-util-lib/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/configuration-filesystem/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/connector-core/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/contract-agreement-api/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc @@ -387,6 +388,8 @@ maven/mavencentral/org.eclipse.edc/control-plane-transfer/0.7.2-20240709-SNAPSHO maven/mavencentral/org.eclipse.edc/control-plane-transform/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/core-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/core-spi/0.7.2-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/crawler-core/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/crawler-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/credential-query-lib/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/crypto-common-lib/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-address-http-data-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc @@ -434,6 +437,9 @@ maven/mavencentral/org.eclipse.edc/edr-index-sql/0.7.2-20240709-SNAPSHOT, Apache maven/mavencentral/org.eclipse.edc/edr-store-core/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/edr-store-receiver/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/edr-store-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/federated-catalog-api/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/federated-catalog-core/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/federated-catalog-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/http-lib/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/http-spi/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/http/0.7.2-20240709-SNAPSHOT, Apache-2.0, approved, technology.edc diff --git a/charts/tractusx-connector-azure-vault/README.md b/charts/tractusx-connector-azure-vault/README.md index 7abd3a3e0..19d25e9e1 100644 --- a/charts/tractusx-connector-azure-vault/README.md +++ b/charts/tractusx-connector-azure-vault/README.md @@ -74,10 +74,18 @@ helm install my-release tractusx-edc/tractusx-connector-azure-vault --version 0. | controlplane.autoscaling.targetMemoryUtilizationPercentage | int | `80` | targetAverageUtilization of memory provided to a pod | | controlplane.bdrs.cache_validity_seconds | int | `600` | Time that a cached BPN/DID resolution map is valid in seconds, default is 600 seconds (10 min) | | controlplane.bdrs.server.url | string | `nil` | URL of the BPN/DID Resolution Service | +| controlplane.catalog | object | `{"crawler":{"initialDelay":null,"num":null,"period":null,"targetsFile":null},"enabled":false}` | configuration for the built-in federated catalog crawler | +| controlplane.catalog.crawler.initialDelay | string | `nil` | Initial delay for the crawling to start. Leave blank for a random delay | +| controlplane.catalog.crawler.num | string | `nil` | Number of desired crawlers. Final number might be different, based on number of crawl targets | +| controlplane.catalog.crawler.period | string | `nil` | Period between two crawl runs in seconds. Default is 60 seconds. | +| controlplane.catalog.crawler.targetsFile | string | `nil` | File path to a JSON file containing TargetNode entries | +| controlplane.catalog.enabled | bool | `false` | Flag to globally enable/disable the FC feature | | controlplane.debug.enabled | bool | `false` | Enables java debugging mode. | | controlplane.debug.port | int | `1044` | Port where the debuggee can connect to. | | controlplane.debug.suspendOnStart | bool | `false` | Defines if the JVM should wait with starting the application until someone connected to the debugging port. | -| controlplane.endpoints | object | `{"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"metrics":{"path":"/metrics","port":9090},"protocol":{"path":"/api/v1/dsp","port":8084}}` | endpoints of the control plane | +| controlplane.endpoints | object | `{"catalog":{"path":"/catalog","port":8085},"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"metrics":{"path":"/metrics","port":9090},"protocol":{"path":"/api/v1/dsp","port":8084}}` | endpoints of the control plane | +| controlplane.endpoints.catalog.path | string | `"/catalog"` | path for incoming catalog cache query requests | +| controlplane.endpoints.catalog.port | int | `8085` | port for incoming catalog cache query requests | | controlplane.endpoints.control | object | `{"path":"/control","port":8083}` | control api, used for internal control calls. can be added to the internal ingress, but should probably not | | controlplane.endpoints.control.path | string | `"/control"` | path for incoming api calls | | controlplane.endpoints.control.port | int | `8083` | port for incoming api calls | diff --git a/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml b/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml index 17d3dbdec..b8a4b2efa 100644 --- a/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml +++ b/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml @@ -172,6 +172,11 @@ spec: value: {{ .Values.controlplane.endpoints.protocol.path | quote }} - name: "EDC_CONTROL_ENDPOINT" value: {{ include "txdc.controlplane.url.control" .}} + - name: "WEB_HTTP_CATALOG_PORT" + value: {{ .Values.controlplane.endpoints.catalog.port | quote }} + - name: "WEB_HTTP_CATALOG_PATH" + value: {{ .Values.controlplane.endpoints.catalog.path | quote }} + ######### ## DSP ## @@ -320,6 +325,30 @@ spec: value: {{ .Values.vault.azure.certificate | quote }} {{- end }} + ############################### + ## FEDERATED CATALOG CRAWLER ## + ############################### + {{- if .Values.controlplane.catalog.crawler.period }} + - name: "EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS" + value: {{ .Values.controlplane.catalog.crawler.period | quote}} + {{- end }} + + {{- if .Values.controlplane.catalog.crawler.initialDelay }} + - name: "EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS" + value: {{ .Values.controlplane.catalog.crawler.initialDelay | quote }} + {{- end }} + + {{- if .Values.controlplane.catalog.crawler.num }} + - name: "EDC_CATALOG_CACHE_PARTITION_NUM_CRAWLERS" + value: {{ .Values.controlplane.catalog.crawler.num }} + {{- end }} + + - name: "EDC_CATALOG_CACHE_EXECUTION_ENABLED" + value: {{ .Values.controlplane.catalog.enabled | quote }} + + - name: "TX_EDC_CATALOG_NODE_LIST_FILE" + value: {{ .Values.controlplane.catalog.crawler.targetsFile }} + ###################################### ## Additional environment variables ## ###################################### diff --git a/charts/tractusx-connector-azure-vault/values.yaml b/charts/tractusx-connector-azure-vault/values.yaml index 702d448e7..2bef692b0 100644 --- a/charts/tractusx-connector-azure-vault/values.yaml +++ b/charts/tractusx-connector-azure-vault/values.yaml @@ -141,6 +141,12 @@ controlplane: # -- path for incoming api calls path: /metrics + catalog: + # -- port for incoming catalog cache query requests + port: 8085 + # -- path for incoming catalog cache query requests + path: /catalog + bdrs: # -- Time that a cached BPN/DID resolution map is valid in seconds, default is 600 seconds (10 min) cache_validity_seconds: 600 @@ -148,6 +154,20 @@ controlplane: # -- URL of the BPN/DID Resolution Service url: + # -- configuration for the built-in federated catalog crawler + catalog: + # -- Flag to globally enable/disable the FC feature + enabled: false + crawler: + # -- Number of desired crawlers. Final number might be different, based on number of crawl targets + num: + # -- Period between two crawl runs in seconds. Default is 60 seconds. + period: + # -- Initial delay for the crawling to start. Leave blank for a random delay + initialDelay: + # -- File path to a JSON file containing TargetNode entries + targetsFile: + service: # -- [Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to expose the running application on a set of Pods as a network service. type: ClusterIP @@ -592,12 +612,12 @@ networkPolicy: controlplane: # -- Specify from rule network policy for cp (defaults to all namespaces) from: - - namespaceSelector: {} + - namespaceSelector: {} # -- Configuration of the dataplane component dataplane: # -- Specify from rule network policy for dp (defaults to all namespaces) from: - - namespaceSelector: {} + - namespaceSelector: {} serviceAccount: # -- Specifies whether a service account should be created diff --git a/charts/tractusx-connector-memory/README.md b/charts/tractusx-connector-memory/README.md index adc8d79d3..99bb96c5e 100644 --- a/charts/tractusx-connector-memory/README.md +++ b/charts/tractusx-connector-memory/README.md @@ -74,10 +74,18 @@ helm install my-release tractusx-edc/tractusx-connector-memory --version 0.7.3 \ | runtime.autoscaling.targetMemoryUtilizationPercentage | int | `80` | targetAverageUtilization of memory provided to a pod | | runtime.bdrs.cache_validity_seconds | int | `600` | Time that a cached BPN/DID resolution map is valid in seconds, default is 600 seconds (10 min) | | runtime.bdrs.server.url | string | `nil` | URL of the BPN/DID Resolution Service | +| runtime.catalog | object | `{"crawler":{"initialDelay":null,"num":null,"period":null,"targetsFile":null},"enabled":false}` | configuration for the built-in federated catalog crawler | +| runtime.catalog.crawler.initialDelay | string | `nil` | Initial delay for the crawling to start. Leave blank for a random delay | +| runtime.catalog.crawler.num | string | `nil` | Number of desired crawlers. Final number might be different, based on number of crawl targets | +| runtime.catalog.crawler.period | string | `nil` | Period between two crawl runs in seconds. Default is 60 seconds. | +| runtime.catalog.crawler.targetsFile | string | `nil` | File path to a JSON file containing TargetNode entries | +| runtime.catalog.enabled | bool | `false` | Flag to globally enable/disable the FC feature | | runtime.debug.enabled | bool | `false` | Enables java debugging mode. | | runtime.debug.port | int | `1044` | Port where the debuggee can connect to. | | runtime.debug.suspendOnStart | bool | `false` | Defines if the JVM should wait with starting the application until someone connected to the debugging port. | -| runtime.endpoints | object | `{"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"protocol":{"path":"/api/v1/dsp","port":8084},"proxy":{"authKey":"password","path":"/proxy","port":8186},"public":{"path":"/api/public","port":8086}}` | endpoints of the controlplane | +| runtime.endpoints | object | `{"catalog":{"path":"/catalog","port":8085},"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"protocol":{"path":"/api/v1/dsp","port":8084},"proxy":{"authKey":"password","path":"/proxy","port":8186},"public":{"path":"/api/public","port":8086}}` | endpoints of the controlplane | +| runtime.endpoints.catalog.path | string | `"/catalog"` | path for incoming catalog cache query requests | +| runtime.endpoints.catalog.port | int | `8085` | port for incoming catalog cache query requests | | runtime.endpoints.control | object | `{"path":"/control","port":8083}` | control api, used for internal control calls. can be added to the internal ingress, but should probably not | | runtime.endpoints.control.path | string | `"/control"` | path for incoming api calls | | runtime.endpoints.control.port | int | `8083` | port for incoming api calls | diff --git a/charts/tractusx-connector-memory/templates/deployment-runtime.yaml b/charts/tractusx-connector-memory/templates/deployment-runtime.yaml index b63a6ff80..806c3c503 100644 --- a/charts/tractusx-connector-memory/templates/deployment-runtime.yaml +++ b/charts/tractusx-connector-memory/templates/deployment-runtime.yaml @@ -187,6 +187,10 @@ spec: value: {{ .Values.runtime.endpoints.public.port | quote }} - name: "WEB_HTTP_PUBLIC_PATH" value: {{ .Values.runtime.endpoints.public.path | quote }} + - name: "WEB_HTTP_CATALOG_PORT" + value: {{ .Values.runtime.endpoints.catalog.port | quote }} + - name: "WEB_HTTP_CATALOG_PATH" + value: {{ .Values.runtime.endpoints.catalog.path | quote }} ######### ## DSP ## @@ -270,13 +274,30 @@ spec: - name: "EDC_VAULT_SECRETS" value: {{ .Values.vault.secrets | quote}} - ########################### - ## AAS WRAPPER EXTENSION ## - ########################### - - name: "EDC_CP_ADAPTER_CACHE_CATALOG_EXPIRE_AFTER" - value: "0" - - name: "EDC_CP_ADAPTER_REUSE_CONTRACT_AGREEMENT" - value: "0" + + ############################### + ## FEDERATED CATALOG CRAWLER ## + ############################### + {{- if .Values.runtime.catalog.crawler.period }} + - name: "EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS" + value: {{ .Values.runtime.catalog.crawler.period | quote}} + {{- end }} + + {{- if .Values.runtime.catalog.crawler.initialDelay }} + - name: "EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS" + value: {{ .Values.runtime.catalog.crawler.initialDelay | quote }} + {{- end }} + + {{- if .Values.runtime.catalog.crawler.num }} + - name: "EDC_CATALOG_CACHE_PARTITION_NUM_CRAWLERS" + value: {{ .Values.runtime.catalog.crawler.num }} + {{- end }} + + - name: "EDC_CATALOG_CACHE_EXECUTION_ENABLED" + value: {{ .Values.runtime.catalog.enabled | quote }} + + - name: "TX_EDC_CATALOG_NODE_LIST_FILE" + value: {{ .Values.runtime.catalog.crawler.targetsFile }} ###################################### ## Additional environment variables ## diff --git a/charts/tractusx-connector-memory/values.yaml b/charts/tractusx-connector-memory/values.yaml index c7c4ad63b..595db2cb1 100644 --- a/charts/tractusx-connector-memory/values.yaml +++ b/charts/tractusx-connector-memory/values.yaml @@ -144,6 +144,12 @@ runtime: # -- authentication key, must be attached to each request as `X-Api-Key` header authKey: "password" + catalog: + # -- port for incoming catalog cache query requests + port: 8085 + # -- path for incoming catalog cache query requests + path: /catalog + token: refresh: # -- TTL in seconds for access tokens (also known as EDR token) @@ -166,6 +172,20 @@ runtime: # -- URL of the BPN/DID Resolution Service url: + # -- configuration for the built-in federated catalog crawler + catalog: + # -- Flag to globally enable/disable the FC feature + enabled: false + crawler: + # -- Number of desired crawlers. Final number might be different, based on number of crawl targets + num: + # -- Period between two crawl runs in seconds. Default is 60 seconds. + period: + # -- Initial delay for the crawling to start. Leave blank for a random delay + initialDelay: + # -- File path to a JSON file containing TargetNode entries + targetsFile: + service: # -- [Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to expose the running application on a set of Pods as a network service. type: ClusterIP diff --git a/charts/tractusx-connector/README.md b/charts/tractusx-connector/README.md index 7168d2bce..019d8a74e 100644 --- a/charts/tractusx-connector/README.md +++ b/charts/tractusx-connector/README.md @@ -71,10 +71,18 @@ helm install my-release tractusx-edc/tractusx-connector --version 0.7.3 \ | controlplane.autoscaling.targetMemoryUtilizationPercentage | int | `80` | targetAverageUtilization of memory provided to a pod | | controlplane.bdrs.cache_validity_seconds | int | `600` | Time that a cached BPN/DID resolution map is valid in seconds, default is 600 seconds (10 min) | | controlplane.bdrs.server.url | string | `nil` | URL of the BPN/DID Resolution Service | +| controlplane.catalog | object | `{"crawler":{"initialDelay":null,"num":null,"period":null,"targetsFile":null},"enabled":false}` | configuration for the built-in federated catalog crawler | +| controlplane.catalog.crawler.initialDelay | string | `nil` | Initial delay for the crawling to start. Leave blank for a random delay | +| controlplane.catalog.crawler.num | string | `nil` | Number of desired crawlers. Final number might be different, based on number of crawl targets | +| controlplane.catalog.crawler.period | string | `nil` | Period between two crawl runs in seconds. Default is 60 seconds. | +| controlplane.catalog.crawler.targetsFile | string | `nil` | File path to a JSON file containing TargetNode entries | +| controlplane.catalog.enabled | bool | `false` | Flag to globally enable/disable the FC feature | | controlplane.debug.enabled | bool | `false` | Enables java debugging mode. | | controlplane.debug.port | int | `1044` | Port where the debuggee can connect to. | | controlplane.debug.suspendOnStart | bool | `false` | Defines if the JVM should wait with starting the application until someone connected to the debugging port. | -| controlplane.endpoints | object | `{"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"metrics":{"path":"/metrics","port":9090},"protocol":{"path":"/api/v1/dsp","port":8084}}` | endpoints of the control plane | +| controlplane.endpoints | object | `{"catalog":{"path":"/catalog","port":8085},"control":{"path":"/control","port":8083},"default":{"path":"/api","port":8080},"management":{"authKey":"password","path":"/management","port":8081},"metrics":{"path":"/metrics","port":9090},"protocol":{"path":"/api/v1/dsp","port":8084}}` | endpoints of the control plane | +| controlplane.endpoints.catalog.path | string | `"/catalog"` | path for incoming catalog cache query requests | +| controlplane.endpoints.catalog.port | int | `8085` | port for incoming catalog cache query requests | | controlplane.endpoints.control | object | `{"path":"/control","port":8083}` | control api, used for internal control calls. can be added to the internal ingress, but should probably not | | controlplane.endpoints.control.path | string | `"/control"` | path for incoming api calls | | controlplane.endpoints.control.port | int | `8083` | port for incoming api calls | diff --git a/charts/tractusx-connector/templates/deployment-controlplane.yaml b/charts/tractusx-connector/templates/deployment-controlplane.yaml index 9cf9e6c4b..90ebc5a64 100644 --- a/charts/tractusx-connector/templates/deployment-controlplane.yaml +++ b/charts/tractusx-connector/templates/deployment-controlplane.yaml @@ -172,6 +172,10 @@ spec: value: {{ .Values.controlplane.endpoints.protocol.path | quote }} - name: "EDC_CONTROL_ENDPOINT" value: {{ include "txdc.controlplane.url.control" .}} + - name: "WEB_HTTP_CATALOG_PORT" + value: {{ .Values.controlplane.endpoints.catalog.port | quote }} + - name: "WEB_HTTP_CATALOG_PATH" + value: {{ .Values.controlplane.endpoints.catalog.path | quote }} ######### ## DSP ## @@ -317,6 +321,31 @@ spec: - name: "EDC_VAULT_HASHICORP_API_HEALTH_CHECK_PATH" value: {{ .Values.vault.hashicorp.paths.health | quote }} + + ############################### + ## FEDERATED CATALOG CRAWLER ## + ############################### + {{- if .Values.controlplane.catalog.crawler.period }} + - name: "EDC_CATALOG_CACHE_EXECUTION_PERIOD_SECONDS" + value: {{ .Values.controlplane.catalog.crawler.period | quote}} + {{- end }} + + {{- if .Values.controlplane.catalog.crawler.initialDelay }} + - name: "EDC_CATALOG_CACHE_EXECUTION_DELAY_SECONDS" + value: {{ .Values.controlplane.catalog.crawler.initialDelay | quote }} + {{- end }} + + {{- if .Values.controlplane.catalog.crawler.num }} + - name: "EDC_CATALOG_CACHE_PARTITION_NUM_CRAWLERS" + value: {{ .Values.controlplane.catalog.crawler.num }} + {{- end }} + + - name: "EDC_CATALOG_CACHE_EXECUTION_ENABLED" + value: {{ .Values.controlplane.catalog.enabled | quote }} + + - name: "TX_EDC_CATALOG_NODE_LIST_FILE" + value: {{ .Values.controlplane.catalog.crawler.targetsFile }} + ###################################### ## Additional environment variables ## ###################################### diff --git a/charts/tractusx-connector/values.yaml b/charts/tractusx-connector/values.yaml index 48e32fda8..4b1e702f6 100644 --- a/charts/tractusx-connector/values.yaml +++ b/charts/tractusx-connector/values.yaml @@ -142,6 +142,11 @@ controlplane: port: 9090 # -- path for incoming api calls path: /metrics + catalog: + # -- port for incoming catalog cache query requests + port: 8085 + # -- path for incoming catalog cache query requests + path: /catalog bdrs: # -- Time that a cached BPN/DID resolution map is valid in seconds, default is 600 seconds (10 min) @@ -150,6 +155,21 @@ controlplane: # -- URL of the BPN/DID Resolution Service url: + # -- configuration for the built-in federated catalog crawler + catalog: + # -- Flag to globally enable/disable the FC feature + enabled: false + crawler: + # -- Number of desired crawlers. Final number might be different, based on number of crawl targets + num: + # -- Period between two crawl runs in seconds. Default is 60 seconds. + period: + # -- Initial delay for the crawling to start. Leave blank for a random delay + initialDelay: + # -- File path to a JSON file containing TargetNode entries + targetsFile: + + service: # -- [Service type](https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types) to expose the running application on a set of Pods as a network service. type: ClusterIP diff --git a/docs/development/management-domains/README.md b/docs/development/management-domains/README.md new file mode 100644 index 000000000..e6741a7b4 --- /dev/null +++ b/docs/development/management-domains/README.md @@ -0,0 +1,199 @@ +# Management Domains Primer + +> Disclaimer: this is an incubating feature that comes without any guarantees of any sort. Changes and even complete +> removal are possible without prior notice. Due to its experimental nature, this feature is disabled by default. + +Management Domains are a way to reflect a company's internal organizational structure in the deployment of several +connectors. For details please refer to +the [official documentation](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/management-domains.md). + +## Usage in Tractus-X + +There are several reasons why a company might consider the use of Management Domains: + +- independent management of connector instances: multiple departments within a (larger) company want to maintain + independence w.r.t. their data, so they operate individual EDCs +- independent version upgrade cycles of connector instances: multiple departments may choose to upgrade their EDCs at + different intervals or velocities. **Note that this only refers to minor changes of APIs, SPIs, configuration etc. All + instances must still maintain protocol (DSP, DCP,...) compatibility!** + +For the purposes of Tractus-X, the usage of +deployment [type 2b](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/management-domains.md#type-2b-edc-catalog-server-and-controldata-plane-runtimes) +or [type 2c](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/management-domains.md#type-2c-catalog-servercontrol-plane-with-data-plane-runtime) +is assumed: + +![type 2b](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/distributed.type2.b.svg) + +Note that is possible to use a conventional Tractus-X EDC runtime as catalog server. + +### Limitations and Caveats + +All runtimes within one company share the same `participantId`, thus they are one single logical entity. They must share +the same set of VerifiableCredentials. In practice, they could either share one credential wallet instance, or have +multiple identical instances. + +## The Federated Catalog crawler + +The Federated Catalog crawler subsystem periodically scrapes target nodes (i.e. catalog servers or EDC runtimes) by +executing a catalog request. If it encounters an `Asset`, that points to another `Asset`, it will automatically recurse +down by following the link, thus building a hierarchical catalog. In other words, there can "Catalogs of Catalogs". A +special [asset type](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/management-domains.md#31-asset-and-dataset-specialization) +was introduced for this purpose. + +Every target node produces one `Catalog`, so in the end there is a `List` which contains all the assets that +are available in a particular dataspace. + +## The Federated Catalog QueryApi + +After some time, when all crawlers have returned, this list of catalogs can be queried using a new REST endpoint: + +```shell +POST /v1alpha/catalog/query +{ + "@context": { + "edc": "https://w3id.org/edc/v0.0.1/ns/" + }, + "@type": "QuerySpec" +} +``` + +the response body contains a list of catalogs as JSON-LD array (`hasPolicy` omitted for legibility). Notice +the `@type: "dcat:Catalog` +of the first `dataset` entry. This indicates that the "outer" Catalog actually contains another Catalog: + +```json +[ + { + "@id": "a6574324-8dd2-4169-adf1-f94423c5d213", + "@type": "dcat:Catalog", + "dcat:dataset": [ + { + "@id": "1af92996-0bb7-4bdd-b04e-938fe54fb27f", + "@type": "dcat:Catalog", + "dcat:dataset": [ + { + "@id": "asset-2", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + }, + "dcat:distribution": [], + "id": "asset-2" + }, + { + "@id": "asset-1", + "@type": "dcat:Dataset", + "odrl:hasPolicy": { + }, + "dcat:distribution": [], + "id": "asset-1" + } + ], + "dcat:distribution": [], + "dcat:service": { + "@id": "684635d3-acc8-4ff5-ba71-d1e968be5e3b", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointUrl": "http://localhost:8192/api/dsp", + "dct:terms": "dspace:connector", + "dct:endpointUrl": "http://localhost:8192/api/dsp" + }, + "dspace:participantId": "did:web:localhost%3A7093", + "participantId": "did:web:localhost%3A7093" + } + ], + "dcat:distribution": [], + "dcat:service": { + "@id": "8c99b5d6-0c46-455e-97b1-7b31f32a714b", + "@type": "dcat:DataService", + "dcat:endpointDescription": "dspace:connector", + "dcat:endpointUrl": "http://localhost:8092/api/dsp", + "dct:terms": "dspace:connector", + "dct:endpointUrl": "http://localhost:8092/api/dsp" + }, + "dspace:participantId": "did:web:localhost%3A7093", + "originator": "http://localhost:8092/api/dsp", + "participantId": "did:web:localhost%3A7093" + } +] +``` + +There is an additional optional query param `?flatten=true` that puts all `dataset` objects in a flat list for +linear consumption. Note that the hierarchy and provenance of a single `dataset` can't be restored anymore. + +## Implementation guidance + +Under the hood, a Tractus-X EDC connector leverages +the [Federated Catalog](https://github.com/eclipse-edc/FederatedCatalog/) and its crawler mechanism to periodically +scrape the dataspace. Note that without additional and explicit configuration, this feature is **disabled** +out-of-the-box! + +There are several steps a consumer EDC needs to take before being able to use it: + +### Create `CatalogAssets` + +`CatalogAssets` are assets that point to another catalog using hyperlinks. They can be thought of as pointers to another +catalog. A catalog server (on the provider side) creates `CatalogAsset` via the Management API by using the following +request body: + +```json +{ + "@id": "linked-asset-1", + "@type": "CatalogAsset", + "properties": { + "description": "This is a linked asset that points to another EDC's catalog." + }, + "dataAddress": { + "@type": "DataAddress", + "type": "HttpData", + "baseUrl": "https://another-edc.com/api/dsp" + } +} +``` + +### Enable and configure the crawler subsystem + +The following config values are used to configure the crawlers: + +| Configuration property | Helm value | default value | description | +|----------------------------------------------|---------------------------------------------|---------------|--------------------------------------------------------------------| +| `edc.catalog.cache.execution.enabled` | `controlplane.catalog.enabled` | false | enables/disables periodic crawling | +| `edc.catalog.cache.execution.period.seconds` | `controlplane.catalog.crawler.period` | 60 | period between two crawl runs | +| `edc.catalog.cache.execution.delay.seconds` | `controlplane.catalog.crawler.initialDelay` | random | initial delay before the first crawl run | +| `edc.catalog.cache.partition.num.crawlers` | `controlplane.catalog.crawler.num` | 2 | desired number of crawlers | +| `web.http.catalog.port` | `controlplane.endpoints.catalog.port` | 8085 | port of the catalog QueryApi's web context | +| `web.http.catalog.path` | `controlplane.endpoints.catalog.path` | /catalog | URL path of the catalog QueryApi's web context | +| `tx.edc.catalog.node.list.file` | `controlplane.catalog.crawler.targetsFile ` | | path to a JSON file that contains an array of `TargetNode` objects | + +all of these config values are optional and come preconfigured with defaults. + +### Configure the target nodes + +The crawler subsystem needs a list of `TargetNode` objects, which it obtains from the `TargetNodeDirectory`. Currently, +for testing purposes, there is a file-based implementation. To use it, a JSON file is needed that contains an array +of `TargetNode` objects: + +```json +[ + { + "name": "test-1", + "url": "https://nodes.com/test-1/api/dsp", + "id": "1", + "supportedProtocols": "dataspace-protocol-http" + }, + { + "name": "test-2", + "url": "https://nodes.com/test-2/api/dsp", + "id": "2", + "supportedProtocols": "dataspace-protocol-http" + } +] +``` + +On Kubernetes, a common way to achieve this is using ConfigMaps. + +## References + +- [Management Domains + documentation](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/management-domains/management-domains.md) +- [Federated Catalog + documentation](https://github.com/eclipse-edc/FederatedCatalog/tree/main/docs/developer/architecture) \ No newline at end of file diff --git a/edc-controlplane/edc-controlplane-base/build.gradle.kts b/edc-controlplane/edc-controlplane-base/build.gradle.kts index 72451290f..b5a0074b9 100644 --- a/edc-controlplane/edc-controlplane-base/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-base/build.gradle.kts @@ -39,7 +39,7 @@ dependencies { // Credentials CX policies runtimeOnly(project(":edc-extensions:cx-policy")) - // needed for IATP integration + // needed for DCP integration runtimeOnly(project(":core:json-ld-core")) runtimeOnly(libs.edc.core.did) runtimeOnly(libs.edc.identity.did.web) @@ -76,4 +76,9 @@ dependencies { runtimeOnly(libs.edc.controlplane.callback.dispatcher.event) runtimeOnly(libs.edc.controlplane.callback.dispatcher.http) + // Federated Catalog Crawler + Query API + runtimeOnly(project(":edc-extensions:federated-catalog")) + runtimeOnly(libs.edc.fc.core) + runtimeOnly(libs.edc.fc.api) + } diff --git a/edc-extensions/federated-catalog/build.gradle.kts b/edc-extensions/federated-catalog/build.gradle.kts new file mode 100644 index 000000000..b4d7e0fe5 --- /dev/null +++ b/edc-extensions/federated-catalog/build.gradle.kts @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +plugins { + `maven-publish` + `java-library` +} + +dependencies { + implementation(libs.edc.spi.core) + implementation(libs.edc.fc.spi.crawler) + + testImplementation(libs.edc.junit) +} diff --git a/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FederatedCatalogExtension.java b/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FederatedCatalogExtension.java new file mode 100644 index 000000000..2768b739f --- /dev/null +++ b/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FederatedCatalogExtension.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.eclipse.tractusx.edc.federatedcatalog; + +import org.eclipse.edc.crawler.spi.TargetNode; +import org.eclipse.edc.crawler.spi.TargetNodeDirectory; +import org.eclipse.edc.runtime.metamodel.annotation.Extension; +import org.eclipse.edc.runtime.metamodel.annotation.Inject; +import org.eclipse.edc.runtime.metamodel.annotation.Provider; +import org.eclipse.edc.runtime.metamodel.annotation.Setting; +import org.eclipse.edc.spi.system.ServiceExtension; +import org.eclipse.edc.spi.system.ServiceExtensionContext; +import org.eclipse.edc.spi.types.TypeManager; + +import java.io.File; +import java.util.Collections; +import java.util.List; + +import static java.util.Optional.ofNullable; +import static org.eclipse.tractusx.edc.federatedcatalog.FederatedCatalogExtension.NAME; + + +@Extension(value = NAME) +public class FederatedCatalogExtension implements ServiceExtension { + + public static final String NAME = "Tractus-X Federated Catalog Extension"; + + @Setting(value = "File path to a JSON file containing TargetNode entries for the Federated Catalog Crawler") + public static final String NODE_LIST_FILE = "tx.edc.catalog.node.list.file"; + + @Inject + private TypeManager typeManager; + + + @Override + public String name() { + return NAME; + } + + @Provider + public TargetNodeDirectory createFileBasedNodeDirectory(ServiceExtensionContext context) { + return ofNullable(context.getConfig().getString(NODE_LIST_FILE, null)) + .map(File::new) + .map(f -> (TargetNodeDirectory) new FileBasedTargetNodeDirectory(f, context.getMonitor(), typeManager.getMapper())) + .orElseGet(() -> { + context.getMonitor().warning("TargetNode file is not configured ('%s'). Federated Catalog Crawler will be inactive.".formatted(NODE_LIST_FILE)); + return new NoopNodeDirectory(); + }); + + } + + private static class NoopNodeDirectory implements TargetNodeDirectory { + @Override + public List getAll() { + return Collections.emptyList(); + } + + @Override + public void insert(TargetNode targetNode) { + + } + } +} diff --git a/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectory.java b/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectory.java new file mode 100644 index 000000000..7a136399f --- /dev/null +++ b/edc-extensions/federated-catalog/src/main/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectory.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.eclipse.tractusx.edc.federatedcatalog; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.edc.crawler.spi.TargetNode; +import org.eclipse.edc.crawler.spi.TargetNodeDirectory; +import org.eclipse.edc.spi.EdcException; +import org.eclipse.edc.spi.monitor.Monitor; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +/** + * File-based implementation of the {@link TargetNodeDirectory} that returns a static {@code List} that are + * serialized as JSON and stored in a file. + */ +class FileBasedTargetNodeDirectory implements TargetNodeDirectory { + + private static final TypeReference> LIST_TYPE = new TypeReference<>() { + }; + private final File nodeFile; + private final Monitor monitor; + private final ObjectMapper objectMapper; + private List nodes; + + FileBasedTargetNodeDirectory(File nodeFile, Monitor monitor, ObjectMapper objectMapper) { + + this.nodeFile = nodeFile; + this.monitor = monitor; + this.objectMapper = objectMapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + } + + @Override + public List getAll() { + + if (nodes == null) { + try { + nodes = objectMapper.readValue(nodeFile, LIST_TYPE); + } catch (IOException e) { + throw new EdcException(e); + } + } + return nodes; + + } + + @Override + public void insert(TargetNode targetNode) { + monitor.warning("Inserting nodes into the file-based TargetNodeDirectory is not supported."); + } +} diff --git a/edc-extensions/federated-catalog/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension b/edc-extensions/federated-catalog/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension new file mode 100644 index 000000000..72bc8734d --- /dev/null +++ b/edc-extensions/federated-catalog/src/main/resources/META-INF/services/org.eclipse.edc.spi.system.ServiceExtension @@ -0,0 +1,21 @@ +################################################################################# +# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +################################################################################# + +org.eclipse.tractusx.edc.federatedcatalog.FederatedCatalogExtension diff --git a/edc-extensions/federated-catalog/src/test/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectoryTest.java b/edc-extensions/federated-catalog/src/test/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectoryTest.java new file mode 100644 index 000000000..3e491de8c --- /dev/null +++ b/edc-extensions/federated-catalog/src/test/java/org/eclipse/tractusx/edc/federatedcatalog/FileBasedTargetNodeDirectoryTest.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +package org.eclipse.tractusx.edc.federatedcatalog; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.eclipse.edc.crawler.spi.TargetNode; +import org.eclipse.edc.junit.testfixtures.TestUtils; +import org.eclipse.edc.spi.EdcException; +import org.eclipse.edc.spi.monitor.Monitor; +import org.junit.jupiter.api.Test; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatNoException; +import static org.assertj.core.api.Assertions.assertThatThrownBy; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +class FileBasedTargetNodeDirectoryTest { + + @Test + void getAll_hasEntries() { + var nodeDir = new FileBasedTargetNodeDirectory(TestUtils.getFileFromResourceName("nodes.json"), mock(), new ObjectMapper()); + assertThat(nodeDir.getAll()).hasSize(2); + } + + @Test + void getAll_fileNotExist() { + var nodeDir = new FileBasedTargetNodeDirectory(new File("not-exist.json"), mock(), new ObjectMapper()); + assertThatThrownBy(nodeDir::getAll) + .isInstanceOf(EdcException.class) + .hasRootCauseInstanceOf(FileNotFoundException.class); + } + + @Test + void insert() { + var monitor = mock(Monitor.class); + var nodeDir = new FileBasedTargetNodeDirectory(new File("not-exist.json"), monitor, new ObjectMapper()); + + assertThatNoException().isThrownBy(() -> nodeDir.insert(new TargetNode("foo", "bar", "https://foobar.com", List.of()))); + verify(monitor).warning("Inserting nodes into the file-based TargetNodeDirectory is not supported."); + } +} \ No newline at end of file diff --git a/edc-extensions/federated-catalog/src/test/resources/nodes.json b/edc-extensions/federated-catalog/src/test/resources/nodes.json new file mode 100644 index 000000000..895b6d59a --- /dev/null +++ b/edc-extensions/federated-catalog/src/test/resources/nodes.json @@ -0,0 +1,14 @@ +[ + { + "name": "test-1", + "url": "http://nodes.com/test-1", + "id": "1", + "supportedProtocols": "test-protocol" + }, + { + "name": "test-2", + "url": "http://nodes.com/test-2", + "id": "2", + "supportedProtocols": "another-test-protocol" + } +] \ No newline at end of file diff --git a/edc-tests/deployment/src/main/resources/helm/tractusx-connector-test.yaml b/edc-tests/deployment/src/main/resources/helm/tractusx-connector-test.yaml index 410a656f4..7598c1809 100644 --- a/edc-tests/deployment/src/main/resources/helm/tractusx-connector-test.yaml +++ b/edc-tests/deployment/src/main/resources/helm/tractusx-connector-test.yaml @@ -36,6 +36,10 @@ iatp: id: "test-client-id" secret_alias: "test-alias" controlplane: + debug: + enabled: true + port: 1044 + suspendOnStart: false service: type: NodePort endpoints: @@ -54,7 +58,7 @@ controlplane: dataplane: debug: enabled: true - port: 1044 + port: 1045 suspendOnStart: false endpoints: proxy: diff --git a/edc-tests/edc-controlplane/catalog-tests/build.gradle.kts b/edc-tests/edc-controlplane/catalog-tests/build.gradle.kts index eb3345c80..34613d0c2 100644 --- a/edc-tests/edc-controlplane/catalog-tests/build.gradle.kts +++ b/edc-tests/edc-controlplane/catalog-tests/build.gradle.kts @@ -29,6 +29,7 @@ dependencies { testImplementation(libs.edc.junit) testImplementation(libs.restAssured) testImplementation(libs.awaitility) + testRuntimeOnly(libs.edc.transaction.local) testCompileOnly(project(":edc-tests:runtime:runtime-memory")) testCompileOnly(project(":edc-tests:runtime:runtime-postgresql")) diff --git a/edc-tests/edc-controlplane/edr-api-tests/build.gradle.kts b/edc-tests/edc-controlplane/edr-api-tests/build.gradle.kts index 42771ae1d..d3d9d8ba4 100644 --- a/edc-tests/edc-controlplane/edr-api-tests/build.gradle.kts +++ b/edc-tests/edc-controlplane/edr-api-tests/build.gradle.kts @@ -29,6 +29,8 @@ dependencies { testImplementation(libs.edc.junit) testImplementation(libs.restAssured) testImplementation(libs.awaitility) + testRuntimeOnly(libs.edc.transaction.local) + } // do not publish diff --git a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/participant/TractusxParticipantBase.java b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/participant/TractusxParticipantBase.java index 0d260e475..60bba45f5 100644 --- a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/participant/TractusxParticipantBase.java +++ b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/participant/TractusxParticipantBase.java @@ -94,6 +94,8 @@ public Map getConfiguration() { put("web.http.management.path", managementEndpoint.getUrl().getPath()); put("web.http.control.port", String.valueOf(controlPlaneControl.getPort())); put("web.http.control.path", controlPlaneControl.getPath()); + put("web.http.catalog.port", String.valueOf(getFreePort())); + put("web.http.catalog.path", "/api/catalog"); put("edc.dsp.callback.address", protocolEndpoint.getUrl().toString()); put("edc.api.auth.key", MANAGEMENT_API_KEY); put("web.http.public.path", "/api/public"); diff --git a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/runtimes/PgParticipantRuntime.java b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/runtimes/PgParticipantRuntime.java index 88855d876..7c1b465f5 100644 --- a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/runtimes/PgParticipantRuntime.java +++ b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/runtimes/PgParticipantRuntime.java @@ -29,7 +29,7 @@ class PgParticipantRuntime extends ParticipantRuntime { - public PgParticipantRuntime(String moduleName, String runtimeName, String bpn, Map properties) { + PgParticipantRuntime(String moduleName, String runtimeName, String bpn, Map properties) { super(moduleName, runtimeName, bpn, properties); mockVault(); } diff --git a/edc-tests/edc-controlplane/iatp-tests/build.gradle.kts b/edc-tests/edc-controlplane/iatp-tests/build.gradle.kts index bd42ed85a..a2e3f5c65 100644 --- a/edc-tests/edc-controlplane/iatp-tests/build.gradle.kts +++ b/edc-tests/edc-controlplane/iatp-tests/build.gradle.kts @@ -34,6 +34,8 @@ dependencies { testImplementation(libs.edc.core.token) testImplementation(libs.edc.identity.vc.ldp) testImplementation(libs.edc.lib.jws2020) + testRuntimeOnly(libs.edc.transaction.local) + // 3rd party libs testImplementation(libs.netty.mockserver) testImplementation(libs.restAssured) diff --git a/edc-tests/edc-controlplane/policy-tests/build.gradle.kts b/edc-tests/edc-controlplane/policy-tests/build.gradle.kts index 42771ae1d..f8f1ae8b0 100644 --- a/edc-tests/edc-controlplane/policy-tests/build.gradle.kts +++ b/edc-tests/edc-controlplane/policy-tests/build.gradle.kts @@ -29,6 +29,7 @@ dependencies { testImplementation(libs.edc.junit) testImplementation(libs.restAssured) testImplementation(libs.awaitility) + testRuntimeOnly(libs.edc.transaction.local) } // do not publish diff --git a/edc-tests/edc-controlplane/transfer-tests/build.gradle.kts b/edc-tests/edc-controlplane/transfer-tests/build.gradle.kts index ddb7e022c..7574ab320 100644 --- a/edc-tests/edc-controlplane/transfer-tests/build.gradle.kts +++ b/edc-tests/edc-controlplane/transfer-tests/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { testImplementation(libs.edc.junit) testImplementation(libs.restAssured) testImplementation(libs.awaitility) + testRuntimeOnly(libs.edc.transaction.local) } // do not publish diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2093b841d..4d2b4e3b5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -133,7 +133,7 @@ edc-aws-validator-data-address-s3 = { module = "org.eclipse.edc.aws:validator-da edc-controlplane-callback-dispatcher-event = { module = "org.eclipse.edc:callback-event-dispatcher", version.ref = "edc" } edc-controlplane-callback-dispatcher-http = { module = "org.eclipse.edc:callback-http-dispatcher", version.ref = "edc" } -# IATP Modules +# DCP Modules edc-spi-identitytrust = { module = "org.eclipse.edc:identity-trust-spi", version.ref = "edc" } edc-core-identitytrust = { module = "org.eclipse.edc:identity-trust-core", version.ref = "edc" } edc-core-did = { module = "org.eclipse.edc:identity-did-core", version.ref = "edc" } @@ -145,8 +145,7 @@ edc-identity-trust-service = { module = "org.eclipse.edc:identity-trust-service" edc-identity-trust-transform = { module = "org.eclipse.edc:identity-trust-transform", version.ref = "edc" } edc-identity-trust-issuers-configuration = { module = "org.eclipse.edc:identity-trust-issuers-configuration", version.ref = "edc" } - -# IATP for Testing +# DCP for Testing edc-identity-trust-sts-remote-client = { module = "org.eclipse.edc:identity-trust-sts-remote-client", version.ref = "edc" } edc-identity-trust-sts-remote-lib = { module = "org.eclipse.edc:identity-trust-sts-remote-lib", version.ref = "edc" } @@ -155,6 +154,11 @@ edc-identity-trust-sts-core = { module = "org.eclipse.edc:identity-trust-sts-cor edc-identity-trust-sts-api = { module = "org.eclipse.edc:identity-trust-sts-api", version.ref = "edc" } edc-identity-trust-sts-client-configuration = { module = "org.eclipse.edc:identity-trust-sts-client-configuration", version.ref = "edc" } +# Federated Catalog modules +edc-fc-spi-crawler = { module = "org.eclipse.edc:crawler-spi", version.ref = "edc" } +edc-fc-core = { module = "org.eclipse.edc:federated-catalog-core", version.ref = "edc" } +edc-fc-api = { module = "org.eclipse.edc:federated-catalog-api", version.ref = "edc" } + ## IH for testing edc-ih-api-presentation = { module = "org.eclipse.edc:presentation-api", version.ref = "edc" } @@ -227,6 +231,6 @@ titaniumJsonLd = { module = "com.apicatalog:titanium-json-ld", version.ref = "ti [bundles] edc-connector = ["edc.boot", "edc.core-connector", "edc.core-controlplane", "edc.api-observability"] edc-dpf = ["edc.dpf-transfer-signaling", "edc.dpf-selector-core", "edc.spi-dataplane-selector"] -edc-sqlstores = ["edc.sql-assetindex", "edc.sql-contract-definition", "edc.sql-contract-negotiation", "edc.sql-transferprocess", "edc.sql-policydef", "edc.sql-policy-monitor", "edc.sql-edrindex"] +edc-sqlstores = ["edc.sql-assetindex", "edc.sql-contract-definition", "edc.sql-contract-negotiation", "edc.sql-transferprocess", "edc.sql-policydef", "edc.sql-policy-monitor", "edc.sql-edrindex", "edc-transaction-local"] edc-monitoring = ["edc.micrometer-core", "edc.micrometer-jersey", "edc.micrometer-jetty"] edc-sts = ["edc-identity-trust-sts-core", "edc-identity-trust-sts-api", "edc-identity-trust-sts-client-configuration"] diff --git a/samples/multi-tenancy/src/test/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntimeTest.java b/samples/multi-tenancy/src/test/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntimeTest.java index 8b4272de6..4ec53ffab 100644 --- a/samples/multi-tenancy/src/test/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntimeTest.java +++ b/samples/multi-tenancy/src/test/java/org/eclipse/tractusx/edc/samples/multitenancy/MultiTenantRuntimeTest.java @@ -26,11 +26,13 @@ import org.mockito.ArgumentMatcher; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; class MultiTenantRuntimeTest { @@ -60,7 +62,7 @@ void throwsExceptionIfTenantsFileDoesNotExist() { @Test void threadForEveryTenant() { System.setProperty("edc.tenants.path", "./src/test/resources/tenants.properties"); - + when(monitor.withPrefix(anyString())).thenReturn(monitor); runtime.boot(false); verify(monitor, times(2)).info(argThat(connectorIsReady())); diff --git a/samples/multi-tenancy/src/test/resources/tenants.properties b/samples/multi-tenancy/src/test/resources/tenants.properties index edaece1d6..eb655247c 100644 --- a/samples/multi-tenancy/src/test/resources/tenants.properties +++ b/samples/multi-tenancy/src/test/resources/tenants.properties @@ -26,6 +26,8 @@ edc.tenants.one.web.http.control.port=18283 edc.tenants.one.web.http.control.path=/control edc.tenants.one.web.http.management.port=18284 edc.tenants.one.web.http.management.path=/management +edc.tenants.one.web.http.catalog.port=18285 +edc.tenants.one.web.http.catalog.path=/catalog edc.tenants.one.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com edc.tenants.one.edc.iam.issuer.id=did:web:tenant1 edc.tenants.two.edc.any=any @@ -37,5 +39,7 @@ edc.tenants.two.web.http.control.port=28283 edc.tenants.two.web.http.control.path=/control edc.tenants.two.web.http.management.port=28284 edc.tenants.two.web.http.management.path=/management +edc.tenants.two.web.http.catalog.port=28285 +edc.tenants.two.web.http.catalog.path=/catalog edc.tenants.two.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com edc.tenants.two.edc.iam.issuer.id=did:web:tenant2 diff --git a/settings.gradle.kts b/settings.gradle.kts index 75583ca88..e1d6ecc1b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -44,6 +44,7 @@ include(":edc-extensions:migrations:data-plane-migration") include(":edc-extensions:tokenrefresh-handler") include(":edc-extensions:bdrs-client") include(":edc-extensions:provision-additional-headers") +include(":edc-extensions:federated-catalog") include(":edc-extensions:edr:edr-api-v2") include(":edc-extensions:edr:edr-callback") include(":edc-extensions:cx-policy")