diff --git a/.github/actions/run-deployment-test/action.yml b/.github/actions/run-deployment-test/action.yml index a8dd85a18..7deb744d1 100644 --- a/.github/actions/run-deployment-test/action.yml +++ b/.github/actions/run-deployment-test/action.yml @@ -84,6 +84,10 @@ runs: shell: bash run: ${{ inputs.helm_command }} + - name: Print logs + if: failure() + shell: bash + run: kubectl get deployments | tail -n +2 | awk '{print $1}' | sed 's/^/deployment\//' | xargs -n1 kubectl logs ################# ### Tear Down ### diff --git a/.github/workflows/upgradeability-test.yaml b/.github/workflows/upgradeability-test.yaml index 6d7741b9e..6e111793a 100644 --- a/.github/workflows/upgradeability-test.yaml +++ b/.github/workflows/upgradeability-test.yaml @@ -117,6 +117,11 @@ jobs: # execute the helm test helm test tx-prod + - name: Print logs + if: failure() + shell: bash + run: kubectl get deployments | tail -n +2 | awk '{print $1}' | sed 's/^/deployment\//' | xargs -n1 kubectl logs + - name: Destroy the kind cluster if: always() shell: bash diff --git a/DEPENDENCIES b/DEPENDENCIES index 53bce631c..ce5970f86 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -392,8 +392,12 @@ maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2/0.7.0, Apache-2.0, app maven/mavencentral/org.eclipse.edc/data-plane-http-spi/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-http/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-public-api-v2/0.7.0, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-selector-api/0.7.0, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-selector-client/0.7.0, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-selector-control-api/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-selector-core/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-selector-spi/0.7.0, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-self-registration/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-signaling-api-configuration/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-signaling-api/0.7.0, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.edc/data-plane-signaling-client/0.7.0, Apache-2.0, approved, technology.edc diff --git a/charts/tractusx-connector-azure-vault/templates/_helpers.tpl b/charts/tractusx-connector-azure-vault/templates/_helpers.tpl index 17bcddc86..17cfe381d 100644 --- a/charts/tractusx-connector-azure-vault/templates/_helpers.tpl +++ b/charts/tractusx-connector-azure-vault/templates/_helpers.tpl @@ -137,12 +137,19 @@ Validation URL {{- end }} {{/* -Control Plane URL +Control Plane Control URL */}} {{- define "txdc.controlplane.url.control" -}} {{- printf "http://%s-controlplane:%v%s" ( include "txdc.fullname" $ ) $.Values.controlplane.endpoints.control.port $.Values.controlplane.endpoints.control.path -}} {{- end }} +{{/* +Data Plane Control URL +*/}} +{{- define "txdc.dataplane.url.control" -}} +{{- printf "http://%s-dataplane:%v%s" ( include "txdc.fullname" $ ) $.Values.dataplane.endpoints.control.port $.Values.dataplane.endpoints.control.path -}} +{{- end }} + {{/* Data Signaling URL */}} diff --git a/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml b/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml index 9dec5c1e4..f6b2eac37 100644 --- a/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml +++ b/charts/tractusx-connector-azure-vault/templates/deployment-controlplane.yaml @@ -298,25 +298,6 @@ spec: value: {{ .Values.controlplane.bdrs.cache_validity_seconds | quote}} {{- end}} - ################ - ## DATA PLANE ## - ################ - - # see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/dataplane-selector-configuration - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_URL" - value: {{ include "txdc.dataplane.url.signaling" . }}/v1/dataflows - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_TRANSFERTYPES" - value: "HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_SOURCETYPES" - value: "HttpData,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_DESTINATIONTYPES" - value: "HttpData,HttpProxy,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_PROPERTIES" - value: |- - {{ printf "{ \"publicApiUrl\": \"%s\" }" (include "txdc.dataplane.url.public" . ) }} - - - ########### ## VAULT ## ########### @@ -352,7 +333,7 @@ spec: ###################################### ## Additional environment variables ## ###################################### - - name: "EDC_CONNECTOR_NAME" + - name: "EDC_RUNTIME_ID" value: {{ include "txdc.fullname" .}}-controlplane {{- range $key, $value := .Values.controlplane.envValueFrom }} - name: {{ $key | quote }} diff --git a/charts/tractusx-connector-azure-vault/templates/deployment-dataplane.yaml b/charts/tractusx-connector-azure-vault/templates/deployment-dataplane.yaml index 1f2619596..2062348f5 100644 --- a/charts/tractusx-connector-azure-vault/templates/deployment-dataplane.yaml +++ b/charts/tractusx-connector-azure-vault/templates/deployment-dataplane.yaml @@ -169,8 +169,10 @@ spec: value: {{ .Values.dataplane.endpoints.public.port | quote }} - name: "WEB_HTTP_PUBLIC_PATH" value: {{ .Values.dataplane.endpoints.public.path | quote }} - - name: "EDC_DATAPLANE_TOKEN_VALIDATION_ENDPOINT" - value: {{ include "txdc.controlplane.url.validation" .}} + - name: "EDC_CONTROL_ENDPOINT" + value: {{ include "txdc.dataplane.url.control" . }} + - name: "EDC_DPF_SELECTOR_URL" + value: {{ include "txdc.controlplane.url.control" . }}/v1/dataplanes ####### # AWS # @@ -296,7 +298,7 @@ spec: ###################################### ## Additional environment variables ## ###################################### - - name: "EDC_CONNECTOR_NAME" + - name: "EDC_RUNTIME_ID" value: {{ include "txdc.fullname" .}}-dataplane {{- range $key, $value := .Values.dataplane.envValueFrom }} - name: {{ $key | quote }} diff --git a/charts/tractusx-connector-azure-vault/templates/service-dataplane.yaml b/charts/tractusx-connector-azure-vault/templates/service-dataplane.yaml index 807eba45f..f44182b96 100644 --- a/charts/tractusx-connector-azure-vault/templates/service-dataplane.yaml +++ b/charts/tractusx-connector-azure-vault/templates/service-dataplane.yaml @@ -36,6 +36,10 @@ spec: targetPort: signaling protocol: TCP name: signaling + - port: {{ .Values.dataplane.endpoints.control.port }} + targetPort: control + protocol: TCP + name: control - port: {{ .Values.dataplane.endpoints.public.port }} targetPort: public protocol: TCP diff --git a/charts/tractusx-connector-memory/templates/deployment-runtime.yaml b/charts/tractusx-connector-memory/templates/deployment-runtime.yaml index 8a75324bf..017c1e04b 100644 --- a/charts/tractusx-connector-memory/templates/deployment-runtime.yaml +++ b/charts/tractusx-connector-memory/templates/deployment-runtime.yaml @@ -189,8 +189,6 @@ spec: value: {{ .Values.runtime.endpoints.public.port | quote }} - name: "WEB_HTTP_PUBLIC_PATH" value: {{ .Values.runtime.endpoints.public.path | quote }} - - name: "EDC_DATAPLANE_TOKEN_VALIDATION_ENDPOINT" - value: {{ include "txdc.runtime.url.validation" .}} ######### ## DSP ## @@ -236,21 +234,6 @@ spec: ################ ## DATA PLANE ## ################ - - # see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/develop/edc-extensions/dataplane-selector-configuration - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_URL" - value: {{ include "txdc.dataplane.url.signaling" . }}/v1/dataflows - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_TRANSFERTYPES" - value: "HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_SOURCETYPES" - value: "HttpData,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_DESTINATIONTYPES" - value: "HttpData,HttpProxy,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_PROPERTIES" - value: |- - {{ printf "{ \"publicApiUrl\": \"%s\" }" (include "txdc.dataplane.url.public" . ) }} - - - name: "EDC_DATAPLANE_API_PUBLIC_BASEURL" value: {{ include "txdc.dataplane.url.public" . }} diff --git a/charts/tractusx-connector/templates/_helpers.tpl b/charts/tractusx-connector/templates/_helpers.tpl index 21581f158..ec85aa19e 100644 --- a/charts/tractusx-connector/templates/_helpers.tpl +++ b/charts/tractusx-connector/templates/_helpers.tpl @@ -136,12 +136,19 @@ Validation URL {{- end }} {{/* -Control Plane URL +Control Plane Control URL */}} {{- define "txdc.controlplane.url.control" -}} {{- printf "http://%s-controlplane:%v%s" ( include "txdc.fullname" $ ) $.Values.controlplane.endpoints.control.port $.Values.controlplane.endpoints.control.path -}} {{- end }} +{{/* +Data Plane Control URL +*/}} +{{- define "txdc.dataplane.url.control" -}} +{{- printf "http://%s-dataplane:%v%s" ( include "txdc.fullname" $ ) $.Values.dataplane.endpoints.control.port $.Values.dataplane.endpoints.control.path -}} +{{- end }} + {{/* Data Signaling URL */}} diff --git a/charts/tractusx-connector/templates/deployment-controlplane.yaml b/charts/tractusx-connector/templates/deployment-controlplane.yaml index 423225045..c0d3db72b 100644 --- a/charts/tractusx-connector/templates/deployment-controlplane.yaml +++ b/charts/tractusx-connector/templates/deployment-controlplane.yaml @@ -299,26 +299,6 @@ spec: value: {{ .Values.controlplane.bdrs.cache_validity_seconds | quote}} {{- end}} - ################ - ## DATA PLANE ## - ################ - - # see extension https://github.com/eclipse-tractusx/tractusx-edc/tree/main/edc-extensions/dataplane-selector-configuration - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_URL" - value: {{ include "txdc.dataplane.url.signaling" . }}/v1/dataflows - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_TRANSFERTYPES" - value: "HttpData-PULL,HttpData-PUSH,AmazonS3-PUSH,AzureStorage-PUSH" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_SOURCETYPES" - value: "HttpData,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_DESTINATIONTYPES" - value: "HttpData,HttpProxy,AmazonS3,AzureStorage" - - name: "EDC_DATAPLANE_SELECTOR_DEFAULTPLANE_PROPERTIES" - value: |- - {{ printf "{ \"publicApiUrl\": \"%s\" }" (include "txdc.dataplane.url.public" . ) }} - - - - ########### ## VAULT ## ########### @@ -348,7 +328,7 @@ spec: ###################################### ## Additional environment variables ## ###################################### - - name: "EDC_CONNECTOR_NAME" + - name: "EDC_RUNTIME_ID" value: {{ include "txdc.fullname" .}}-controlplane {{- range $key, $value := .Values.controlplane.envValueFrom }} - name: {{ $key | quote }} diff --git a/charts/tractusx-connector/templates/deployment-dataplane.yaml b/charts/tractusx-connector/templates/deployment-dataplane.yaml index 16f2b8059..ae01c063d 100644 --- a/charts/tractusx-connector/templates/deployment-dataplane.yaml +++ b/charts/tractusx-connector/templates/deployment-dataplane.yaml @@ -169,8 +169,10 @@ spec: value: {{ .Values.dataplane.endpoints.public.port | quote }} - name: "WEB_HTTP_PUBLIC_PATH" value: {{ .Values.dataplane.endpoints.public.path | quote }} - - name: "EDC_DATAPLANE_TOKEN_VALIDATION_ENDPOINT" - value: {{ include "txdc.controlplane.url.validation" .}} + - name: "EDC_CONTROL_ENDPOINT" + value: {{ include "txdc.dataplane.url.control" . }} + - name: "EDC_DPF_SELECTOR_URL" + value: {{ include "txdc.controlplane.url.control" . }}/v1/dataplanes ####### # AWS # @@ -291,7 +293,7 @@ spec: ###################################### ## Additional environment variables ## ###################################### - - name: "EDC_CONNECTOR_NAME" + - name: "EDC_RUNTIME_ID" value: {{ include "txdc.fullname" .}}-dataplane {{- range $key, $value := .Values.dataplane.envValueFrom }} - name: {{ $key | quote }} diff --git a/charts/tractusx-connector/templates/service-dataplane.yaml b/charts/tractusx-connector/templates/service-dataplane.yaml index 97e8c07ea..83cf99a52 100644 --- a/charts/tractusx-connector/templates/service-dataplane.yaml +++ b/charts/tractusx-connector/templates/service-dataplane.yaml @@ -40,6 +40,10 @@ spec: targetPort: signaling protocol: TCP name: signaling + - port: {{ .Values.dataplane.endpoints.control.port }} + targetPort: control + protocol: TCP + name: control - port: {{ .Values.dataplane.endpoints.public.port }} targetPort: public protocol: TCP diff --git a/edc-controlplane/edc-controlplane-base/build.gradle.kts b/edc-controlplane/edc-controlplane-base/build.gradle.kts index 6febbd242..5505921ac 100644 --- a/edc-controlplane/edc-controlplane-base/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-base/build.gradle.kts @@ -25,7 +25,6 @@ plugins { dependencies { runtimeOnly(project(":core:edr-core")) runtimeOnly(project(":edc-extensions:dataplane:dataplane-selector-configuration")) - runtimeOnly(project(":edc-extensions:provision-additional-headers")) runtimeOnly(project(":edc-extensions:edr:edr-api-v2")) runtimeOnly(project(":edc-extensions:edr:edr-callback")) @@ -58,6 +57,7 @@ dependencies { runtimeOnly(libs.edc.config.filesystem) runtimeOnly(libs.edc.auth.tokenbased) runtimeOnly(libs.edc.validator.data.address.http.data) + runtimeOnly(libs.edc.data.plane.selector.control.api) runtimeOnly(libs.edc.api.management) runtimeOnly(libs.edc.api.controlplane) diff --git a/edc-controlplane/edc-runtime-memory/build.gradle.kts b/edc-controlplane/edc-runtime-memory/build.gradle.kts index fb20ab45c..34c05b3dd 100644 --- a/edc-controlplane/edc-runtime-memory/build.gradle.kts +++ b/edc-controlplane/edc-runtime-memory/build.gradle.kts @@ -27,7 +27,9 @@ dependencies { implementation(project(":core:core-utils")) implementation(libs.edc.spi.core) runtimeOnly(project(":edc-controlplane:edc-controlplane-base")) - runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) + runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { + exclude("org.eclipse.edc", "data-plane-selector-client") + } runtimeOnly(libs.edc.core.controlplane) testImplementation(libs.edc.junit) testImplementation(libs.edc.lib.boot) diff --git a/edc-dataplane/edc-dataplane-base/build.gradle.kts b/edc-dataplane/edc-dataplane-base/build.gradle.kts index e7285164f..d3578eb23 100644 --- a/edc-dataplane/edc-dataplane-base/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-base/build.gradle.kts @@ -34,7 +34,6 @@ dependencies { runtimeOnly(libs.edc.core.did) // for the DID Public Key Resolver runtimeOnly(libs.edc.identity.did.web) runtimeOnly(libs.edc.config.filesystem) - runtimeOnly(libs.edc.auth.tokenbased) runtimeOnly(libs.edc.dpf.awss3) runtimeOnly(libs.edc.dpf.azblob) runtimeOnly(libs.edc.dpf.oauth2) @@ -43,7 +42,8 @@ dependencies { runtimeOnly(libs.edc.dpf.core) runtimeOnly(libs.edc.controlplane.apiclient) - runtimeOnly(libs.edc.dpf.api.control) + runtimeOnly(libs.edc.data.plane.selector.client) + runtimeOnly(libs.edc.data.plane.self.registration) runtimeOnly(libs.edc.dpf.api.signaling) runtimeOnly(libs.edc.dpf.api.public.v2) diff --git a/edc-extensions/dataplane/dataplane-selector-configuration/src/main/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java b/edc-extensions/dataplane/dataplane-selector-configuration/src/main/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java index a1f175d58..af3301554 100644 --- a/edc-extensions/dataplane/dataplane-selector-configuration/src/main/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java +++ b/edc-extensions/dataplane/dataplane-selector-configuration/src/main/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtension.java @@ -40,6 +40,7 @@ import static java.lang.String.format; import static java.lang.String.join; +@Deprecated(since = "0.7.2") @Requires({ DataPlaneSelectorService.class }) public class DataPlaneSelectorConfigurationServiceExtension implements ServiceExtension { @@ -51,7 +52,7 @@ public class DataPlaneSelectorConfigurationServiceExtension implements ServiceEx public static final String PROPERTIES_SUFFIX = "properties"; public static final String PUBLIC_API_URL_PROPERTY = "publicApiUrl"; - private static final String NAME = "Data Plane Selector Configuration Extension"; + private static final String NAME = "DEPRECATED: Data Plane Selector Configuration Extension"; private static final String COMMA = ","; private static final String LOG_MISSING_CONFIGURATION = NAME + ": Missing configuration for " + CONFIG_PREFIX + ".%s.%s"; private static final String LOG_SKIP_BC_MISSING_CONFIGURATION = NAME + ": Configuration issues. Skip registering of Data Plane Instance '%s'"; @@ -66,12 +67,11 @@ public String name() { } @Override - public void initialize(final ServiceExtensionContext serviceExtensionContext) { - this.dataPlaneSelectorService = - serviceExtensionContext.getService(DataPlaneSelectorService.class); - this.monitor = serviceExtensionContext.getMonitor(); + public void initialize(ServiceExtensionContext context) { + this.dataPlaneSelectorService = context.getService(DataPlaneSelectorService.class); + this.monitor = context.getMonitor(); - var config = serviceExtensionContext.getConfig(CONFIG_PREFIX); + var config = context.getConfig(CONFIG_PREFIX); config.partition().forEach(this::configureDataPlaneInstance); } @@ -79,6 +79,12 @@ public void initialize(final ServiceExtensionContext serviceExtensionContext) { private void configureDataPlaneInstance(final Config config) { var id = config.currentNode(); + monitor.warning(""" + The dataplane-selector-configuration has been deprecated, as now data-planes can register themselves + through the data-plane-self-registration extension. Please remove the 'edc.dataplane.selector.%s' config + group and configure your data-plane accordingly + """.formatted(id)); + var url = config.getString(URL_SUFFIX, ""); var sourceTypes = Arrays.stream(config.getString(SOURCE_TYPES_SUFFIX, "").split(COMMA)) diff --git a/edc-extensions/dataplane/dataplane-selector-configuration/src/test/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionTest.java b/edc-extensions/dataplane/dataplane-selector-configuration/src/test/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionTest.java index 5d6efdd89..45e0176f1 100644 --- a/edc-extensions/dataplane/dataplane-selector-configuration/src/test/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionTest.java +++ b/edc-extensions/dataplane/dataplane-selector-configuration/src/test/java/org/eclipse/tractusx/edc/dataplane/selector/configuration/DataPlaneSelectorConfigurationServiceExtensionTest.java @@ -38,6 +38,7 @@ import java.util.Map; import java.util.stream.Stream; +import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.CONFIG_PREFIX; import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.DESTINATION_TYPES_SUFFIX; import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.PROPERTIES_SUFFIX; @@ -45,8 +46,6 @@ import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.SOURCE_TYPES_SUFFIX; import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.TRANSFER_TYPES_SUFFIX; import static org.eclipse.tractusx.edc.dataplane.selector.configuration.DataPlaneSelectorConfigurationServiceExtension.URL_SUFFIX; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.argThat; @@ -87,8 +86,7 @@ void setup() { void testName() { var extension = new DataPlaneSelectorConfigurationServiceExtension(); - assertNotNull(extension.name()); - assertEquals("Data Plane Selector Configuration Extension", extension.name()); + assertThat(extension.name()).contains("Data Plane Selector Configuration Extension"); } @Test @@ -124,8 +122,8 @@ void testWarningOnPropertyMissing(String configKey, String configValue) { when(serviceExtensionContext.getConfig(CONFIG_PREFIX)).thenReturn(config); extension.initialize(serviceExtensionContext); - // one warning config missing, one warning data plane instance skipped - verify(monitor, times(2)).warning(anyString()); + // one warning deprecation, one warning config missing, one warning data plane instance skipped + verify(monitor, times(3)).warning(anyString()); } @Test 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 dc6c63bf8..eb821307a 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 @@ -61,6 +61,10 @@ controlplane: server: url: "https://bdrs.test.org" dataplane: + debug: + enabled: true + port: 1044 + suspendOnStart: false endpoints: proxy: authKey: password diff --git a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/helpers/TransferProcessHelperFunctions.java b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/helpers/TransferProcessHelperFunctions.java deleted file mode 100644 index 82cafae36..000000000 --- a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/helpers/TransferProcessHelperFunctions.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * 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.tests.helpers; - -import jakarta.json.Json; -import jakarta.json.JsonObject; - -import static jakarta.json.Json.createObjectBuilder; -import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.ID; -import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE; -import static org.eclipse.edc.spi.constants.CoreConstants.EDC_NAMESPACE; - -public class TransferProcessHelperFunctions { - - public static JsonObject createTransferRequest(String dataRequestId, String counterPartyAddress, String contractId, String assetId, boolean managedResources, JsonObject destination) { - return Json.createObjectBuilder() - .add(TYPE, EDC_NAMESPACE + "TransferRequestDto") - .add(ID, dataRequestId) - .add(EDC_NAMESPACE + "connectorId", "connectorId") - .add(EDC_NAMESPACE + "dataDestination", destination) - .add(EDC_NAMESPACE + "protocol", "dataspace-protocol-http") - .add(EDC_NAMESPACE + "assetId", assetId) - .add(EDC_NAMESPACE + "contractId", contractId) - .add(EDC_NAMESPACE + "counterPartyAddress", counterPartyAddress) - .add(EDC_NAMESPACE + "managedResources", managedResources) - .build(); - - } - - public static JsonObject createProxyRequest() { - return Json.createObjectBuilder() - .add(TYPE, EDC_NAMESPACE + "DataAddress") - .add(EDC_NAMESPACE + "type", "HttpProxy") - .build(); - - } - - public static JsonObject httpDataAddress(String baseUrl) { - return createObjectBuilder() - .add(TYPE, EDC_NAMESPACE + "DataAddress") - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "properties", createObjectBuilder() - .add(EDC_NAMESPACE + "baseUrl", baseUrl) - .build()) - .build(); - } -} 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 1ffe39b8b..32b985e21 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 @@ -83,7 +83,7 @@ public String getBpn() { public Map getConfiguration() { return new HashMap<>() { { - put("edc.connector.name", name); + put("edc.runtime.id", name); put("edc.participant.id", id); put("web.http.port", String.valueOf(controlPlaneDefault.getPort())); put("web.http.path", "/api"); @@ -102,12 +102,6 @@ public Map getConfiguration() { put("edc.transfer.send.retry.limit", "1"); put("edc.transfer.send.retry.base-delay.ms", "100"); put("tx.dpf.consumer.proxy.port", String.valueOf(dataPlaneProxy.getPort())); - put("edc.dataplane.token.validation.endpoint", controlPlaneControl + "/token"); - put("edc.dataplane.selector.httpplane.url", controlPlaneControl.toString()); - put("edc.dataplane.selector.httpplane.sourcetypes", "HttpData"); - put("edc.dataplane.selector.httpplane.destinationtypes", "HttpProxy"); - put("edc.dataplane.selector.httpplane.transfertypes", "HttpProxy-PULL"); - put("edc.dataplane.selector.httpplane.properties", "{\"publicApiUrl\":\"http://localhost:" + dataPlanePublic.getPort() + "/api/public/v2\"}"); put("edc.receiver.http.dynamic.endpoint", "http://localhost:" + controlPlaneDefault.getPort() + "/api/consumer/datareference"); put("tractusx.businesspartnervalidation.log.agreement.validation", "true"); put("edc.agent.identity.key", "BusinessPartnerNumber"); diff --git a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullBaseTest.java b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullBaseTest.java index 0ea951065..f258cf7c4 100644 --- a/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullBaseTest.java +++ b/edc-tests/edc-controlplane/fixtures/src/testFixtures/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullBaseTest.java @@ -19,7 +19,6 @@ package org.eclipse.tractusx.edc.tests.transfer; -import jakarta.json.Json; import jakarta.json.JsonObject; import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates; import org.eclipse.tractusx.edc.tests.ParticipantAwareTest; @@ -37,7 +36,6 @@ import static org.awaitility.pollinterval.FibonacciPollInterval.fibonacci; import static org.eclipse.edc.util.io.Ports.getFreePort; import static org.eclipse.tractusx.edc.tests.helpers.PolicyHelperFunctions.bnpPolicy; -import static org.eclipse.tractusx.edc.tests.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.tests.participant.TractusxParticipantBase.ASYNC_TIMEOUT; import static org.mockserver.model.HttpRequest.request; import static org.mockserver.model.HttpResponse.response; @@ -76,7 +74,7 @@ void transferData_privateBackend() { var accessPolicyId = provider().createPolicyDefinition(createAccessPolicy(consumer().getBpn())); var contractPolicyId = provider().createPolicyDefinition(createContractPolicy(consumer().getBpn())); provider().createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = consumer().requestAsset(provider(), assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = consumer().requestAssetFrom(assetId, provider()).withTransferType("HttpData-PULL").execute(); var edr = new AtomicReference(); @@ -125,7 +123,7 @@ void transferData_privateBackend_withConsumerDataPlane() { var accessPolicyId = provider().createPolicyDefinition(createAccessPolicy(consumer().getBpn())); var contractPolicyId = provider().createPolicyDefinition(createContractPolicy(consumer().getBpn())); provider().createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = consumer().requestAsset(provider(), assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = consumer().requestAssetFrom(assetId, provider()).withTransferType("HttpData-PULL").execute(); var edr = new AtomicReference(); diff --git a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractIatpConsumerPullTest.java b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractIatpConsumerPullTest.java index fa3da5a30..ab98a284d 100644 --- a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractIatpConsumerPullTest.java +++ b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractIatpConsumerPullTest.java @@ -66,7 +66,6 @@ import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_BPN; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_NAME; import static org.eclipse.tractusx.edc.tests.helpers.PolicyHelperFunctions.frameworkPolicy; -import static org.eclipse.tractusx.edc.tests.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.tests.participant.TractusxParticipantBase.ASYNC_TIMEOUT; import static org.eclipse.tractusx.edc.tests.transfer.iatp.harness.IatpHelperFunctions.createVcBuilder; import static org.eclipse.tractusx.edc.tests.transfer.iatp.harness.IatpHelperFunctions.membershipSubject; @@ -141,7 +140,7 @@ void transferData_whenContractPolicyFulfilled(JsonObject contractPolicy, String var accessPolicyId = PROVIDER.createPolicyDefinition(createAccessPolicy(CONSUMER.getBpn())); var contractPolicyId = PROVIDER.createPolicyDefinition(contractPolicy); PROVIDER.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); var edr = new AtomicReference(); diff --git a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/StsParticipant.java b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/StsParticipant.java index 3671cb60e..8b57c255f 100644 --- a/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/StsParticipant.java +++ b/edc-tests/edc-controlplane/iatp-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/iatp/harness/StsParticipant.java @@ -46,7 +46,6 @@ public Map stsConfiguration(IatpParticipant... participants) { stsConfiguration.put("web.http.sts.port", String.valueOf(stsUri.getPort())); stsConfiguration.put("web.http.sts.path", stsUri.getPath()); - stsConfiguration.put("edc.dataplane.token.validation.endpoint", ""); stsConfiguration.put("tx.vault.seed.secrets", "client_secret_alias:client_secret"); Arrays.stream(participants).forEach(participant -> { diff --git a/edc-tests/edc-controlplane/policy-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorEndToEndTest.java b/edc-tests/edc-controlplane/policy-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorEndToEndTest.java index 6dc9d28c7..d21e3d853 100644 --- a/edc-tests/edc-controlplane/policy-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorEndToEndTest.java +++ b/edc-tests/edc-controlplane/policy-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorEndToEndTest.java @@ -19,7 +19,6 @@ package org.eclipse.tractusx.edc.tests.policy; -import jakarta.json.Json; import org.eclipse.edc.junit.annotations.EndToEndTest; import org.eclipse.edc.junit.annotations.PostgresqlIntegrationTest; import org.eclipse.tractusx.edc.tests.participant.TransferParticipant; @@ -41,7 +40,6 @@ import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.CONSUMER_NAME; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_BPN; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_NAME; -import static org.eclipse.tractusx.edc.tests.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.tests.participant.TractusxParticipantBase.ASYNC_TIMEOUT; import static org.eclipse.tractusx.edc.tests.runtimes.Runtimes.memoryRuntime; import static org.eclipse.tractusx.edc.tests.runtimes.Runtimes.pgRuntime; @@ -79,7 +77,7 @@ void shouldTerminateTransfer_whenPolicyExpires() { PROVIDER.createContractDefinition(assetId, UUID.randomUUID().toString(), policyId, policyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); await().atMost(ASYNC_TIMEOUT).untilAsserted(() -> { var state = CONSUMER.getTransferProcessState(transferProcessId); assertThat(state).isEqualTo(STARTED.name()); diff --git a/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferPullEndToEndTest.java b/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferPullEndToEndTest.java index 6dfc2bf7a..d8be43e10 100644 --- a/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferPullEndToEndTest.java +++ b/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferPullEndToEndTest.java @@ -19,7 +19,6 @@ package org.eclipse.tractusx.edc.tests.transfer; -import jakarta.json.Json; import jakarta.json.JsonObject; import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates; import org.eclipse.edc.junit.annotations.EndToEndTest; @@ -41,7 +40,6 @@ import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.CONSUMER_NAME; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_BPN; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_NAME; -import static org.eclipse.tractusx.edc.tests.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.tests.runtimes.Runtimes.memoryRuntime; import static org.eclipse.tractusx.edc.tests.runtimes.Runtimes.pgRuntime; import static org.mockserver.model.HttpRequest.request; @@ -88,7 +86,7 @@ void transferData_withSuspendResume() { var accessPolicyId = PROVIDER.createPolicyDefinition(createAccessPolicy(CONSUMER.getBpn())); var contractPolicyId = PROVIDER.createPolicyDefinition(createContractPolicy(CONSUMER.getBpn())); PROVIDER.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); CONSUMER.waitForTransferProcess(transferProcessId, TransferProcessStates.STARTED); @@ -144,7 +142,7 @@ void transferData_withTerminate() { var accessPolicyId = PROVIDER.createPolicyDefinition(createAccessPolicy(CONSUMER.getBpn())); var contractPolicyId = PROVIDER.createPolicyDefinition(inForcePolicy()); PROVIDER.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); CONSUMER.waitForTransferProcess(transferProcessId, TransferProcessStates.STARTED); @@ -196,4 +194,4 @@ class Postgres extends Tests { protected static final PgParticipantRuntime PROVIDER_RUNTIME = pgRuntime(PROVIDER.getName(), PROVIDER.getBpn(), PROVIDER.getConfiguration()); } -} \ No newline at end of file +} diff --git a/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferWithTokenRefreshTest.java b/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferWithTokenRefreshTest.java index 81a46a962..ac0bb9be5 100644 --- a/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferWithTokenRefreshTest.java +++ b/edc-tests/edc-controlplane/transfer-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/TransferWithTokenRefreshTest.java @@ -19,7 +19,6 @@ package org.eclipse.tractusx.edc.tests.transfer; -import jakarta.json.Json; import jakarta.json.JsonObject; import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates; import org.eclipse.edc.junit.annotations.EndToEndTest; @@ -48,7 +47,6 @@ import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_BPN; import static org.eclipse.tractusx.edc.tests.TestRuntimeConfiguration.PROVIDER_NAME; import static org.eclipse.tractusx.edc.tests.helpers.PolicyHelperFunctions.bnpPolicy; -import static org.eclipse.tractusx.edc.tests.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.tests.participant.TractusxParticipantBase.ASYNC_TIMEOUT; import static org.eclipse.tractusx.edc.tests.runtimes.Runtimes.memoryRuntime; import static org.mockserver.model.HttpRequest.request; @@ -115,7 +113,7 @@ void transferData_withExpiredEdr_shouldReturn4xx() { var accessPolicyId = PROVIDER.createPolicyDefinition(createAccessPolicy(CONSUMER.getBpn())); var contractPolicyId = PROVIDER.createPolicyDefinition(createContractPolicy(CONSUMER.getBpn())); PROVIDER.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); CONSUMER.waitForTransferProcess(transferProcessId, TransferProcessStates.STARTED); @@ -173,7 +171,7 @@ void transferData_withAutomaticRefresh() { var accessPolicyId = PROVIDER.createPolicyDefinition(createAccessPolicy(CONSUMER.getBpn())); var contractPolicyId = PROVIDER.createPolicyDefinition(createContractPolicy(CONSUMER.getBpn())); PROVIDER.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var transferProcessId = CONSUMER.requestAsset(PROVIDER, assetId, Json.createObjectBuilder().build(), createProxyRequest(), "HttpData-PULL"); + var transferProcessId = CONSUMER.requestAssetFrom(assetId, PROVIDER).withTransferType("HttpData-PULL").execute(); CONSUMER.waitForTransferProcess(transferProcessId, TransferProcessStates.STARTED); diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/build.gradle.kts b/edc-tests/edc-dataplane/cloud-transfer-tests/build.gradle.kts index aa7bbb5e7..bf924af48 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/build.gradle.kts +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/build.gradle.kts @@ -33,6 +33,7 @@ dependencies { testImplementation(libs.edc.config.filesystem) testImplementation(libs.edc.dpf.http) testImplementation(libs.edc.auth.tokenbased) + testImplementation(libs.edc.dpf.selector.spi) testImplementation(libs.testcontainers.junit) testImplementation(testFixtures(libs.edc.azure.test)) testImplementation(libs.edc.aws.s3.core) diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/AzureToAzureTest.java b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/AzureToAzureTest.java index ee4762bcd..dc2ac5cc2 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/AzureToAzureTest.java +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/AzureToAzureTest.java @@ -79,7 +79,7 @@ public class AzureToAzureTest { protected static final ParticipantRuntime DATAPLANE_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:dataplane-cloud", "AzureBlob-Dataplane", - RuntimeConfig.Azure.createDataplane("/control", PROVIDER_CONTROL_PORT, AZURITE_HOST_PORT) + RuntimeConfig.Azure.blobstoreDataplaneConfig("/control", PROVIDER_CONTROL_PORT, AZURITE_HOST_PORT) ); /** * Currently we have to use one container to host both consumer and provider accounts, because we cannot handle @@ -280,4 +280,3 @@ private DataFlowStartMessage createMultipleFileFlowRequest(String blobPrefix) { .processId("test-process-multiple-file-id").build(); } } - \ No newline at end of file diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/MultiCloudTest.java b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/MultiCloudTest.java index dd5748814..29341b10a 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/MultiCloudTest.java +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/MultiCloudTest.java @@ -90,7 +90,7 @@ public class MultiCloudTest { protected static final ParticipantRuntime DATAPLANE_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:dataplane-cloud", "MultiCloud-Dataplane", - RuntimeConfig.Azure.createDataplane("/control", PROVIDER_CONTROL_PORT, AZURITE_HOST_PORT) + RuntimeConfig.Azure.blobstoreDataplaneConfig("/control", PROVIDER_CONTROL_PORT, AZURITE_HOST_PORT) ); @Container diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/ParticipantRuntime.java b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/ParticipantRuntime.java index a3662b2b0..855179918 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/ParticipantRuntime.java +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/ParticipantRuntime.java @@ -37,7 +37,6 @@ public class ParticipantRuntime extends EdcRuntimeExtension implements BeforeAllCallback, AfterAllCallback { - public ParticipantRuntime(String moduleName, String runtimeName, Map properties) { super(moduleName, runtimeName, properties); var monitor = spy(new ConsoleMonitor(runtimeName, ConsoleMonitor.Level.DEBUG)); diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/RuntimeConfig.java b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/RuntimeConfig.java index 0d4b4121b..09ef5c49e 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/RuntimeConfig.java +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/RuntimeConfig.java @@ -35,16 +35,15 @@ public class RuntimeConfig { public static Map baseConfig(String controlPath, int controlPort) { return new HashMap<>() { { - put("edc.dataplane.token.validation.endpoint", "http://token-validation.com"); put("web.http.path", "/api"); put("web.http.port", String.valueOf(getFreePort())); + put("web.http.control.path", controlPath); + put("web.http.control.port", String.valueOf(controlPort)); put("web.http.public.path", "/public"); put("web.http.public.port", String.valueOf(getFreePort())); put("web.http.consumer.api.path", "/api/consumer"); put("web.http.consumer.api.port", String.valueOf(getFreePort())); put("tx.dpf.consumer.proxy.port", String.valueOf(getFreePort())); - put("web.http.control.path", controlPath); - put("web.http.control.port", String.valueOf(controlPort)); put("edc.iam.issuer.id", "did:web:" + UUID.randomUUID()); put("edc.iam.sts.oauth.token.url", "http://sts.example.com/token"); put("edc.iam.sts.oauth.client.id", "test-clientid"); @@ -66,7 +65,7 @@ public static class Azure { * @param controlPort the port of the control API * @param mappedAzuritePort the host port for the Blob endpoint template. */ - public static Map createDataplane(String controlPath, int controlPort, Integer mappedAzuritePort) { + public static Map blobstoreDataplaneConfig(String controlPath, int controlPort, Integer mappedAzuritePort) { var base = baseConfig(controlPath, controlPort); base.putAll(new HashMap<>() { @@ -80,7 +79,7 @@ public static Map createDataplane(String controlPath, int contro public static class S3 { - public static Map createDataplane(String controlPath, int controlPort) { + public static Map s3dataplaneConfig(String controlPath, int controlPort) { return baseConfig(controlPath, controlPort); } } diff --git a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/S3ToS3Test.java b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/S3ToS3Test.java index df4e46b45..148e6de1a 100644 --- a/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/S3ToS3Test.java +++ b/edc-tests/edc-dataplane/cloud-transfer-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/transfer/test/S3ToS3Test.java @@ -86,7 +86,7 @@ public class S3ToS3Test { protected static final ParticipantRuntime DATAPLANE_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:dataplane-cloud", "AwsS3-Dataplane", - RuntimeConfig.S3.createDataplane("/control", PROVIDER_CONTROL_PORT) + RuntimeConfig.S3.s3dataplaneConfig("/control", PROVIDER_CONTROL_PORT) ); @Container private final GenericContainer providerContainer = new GenericContainer<>(MINIO_DOCKER_IMAGE) @@ -343,4 +343,4 @@ private DataFlowStartMessage createMultipleFileFlowRequest() { .build(); } -} \ No newline at end of file +} diff --git a/edc-tests/edc-dataplane/edc-dataplane-tokenrefresh-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/tokenrefresh/e2e/DataPlaneTokenRefreshEndToEndTest.java b/edc-tests/edc-dataplane/edc-dataplane-tokenrefresh-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/tokenrefresh/e2e/DataPlaneTokenRefreshEndToEndTest.java index 9e3440725..a13779681 100644 --- a/edc-tests/edc-dataplane/edc-dataplane-tokenrefresh-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/tokenrefresh/e2e/DataPlaneTokenRefreshEndToEndTest.java +++ b/edc-tests/edc-dataplane/edc-dataplane-tokenrefresh-tests/src/test/java/org/eclipse/tractusx/edc/dataplane/tokenrefresh/e2e/DataPlaneTokenRefreshEndToEndTest.java @@ -66,13 +66,15 @@ public class DataPlaneTokenRefreshEndToEndTest { public static final String PROVIDER_KEY_ID_PUBLIC = PROVIDER_DID + "#key-1-public"; public static final String CONSUMER_KEY_ID = CONSUMER_DID + "#cons-1"; private static final RuntimeConfig RUNTIME_CONFIG = new RuntimeConfig(); + @RegisterExtension - protected static final EdcRuntimeExtension DATAPLANE_RUNTIME = new EdcRuntimeExtension( + private static final EdcRuntimeExtension DATAPLANE_RUNTIME = new EdcRuntimeExtension( ":edc-tests:runtime:dataplane-cloud", "Token-Refresh-Dataplane", with(RUNTIME_CONFIG.baseConfig(), Map.of("edc.transfer.proxy.token.signer.privatekey.alias", PROVIDER_KEY_ID, "edc.transfer.proxy.token.verifier.publickey.alias", PROVIDER_KEY_ID_PUBLIC)) ); + private ECKey providerKey; private ECKey consumerKey; @@ -81,7 +83,6 @@ private static Map with(Map baseConfig, Map baseConfig() { return new HashMap<>() { { - put("edc.dataplane.token.validation.endpoint", "http://token-validation.com"); put("web.http.path", defaultApi.url().getPath()); put("web.http.port", String.valueOf(defaultApi.url().getPort())); put("web.http.public.path", publicApi.url().getPath()); put("web.http.public.port", String.valueOf(publicApi.url().getPort())); put("web.http.control.path", controlApi.url().getPath()); put("web.http.control.port", String.valueOf(controlApi.url().getPort())); + put("edc.dpf.selector.url", "http://not-used/feature"); put("edc.iam.issuer.id", "did:web:" + UUID.randomUUID()); put("edc.iam.sts.oauth.token.url", "http://sts.example.com/token"); put("edc.iam.sts.oauth.client.id", "test-clientid"); diff --git a/edc-tests/runtime/dataplane-cloud/build.gradle.kts b/edc-tests/runtime/dataplane-cloud/build.gradle.kts index 2ebe40727..dc71a1292 100644 --- a/edc-tests/runtime/dataplane-cloud/build.gradle.kts +++ b/edc-tests/runtime/dataplane-cloud/build.gradle.kts @@ -28,6 +28,8 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { exclude("org.eclipse.edc", "api-observability") + exclude("org.eclipse.edc", "data-plane-selector-client") + exclude("org.eclipse.edc", "data-plane-self-registration") } } diff --git a/edc-tests/runtime/iatp/runtime-memory-iatp-dim-ih/build.gradle.kts b/edc-tests/runtime/iatp/runtime-memory-iatp-dim-ih/build.gradle.kts index e3ebeed3d..be7394f9b 100644 --- a/edc-tests/runtime/iatp/runtime-memory-iatp-dim-ih/build.gradle.kts +++ b/edc-tests/runtime/iatp/runtime-memory-iatp-dim-ih/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { exclude("org.eclipse.edc", "api-observability") + exclude("org.eclipse.edc", "data-plane-selector-client") } implementation(libs.edc.core.controlplane) diff --git a/edc-tests/runtime/iatp/runtime-memory-iatp-dim/build.gradle.kts b/edc-tests/runtime/iatp/runtime-memory-iatp-dim/build.gradle.kts index c9ebd1ba2..00f90c973 100644 --- a/edc-tests/runtime/iatp/runtime-memory-iatp-dim/build.gradle.kts +++ b/edc-tests/runtime/iatp/runtime-memory-iatp-dim/build.gradle.kts @@ -37,6 +37,7 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { exclude("org.eclipse.edc", "api-observability") + exclude("org.eclipse.edc", "data-plane-selector-client") } implementation(libs.edc.core.controlplane) diff --git a/edc-tests/runtime/iatp/runtime-memory-iatp-ih/build.gradle.kts b/edc-tests/runtime/iatp/runtime-memory-iatp-ih/build.gradle.kts index 821f5b032..edaf8fa71 100644 --- a/edc-tests/runtime/iatp/runtime-memory-iatp-ih/build.gradle.kts +++ b/edc-tests/runtime/iatp/runtime-memory-iatp-ih/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { exclude("org.eclipse.edc", "api-observability") + exclude("org.eclipse.edc", "data-plane-selector-client") } implementation(libs.edc.core.controlplane) diff --git a/edc-tests/runtime/runtime-memory-signaling/README.md b/edc-tests/runtime/runtime-memory-signaling/README.md deleted file mode 100644 index 2f9593a75..000000000 --- a/edc-tests/runtime/runtime-memory-signaling/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# In-Memory Runtime for Testing Purposes - -This module provides a very small, purely in-mem runtime to execute tests against. Not intended for anything other than testing! diff --git a/edc-tests/runtime/runtime-memory-signaling/build.gradle.kts b/edc-tests/runtime/runtime-memory-signaling/build.gradle.kts deleted file mode 100644 index 518aabfcd..000000000 --- a/edc-tests/runtime/runtime-memory-signaling/build.gradle.kts +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * 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 { - `java-library` - id("application") -} - - -dependencies { - - // use basic (all in-mem) control plane - implementation(project(":edc-tests:runtime:runtime-memory")) -} - -application { - mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime") -} - -edcBuild { - publish.set(false) -} diff --git a/edc-tests/runtime/runtime-memory/build.gradle.kts b/edc-tests/runtime/runtime-memory/build.gradle.kts index b2ff89caf..5c59cd5e7 100644 --- a/edc-tests/runtime/runtime-memory/build.gradle.kts +++ b/edc-tests/runtime/runtime-memory/build.gradle.kts @@ -44,6 +44,7 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-base")) { exclude("org.eclipse.edc", "api-observability") + exclude("org.eclipse.edc", "data-plane-selector-client") } implementation(libs.edc.core.controlplane) diff --git a/edc-tests/runtime/runtime-postgresql/build.gradle.kts b/edc-tests/runtime/runtime-postgresql/build.gradle.kts index 39f49763d..092f087d1 100644 --- a/edc-tests/runtime/runtime-postgresql/build.gradle.kts +++ b/edc-tests/runtime/runtime-postgresql/build.gradle.kts @@ -42,7 +42,8 @@ dependencies { // use basic (all in-mem) data plane runtimeOnly(project(":edc-dataplane:edc-dataplane-hashicorp-vault")) { exclude("org.eclipse.edc", "api-observability") - exclude(group = "org.eclipse.edc", "vault-hashicorp") + exclude("org.eclipse.edc", "data-plane-selector-client") + exclude("org.eclipse.edc", "vault-hashicorp") } implementation(libs.edc.core.controlplane) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d0e3180bd..fce52d88d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -184,6 +184,9 @@ edc-dpf-api-control = { module = "org.eclipse.edc:data-plane-control-api", versi edc-dpf-api-public-v2 = { module = "org.eclipse.edc:data-plane-public-api-v2", version.ref = "edc" } edc-dpf-api-signaling = { module = "org.eclipse.edc:data-plane-signaling-api", version.ref = "edc" } +edc-data-plane-selector-control-api = { module = "org.eclipse.edc:data-plane-selector-control-api", version.ref = "edc" } +edc-data-plane-selector-client = { module = "org.eclipse.edc:data-plane-selector-client", version.ref = "edc" } +edc-data-plane-self-registration = { module = "org.eclipse.edc:data-plane-self-registration", version.ref = "edc" } # micrometer and other infra stuff edc-micrometer-core = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" }