diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml index 88bf8d850..35ac5ff9c 100644 --- a/.github/workflows/verify.yaml +++ b/.github/workflows/verify.yaml @@ -77,6 +77,15 @@ jobs: run: | ./gradlew checkstyleMain checkstyleTest + verify-javadoc: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup-java + + - name: Run Javadoc + run: ./gradlew javadoc + unit-tests: runs-on: ubuntu-latest steps: diff --git a/edc-controlplane/edc-controlplane-base/build.gradle.kts b/edc-controlplane/edc-controlplane-base/build.gradle.kts index 5505921ac..e17edd8e0 100644 --- a/edc-controlplane/edc-controlplane-base/build.gradle.kts +++ b/edc-controlplane/edc-controlplane-base/build.gradle.kts @@ -62,6 +62,7 @@ dependencies { runtimeOnly(libs.edc.api.management) runtimeOnly(libs.edc.api.controlplane) runtimeOnly(libs.edc.api.management.config) + runtimeOnly(libs.edc.api.control.config) runtimeOnly(libs.edc.api.core) runtimeOnly(libs.edc.api.observability) runtimeOnly(libs.edc.dsp) diff --git a/edc-dataplane/edc-dataplane-base/build.gradle.kts b/edc-dataplane/edc-dataplane-base/build.gradle.kts index 5a67d51ef..ca2b2a112 100644 --- a/edc-dataplane/edc-dataplane-base/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-base/build.gradle.kts @@ -47,6 +47,7 @@ dependencies { runtimeOnly(libs.edc.dpf.api.control) runtimeOnly(libs.edc.dpf.api.signaling) + runtimeOnly(libs.edc.api.control.config) runtimeOnly(libs.edc.dpf.api.public.v2) runtimeOnly(libs.edc.core.connector) runtimeOnly(libs.edc.boot) @@ -55,4 +56,5 @@ dependencies { runtimeOnly(libs.bundles.edc.monitoring) runtimeOnly(libs.edc.ext.http) runtimeOnly(libs.edc.api.observability) + runtimeOnly(libs.edc.api.core) } diff --git a/edc-extensions/bpn-validation/bpn-validation-api/src/main/java/org/eclipse/tractusx/edc/api/bpn/BusinessPartnerGroupApiExtension.java b/edc-extensions/bpn-validation/bpn-validation-api/src/main/java/org/eclipse/tractusx/edc/api/bpn/BusinessPartnerGroupApiExtension.java index f6bef816f..d0cef588f 100644 --- a/edc-extensions/bpn-validation/bpn-validation-api/src/main/java/org/eclipse/tractusx/edc/api/bpn/BusinessPartnerGroupApiExtension.java +++ b/edc-extensions/bpn-validation/bpn-validation-api/src/main/java/org/eclipse/tractusx/edc/api/bpn/BusinessPartnerGroupApiExtension.java @@ -19,13 +19,13 @@ package org.eclipse.tractusx.edc.api.bpn; -import org.eclipse.edc.connector.api.management.configuration.ManagementApiConfiguration; import org.eclipse.edc.jsonld.spi.JsonLd; import org.eclipse.edc.runtime.metamodel.annotation.Extension; import org.eclipse.edc.runtime.metamodel.annotation.Inject; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; import org.eclipse.edc.web.spi.WebService; +import org.eclipse.edc.web.spi.configuration.ApiContext; import org.eclipse.tractusx.edc.validation.businesspartner.spi.BusinessPartnerStore; import static org.eclipse.tractusx.edc.edr.spi.CoreConstants.TX_NAMESPACE; @@ -37,8 +37,6 @@ public class BusinessPartnerGroupApiExtension implements ServiceExtension { @Inject private WebService webService; @Inject - private ManagementApiConfiguration apiConfiguration; - @Inject private JsonLd jsonLdService; @Inject private BusinessPartnerStore businessPartnerStore; @@ -47,7 +45,7 @@ public class BusinessPartnerGroupApiExtension implements ServiceExtension { public void initialize(ServiceExtensionContext context) { jsonLdService.registerNamespace(TX_PREFIX, TX_NAMESPACE); - webService.registerResource(apiConfiguration.getContextAlias(), new BusinessPartnerGroupApiController(businessPartnerStore)); + webService.registerResource(ApiContext.MANAGEMENT, new BusinessPartnerGroupApiController(businessPartnerStore)); } } diff --git a/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/DataPlaneProxyConsumerApiExtension.java b/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/DataPlaneProxyConsumerApiExtension.java index a33b1523e..4aea357ac 100644 --- a/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/DataPlaneProxyConsumerApiExtension.java +++ b/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/DataPlaneProxyConsumerApiExtension.java @@ -106,8 +106,9 @@ public String name() { @Override public void initialize(ServiceExtensionContext context) { var port = propertyCompatibility(context, CONSUMER_PORT, CONSUMER_PORT_DEPRECATED, DEFAULT_PROXY_PORT); + var config = context.getConfig(CONSUMER_CONFIG_KEY); - configurer.configure(context, webServer, createApiContext(port)); + configurer.configure(config, webServer, createApiContext(port)); var poolSize = propertyCompatibility(context, THREAD_POOL_SIZE, THREAD_POOL_SIZE_DEPRECATED, DEFAULT_THREAD_POOL); executorService = newFixedThreadPool(poolSize); diff --git a/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/TokenBasedAuthenticationService.java b/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/TokenBasedAuthenticationService.java index 221f2e30f..14ecbbdb7 100644 --- a/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/TokenBasedAuthenticationService.java +++ b/edc-extensions/dataplane/dataplane-proxy/edc-dataplane-proxy-consumer-api/src/main/java/org/eclipse/tractusx/edc/dataplane/proxy/consumer/api/TokenBasedAuthenticationService.java @@ -28,7 +28,7 @@ import java.util.Objects; /** - * This is a carbon-copy of the {@link org.eclipse.edc.api.auth.token.TokenBasedAuthenticationService}. + * This is a carbon-copy of the upstream EDC org.eclipse.edc.api.auth.token.TokenBasedAuthenticationService. * * @deprecated this is a shim that we need to use until upstream EDC has made the TokenBasedAuthenticationService available for standalone use. */ diff --git a/edc-extensions/edr/edr-api-v2/src/main/java/org/eclipse/tractusx/edc/api/edr/v2/EdrCacheApiExtension.java b/edc-extensions/edr/edr-api-v2/src/main/java/org/eclipse/tractusx/edc/api/edr/v2/EdrCacheApiExtension.java index 585c0fcc7..c3e351d6d 100644 --- a/edc-extensions/edr/edr-api-v2/src/main/java/org/eclipse/tractusx/edc/api/edr/v2/EdrCacheApiExtension.java +++ b/edc-extensions/edr/edr-api-v2/src/main/java/org/eclipse/tractusx/edc/api/edr/v2/EdrCacheApiExtension.java @@ -20,7 +20,6 @@ package org.eclipse.tractusx.edc.api.edr.v2; import jakarta.json.Json; -import org.eclipse.edc.connector.api.management.configuration.ManagementApiConfiguration; import org.eclipse.edc.connector.controlplane.services.spi.contractnegotiation.ContractNegotiationService; import org.eclipse.edc.edr.spi.store.EndpointDataReferenceStore; import org.eclipse.edc.jsonld.spi.JsonLd; @@ -31,6 +30,7 @@ import org.eclipse.edc.transform.spi.TypeTransformerRegistry; import org.eclipse.edc.validator.spi.JsonObjectValidatorRegistry; import org.eclipse.edc.web.spi.WebService; +import org.eclipse.edc.web.spi.configuration.ApiContext; import org.eclipse.tractusx.edc.api.edr.v2.transform.JsonObjectFromEndpointDataReferenceEntryTransformer; import org.eclipse.tractusx.edc.edr.spi.service.EdrService; @@ -43,8 +43,6 @@ public class EdrCacheApiExtension implements ServiceExtension { @Inject private WebService webService; - @Inject - private ManagementApiConfiguration apiConfig; @Inject private EdrService edrService; @@ -71,6 +69,6 @@ public void initialize(ServiceExtensionContext context) { jsonLdService.registerNamespace(TX_PREFIX, TX_NAMESPACE); var mgmtApiTransformerRegistry = transformerRegistry.forContext("management-api"); mgmtApiTransformerRegistry.register(new JsonObjectFromEndpointDataReferenceEntryTransformer(Json.createBuilderFactory(Map.of()))); - webService.registerResource(apiConfig.getContextAlias(), new EdrCacheApiController(edrStore, mgmtApiTransformerRegistry, validatorRegistry, monitor, edrService, contractNegotiationService)); + webService.registerResource(ApiContext.MANAGEMENT, new EdrCacheApiController(edrStore, mgmtApiTransformerRegistry, validatorRegistry, monitor, edrService, contractNegotiationService)); } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index efab640e5..82f80e5ec 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -67,6 +67,7 @@ edc-core-edrstore = { module = "org.eclipse.edc:edr-store-core", version.ref = " edc-controlplane-callback-staticendpoint = { module = "org.eclipse.edc:callback-static-endpoint", version.ref = "edc" } edc-junit = { module = "org.eclipse.edc:junit", version.ref = "edc" } edc-api-management-config = { module = "org.eclipse.edc:management-api-configuration", version.ref = "edc" } +edc-api-control-config = { module = "org.eclipse.edc:control-api-configuration", version.ref = "edc" } edc-api-management = { module = "org.eclipse.edc:management-api", version.ref = "edc" } edc-api-core = { module = "org.eclipse.edc:api-core", version.ref = "edc" } edc-api-management-test-fixtures = { module = "org.eclipse.edc:management-api-test-fixtures", version.ref = "edc" } diff --git a/samples/multi-tenancy/src/test/resources/tenants.properties b/samples/multi-tenancy/src/test/resources/tenants.properties index 5100eb12d..14fee9c9d 100644 --- a/samples/multi-tenancy/src/test/resources/tenants.properties +++ b/samples/multi-tenancy/src/test/resources/tenants.properties @@ -16,7 +16,6 @@ # # SPDX-License-Identifier: Apache-2.0 ################################################################################# - edc.tenants.one.edc.any=any edc.tenants.one.web.http.port=18181 edc.tenants.one.web.http.path=/api @@ -24,6 +23,8 @@ edc.tenants.one.web.http.protocol.port=18282 edc.tenants.one.web.http.protocol.path=/protocol 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.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 @@ -33,5 +34,7 @@ edc.tenants.two.web.http.protocol.port=28282 edc.tenants.two.web.http.protocol.path=/protocol 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.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com edc.tenants.two.edc.iam.issuer.id=did:web:tenant2