diff --git a/DEPENDENCIES b/DEPENDENCIES index 37aafb2a9..0ab3ea8d9 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -2,62 +2,51 @@ maven/mavencentral/com.apicatalog/carbon-did/0.0.2, Apache-2.0, approved, #9239 maven/mavencentral/com.apicatalog/iron-verifiable-credentials/0.8.1, Apache-2.0, approved, #9234 maven/mavencentral/com.apicatalog/titanium-json-ld/1.0.0, Apache-2.0, approved, clearlydefined maven/mavencentral/com.apicatalog/titanium-json-ld/1.3.1, Apache-2.0, approved, #8912 -maven/mavencentral/com.apicatalog/titanium-json-ld/1.3.2, Apache-2.0, approved, #8912 maven/mavencentral/com.apicatalog/titanium-json-ld/1.3.3, Apache-2.0, approved, #8912 maven/mavencentral/com.azure/azure-core-http-netty/1.13.11, MIT AND Apache-2.0, approved, #7948 -maven/mavencentral/com.azure/azure-core-http-netty/1.13.7, MIT AND Apache-2.0, approved, #7948 maven/mavencentral/com.azure/azure-core-http-netty/1.13.9, MIT AND Apache-2.0, approved, #7948 -maven/mavencentral/com.azure/azure-core/1.43.0, MIT AND Apache-2.0, approved, #10548 maven/mavencentral/com.azure/azure-core/1.44.1, MIT, approved, clearlydefined maven/mavencentral/com.azure/azure-core/1.45.1, MIT AND Apache-2.0, approved, #11845 -maven/mavencentral/com.azure/azure-identity/1.10.1, MIT AND Apache-2.0, approved, #10086 maven/mavencentral/com.azure/azure-identity/1.11.1, MIT, approved, clearlydefined maven/mavencentral/com.azure/azure-json/1.1.0, MIT AND Apache-2.0, approved, #10547 -maven/mavencentral/com.azure/azure-security-keyvault-secrets/4.7.0, MIT, approved, #10868 maven/mavencentral/com.azure/azure-security-keyvault-secrets/4.7.3, MIT, approved, #10868 maven/mavencentral/com.azure/azure-storage-blob/12.24.1, MIT, approved, #10568 maven/mavencentral/com.azure/azure-storage-common/12.23.1, MIT, approved, #10569 maven/mavencentral/com.azure/azure-storage-internal-avro/12.9.1, MIT, approved, #10560 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.10.3, Apache-2.0, approved, CQ21280 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.13.5, Apache-2.0, approved, clearlydefined -maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.1, Apache-2.0, approved, #5303 -maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.14.2, Apache-2.0, approved, #5303 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.1, Apache-2.0, approved, #7947 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.15.3, Apache-2.0, approved, #7947 +maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.16.0, Apache-2.0, approved, #11606 maven/mavencentral/com.fasterxml.jackson.core/jackson-annotations/2.16.1, Apache-2.0, approved, #11606 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.13.5, Apache-2.0, approved, #2133 -maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.14.2, Apache-2.0 AND MIT, approved, #4303 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.1, MIT AND Apache-2.0, approved, #7932 -maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.15.3, MIT AND Apache-2.0, approved, #7932 +maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.16.0, Apache-2.0 AND MIT, approved, #11602 maven/mavencentral/com.fasterxml.jackson.core/jackson-core/2.16.1, Apache-2.0 AND MIT, approved, #11602 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.13.4.2, Apache-2.0, approved, #2134 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.13.5, Apache-2.0, approved, #2134 -maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.1, Apache-2.0, approved, #4105 -maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.14.2, Apache-2.0, approved, #4105 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.1, Apache-2.0, approved, #7934 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.15.3, Apache-2.0, approved, #7934 +maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.16.0, Apache-2.0, approved, #11605 maven/mavencentral/com.fasterxml.jackson.core/jackson-databind/2.16.1, Apache-2.0, approved, #11605 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.15.2, Apache-2.0, approved, #9160 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-toml/2.16.1, , restricted, clearlydefined maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.13.5, Apache-2.0, approved, #3768 -maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.14.2, Apache-2.0, approved, #4300 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-xml/2.16.1, Apache-2.0, approved, #12438 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.15.1, Apache-2.0, approved, #8802 maven/mavencentral/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.16.1, Apache-2.0, approved, #11855 -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.15.3, Apache-2.0, approved, #9179 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jakarta-jsonp/2.16.1, Apache-2.0, approved, #11854 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.13.5, Apache-2.0, approved, clearlydefined -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.14.2, Apache-2.0, approved, #4699 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.1, Apache-2.0, approved, #7930 -maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.15.3, Apache-2.0, approved, #7930 +maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.16.0, Apache-2.0, approved, #11853 maven/mavencentral/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.16.1, Apache-2.0, approved, #11853 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-base/2.16.1, Apache-2.0, approved, #11851 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.15.1, Apache-2.0, approved, #9236 maven/mavencentral/com.fasterxml.jackson.jakarta.rs/jackson-jakarta-rs-json-provider/2.16.1, Apache-2.0, approved, #11858 -maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.14.1, Apache-2.0, approved, #5308 +maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.15.3, Apache-2.0, approved, #9241 maven/mavencentral/com.fasterxml.jackson.module/jackson-module-jakarta-xmlbind-annotations/2.16.1, Apache-2.0, approved, #11856 maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.15.1, Apache-2.0, approved, #7929 -maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.15.3, Apache-2.0, approved, #7929 +maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.16.0, Apache-2.0, approved, #11852 maven/mavencentral/com.fasterxml.jackson/jackson-bom/2.16.1, Apache-2.0, approved, #11852 maven/mavencentral/com.fasterxml.woodstox/woodstox-core/6.5.1, Apache-2.0, approved, #7950 maven/mavencentral/com.github.docker-java/docker-java-api/3.3.4, Apache-2.0, approved, #10346 @@ -75,13 +64,11 @@ maven/mavencentral/com.google.guava/listenablefuture/9999.0-empty-to-avoid-confl maven/mavencentral/com.google.j2objc/j2objc-annotations/1.3, Apache-2.0, approved, CQ21195 maven/mavencentral/com.google.protobuf/protobuf-java/3.24.3, BSD-3-Clause, approved, clearlydefined maven/mavencentral/com.microsoft.azure/msal4j-persistence-extension/1.2.0, MIT, approved, clearlydefined -maven/mavencentral/com.microsoft.azure/msal4j/1.13.9, MIT, approved, clearlydefined maven/mavencentral/com.microsoft.azure/msal4j/1.14.0, MIT, approved, clearlydefined maven/mavencentral/com.microsoft.azure/msal4j/1.4.0, MIT, approved, clearlydefined maven/mavencentral/com.nimbusds/content-type/2.2, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/lang-tag/1.7, Apache-2.0, approved, clearlydefined maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.30.2, Apache-2.0, approved, clearlydefined -maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37, Apache-2.0, approved, #11701 maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.37.3, Apache-2.0, approved, #11701 maven/mavencentral/com.nimbusds/oauth2-oidc-sdk/10.7.1, Apache-2.0, approved, clearlydefined maven/mavencentral/com.puppycrawl.tools/checkstyle/10.0, LGPL-2.1-or-later, approved, #7936 @@ -107,90 +94,65 @@ maven/mavencentral/dev.failsafe/failsafe/3.3.1, Apache-2.0, approved, #9268 maven/mavencentral/dev.failsafe/failsafe/3.3.2, Apache-2.0, approved, #9268 maven/mavencentral/info.picocli/picocli/4.6.3, Apache-2.0, approved, clearlydefined maven/mavencentral/io.github.classgraph/classgraph/4.8.154, MIT, approved, CQ22530 -maven/mavencentral/io.micrometer/micrometer-commons/1.12.0, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #11679 -maven/mavencentral/io.micrometer/micrometer-core/1.12.0, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #11678 -maven/mavencentral/io.micrometer/micrometer-observation/1.12.0, Apache-2.0, approved, #11680 +maven/mavencentral/io.micrometer/micrometer-commons/1.12.1, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #11679 +maven/mavencentral/io.micrometer/micrometer-core/1.12.1, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #11678 +maven/mavencentral/io.micrometer/micrometer-observation/1.12.1, Apache-2.0, approved, #11680 maven/mavencentral/io.netty/netty-buffer/4.1.100.Final, Apache-2.0, approved, CQ21842 maven/mavencentral/io.netty/netty-buffer/4.1.101.Final, Apache-2.0, approved, CQ21842 -maven/mavencentral/io.netty/netty-buffer/4.1.94.Final, Apache-2.0, approved, CQ21842 maven/mavencentral/io.netty/netty-codec-dns/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-dns/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-codec-dns/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-http/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-http/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-codec-http/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-http2/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-http2/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-codec-http2/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-socks/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec-socks/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-codec-socks/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-codec/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-codec/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-common/4.1.100.Final, Apache-2.0 AND MIT AND CC0-1.0, approved, CQ21843 maven/mavencentral/io.netty/netty-common/4.1.101.Final, Apache-2.0 AND MIT AND CC0-1.0, approved, CQ21843 -maven/mavencentral/io.netty/netty-common/4.1.94.Final, Apache-2.0 AND MIT AND CC0-1.0, approved, CQ21843 maven/mavencentral/io.netty/netty-handler-proxy/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-handler-proxy/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-handler-proxy/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-handler/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-handler/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-handler/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-resolver-dns-classes-macos/4.1.100.Final, Apache-2.0, approved, #6367 maven/mavencentral/io.netty/netty-resolver-dns-classes-macos/4.1.101.Final, Apache-2.0, approved, #6367 -maven/mavencentral/io.netty/netty-resolver-dns-classes-macos/4.1.94.Final, Apache-2.0, approved, #6367 maven/mavencentral/io.netty/netty-resolver-dns-native-macos/4.1.100.Final, Apache-2.0, approved, #7004 maven/mavencentral/io.netty/netty-resolver-dns-native-macos/4.1.101.Final, Apache-2.0, approved, #7004 -maven/mavencentral/io.netty/netty-resolver-dns-native-macos/4.1.94.Final, Apache-2.0, approved, #7004 maven/mavencentral/io.netty/netty-resolver-dns/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-resolver-dns/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-resolver-dns/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-resolver/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-resolver/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-resolver/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-tcnative-boringssl-static/2.0.61.Final, Apache-2.0 OR LicenseRef-Public-Domain OR BSD-2-Clause OR MIT, approved, CQ15280 maven/mavencentral/io.netty/netty-tcnative-boringssl-static/2.0.62.Final, Apache-2.0 OR LicenseRef-Public-Domain OR BSD-2-Clause OR MIT, approved, CQ15280 -maven/mavencentral/io.netty/netty-tcnative-classes/2.0.61.Final, Apache-2.0, approved, clearlydefined maven/mavencentral/io.netty/netty-tcnative-classes/2.0.62.Final, Apache-2.0, approved, clearlydefined maven/mavencentral/io.netty/netty-transport-classes-epoll/4.1.100.Final, Apache-2.0, approved, #6366 maven/mavencentral/io.netty/netty-transport-classes-epoll/4.1.101.Final, Apache-2.0, approved, #6366 -maven/mavencentral/io.netty/netty-transport-classes-epoll/4.1.94.Final, Apache-2.0, approved, #6366 maven/mavencentral/io.netty/netty-transport-classes-kqueue/4.1.100.Final, Apache-2.0, approved, #4107 maven/mavencentral/io.netty/netty-transport-classes-kqueue/4.1.101.Final, Apache-2.0, approved, #4107 -maven/mavencentral/io.netty/netty-transport-classes-kqueue/4.1.94.Final, Apache-2.0, approved, #4107 maven/mavencentral/io.netty/netty-transport-native-epoll/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport-native-epoll/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-transport-native-epoll/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport-native-kqueue/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport-native-kqueue/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-transport-native-kqueue/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport-native-unix-common/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport-native-unix-common/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-transport-native-unix-common/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport/4.1.100.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 maven/mavencentral/io.netty/netty-transport/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.netty/netty-transport/4.1.94.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 -maven/mavencentral/io.opentelemetry.instrumentation/opentelemetry-instrumentation-annotations/1.31.0, Apache-2.0, approved, #11085 -maven/mavencentral/io.opentelemetry/opentelemetry-api/1.31.0, Apache-2.0, approved, #11087 -maven/mavencentral/io.opentelemetry/opentelemetry-context/1.31.0, Apache-2.0, approved, #11088 -maven/mavencentral/io.projectreactor.netty/reactor-netty-core/1.0.34, Apache-2.0, approved, #9687 +maven/mavencentral/io.opentelemetry.instrumentation/opentelemetry-instrumentation-annotations/1.32.0, Apache-2.0, approved, #11684 +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.32.0, Apache-2.0, approved, #11682 +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.32.0, Apache-2.0, approved, #11683 maven/mavencentral/io.projectreactor.netty/reactor-netty-core/1.0.38, Apache-2.0, approved, #9687 maven/mavencentral/io.projectreactor.netty/reactor-netty-core/1.0.39, Apache-2.0, approved, #9687 -maven/mavencentral/io.projectreactor.netty/reactor-netty-http/1.0.34, Apache-2.0, approved, #11661 maven/mavencentral/io.projectreactor.netty/reactor-netty-http/1.0.38, Apache-2.0, approved, #11661 maven/mavencentral/io.projectreactor.netty/reactor-netty-http/1.0.39, Apache-2.0, approved, #11661 -maven/mavencentral/io.projectreactor/reactor-core/3.4.31, Apache-2.0, approved, #7517 maven/mavencentral/io.projectreactor/reactor-core/3.4.33, Apache-2.0, approved, #7517 maven/mavencentral/io.projectreactor/reactor-core/3.4.34, Apache-2.0, approved, #7517 maven/mavencentral/io.rest-assured/json-path/5.4.0, Apache-2.0, approved, #12042 maven/mavencentral/io.rest-assured/rest-assured-common/5.4.0, Apache-2.0, approved, #12039 -maven/mavencentral/io.rest-assured/rest-assured/5.3.2, Apache-2.0, approved, #9262 maven/mavencentral/io.rest-assured/rest-assured/5.4.0, Apache-2.0, approved, #12040 maven/mavencentral/io.rest-assured/xml-path/5.4.0, Apache-2.0, approved, #12038 maven/mavencentral/io.setl/rdf-urdna/1.1, Apache-2.0, approved, clearlydefined maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.15, Apache-2.0, approved, #5947 -maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.19, Apache-2.0, approved, #5947 +maven/mavencentral/io.swagger.core.v3/swagger-annotations-jakarta/2.2.20, Apache-2.0, approved, #5947 maven/mavencentral/io.swagger.core.v3/swagger-annotations/2.2.15, Apache-2.0, approved, #11362 maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, approved, #5929 maven/mavencentral/io.swagger.core.v3/swagger-core/2.2.15, Apache-2.0, approved, #9265 @@ -216,8 +178,10 @@ maven/mavencentral/javax.servlet/javax.servlet-api/3.1.0, (CDDL-1.1 OR GPL-2.0-o maven/mavencentral/javax.ws.rs/javax.ws.rs-api/2.1, (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0) AND Apache-2.0, approved, CQ18121 maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.1, Apache-2.0, approved, #7164 +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.10, Apache-2.0, approved, #7164 maven/mavencentral/net.bytebuddy/byte-buddy/1.12.21, Apache-2.0 AND BSD-3-Clause, approved, #1811 maven/mavencentral/net.bytebuddy/byte-buddy/1.14.1, Apache-2.0 AND BSD-3-Clause, approved, #7163 +maven/mavencentral/net.bytebuddy/byte-buddy/1.14.10, Apache-2.0 AND BSD-3-Clause, approved, #7163 maven/mavencentral/net.bytebuddy/byte-buddy/1.14.11, Apache-2.0 AND BSD-3-Clause, approved, #7163 maven/mavencentral/net.java.dev.jna/jna-platform/5.13.0, Apache-2.0 OR LGPL-2.1-or-later, approved, #6707 maven/mavencentral/net.java.dev.jna/jna-platform/5.6.0, Apache-2.0 OR LGPL-2.1-or-later, approved, CQ22390 @@ -245,174 +209,171 @@ maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161 maven/mavencentral/org.assertj/assertj-core/3.25.0, Apache-2.0, approved, #12585 maven/mavencentral/org.awaitility/awaitility/4.2.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.76, MIT, approved, #9825 maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.77, MIT, approved, #11593 -maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.76, MIT AND CC0-1.0, approved, #9827 maven/mavencentral/org.bouncycastle/bcprov-jdk18on/1.77, MIT AND CC0-1.0, approved, #11595 -maven/mavencentral/org.bouncycastle/bcutil-jdk18on/1.76, MIT, approved, #9828 maven/mavencentral/org.bouncycastle/bcutil-jdk18on/1.77, MIT, approved, #11596 maven/mavencentral/org.ccil.cowan.tagsoup/tagsoup/1.2.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.checkerframework/checker-qual/3.12.0, MIT, approved, clearlydefined maven/mavencentral/org.checkerframework/checker-qual/3.31.0, MIT, approved, clearlydefined maven/mavencentral/org.checkerframework/checker-qual/3.41.0, MIT, approved, #12032 maven/mavencentral/org.codehaus.woodstox/stax2-api/4.2.1, BSD-2-Clause, approved, #2670 -maven/mavencentral/org.eclipse.edc/api-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/api-observability/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/asset-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/asset-index-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/asset-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/auth-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/auth-tokenbased/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/autodoc-processor/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/aws-s3-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/aws-s3-test/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/azure-blob-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/azure-test/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/boot/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/callback-event-dispatcher/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/callback-http-dispatcher/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/catalog-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/catalog-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/catalog-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/configuration-filesystem/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/connector-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-agreement-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-definition-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-definition-store-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-negotiation-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-negotiation-store-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-api-configuration/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-aggregate-services/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-api-client-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-api-client/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/core-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-address-http-data-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-aws-s3/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-azure-storage/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-client/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-http-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-http/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-selector-client/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-selector-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-selector-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/data-plane-util/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-api-configuration/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-http-dispatcher/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-transform/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-http-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-http-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-http-dispatcher/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-transform/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-http-dispatcher/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-transform/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/http-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/http/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/iam-mock/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jersey-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jersey-micrometer/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jersey-providers/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jetty-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jetty-micrometer/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/json-ld-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/json-ld/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/junit/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jwt-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jwt-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/management-api-configuration/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/management-api-test-fixtures/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/management-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/micrometer-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/oauth2-client/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/oauth2-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-definition-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-definition-store-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-engine/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-evaluator/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-model/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-monitor-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-monitor-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-monitor-store-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/sql-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/sql-lease/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/sql-pool-apache-commons/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/state-machine/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transaction-local/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transaction-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-data-plane/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-process-api/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-process-store-sql/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-pull-http-dynamic-receiver/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transform-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transform-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/util/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/validator-core/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/validator-data-address-http-data/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/validator-spi/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/vault-azure/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/vault-hashicorp/0.4.1, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/web-spi/0.4.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/api-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/api-observability/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/asset-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/asset-index-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/asset-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/auth-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/auth-tokenbased/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/autodoc-processor/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/aws-s3-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/aws-s3-test/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/azure-blob-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/azure-test/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/boot/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/callback-event-dispatcher/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/callback-http-dispatcher/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/catalog-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/catalog-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/catalog-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/configuration-filesystem/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/connector-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-agreement-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-definition-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-definition-store-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-negotiation-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-negotiation-store-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-api-configuration/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-aggregate-services/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-api-client-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-api-client/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/core-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-address-http-data-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-aws-s3/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-azure-storage/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-client/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-control-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-http-oauth2/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-http-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-http/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-public-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-selector-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-selector-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/data-plane-util/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-api-configuration/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-http-dispatcher/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-transform/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-http-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-http-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-http-dispatcher/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-transform/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-http-dispatcher/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-transform/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/http-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/http/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/iam-mock/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-micrometer/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-providers/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jetty-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jetty-micrometer/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/json-ld-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/json-ld/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/junit/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jwt-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jwt-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/management-api-configuration/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/management-api-test-fixtures/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/management-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/micrometer-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/oauth2-client/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/oauth2-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-definition-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-definition-store-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-evaluator/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-model/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-monitor-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-monitor-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-monitor-store-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/sql-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/sql-lease/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/sql-pool-apache-commons/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/state-machine/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transaction-local/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transaction-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-data-plane/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-process-api/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-process-store-sql/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-pull-http-dynamic-receiver/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transform-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transform-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/util/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/validator-core/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/validator-data-address-http-data/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/validator-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/vault-azure/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/vault-hashicorp/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/web-spi/0.4.2-20240103-SNAPSHOT, Apache-2.0, approved, technology.edc maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-servlet-api/5.0.2, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.eclipse.jetty.toolchain/jetty-jakarta-websocket-api/2.0.0, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty -maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.18, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-client/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-common/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-core-server/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-client/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-common/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-jakarta-server/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty.websocket/websocket-servlet/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-alpn-client/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-annotations/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-client/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-http/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-io/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-jndi/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-plus/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-security/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-server/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-servlet/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-util/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty +maven/mavencentral/org.eclipse.jetty/jetty-xml/11.0.19, EPL-2.0 OR Apache-2.0, approved, rt.jetty maven/mavencentral/org.flywaydb/flyway-core/9.22.3, Apache-2.0, approved, #10349 -maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish -maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish -maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish -maven/mavencentral/org.glassfish.hk2/hk2-utils/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-locator/3.0.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish +maven/mavencentral/org.glassfish.hk2/hk2-utils/3.0.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish maven/mavencentral/org.glassfish.hk2/osgi-resource-locator/1.0.3, CDDL-1.0, approved, CQ10889 -maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey -maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-client/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-common/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.core/jersey-server/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.ext/jersey-entity-filtering/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.inject/jersey-hk2/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-json-jackson/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey +maven/mavencentral/org.glassfish.jersey.media/jersey-media-multipart/3.1.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jersey maven/mavencentral/org.glassfish/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ11429 maven/mavencentral/org.hamcrest/hamcrest/2.1, BSD-3-Clause, approved, clearlydefined @@ -436,15 +397,13 @@ maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.10, Apache-2.0, approv maven/mavencentral/org.jetbrains.kotlin/kotlin-stdlib/1.9.21, Apache-2.0, approved, #11827 maven/mavencentral/org.jetbrains/annotations/13.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.jetbrains/annotations/17.0.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.jetbrains/annotations/24.0.1, Apache-2.0, approved, #7417 -maven/mavencentral/org.junit-pioneer/junit-pioneer/2.1.0, EPL-2.0, approved, #10550 +maven/mavencentral/org.jetbrains/annotations/24.1.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.junit-pioneer/junit-pioneer/2.2.0, EPL-2.0, approved, #11857 maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.0, EPL-2.0, approved, #9714 maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.10.1, EPL-2.0, approved, #9714 maven/mavencentral/org.junit.jupiter/junit-jupiter-api/5.9.3, EPL-2.0, approved, #3133 -maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.0, EPL-2.0, approved, #9711 maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.10.1, EPL-2.0, approved, #9711 maven/mavencentral/org.junit.jupiter/junit-jupiter-engine/5.9.3, EPL-2.0, approved, #3125 -maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.0, EPL-2.0, approved, #9708 maven/mavencentral/org.junit.jupiter/junit-jupiter-params/5.10.1, EPL-2.0, approved, #9708 maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.0, EPL-2.0, approved, #9715 maven/mavencentral/org.junit.platform/junit-platform-commons/1.10.1, EPL-2.0, approved, #9715 @@ -456,6 +415,7 @@ maven/mavencentral/org.junit/junit-bom/5.9.2, EPL-2.0, approved, #4711 maven/mavencentral/org.jvnet.mimepull/mimepull/1.9.15, CDDL-1.1 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, CQ21484 maven/mavencentral/org.latencyutils/LatencyUtils/2.0.3, BSD-2-Clause, approved, CQ17408 maven/mavencentral/org.mockito/mockito-core/5.2.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #7401 +maven/mavencentral/org.mockito/mockito-core/5.8.0, MIT AND (Apache-2.0 AND MIT) AND Apache-2.0, approved, #11787 maven/mavencentral/org.mockito/mockito-inline/5.2.0, MIT, approved, clearlydefined maven/mavencentral/org.objenesis/objenesis/3.3, Apache-2.0, approved, clearlydefined maven/mavencentral/org.opentest4j/opentest4j/1.3.0, Apache-2.0, approved, #9713 @@ -467,7 +427,7 @@ maven/mavencentral/org.ow2.asm/asm-tree/9.6, BSD-3-Clause, approved, #10773 maven/mavencentral/org.ow2.asm/asm/9.2, BSD-3-Clause, approved, CQ23635 maven/mavencentral/org.ow2.asm/asm/9.3, BSD-3-Clause, approved, clearlydefined maven/mavencentral/org.ow2.asm/asm/9.6, BSD-3-Clause, approved, #10776 -maven/mavencentral/org.postgresql/postgresql/42.6.0, BSD-2-Clause AND Apache-2.0, approved, #9159 +maven/mavencentral/org.postgresql/postgresql/42.7.0, BSD-2-Clause AND Apache-2.0, approved, #11681 maven/mavencentral/org.postgresql/postgresql/42.7.1, BSD-2-Clause AND Apache-2.0, approved, #11681 maven/mavencentral/org.reactivestreams/reactive-streams/1.0.4, CC0-1.0, approved, CQ16332 maven/mavencentral/org.reflections/reflections/0.10.2, Apache-2.0 AND WTFPL, approved, clearlydefined @@ -481,73 +441,67 @@ maven/mavencentral/org.slf4j/slf4j-api/1.7.36, MIT, approved, CQ13368 maven/mavencentral/org.slf4j/slf4j-api/1.7.7, MIT, approved, CQ9827 maven/mavencentral/org.slf4j/slf4j-api/2.0.10, MIT, approved, #5915 maven/mavencentral/org.slf4j/slf4j-api/2.0.5, MIT, approved, #5915 -maven/mavencentral/org.testcontainers/database-commons/1.19.2, Apache-2.0, approved, #10345 maven/mavencentral/org.testcontainers/database-commons/1.19.3, Apache-2.0, approved, #10345 -maven/mavencentral/org.testcontainers/jdbc/1.19.2, Apache-2.0, approved, #10348 maven/mavencentral/org.testcontainers/jdbc/1.19.3, Apache-2.0, approved, #10348 -maven/mavencentral/org.testcontainers/junit-jupiter/1.19.1, MIT, approved, #10344 -maven/mavencentral/org.testcontainers/junit-jupiter/1.19.2, MIT, approved, #10344 maven/mavencentral/org.testcontainers/junit-jupiter/1.19.3, MIT, approved, #10344 -maven/mavencentral/org.testcontainers/postgresql/1.19.2, MIT, approved, #10350 maven/mavencentral/org.testcontainers/postgresql/1.19.3, MIT, approved, #10350 -maven/mavencentral/org.testcontainers/testcontainers/1.19.2, Apache-2.0 AND MIT, approved, #10347 maven/mavencentral/org.testcontainers/testcontainers/1.19.3, Apache-2.0 AND MIT, approved, #10347 maven/mavencentral/org.testcontainers/vault/1.19.3, MIT, approved, #10852 maven/mavencentral/org.yaml/snakeyaml/2.0, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #7275 maven/mavencentral/org.yaml/snakeyaml/2.2, Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause OR EPL-1.0 OR GPL-2.0-or-later OR LGPL-2.1-or-later), approved, #10232 -maven/mavencentral/software.amazon.awssdk/annotations/2.21.15, Apache-2.0, approved, #11137 +maven/mavencentral/software.amazon.awssdk/annotations/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/annotations/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/apache-client/2.21.15, Apache-2.0, approved, #11133 +maven/mavencentral/software.amazon.awssdk/apache-client/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/apache-client/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/arns/2.21.15, Apache-2.0, approved, #11143 +maven/mavencentral/software.amazon.awssdk/arns/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/arns/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/auth/2.21.15, Apache-2.0, approved, #11139 +maven/mavencentral/software.amazon.awssdk/auth/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/auth/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/aws-core/2.21.15, Apache-2.0, approved, #11126 +maven/mavencentral/software.amazon.awssdk/aws-core/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/aws-core/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/aws-query-protocol/2.21.15, Apache-2.0, approved, #11123 +maven/mavencentral/software.amazon.awssdk/aws-query-protocol/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/aws-query-protocol/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/aws-xml-protocol/2.21.15, Apache-2.0, approved, #11124 +maven/mavencentral/software.amazon.awssdk/aws-xml-protocol/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/aws-xml-protocol/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/checksums-spi/2.21.15, Apache-2.0, approved, #11131 +maven/mavencentral/software.amazon.awssdk/checksums-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/checksums-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/checksums/2.21.15, Apache-2.0, approved, #11134 +maven/mavencentral/software.amazon.awssdk/checksums/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/checksums/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/crt-core/2.21.15, Apache-2.0, approved, #11130 +maven/mavencentral/software.amazon.awssdk/crt-core/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/crt-core/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/endpoints-spi/2.21.15, Apache-2.0, approved, #11118 +maven/mavencentral/software.amazon.awssdk/endpoints-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/endpoints-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/http-auth-aws/2.21.15, Apache-2.0, approved, #11145 +maven/mavencentral/software.amazon.awssdk/http-auth-aws/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/http-auth-aws/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/http-auth-spi/2.21.15, Apache-2.0, approved, #11128 +maven/mavencentral/software.amazon.awssdk/http-auth-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/http-auth-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/http-auth/2.21.15, Apache-2.0, approved, #11120 +maven/mavencentral/software.amazon.awssdk/http-auth/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/http-auth/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/http-client-spi/2.21.15, Apache-2.0, approved, #11132 +maven/mavencentral/software.amazon.awssdk/http-client-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/http-client-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/iam/2.21.15, Apache-2.0, approved, #11138 -maven/mavencentral/software.amazon.awssdk/identity-spi/2.21.15, Apache-2.0, approved, #11129 +maven/mavencentral/software.amazon.awssdk/iam/2.22.6, , restricted, clearlydefined +maven/mavencentral/software.amazon.awssdk/identity-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/identity-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/json-utils/2.21.15, Apache-2.0, approved, #11119 +maven/mavencentral/software.amazon.awssdk/json-utils/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/json-utils/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/metrics-spi/2.21.15, Apache-2.0, approved, #11144 +maven/mavencentral/software.amazon.awssdk/metrics-spi/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/metrics-spi/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/netty-nio-client/2.21.15, Apache-2.0, approved, #11140 +maven/mavencentral/software.amazon.awssdk/netty-nio-client/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/netty-nio-client/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/profiles/2.21.15, Apache-2.0, approved, #11148 +maven/mavencentral/software.amazon.awssdk/profiles/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/profiles/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/protocol-core/2.21.15, Apache-2.0, approved, #11141 +maven/mavencentral/software.amazon.awssdk/protocol-core/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/protocol-core/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/regions/2.21.15, Apache-2.0, approved, #11142 +maven/mavencentral/software.amazon.awssdk/regions/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/regions/2.22.9, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/s3-transfer-manager/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/s3/2.21.15, Apache-2.0, approved, #11135 +maven/mavencentral/software.amazon.awssdk/s3/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/s3/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/sdk-core/2.21.15, Apache-2.0, approved, #11121 +maven/mavencentral/software.amazon.awssdk/sdk-core/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/sdk-core/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/sts/2.21.15, Apache-2.0, approved, #11146 -maven/mavencentral/software.amazon.awssdk/third-party-jackson-core/2.21.15, Apache-2.0, approved, #11127 +maven/mavencentral/software.amazon.awssdk/sts/2.22.6, , restricted, clearlydefined +maven/mavencentral/software.amazon.awssdk/third-party-jackson-core/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/third-party-jackson-core/2.22.9, , restricted, clearlydefined -maven/mavencentral/software.amazon.awssdk/utils/2.21.15, Apache-2.0, approved, #11136 +maven/mavencentral/software.amazon.awssdk/utils/2.22.6, , restricted, clearlydefined maven/mavencentral/software.amazon.awssdk/utils/2.22.9, , restricted, clearlydefined maven/mavencentral/software.amazon.eventstream/eventstream/1.0.1, Apache-2.0, approved, clearlydefined diff --git a/core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/manager/EdrManagerImpl.java b/core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/manager/EdrManagerImpl.java index 39042ac52..d78b3d9ea 100644 --- a/core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/manager/EdrManagerImpl.java +++ b/core/edr-core/src/main/java/org/eclipse/tractusx/edc/edr/core/manager/EdrManagerImpl.java @@ -247,7 +247,6 @@ private StatusResult fireTransferProcess(EndpointDataReferenceEntry entry) var transferRequest = TransferRequest.Builder.newInstance() .assetId(dataRequest.getAssetId()) - .connectorId(dataRequest.getConnectorId()) .contractId(dataRequest.getContractId()) .protocol(dataRequest.getProtocol()) .counterPartyAddress(dataRequest.getConnectorAddress()) diff --git a/edc-controlplane/edc-runtime-memory/src/test/java/org/eclipse/tractusx/edc/vault/memory/VaultSeedExtensionTest.java b/edc-controlplane/edc-runtime-memory/src/test/java/org/eclipse/tractusx/edc/vault/memory/VaultSeedExtensionTest.java index e0ffd32cd..f7f1287db 100644 --- a/edc-controlplane/edc-runtime-memory/src/test/java/org/eclipse/tractusx/edc/vault/memory/VaultSeedExtensionTest.java +++ b/edc-controlplane/edc-runtime-memory/src/test/java/org/eclipse/tractusx/edc/vault/memory/VaultSeedExtensionTest.java @@ -30,7 +30,6 @@ import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.eq; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -43,7 +42,7 @@ class VaultSeedExtensionTest { @BeforeEach void setup(ServiceExtensionContext context, ObjectFactory factory) { - this.context = spy(context); + this.context = context; monitor = mock(Monitor.class); context.registerService(Monitor.class, monitor); context.registerService(Vault.class, new InMemoryVault(monitor)); @@ -56,7 +55,7 @@ void name() { } @ParameterizedTest - @ValueSource(strings = {"key1:", "key1:value1", "key1:value1;", ";key1:value1", ";sdf;key1:value1"}) + @ValueSource(strings = { "key1:", "key1:value1", "key1:value1;", ";key1:value1", ";sdf;key1:value1" }) void createInMemVault_validString(String secret) { when(context.getSetting(eq(VaultSeedExtension.VAULT_MEMORY_SECRETS_PROPERTY), eq(null))).thenReturn(secret); extension.createInMemVault(context); diff --git a/edc-dataplane/edc-dataplane-base/build.gradle.kts b/edc-dataplane/edc-dataplane-base/build.gradle.kts index 021e4a254..53a5ce480 100644 --- a/edc-dataplane/edc-dataplane-base/build.gradle.kts +++ b/edc-dataplane/edc-dataplane-base/build.gradle.kts @@ -38,7 +38,8 @@ dependencies { runtimeOnly(libs.edc.dpf.core) runtimeOnly(libs.edc.controlplane.apiclient) - runtimeOnly(libs.edc.dpf.api) + runtimeOnly(libs.edc.dpf.api.control) + runtimeOnly(libs.edc.dpf.api.public) runtimeOnly(libs.edc.core.connector) runtimeOnly(libs.edc.boot) diff --git a/edc-extensions/data-encryption/src/test/java/org/eclipse/tractusx/edc/data/encryption/TxEncryptorExtensionTest.java b/edc-extensions/data-encryption/src/test/java/org/eclipse/tractusx/edc/data/encryption/TxEncryptorExtensionTest.java index 1b3cbdc2c..080308cd4 100644 --- a/edc-extensions/data-encryption/src/test/java/org/eclipse/tractusx/edc/data/encryption/TxEncryptorExtensionTest.java +++ b/edc-extensions/data-encryption/src/test/java/org/eclipse/tractusx/edc/data/encryption/TxEncryptorExtensionTest.java @@ -35,7 +35,6 @@ import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.startsWith; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -49,7 +48,7 @@ class TxEncryptorExtensionTest { @BeforeEach void setup(ObjectFactory factory, ServiceExtensionContext c) { c.registerService(Monitor.class, monitor); - context = spy(c); + context = c; when(context.getSetting(ENCRYPTION_KEY_ALIAS, null)).thenReturn("test-key"); extension = factory.constructInstance(TxEncryptorExtension.class); } @@ -76,7 +75,7 @@ void createEncryptor_withPropertyEqualsAes() { } @ParameterizedTest - @ValueSource(strings = {CACHING_ENABLED, CACHING_SECONDS}) + @ValueSource(strings = { CACHING_ENABLED, CACHING_SECONDS }) void verifyDeprecationWarnings(String deprecatedSetting) { when(context.getSetting(eq(deprecatedSetting), any())).thenReturn("doesn't matter"); extension.createEncryptor(context); diff --git a/edc-extensions/edr/edr-cache-sql/src/test/java/org/eclipse/tractusx/edc/edr/store/sql/SqlEndpointDataReferenceCacheExtensionTest.java b/edc-extensions/edr/edr-cache-sql/src/test/java/org/eclipse/tractusx/edc/edr/store/sql/SqlEndpointDataReferenceCacheExtensionTest.java index 0bc1446a9..dfc13befa 100644 --- a/edc-extensions/edr/edr-cache-sql/src/test/java/org/eclipse/tractusx/edc/edr/store/sql/SqlEndpointDataReferenceCacheExtensionTest.java +++ b/edc-extensions/edr/edr-cache-sql/src/test/java/org/eclipse/tractusx/edc/edr/store/sql/SqlEndpointDataReferenceCacheExtensionTest.java @@ -29,7 +29,6 @@ import static org.eclipse.tractusx.edc.edr.store.sql.SqlEndpointDataReferenceCacheExtension.DEFAULT_DATASOURCE_NAME; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -42,7 +41,7 @@ public class SqlEndpointDataReferenceCacheExtensionTest { @BeforeEach void setUp(ObjectFactory factory, ServiceExtensionContext context) { - this.context = spy(context); + this.context = context; context.registerService(TypeManager.class, new TypeManager()); context.registerService(DataSourceRegistry.class, mock(DataSourceRegistry.class)); extension = factory.constructInstance(SqlEndpointDataReferenceCacheExtension.class); diff --git a/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallback.java b/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallback.java index 031e75c3c..f09a7c682 100644 --- a/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallback.java +++ b/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallback.java @@ -54,7 +54,6 @@ private Result initiateTransfer(ContractNegotiationFinalized negotiationFi .id(UUID.randomUUID().toString()) .assetId(negotiationFinalized.getContractAgreement().getAssetId()) .contractId(negotiationFinalized.getContractAgreement().getId()) - .connectorId(negotiationFinalized.getCounterPartyId()) .counterPartyAddress(negotiationFinalized.getCounterPartyAddress()) .protocol(negotiationFinalized.getProtocol()) .dataDestination(DATA_DESTINATION) diff --git a/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallback.java b/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallback.java index ad72a815d..7337f59d2 100644 --- a/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallback.java +++ b/edc-extensions/edr/edr-callback/src/main/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallback.java @@ -95,7 +95,9 @@ private Result storeEdr(EndpointDataReference edr) { if (contractNegotiation != null) { contractNegotiationId = contractNegotiation.getId(); } else { - monitor.warning(format("Contract negotiation for agreement with id: %s is missing.", transferProcess.getContractId())); + var msg = format("Contract negotiation for agreement with id: %s is missing.", transferProcess.getContractId()); + monitor.warning(msg); + return Result.failure(msg); } var expirationTime = extractExpirationTime(edr); @@ -106,7 +108,7 @@ private Result storeEdr(EndpointDataReference edr) { .transferProcessId(transferProcess.getId()) .assetId(transferProcess.getDataRequest().getAssetId()) .agreementId(transferProcess.getDataRequest().getContractId()) - .providerId(transferProcess.getDataRequest().getConnectorId()) + .providerId(contractNegotiation.getCounterPartyId()) .state(EndpointDataReferenceEntryStates.NEGOTIATED.code()) .expirationTimestamp(expirationTime.getContent()) .contractNegotiationId(contractNegotiationId) diff --git a/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallbackTest.java b/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallbackTest.java index bc3d81448..9d43d352d 100644 --- a/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallbackTest.java +++ b/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/ContractNegotiationCallbackTest.java @@ -63,6 +63,16 @@ public class ContractNegotiationCallbackTest { ContractNegotiationCallback callback; + private static > B baseBuilder(B builder) { + var callbacks = List.of(CallbackAddress.Builder.newInstance().uri("http://local").events(Set.of("test")).build()); + return builder + .contractNegotiationId("id") + .protocol("test") + .callbackAddresses(callbacks) + .counterPartyAddress("addr") + .counterPartyId("provider"); + } + @BeforeEach void setup() { callback = new ContractNegotiationCallback(transferProcessService, monitor); @@ -92,7 +102,6 @@ void invoke_shouldStartTransferProcess() { assertThat(tp.getContractId()).isEqualTo(event.getContractAgreement().getId()); assertThat(tp.getAssetId()).isEqualTo(event.getContractAgreement().getAssetId()); assertThat(tp.getCounterPartyAddress()).isEqualTo(event.getCounterPartyAddress()); - assertThat(tp.getConnectorId()).isEqualTo(event.getCounterPartyId()); assertThat(tp.getProtocol()).isEqualTo(event.getProtocol()); assertThat(tp.getDataDestination()).usingRecursiveComparison().isEqualTo(DATA_DESTINATION); }); @@ -140,16 +149,6 @@ void invoke_whenFinalized() { verify(transferProcessService).initiateTransfer(any(TransferRequest.class)); } - private static > B baseBuilder(B builder) { - var callbacks = List.of(CallbackAddress.Builder.newInstance().uri("http://local").events(Set.of("test")).build()); - return builder - .contractNegotiationId("id") - .protocol("test") - .callbackAddresses(callbacks) - .counterPartyAddress("addr") - .counterPartyId("provider"); - } - private static class EventInstances implements ArgumentsProvider { @Override diff --git a/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallbackTest.java b/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallbackTest.java index 84dc5eb0a..60c8ecad6 100644 --- a/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallbackTest.java +++ b/edc-extensions/edr/edr-callback/src/test/java/org/eclipse/tractusx/edc/callback/TransferProcessLocalCallbackTest.java @@ -14,6 +14,7 @@ package org.eclipse.tractusx.edc.callback; +import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiation; import org.eclipse.edc.connector.spi.contractagreement.ContractAgreementService; import org.eclipse.edc.connector.transfer.spi.event.TransferProcessCompleted; import org.eclipse.edc.connector.transfer.spi.event.TransferProcessDeprovisioned; @@ -108,11 +109,20 @@ void invoke_shouldStoreTheEdrInCache_whenDataAddressIsPresent() { var edrEntry = EndpointDataReferenceEntry.Builder.newInstance() .agreementId(contractId) .transferProcessId(transferProcessId) - .assetId(assetId).build(); + .assetId(assetId) + .build(); + + var negotiation = ContractNegotiation.Builder.newInstance() + .id(contractId) + .counterPartyId("providerId") + .counterPartyAddress("http://test") + .protocol("protocol") + .build(); when(transformerRegistry.transform(any(DataAddress.class), eq(EndpointDataReference.class))).thenReturn(Result.success(edr)); when(transferProcessStore.findForCorrelationId(edr.getId())).thenReturn(transferProcess); when(transferProcessStore.findById(transferProcessId)).thenReturn(transferProcess); + when(agreementService.findNegotiation(contractId)).thenReturn(negotiation); when(edrCache.queryForEntries(any())).thenReturn(Stream.of(edrEntry)); diff --git a/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/AbstractPostgresqlMigrationExtension.java b/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/AbstractPostgresqlMigrationExtension.java index ff88d9a9f..fa86a86c5 100644 --- a/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/AbstractPostgresqlMigrationExtension.java +++ b/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/AbstractPostgresqlMigrationExtension.java @@ -24,6 +24,7 @@ import org.eclipse.edc.spi.persistence.EdcPersistenceException; import org.eclipse.edc.spi.system.ServiceExtension; import org.eclipse.edc.spi.system.ServiceExtensionContext; +import org.eclipse.edc.sql.DriverManagerConnectionFactory; import org.eclipse.edc.sql.datasource.ConnectionFactoryDataSource; import org.flywaydb.core.Flyway; import org.flywaydb.core.api.MigrationVersion; @@ -32,7 +33,7 @@ import java.util.Properties; abstract class AbstractPostgresqlMigrationExtension implements ServiceExtension { - + private static final String EDC_DATASOURCE_PREFIX = "edc.datasource"; private static final String MIGRATION_LOCATION_BASE = String.format("classpath:%s", AbstractPostgresqlMigrationExtension.class.getPackageName().replace(".", "/")); @@ -50,12 +51,10 @@ public String name() { return "Postgresql schema migration for subsystem " + getSubsystemName(); } - protected abstract String getSubsystemName(); - @Override public void initialize(final ServiceExtensionContext context) { var config = context.getConfig(); - + var subSystemName = Objects.requireNonNull(getSubsystemName()); var enabled = config.getBoolean(MIGRATION_ENABLED_TEMPLATE.formatted(subSystemName), Boolean.valueOf(DEFAULT_MIGRATION_ENABLED_TEMPLATE)); @@ -77,8 +76,8 @@ public void initialize(final ServiceExtensionContext context) { var jdbcProperties = new Properties(); jdbcProperties.putAll(datasourceConfig.getRelativeEntries()); - var driverManagerConnectionFactory = new DriverManagerConnectionFactory(jdbcUrl, jdbcProperties); - var dataSource = new ConnectionFactoryDataSource(driverManagerConnectionFactory); + var driverManagerConnectionFactory = new DriverManagerConnectionFactory(); + var dataSource = new ConnectionFactoryDataSource(driverManagerConnectionFactory, jdbcUrl, jdbcProperties); var flyway = Flyway.configure() @@ -102,4 +101,6 @@ public void initialize(final ServiceExtensionContext context) { } } + protected abstract String getSubsystemName(); + } diff --git a/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/DriverManagerConnectionFactory.java b/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/DriverManagerConnectionFactory.java deleted file mode 100644 index f4667de28..000000000 --- a/edc-extensions/postgresql-migration/src/main/java/org/eclipse/tractusx/edc/postgresql/migration/DriverManagerConnectionFactory.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2022 Mercedes-Benz Tech Innovation GmbH - * Copyright (c) 2021,2022 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 - */ - -package org.eclipse.tractusx.edc.postgresql.migration; - -import org.eclipse.edc.spi.persistence.EdcPersistenceException; -import org.eclipse.edc.sql.ConnectionFactory; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.util.Objects; -import java.util.Properties; - -/** - * From the EDC version after 0.4.1 this connection factory will be provided as injectable service, so this duplicate - * can be removed on the next version update. - * - * @deprecated will be removed on the next version - */ -@Deprecated(since = "0.6.0") -class DriverManagerConnectionFactory implements ConnectionFactory { - private final String jdbcUrl; - private final Properties properties; - - DriverManagerConnectionFactory(final String jdbcUrl, final Properties properties) { - this.jdbcUrl = Objects.requireNonNull(jdbcUrl); - this.properties = Objects.requireNonNull(properties); - } - - @Override - public Connection create() { - try { - return DriverManager.getConnection(jdbcUrl, properties); - } catch (Exception exception) { - throw new EdcPersistenceException(exception.getMessage(), exception); - } - } -} diff --git a/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy/V0_0_4__Add_Private_Properties.sql b/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy/V0_0_4__Add_Private_Properties.sql new file mode 100644 index 000000000..283ec3f02 --- /dev/null +++ b/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/policy/V0_0_4__Add_Private_Properties.sql @@ -0,0 +1,15 @@ +-- +-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +-- +-- 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 +-- +-- SPDX-License-Identifier: Apache-2.0 +-- +-- Contributors: +-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation +-- + +-- add columns +ALTER TABLE edc_policydefinitions ADD COLUMN private_properties JSON; \ No newline at end of file diff --git a/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/transferprocess/V0_0_12__Alter_TransferProcess_AddTransferType.sql b/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/transferprocess/V0_0_12__Alter_TransferProcess_AddTransferType.sql new file mode 100644 index 000000000..121fc7235 --- /dev/null +++ b/edc-extensions/postgresql-migration/src/main/resources/org/eclipse/tractusx/edc/postgresql/migration/transferprocess/V0_0_12__Alter_TransferProcess_AddTransferType.sql @@ -0,0 +1,15 @@ +-- +-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +-- +-- 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 +-- +-- SPDX-License-Identifier: Apache-2.0 +-- +-- Contributors: +-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation +-- + +-- add column +ALTER TABLE edc_transfer_process ADD COLUMN transfer_type VARCHAR; diff --git a/edc-extensions/ssi/ssi-identity-core/src/main/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityService.java b/edc-extensions/ssi/ssi-identity-core/src/main/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityService.java index 199600929..ac634d7ae 100644 --- a/edc-extensions/ssi/ssi-identity-core/src/main/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityService.java +++ b/edc-extensions/ssi/ssi-identity-core/src/main/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityService.java @@ -19,6 +19,7 @@ import org.eclipse.edc.spi.iam.IdentityService; import org.eclipse.edc.spi.iam.TokenParameters; import org.eclipse.edc.spi.iam.TokenRepresentation; +import org.eclipse.edc.spi.iam.VerificationContext; import org.eclipse.edc.spi.result.Result; import org.eclipse.tractusx.edc.iam.ssi.spi.SsiCredentialClient; @@ -39,7 +40,7 @@ public Result obtainClientCredentials(TokenParameters param } @Override - public Result verifyJwtToken(TokenRepresentation tokenRepresentation, String audience) { + public Result verifyJwtToken(TokenRepresentation tokenRepresentation, VerificationContext verificationContext) { return tokenValidationService.validate(tokenRepresentation); } } diff --git a/edc-extensions/ssi/ssi-identity-core/src/test/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityServiceExtensionTest.java b/edc-extensions/ssi/ssi-identity-core/src/test/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityServiceExtensionTest.java index 42a88786c..3255f83b3 100644 --- a/edc-extensions/ssi/ssi-identity-core/src/test/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityServiceExtensionTest.java +++ b/edc-extensions/ssi/ssi-identity-core/src/test/java/org/eclipse/tractusx/edc/iam/ssi/identity/SsiIdentityServiceExtensionTest.java @@ -28,7 +28,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.eclipse.tractusx.edc.iam.ssi.identity.SsiIdentityServiceExtension.ENDPOINT_AUDIENCE; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -41,7 +40,7 @@ public class SsiIdentityServiceExtensionTest { @BeforeEach void setup(ObjectFactory factory, ServiceExtensionContext context) { - this.context = spy(context); + this.context = context; context.registerService(SsiCredentialClient.class, mock(SsiCredentialClient.class)); extension = factory.constructInstance(SsiIdentityServiceExtension.class); } diff --git a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwConfigurationExtensionTest.java b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwConfigurationExtensionTest.java index 140de3a53..838146279 100644 --- a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwConfigurationExtensionTest.java +++ b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwConfigurationExtensionTest.java @@ -31,7 +31,6 @@ import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -44,7 +43,7 @@ public class SsiMiwConfigurationExtensionTest { @BeforeEach void setup(ObjectFactory factory, ServiceExtensionContext context) { - this.context = spy(context); + this.context = context; extension = factory.constructInstance(SsiMiwConfigurationExtension.class); } diff --git a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwOauth2ClientExtensionTest.java b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwOauth2ClientExtensionTest.java index 474e84b02..acecfbdf6 100644 --- a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwOauth2ClientExtensionTest.java +++ b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/SsiMiwOauth2ClientExtensionTest.java @@ -33,7 +33,6 @@ import static org.eclipse.tractusx.edc.iam.ssi.miw.SsiMiwOauth2ClientExtension.CLIENT_SECRET_ALIAS; import static org.eclipse.tractusx.edc.iam.ssi.miw.SsiMiwOauth2ClientExtension.TOKEN_URL; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -48,7 +47,7 @@ public class SsiMiwOauth2ClientExtensionTest { @BeforeEach void setup(ObjectFactory factory, ServiceExtensionContext context) { - this.context = spy(context); + this.context = context; context.registerService(MiwApiClient.class, mock(MiwApiClient.class)); context.registerService(TypeManager.class, new TypeManager()); context.registerService(Vault.class, vault); @@ -85,7 +84,7 @@ void initialize_withTrailingUrl() { .extracting(MiwOauth2ClientImpl::getConfiguration) .extracting(MiwOauth2ClientConfiguration::getTokenUrl) .isEqualTo("http://localhost:8080"); - + verify(config).getString(TOKEN_URL); verify(config).getString(CLIENT_ID); verify(config).getString(CLIENT_SECRET_ALIAS); diff --git a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialIssuerValidationRuleTest.java b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialIssuerValidationRuleTest.java index 34afa8c57..3784c9b81 100644 --- a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialIssuerValidationRuleTest.java +++ b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialIssuerValidationRuleTest.java @@ -39,7 +39,7 @@ public class SsiCredentialIssuerValidationRuleTest { @Test void checkRule() throws JsonProcessingException { - validationRule = new SsiCredentialIssuerValidationRule("did:web:issuer-a016-203-129-213-99.ngrok-free.app:BPNL000000000000", mock(Monitor.class)); + validationRule = new SsiCredentialIssuerValidationRule("did:web:issuer-example.com", mock(Monitor.class)); var vp = expand(createObjectMapper().readValue(SUMMARY_VP, JsonObject.class), CONTEXT_CACHE); var claimToken = ClaimToken.Builder.newInstance().claim(VP_PROPERTY, vp).build(); var result = validationRule.checkRule(claimToken, Map.of()); diff --git a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialSubjectIdValidationRuleTest.java b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialSubjectIdValidationRuleTest.java index 7fefd00fb..411b15367 100644 --- a/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialSubjectIdValidationRuleTest.java +++ b/edc-extensions/ssi/ssi-miw-credential-client/src/test/java/org/eclipse/tractusx/edc/iam/ssi/miw/rule/SsiCredentialSubjectIdValidationRuleTest.java @@ -43,7 +43,7 @@ void checkRule() throws JsonProcessingException { var vp = expand(createObjectMapper().readValue(SUMMARY_VP, JsonObject.class), CONTEXT_CACHE); var claimToken = ClaimToken.Builder.newInstance() .claim(VP_PROPERTY, vp) - .claim(ISSUER, "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000").build(); + .claim(ISSUER, "did:web:example.com").build(); var result = validationRule.checkRule(claimToken, Map.of()); diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/helpers/PolicyHelperFunctions.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/helpers/PolicyHelperFunctions.java index 4c933fb1b..c592de742 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/helpers/PolicyHelperFunctions.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/helpers/PolicyHelperFunctions.java @@ -43,6 +43,7 @@ public class PolicyHelperFunctions { public static final String TX_NAMESPACE = "https://w3id.org/tractusx/v0.0.1/ns/"; + private static final String ODRL_JSONLD = "http://www.w3.org/ns/odrl.jsonld"; private static final String BUSINESS_PARTNER_EVALUATION_KEY = "BusinessPartnerNumber"; public static final String BUSINESS_PARTNER_LEGACY_EVALUATION_KEY = TX_NAMESPACE + BUSINESS_PARTNER_EVALUATION_KEY; @@ -51,23 +52,9 @@ public class PolicyHelperFunctions { private static final ObjectMapper MAPPER = JacksonJsonLd.createObjectMapper(); - /** - * Creates a {@link PolicyDefinition} using the given ID, that contains equality constraints for each of the given BusinessPartnerNumbers: - * each BPN is converted into an {@link AtomicConstraint} {@code BusinessPartnerNumber EQ [BPN]}. - * - * @deprecated This method creates a policy that is compliant with the old/legacy BPN validation. Please use {@link PolicyHelperFunctions#businessPartnerGroupPolicy(String, Operator, String...)} instead. - */ - @Deprecated - public static JsonObject businessPartnerNumberPolicy(String id, String... bpns) { - return policyDefinitionBuilder(bnpPolicy(bpns)) - .add(ID, id) - .build(); - } - public static JsonObject businessPartnerGroupPolicy(String id, Operator operator, String... allowedGroups) { - return policyDefinitionBuilder(bpnGroupPolicy(operator.getOdrlRepresentation(), allowedGroups)) - .add(ID, id) - .build(); + public static JsonObject bpnGroupPolicy(Operator operator, String... allowedGroups) { + return bpnGroupPolicy(operator.getOdrlRepresentation(), allowedGroups); } private static JsonObject bpnGroupPolicy(String operator, String... allowedGroups) { @@ -75,7 +62,7 @@ private static JsonObject bpnGroupPolicy(String operator, String... allowedGroup var groupConstraint = atomicConstraint(BUSINESS_PARTNER_CONSTRAINT_KEY, operator, Arrays.asList(allowedGroups)); var permission = Json.createObjectBuilder() - .add("action", "USE") + .add("action", "use") .add("constraint", Json.createObjectBuilder() .add(TYPE, ODRL_LOGICAL_CONSTRAINT_TYPE) .add("or", groupConstraint) @@ -83,7 +70,7 @@ private static JsonObject bpnGroupPolicy(String operator, String... allowedGroup .build(); return Json.createObjectBuilder() - .add(CONTEXT, "http://www.w3.org/ns/odrl.jsonld") + .add(CONTEXT, ODRL_JSONLD) .add("permission", permission) .build(); } @@ -132,21 +119,9 @@ public static JsonObjectBuilder policyDefinitionBuilder(JsonObject policy) { .add(EDC_NAMESPACE + "policy", policy); } - public static JsonObject noConstraintPolicyDefinition(String id) { - return policyDefinitionBuilder(noConstraintPolicy()) - .add(ID, id) - .build(); - } - - private static JsonObject noConstraintPolicy() { - return Json.createObjectBuilder() - .add(TYPE, "use") - .build(); - } - - private static JsonObject bnpPolicy(String... bnps) { + public static JsonObject bnpPolicy(String... bnps) { return Json.createObjectBuilder() - .add(CONTEXT, "http://www.w3.org/ns/odrl.jsonld") + .add(CONTEXT, ODRL_JSONLD) .add("permission", Json.createArrayBuilder() .add(permission(bnps))) .build(); @@ -155,11 +130,11 @@ private static JsonObject bnpPolicy(String... bnps) { private static JsonObject permission(String... bpns) { var bpnConstraints = Stream.of(bpns) - .map(bpn -> atomicConstraint(BUSINESS_PARTNER_EVALUATION_KEY, "eq", bpn)) + .map(bpn -> atomicConstraint(TX_NAMESPACE + BUSINESS_PARTNER_EVALUATION_KEY, "eq", bpn)) .collect(Json::createArrayBuilder, JsonArrayBuilder::add, JsonArrayBuilder::add); return Json.createObjectBuilder() - .add("action", "USE") + .add("action", "use") .add("constraint", Json.createObjectBuilder() .add(TYPE, ODRL_LOGICAL_CONSTRAINT_TYPE) .add("or", bpnConstraints) @@ -167,9 +142,9 @@ private static JsonObject permission(String... bpns) { .build(); } - private static JsonObject frameworkPolicy(Map permissions) { + public static JsonObject frameworkPolicy(Map permissions) { return Json.createObjectBuilder() - .add(CONTEXT, "http://www.w3.org/ns/odrl.jsonld") + .add(CONTEXT, ODRL_JSONLD) .add("permission", Json.createArrayBuilder() .add(frameworkPermission(permissions))) .build(); @@ -182,7 +157,7 @@ private static JsonObject frameworkPermission(Map permissions) { .collect(Json::createArrayBuilder, JsonArrayBuilder::add, JsonArrayBuilder::add); return Json.createObjectBuilder() - .add("action", "USE") + .add("action", "use") .add("constraint", Json.createObjectBuilder() .add(TYPE, ODRL_LOGICAL_CONSTRAINT_TYPE) .add("or", constraints) diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/Participant.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/Participant.java deleted file mode 100644 index 69e18675d..000000000 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/Participant.java +++ /dev/null @@ -1,482 +0,0 @@ -/* - * Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - * - * 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 - * - * SPDX-License-Identifier: Apache-2.0 - * - * Contributors: - * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation - * - */ - -package org.eclipse.tractusx.edc.lifecycle; - -import com.fasterxml.jackson.databind.ObjectMapper; -import io.restassured.response.Response; -import io.restassured.response.ValidatableResponse; -import io.restassured.specification.RequestSpecification; -import jakarta.json.Json; -import jakarta.json.JsonArray; -import jakarta.json.JsonObject; -import jakarta.json.JsonValue; -import org.eclipse.edc.jsonld.TitaniumJsonLd; -import org.eclipse.edc.jsonld.spi.JsonLd; -import org.eclipse.edc.jsonld.util.JacksonJsonLd; -import org.eclipse.edc.spi.EdcException; -import org.eclipse.edc.spi.monitor.Monitor; -import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; -import org.eclipse.tractusx.edc.helpers.AssetHelperFunctions; -import org.eclipse.tractusx.edc.helpers.ContractDefinitionHelperFunctions; - -import java.net.URI; -import java.util.Arrays; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicReference; - -import static io.restassured.RestAssured.given; -import static io.restassured.http.ContentType.JSON; -import static java.lang.String.format; -import static org.assertj.core.api.Assertions.assertThat; -import static org.awaitility.Awaitility.await; -import static org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiationStates.FINALIZED; -import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.ID; -import static org.eclipse.edc.jsonld.spi.PropertyAndTypeNames.DCAT_DATASET_ATTRIBUTE; -import static org.eclipse.tractusx.edc.helpers.AssetHelperFunctions.createDataAddressBuilder; -import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.createCatalogRequest; -import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetAssetId; -import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetContractId; -import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetFirstPolicy; -import static org.eclipse.tractusx.edc.helpers.ContractNegotiationHelperFunctions.createNegotiationRequest; -import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createEdrNegotiationRequest; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.TX_NAMESPACE; -import static org.eclipse.tractusx.edc.helpers.TransferProcessHelperFunctions.createTransferRequest; -import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; -import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; -import static org.mockito.Mockito.mock; - -public class Participant { - - private static final String PROXY_SUBPATH = "proxy/aas/request"; - - private final String managementUrl; - private final String apiKey; - private final String dspEndpoint; - - private final String gatewayEndpoint; - - private final String runtimeName; - private final String bpn; - private final String backend; - private final JsonLd jsonLd; - - private final ObjectMapper objectMapper = JacksonJsonLd.createObjectMapper(); - private final String proxyUrl; - - public Participant(String runtimeName, String bpn, Map properties) { - this.managementUrl = URI.create(format("http://localhost:%s%s", properties.get("web.http.management.port"), properties.get("web.http.management.path"))).toString(); - this.dspEndpoint = URI.create(format("http://localhost:%s%s", properties.get("web.http.protocol.port"), properties.get("web.http.protocol.path"))).toString(); - this.apiKey = properties.get("edc.api.auth.key"); - this.gatewayEndpoint = URI.create(format("http://localhost:%s/api/gateway", properties.get("web.http.port"))).toString(); - this.proxyUrl = URI.create(format("http://localhost:%s", properties.get("tx.dpf.consumer.proxy.port"))).toString(); - this.bpn = bpn; - this.runtimeName = runtimeName; - this.backend = properties.get("edc.receiver.http.dynamic.endpoint"); - jsonLd = new TitaniumJsonLd(mock(Monitor.class)); - } - - /** - * Creates an asset with the given ID and props using the participant's Data Management API - */ - public void createAsset(String id, JsonObject properties) { - createAsset(id, properties, createDataAddressBuilder("test-type").build()); - } - - /** - * Creates an asset with the given ID and props using the participant's Data Management API - */ - public void createAsset(String id) { - createAsset(id, Json.createObjectBuilder().build(), createDataAddressBuilder("test-type").build()); - } - - /** - * Creates an asset with the given ID and props using the participant's Data Management API - */ - public void createAsset(String id, JsonObject assetProperties, JsonObject dataAddress) { - var asset = AssetHelperFunctions.createAsset(id, assetProperties, dataAddress); - - baseRequest() - .body(asset) - .when() - .post("/v3/assets") - .then() - .log().ifError() - .statusCode(200) - .contentType(JSON); - } - - /** - * Creates a {@link org.eclipse.edc.connector.contract.spi.types.offer.ContractDefinition} using the participant's Data Management API - */ - public void createContractDefinition(String assetId, String definitionId, String accessPolicyId, String contractPolicyId) { - var requestBody = ContractDefinitionHelperFunctions.createContractDefinition(assetId, definitionId, accessPolicyId, contractPolicyId); - - baseRequest() - .contentType(JSON) - .body(requestBody) - .when() - .post("/v2/contractdefinitions") - .then() - .statusCode(200) - .contentType(JSON); - } - - public String createPolicy(JsonObject policyDefinition) { - return baseRequest() - .contentType(JSON) - .body(policyDefinition) - .when() - .post("/v2/policydefinitions") - .then() - .log().ifError() - .statusCode(200) - .contentType(JSON) - .extract() - .path("@id"); - } - - public void storeBusinessPartner(String bpn, String... groups) { - var body = Json.createObjectBuilder() - .add(ID, bpn) - .add(TX_NAMESPACE + "groups", Json.createArrayBuilder(Arrays.asList(groups))) - .build(); - baseRequest() - .contentType(JSON) - .body(body) - .when() - .post("/business-partner-groups") - .then() - .statusCode(204); - } - - public String negotiateContract(Participant other, String assetId) { - var dataset = getDatasetForAsset(other, assetId); - assertThat(dataset).withFailMessage("Catalog received from " + other.runtimeName + " was empty!").isNotEmpty(); - - var policy = getDatasetFirstPolicy(dataset); - var requestBody = createNegotiationRequest(other.dspEndpoint, other.getBpn(), policy); - var response = baseRequest() - .when() - .body(requestBody) - .post("/v2/contractnegotiations") - .then(); - - var body = response.extract().body().asString(); - assertThat(response.extract().statusCode()).withFailMessage(body).isBetween(200, 299); - - return response.extract().jsonPath().getString(ID); - } - - public String negotiateEdr(Participant other, String assetId, JsonArray callbacks) { - var dataset = getDatasetForAsset(other, assetId); - assertThat(dataset).withFailMessage("Catalog received from " + other.runtimeName + " was empty!").isNotEmpty(); - - var policy = getDatasetFirstPolicy(dataset); - var contractId = getDatasetContractId(dataset); - - var requestBody = createEdrNegotiationRequest(other.dspEndpoint, other.getBpn(), contractId.toString(), contractId.assetIdPart(), policy, callbacks); - - - var response = baseRequest() - .when() - .body(requestBody) - .post("/edrs") - .then(); - - var body = response.extract().body().asString(); - assertThat(response.extract().statusCode()).withFailMessage(body).isBetween(200, 299); - - return response.extract().jsonPath().getString(ID); - } - - public String getNegotiationState(String negotiationId) { - return baseRequest() - .when() - .get("/v2/contractnegotiations/{id}/state", negotiationId) - .then() - .statusCode(200) - .extract().body().jsonPath().getString("'state'"); - } - - public String getContractAgreementId(String negotiationId) { - return getContractNegotiationField(negotiationId, "contractAgreementId"); - } - - public String getContractNegotiationError(String negotiationId) { - return getContractNegotiationField(negotiationId, "errorDetail"); - } - - public JsonObject getEdr(String transferProcessId) { - return getEdrRequest(transferProcessId) - .statusCode(200) - .extract() - .body() - .as(JsonObject.class); - } - - public ValidatableResponse getEdrRequest(String transferProcessId) { - return baseRequest() - .when() - .get("/edrs/{id}", transferProcessId) - .then(); - } - - public JsonArray getEdrEntriesByAssetId(String assetId) { - return baseRequest() - .when() - .get("/edrs?assetId={assetId}", assetId) - .then() - .statusCode(200) - .extract() - .body() - .as(JsonArray.class); - } - - public JsonArray getEdrEntriesByContractNegotiationId(String contractNegotiationId) { - return baseRequest() - .when() - .get("/edrs?contractNegotiationId={contractNegotiationId}", contractNegotiationId) - .then() - .statusCode(200) - .extract() - .body() - .as(JsonArray.class); - } - - public JsonArray getEdrEntriesByAgreementId(String agreementId) { - return baseRequest() - .when() - .get("/edrs?agreementId={agreementId}", agreementId) - .then() - .statusCode(200) - .extract() - .body() - .as(JsonArray.class); - } - - /** - * Returns this participant's BusinessPartnerNumber (=BPN). This is constructed of the runtime name plus "-BPN" - */ - public String getBpn() { - return bpn; - } - - public String requestTransfer(String dataRequestId, String contractId, String assetId, Participant other, JsonObject destination) { - - var request = createTransferRequest(dataRequestId, other.dspEndpoint, contractId, assetId, false, destination); - var response = baseRequest() - .when() - .body(request) - .post("/v2/transferprocesses") - .then(); - - var body = response.extract().body().asString(); - assertThat(response.extract().statusCode()).withFailMessage(body).isBetween(200, 299); - - return response.extract().jsonPath().getString(ID); - - } - - public JsonArray getAllTransferProcess() { - return baseRequest() - .when() - .post("/v2/transferprocesses/request") - .then() - .statusCode(200) - .extract() - .body() - .as(JsonArray.class); - } - - public String getTransferProcessState(String id) { - return baseRequest() - .when() - .get("/v2/transferprocesses/{id}/state", id) - .then() - .statusCode(200) - .extract().body().jsonPath().getString("'state'"); - } - - public EndpointDataReference getDataReference(String dataRequestId) { - var dataReference = new AtomicReference(); - - var result = given() - .when() - .get(backend + "/{id}", dataRequestId) - .then() - .statusCode(200) - .extract() - .body() - .as(EndpointDataReference.class); - dataReference.set(result); - - return dataReference.get(); - } - - public String pullData(EndpointDataReference edr, Map queryParams) { - var response = given() - .baseUri(edr.getEndpoint()) - .header(edr.getAuthKey(), edr.getAuthCode()) - .queryParams(queryParams) - .when() - .get(); - assertThat(response.statusCode()).isBetween(200, 300); - return response.body().asString(); - } - - public JsonArray getCatalogDatasets(Participant provider) { - return getCatalogDatasets(provider, null); - } - - public JsonArray getCatalogDatasets(Participant provider, JsonObject querySpec) { - var datasetReference = new AtomicReference(); - - var requestBody = createCatalogRequest(querySpec, provider.dspEndpoint); - - await().pollInterval(ASYNC_POLL_INTERVAL).atMost(ASYNC_TIMEOUT).untilAsserted(() -> { - System.out.println("REQUEST CATALOG"); - var response = baseRequest() - .contentType(JSON) - .when() - .body(requestBody) - .post("/v2/catalog/request") - .then() - .log().ifError() - .statusCode(200) - .extract().body().asString(); - - var responseBody = objectMapper.readValue(response, JsonObject.class); - var catalog = jsonLd.expand(responseBody).orElseThrow(f -> new EdcException(f.getFailureDetail())); - - var datasets = catalog.getJsonArray(DCAT_DATASET_ATTRIBUTE); - assertThat(datasets).hasSizeGreaterThan(0); - - datasetReference.set(datasets); - }); - - return datasetReference.get(); - } - - /** - * Request a provider asset: - * - retrieves the contract definition associated with the asset, - * - handles the contract negotiation, - * - initiate the data transfer. - * - * @param provider data provider - * @param assetId asset id - * @param destination data destination - * @return transfer process id. - */ - public String requestAsset(Participant provider, String assetId, JsonObject destination) { - var negotiationId = negotiateContract(provider, assetId); - var contractAgreementId = waitForAgreementId(negotiationId); - var transferProcessId = requestTransfer(UUID.randomUUID().toString(), contractAgreementId, assetId, provider, destination); - assertThat(transferProcessId).isNotNull(); - return transferProcessId; - } - - - public String waitForAgreementId(String negotiationId) { - await().atMost(ASYNC_TIMEOUT).untilAsserted(() -> { - var state = getContractNegotiationField(negotiationId, "state"); - assertThat(state).isEqualTo(FINALIZED.name()); - }); - - return getContractAgreementId(negotiationId); - } - - - public String pullProxyDataByAssetId(Participant provider, String assetId) { - var body = Map.of("assetId", assetId, "endpointUrl", format("%s/aas/test", provider.gatewayEndpoint)); - return getProxyData(body); - } - - - public String pullProviderDataPlaneDataByAssetId(Participant provider, String assetId) { - var body = Map.of("assetId", assetId); - return getProxyData(body); - } - - public String pullProviderDataPlaneDataByAssetIdAndCustomProperties(Participant provider, String assetId, String path, String params) { - var body = Map.of("assetId", assetId, "pathSegments", path, "queryParams", params); - return getProxyData(body); - } - - public Response pullProxyDataResponseByAssetId(Participant provider, String assetId) { - var body = Map.of("assetId", assetId, - "endpointUrl", format("%s/aas/test", provider.gatewayEndpoint), - "providerId", provider.bpn); - return proxyRequest(body); - } - - public String pullProxyDataByTransferProcessId(Participant provider, String transferProcessId) { - var body = Map.of("transferProcessId", transferProcessId, - "endpointUrl", format("%s/aas/test", provider.gatewayEndpoint)); - return getProxyData(body); - - } - - public String pullProviderDataPlaneDataByTransferProcessId(Participant provider, String transferProcessId) { - var body = Map.of("transferProcessId", transferProcessId); - return getProxyData(body); - - } - - public JsonObject getDatasetForAsset(Participant provider, String assetId) { - var datasets = getCatalogDatasets(provider); - return datasets.stream() - .map(JsonValue::asJsonObject) - .filter(it -> assetId.equals(getDatasetAssetId(it))) - .findFirst() - .orElseThrow(() -> new EdcException(format("No dataset for asset %s in the catalog", assetId))); - } - - private String getContractNegotiationField(String negotiationId, String fieldName) { - return baseRequest() - .when() - .get("/v2/contractnegotiations/{id}", negotiationId) - .then() - .statusCode(200) - .extract().body().jsonPath() - .getString(format("'%s'", fieldName)); - } - - private String getProxyData(Map body) { - return proxyRequest(body) - .then() - .assertThat().statusCode(200) - .extract().body().asString(); - } - - private Response proxyRequest(Map body) { - return given() - .baseUri(proxyUrl) - .header("x-api-key", apiKey) - .contentType("application/json") - .body(body) - .post(PROXY_SUBPATH); - } - - private RequestSpecification baseRequest() { - return given() - .baseUri(managementUrl) - .header("x-api-key", apiKey) - .contentType(JSON); - } - - -} diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/PgParticipantRuntime.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/PgParticipantRuntime.java index d427e5c78..437ace8b9 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/PgParticipantRuntime.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/PgParticipantRuntime.java @@ -73,7 +73,7 @@ public void afterAll(ExtensionContext context) throws Exception { @Override protected void bootExtensions(ServiceExtensionContext context, List> serviceExtensions) { PostgresqlLocalInstance helper = new PostgresqlLocalInstance(postgreSqlContainer.getUsername(), postgreSqlContainer.getPassword(), baseJdbcUrl(), postgreSqlContainer.getDatabaseName()); - helper.createDatabase(dbName); + helper.createDatabase(); super.bootExtensions(context, serviceExtensions); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/TestRuntimeConfiguration.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/TestRuntimeConfiguration.java index a22e7f75f..2870b6d52 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/TestRuntimeConfiguration.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/TestRuntimeConfiguration.java @@ -14,163 +14,13 @@ package org.eclipse.tractusx.edc.lifecycle; -import java.util.HashMap; -import java.util.Map; - -import static org.eclipse.edc.junit.testfixtures.TestUtils.getFreePort; - public class TestRuntimeConfiguration { - - + public static final String BPN_SUFFIX = "-BPN"; public static final String SOKRATES_NAME = "SOKRATES"; public static final String SOKRATES_BPN = SOKRATES_NAME + BPN_SUFFIX; public static final String PLATO_NAME = "PLATO"; public static final String PLATO_BPN = PLATO_NAME + BPN_SUFFIX; - public static final Integer PLATO_PROXIED_AAS_BACKEND_PORT = getFreePort(); - - public static final String PROXIED_PATH = "/events"; - - public static final int MIW_PLATO_PORT = getFreePort(); - - public static final int MIW_SOKRATES_PORT = getFreePort(); - - public static final int OAUTH_PORT = getFreePort(); - - static final String DSP_PATH = "/api/v1/dsp"; - static final int PLATO_CONNECTOR_PORT = getFreePort(); - static final int PLATO_MANAGEMENT_PORT = getFreePort(); - static final String PLATO_CONNECTOR_PATH = "/api"; - static final String PLATO_MANAGEMENT_PATH = "/api/v1/management"; - static final int PLATO_DSP_API_PORT = getFreePort(); - public static final String PLATO_DSP_CALLBACK = "http://localhost:" + PLATO_DSP_API_PORT + DSP_PATH; - static final int SOKRATES_CONNECTOR_PORT = getFreePort(); - static final int SOKRATES_MANAGEMENT_PORT = getFreePort(); - static final int SOKRATES_GATEWAY_PORT = getFreePort(); - static final String SOKRATES_CONNECTOR_PATH = "/api"; - static final String SOKRATES_MANAGEMENT_PATH = "/api/v1/management"; - static final String SOKRATES_GATEWAY_PATH = "/api/v1/gateway"; - static final int SOKRATES_DSP_API_PORT = getFreePort(); - public static final String SOKRATES_DSP_CALLBACK = "http://localhost:" + SOKRATES_DSP_API_PORT + DSP_PATH; - static final String SOKRATES_PUBLIC_API_PORT = String.valueOf(getFreePort()); - static final String PLATO_PUBLIC_API_PORT = String.valueOf(getFreePort()); - static final String PLATO_DATAPLANE_CONTROL_PORT = String.valueOf(getFreePort()); - static final String PLATO_DATAPLANE_PROXY_PORT = String.valueOf(getFreePort()); - static final String SOKRATES_DATAPLANE_CONTROL_PORT = String.valueOf(getFreePort()); - static final String SOKRATES_DATAPLANE_PROXY_PORT = String.valueOf(getFreePort()); static final String DB_SCHEMA_NAME = "testschema"; - static final String MIW_SOKRATES_URL = "http://localhost:" + MIW_SOKRATES_PORT; - - static final String MIW_PLATO_URL = "http://localhost:" + MIW_PLATO_PORT; - - static final String OAUTH_TOKEN_URL = "http://localhost:" + OAUTH_PORT; - - public static Map sokratesSsiConfiguration() { - var ssiConfiguration = new HashMap() { - { - put("tx.ssi.miw.url", MIW_SOKRATES_URL); - put("tx.ssi.oauth.token.url", OAUTH_TOKEN_URL); - put("tx.ssi.oauth.client.id", "client_id"); - put("tx.ssi.oauth.client.secret.alias", "client_secret_alias"); - put("tx.ssi.miw.authority.id", "authorityId"); - put("tx.ssi.miw.authority.issuer", "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000"); - put("tx.vault.seed.secrets", "client_secret_alias:client_secret"); - put("tx.ssi.endpoint.audience", SOKRATES_DSP_CALLBACK); - } - }; - var baseConfiguration = sokratesConfiguration(); - ssiConfiguration.putAll(baseConfiguration); - return ssiConfiguration; - } - - public static Map sokratesConfiguration() { - return new HashMap<>() { - { - put("edc.connector.name", "sokrates"); - put("edc.participant.id", SOKRATES_BPN); - put("web.http.port", String.valueOf(SOKRATES_CONNECTOR_PORT)); - put("web.http.path", SOKRATES_CONNECTOR_PATH); - put("web.http.management.port", String.valueOf(SOKRATES_MANAGEMENT_PORT)); - put("web.http.management.path", SOKRATES_MANAGEMENT_PATH); - put("web.http.protocol.port", String.valueOf(SOKRATES_DSP_API_PORT)); - put("web.http.protocol.path", DSP_PATH); - put("edc.dsp.callback.address", SOKRATES_DSP_CALLBACK); - put("edc.api.auth.key", "testkey"); - put("web.http.public.path", "/api/public"); - put("web.http.public.port", SOKRATES_PUBLIC_API_PORT); - put("web.http.gateway.path", SOKRATES_GATEWAY_PATH); - put("web.http.gateway.port", String.valueOf(SOKRATES_GATEWAY_PORT)); - - put("edc.transfer.send.retry.limit", "1"); - put("edc.transfer.send.retry.base-delay.ms", "100"); - // embedded dataplane config - put("web.http.control.path", "/api/dataplane/control"); - put("web.http.control.port", SOKRATES_DATAPLANE_CONTROL_PORT); - put("tx.dpf.consumer.proxy.port", SOKRATES_DATAPLANE_PROXY_PORT); - put("edc.dataplane.token.validation.endpoint", "http://localhost:" + SOKRATES_DATAPLANE_CONTROL_PORT + "/api/dataplane/control/token"); - put("edc.dataplane.selector.httpplane.url", "http://localhost:" + SOKRATES_DATAPLANE_CONTROL_PORT + "/api/dataplane/control"); - put("edc.dataplane.selector.httpplane.sourcetypes", "HttpData"); - put("edc.dataplane.selector.httpplane.destinationtypes", "HttpProxy"); - put("edc.dataplane.selector.httpplane.properties", "{\"publicApiUrl\":\"http://localhost:" + SOKRATES_PUBLIC_API_PORT + "/api/public\"}"); - put("edc.receiver.http.dynamic.endpoint", "http://localhost:" + SOKRATES_CONNECTOR_PORT + "/api/consumer/datareference"); - put("tractusx.businesspartnervalidation.log.agreement.validation", "true"); - put("edc.agent.identity.key", "BusinessPartnerNumber"); - put("edc.data.encryption.keys.alias", "test-alias"); - } - }; - } - - public static Map platoConfiguration() { - return new HashMap<>() { - { - put("edc.connector.name", "plato"); - put("edc.participant.id", PLATO_BPN); - put("web.http.port", String.valueOf(PLATO_CONNECTOR_PORT)); - put("web.http.path", PLATO_CONNECTOR_PATH); - put("web.http.management.port", String.valueOf(PLATO_MANAGEMENT_PORT)); - put("web.http.management.path", PLATO_MANAGEMENT_PATH); - put("web.http.protocol.port", String.valueOf(PLATO_DSP_API_PORT)); - put("web.http.protocol.path", DSP_PATH); - put("edc.dsp.callback.address", PLATO_DSP_CALLBACK); - put("edc.api.auth.key", "testkey"); - put("web.http.public.port", PLATO_PUBLIC_API_PORT); - put("web.http.public.path", "/api/public"); - put("edc.transfer.send.retry.limit", "1"); - put("edc.transfer.send.retry.base-delay.ms", "100"); - // embedded dataplane config - put("web.http.control.path", "/api/dataplane/control"); - put("web.http.control.port", PLATO_DATAPLANE_CONTROL_PORT); - put("tx.dpf.consumer.proxy.port", PLATO_DATAPLANE_PROXY_PORT); - put("edc.dataplane.token.validation.endpoint", "http://localhost:" + PLATO_DATAPLANE_CONTROL_PORT + "/api/dataplane/control/token"); - put("edc.dataplane.selector.httpplane.url", "http://localhost:" + PLATO_DATAPLANE_CONTROL_PORT + "/api/dataplane/control"); - put("edc.dataplane.selector.httpplane.sourcetypes", "HttpData"); - put("edc.dataplane.selector.httpplane.destinationtypes", "HttpProxy"); - put("edc.dataplane.selector.httpplane.properties", "{\"publicApiUrl\":\"http://localhost:" + PLATO_PUBLIC_API_PORT + "/api/public\"}"); - put("tractusx.businesspartnervalidation.log.agreement.validation", "true"); - put("edc.agent.identity.key", "BusinessPartnerNumber"); - put("tx.dpf.proxy.gateway.aas.proxied.path", "http://localhost:" + PLATO_PROXIED_AAS_BACKEND_PORT + PROXIED_PATH); - put("tx.dpf.proxy.gateway.aas.authorization.type", "none"); - put("edc.data.encryption.keys.alias", "test-alias"); - } - }; - } - - public static Map platoSsiConfiguration() { - var ssiConfiguration = new HashMap() { - { - put("tx.ssi.miw.url", MIW_PLATO_URL); - put("tx.ssi.oauth.token.url", OAUTH_TOKEN_URL); - put("tx.ssi.oauth.client.id", "client_id"); - put("tx.ssi.oauth.client.secret.alias", "client_secret_alias"); - put("tx.ssi.miw.authority.id", "authorityId"); - put("tx.ssi.miw.authority.issuer", "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000"); - put("tx.vault.seed.secrets", "client_secret_alias:client_secret"); - put("tx.ssi.endpoint.audience", PLATO_DSP_CALLBACK); - } - }; - var baseConfiguration = platoConfiguration(); - ssiConfiguration.putAll(baseConfiguration); - return ssiConfiguration; - } } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantDataApi.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantDataApi.java new file mode 100644 index 000000000..f90984003 --- /dev/null +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantDataApi.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.tractusx.edc.lifecycle.tx; + +import io.restassured.response.Response; +import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; + +import java.util.Map; + +import static io.restassured.RestAssured.given; +import static java.lang.String.format; +import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant.API_KEY; +import static org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant.PROXY_SUBPATH; + + +/** + * E2E test helper for fetching the data + */ +public class ParticipantDataApi { + + private final TxParticipant participant; + + public ParticipantDataApi(TxParticipant participant) { + this.participant = participant; + } + + /** + * Pull the data using the Consumer DataPlane and the provider's gateway with an asset id + * + * @return the data + */ + public String pullProxyDataByAssetId(TxParticipant provider, String assetId) { + var body = Map.of("assetId", assetId, "endpointUrl", format("%s/gateway/aas/test", provider.gatewayEndpoint())); + return getProxyData(body); + } + + /** + * Pull the data using the Consumer DataPlane and the provider's gateway with an transfer process id + * + * @return the data + */ + public String pullProxyDataByTransferProcessId(TxParticipant provider, String transferProcessId) { + var body = Map.of("transferProcessId", transferProcessId, + "endpointUrl", format("%s/gateway/aas/test", provider.gatewayEndpoint())); + return getProxyData(body); + + } + + /** + * Pull the data using the Consumer DataPlane and the provider's gateway with an asset id + * + * @return the data + */ + public Response pullProxyDataResponseByAssetId(TxParticipant provider, String assetId) { + var body = Map.of("assetId", assetId, + "endpointUrl", format("%s/gateway/aas/test", provider.gatewayEndpoint()), + "providerId", provider.getBpn()); + return proxyRequest(body); + } + + /** + * Pull the data using the Consumer DataPlane with an asset id + * + * @return the data + */ + public String pullProviderDataPlaneDataByAssetId(TxParticipant provider, String assetId) { + var body = Map.of("assetId", assetId); + return getProxyData(body); + } + + /** + * Pull the data using the Consumer DataPlane with an asset id and additional parameters + * + * @return the data + */ + public String pullProviderDataPlaneDataByAssetIdAndCustomProperties(TxParticipant provider, String assetId, String path, String params) { + var body = Map.of("assetId", assetId, "pathSegments", path, "queryParams", params); + return getProxyData(body); + } + + /** + * Pull the data using the Consumer DataPlane + * + * @return the data + */ + public String pullProviderDataPlaneDataByTransferProcessId(TxParticipant provider, String transferProcessId) { + var body = Map.of("transferProcessId", transferProcessId); + return getProxyData(body); + + } + + /** + * Pull the data with an {@link EndpointDataReference} + * + * @param edr The edr + * @param queryParams additional params + * @return the data + */ + public String pullData(EndpointDataReference edr, Map queryParams) { + var response = given() + .baseUri(edr.getEndpoint()) + .header(edr.getAuthKey(), edr.getAuthCode()) + .queryParams(queryParams) + .when() + .get(); + assertThat(response.statusCode()).isBetween(200, 300); + return response.body().asString(); + } + + private String getProxyData(Map body) { + return proxyRequest(body) + .then() + .assertThat().statusCode(200) + .extract().body().asString(); + } + + private Response proxyRequest(Map body) { + return given() + .baseUri(participant.dataPlaneProxy().toString()) + .header("x-api-key", API_KEY) + .contentType("application/json") + .body(body) + .post(PROXY_SUBPATH); + } +} diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantEdrApi.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantEdrApi.java new file mode 100644 index 000000000..9ba913891 --- /dev/null +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/ParticipantEdrApi.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.tractusx.edc.lifecycle.tx; + +import io.restassured.response.ValidatableResponse; +import io.restassured.specification.RequestSpecification; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; +import org.eclipse.edc.test.system.utils.Participant; + +import java.net.URI; +import java.util.concurrent.atomic.AtomicReference; + +import static io.restassured.RestAssured.given; +import static io.restassured.http.ContentType.JSON; +import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.ID; +import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetContractId; +import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetFirstPolicy; +import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createEdrNegotiationRequest; + +/** + * E2E test helper for the EDR APIs + */ +public class ParticipantEdrApi { + + private final TxParticipant participant; + private final URI edrBackend; + + public ParticipantEdrApi(TxParticipant participant, Participant.Endpoint managementEndpoint, URI edrBackend) { + this.participant = participant; + this.edrBackend = edrBackend; + } + + /** + * Get the cached EDR for a transfer process + * + * @param transferProcessId The transfer process id + * @return The EDR + */ + public JsonObject getEdr(String transferProcessId) { + return getEdrRequest(transferProcessId) + .statusCode(200) + .extract() + .body() + .as(JsonObject.class); + } + + /** + * Get the cached EDR for a transfer process cached in a backend + * + * @param transferProcessId The transfer process id + * @return The EDR + */ + public EndpointDataReference getDataReferenceFromBackend(String transferProcessId) { + var dataReference = new AtomicReference(); + + var result = given() + .when() + .get(edrBackend + "/{id}", transferProcessId) + .then() + .statusCode(200) + .extract() + .body() + .as(EndpointDataReference.class); + dataReference.set(result); + + return dataReference.get(); + } + + /** + * Get the cached EDR for a transfer process as {@link ValidatableResponse} + * + * @param transferProcessId The transfer process id + * @return The {@link ValidatableResponse} + */ + public ValidatableResponse getEdrRequest(String transferProcessId) { + return baseEdrRequest() + .when() + .get("/edrs/{id}", transferProcessId) + .then(); + } + + /** + * Start an EDR negotiation using the EDRs API. + * + * @param other The provider + * @param assetId The asset ID + * @param callbacks The callbacks + * @return The contract negotiation id + */ + public String negotiateEdr(TxParticipant other, String assetId, JsonArray callbacks) { + var dataset = participant.getDatasetForAsset(other, assetId); + assertThat(dataset).withFailMessage("Catalog received from " + other.getName() + " was empty!").isNotEmpty(); + + var policy = getDatasetFirstPolicy(dataset); + var contractId = getDatasetContractId(dataset); + + var requestBody = createEdrNegotiationRequest(other.getProtocolEndpoint().getUrl().toString(), other.getBpn(), contractId.toString(), contractId.assetIdPart(), policy, callbacks); + + + var response = baseEdrRequest() + .when() + .body(requestBody) + .post("/edrs") + .then(); + + var body = response.extract().body().asString(); + assertThat(response.extract().statusCode()).withFailMessage(body).isBetween(200, 299); + + return response.extract().jsonPath().getString(ID); + } + + /** + * Get the cached EDRs for a contract negotiation + * + * @param contractNegotiationId The contract negotiation id + * @return The EDRs + */ + public JsonArray getEdrEntriesByContractNegotiationId(String contractNegotiationId) { + return baseEdrRequest() + .when() + .get("/edrs?contractNegotiationId={contractNegotiationId}", contractNegotiationId) + .then() + .statusCode(200) + .extract() + .body() + .as(JsonArray.class); + } + + /** + * Get the cached EDRs for a contract agreement + * + * @param agreementId The contract agreement id + * @return The EDRs + */ + public JsonArray getEdrEntriesByAgreementId(String agreementId) { + return baseEdrRequest() + .when() + .get("/edrs?agreementId={agreementId}", agreementId) + .then() + .statusCode(200) + .extract() + .body() + .as(JsonArray.class); + } + + /** + * Get the cached EDRs for an asset + * + * @param assetId The asset id + * @return The EDRs + */ + public JsonArray getEdrEntriesByAssetId(String assetId) { + return baseEdrRequest() + .when() + .get("/edrs?assetId={assetId}", assetId) + .then() + .statusCode(200) + .extract() + .body() + .as(JsonArray.class); + } + + private RequestSpecification baseEdrRequest() { + return participant.getManagementEndpoint().baseRequest().contentType(JSON); + } +} diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/TxParticipant.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/TxParticipant.java new file mode 100644 index 000000000..5ad1b3015 --- /dev/null +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/lifecycle/tx/TxParticipant.java @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * + * 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 + * + * SPDX-License-Identifier: Apache-2.0 + * + * Contributors: + * Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation + * + */ + +package org.eclipse.tractusx.edc.lifecycle.tx; + +import com.fasterxml.jackson.annotation.JsonCreator; +import io.restassured.specification.RequestSpecification; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import org.eclipse.edc.test.system.utils.Participant; + +import java.net.URI; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +import static io.restassured.http.ContentType.JSON; +import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.ID; +import static org.eclipse.edc.junit.testfixtures.TestUtils.getFreePort; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.TX_NAMESPACE; +import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; + +/** + * Implementation for TX of a {@link Participant} + */ +public class TxParticipant extends Participant { + + public static final String API_KEY = "testkey"; + public static final String PROXY_SUBPATH = "proxy/aas/request"; + private final URI controlPlaneDefault = URI.create("http://localhost:" + getFreePort()); + private final URI controlPlaneControl = URI.create("http://localhost:" + getFreePort() + "/control"); + private final URI gateway = URI.create("http://localhost:" + getFreePort() + "/api/gateway"); + private final URI backendProviderProxy = URI.create("http://localhost:" + getFreePort() + "/events"); + private final URI dataPlaneProxy = URI.create("http://localhost:" + getFreePort()); + private final URI dataPlanePublic = URI.create("http://localhost:" + getFreePort() + "/public"); + private final URI miwUri = URI.create("http://localhost:" + getFreePort()); + private final URI oauthTokenUri = URI.create("http://localhost:" + getFreePort()); + private final URI backend = URI.create("http://localhost:" + controlPlaneDefault.getPort() + "/api/consumer/datareference"); + private ParticipantEdrApi edrs; + private ParticipantDataApi data; + + /** + * Creates an asset with the given ID and props using the participant's Data Management API + */ + public void createAsset(String id) { + createAsset(id, new HashMap<>(), Map.of("type", "test-type")); + } + + /** + * Stores BPN groups + */ + public void storeBusinessPartner(String bpn, String... groups) { + var body = Json.createObjectBuilder() + .add(ID, bpn) + .add(TX_NAMESPACE + "groups", Json.createArrayBuilder(Arrays.asList(groups))) + .build(); + managementEndpoint.baseRequest() + .contentType(JSON) + .body(body) + .when() + .post("/business-partner-groups") + .then() + .statusCode(204); + } + + /** + * The BPN/ID of the participant + * + * @return The bpn + */ + + public String getBpn() { + return id; + } + + + /** + * Returns the client API for interacting with EDRs + */ + public ParticipantEdrApi edrs() { + return edrs; + } + + /** + * Returns the client API for fetching data + */ + public ParticipantDataApi data() { + return data; + } + + /** + * Creates a policy definition + */ + public String createPolicy(JsonObject policyDefinition) { + return managementRequest() + .contentType(JSON) + .body(policyDefinition) + .when() + .post("/v2/policydefinitions") + .then() + .log().ifError() + .statusCode(200) + .contentType(JSON) + .extract() + .path("@id"); + } + + /** + * Get current error if any of a contract negotiation. + * + * @param negotiationId contract negotiation id + * @return error of the contract negotiation. + */ + public String getContractNegotiationError(String negotiationId) { + return getContractNegotiationField(negotiationId, "errorDetail"); + } + + /** + * Returns the base configuration + */ + public Map getConfiguration() { + return new HashMap<>() { + { + put("edc.connector.name", name); + put("edc.participant.id", id); + put("web.http.port", String.valueOf(controlPlaneDefault.getPort())); + put("web.http.path", "/api"); + put("web.http.protocol.port", String.valueOf(protocolEndpoint.getUrl().getPort())); + put("web.http.protocol.path", protocolEndpoint.getUrl().getPath()); + put("web.http.management.port", String.valueOf(managementEndpoint.getUrl().getPort())); + 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("edc.dsp.callback.address", protocolEndpoint.getUrl().toString()); + put("edc.api.auth.key", "testkey"); + put("web.http.public.path", "/api/public"); + put("web.http.public.port", String.valueOf(dataPlanePublic.getPort())); + put("web.http.gateway.path", gateway.getPath()); + put("web.http.gateway.port", String.valueOf(gateway.getPort())); + + 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.properties", "{\"publicApiUrl\":\"http://localhost:" + dataPlanePublic.getPort() + "/api/public\"}"); + 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"); + put("edc.data.encryption.keys.alias", "test-alias"); + put("tx.dpf.proxy.gateway.aas.proxied.path", backendProviderProxy.toString()); + put("tx.dpf.proxy.gateway.aas.authorization.type", "none"); + } + }; + } + + /** + * Returns the SSI configuration + */ + public Map ssiConfiguration() { + var ssiConfiguration = new HashMap() { + { + put("tx.ssi.miw.url", miwUri.toString()); + put("tx.ssi.oauth.token.url", oauthTokenUri.toString()); + put("tx.ssi.oauth.client.id", "client_id"); + put("tx.ssi.oauth.client.secret.alias", "client_secret_alias"); + put("tx.ssi.miw.authority.id", "authorityId"); + put("tx.ssi.miw.authority.issuer", "did:web:example.com"); + put("tx.vault.seed.secrets", "client_secret_alias:client_secret"); + put("tx.ssi.endpoint.audience", protocolEndpoint.getUrl().toString()); + } + }; + var baseConfiguration = getConfiguration(); + ssiConfiguration.putAll(baseConfiguration); + return ssiConfiguration; + } + + /** + * Returns the renewal configuration + */ + public Map renewalConfiguration() { + return renewalConfiguration("10"); + } + + /** + * Returns the renewal configuration + */ + public Map renewalConfiguration(String retention) { + var renewalConfig = new HashMap() { + { + put("edc.edr.state-machine.expiring-duration", "10"); + put("edc.edr.state-machine.expired-retention", retention); + put("edc.transfer.proxy.token.validity.seconds", "15"); + } + }; + var baseConfiguration = getConfiguration(); + renewalConfig.putAll(baseConfiguration); + + return renewalConfig; + } + + /** + * Returns the MIW endpoint + */ + public URI miwEndpoint() { + return miwUri; + } + + /** + * Returns the OAuth2 token endpoint + */ + public URI authTokenEndpoint() { + return oauthTokenUri; + } + + /** + * Returns the Gateway endpoint + */ + public URI gatewayEndpoint() { + return gateway; + } + + /** + * Returns the Consumer data plane proxy endpoint + */ + public URI dataPlaneProxy() { + return dataPlaneProxy; + } + + /** + * Returns the provider gateway backend endpoint + */ + public URI backendProviderProxy() { + return backendProviderProxy; + } + + protected RequestSpecification managementRequest() { + return managementEndpoint.baseRequest(); + } + + public static final class Builder extends Participant.Builder { + + private Builder() { + super(new TxParticipant()); + } + + @JsonCreator + public static Builder newInstance() { + return new Builder(); + } + + @Override + public TxParticipant build() { + super.managementEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/api/management"), Map.of("x-api-key", API_KEY))); + super.protocolEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/protocol"))); + super.timeout(ASYNC_TIMEOUT); + super.build(); + + this.participant.edrs = new ParticipantEdrApi(participant, participant.managementEndpoint, participant.backend); + this.participant.data = new ParticipantDataApi(participant); + return participant; + } + } +} diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/AbstractCatalogTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/AbstractCatalogTest.java index 1b8fe86bb..3231ebabe 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/AbstractCatalogTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/AbstractCatalogTest.java @@ -16,7 +16,7 @@ import org.eclipse.edc.policy.model.Operator; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -24,36 +24,42 @@ import static java.util.stream.IntStream.range; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.edc.test.system.utils.PolicyFixtures.noConstraintPolicy; import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetAssetId; import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetPolicies; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.BUSINESS_PARTNER_LEGACY_EVALUATION_KEY; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerNumberPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bnpPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.frameworkPolicy; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.noConstraintPolicyDefinition; import static org.eclipse.tractusx.edc.helpers.QueryHelperFunctions.createQuery; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; public abstract class AbstractCatalogTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); + @Test @DisplayName("Plato gets catalog from Sokrates. No constraints.") void requestCatalog_fulfillsPolicy_shouldReturnOffer() { // arrange SOKRATES.createAsset("test-asset"); - var accessPolicy = noConstraintPolicyDefinition("test-ap1"); - var contractPolicy = noConstraintPolicyDefinition("test-cp1"); - SOKRATES.createPolicy(accessPolicy); - SOKRATES.createPolicy(contractPolicy); - SOKRATES.createContractDefinition("test-asset", "test-def", "test-ap1", "test-cp1"); + var ap = SOKRATES.createPolicyDefinition(noConstraintPolicy()); + var cp = SOKRATES.createPolicyDefinition(noConstraintPolicy()); + SOKRATES.createContractDefinition("test-asset", "test-def", ap, cp); // act var catalog = PLATO.getCatalogDatasets(SOKRATES); @@ -70,16 +76,12 @@ void requestCatalog_fulfillsPolicy_shouldReturnOffer() { @Test @DisplayName("Verify that Plato receives only the offers he is permitted to (using the legacy BPN validation)") void requestCatalog_filteredByBpnLegacy_shouldReject() { - var onlyPlatoId = "ap"; - var onlyDiogenesId = "db"; - - var onlyPlatoPolicy = businessPartnerNumberPolicy(onlyPlatoId, "BPN1", "BPN2", PLATO.getBpn()); - var onlyDiogenesPolicy = businessPartnerNumberPolicy(onlyDiogenesId, "ARISTOTELES-BPN"); - var noConstraintPolicyId = "no-constraint"; + var onlyPlatoPolicy = bnpPolicy("BPN1", "BPN2", PLATO.getBpn()); + var onlyDiogenesPolicy = bnpPolicy("ARISTOTELES-BPN"); - SOKRATES.createPolicy(onlyPlatoPolicy); - SOKRATES.createPolicy(onlyDiogenesPolicy); - SOKRATES.createPolicy(noConstraintPolicyDefinition(noConstraintPolicyId)); + var onlyPlatoId = SOKRATES.createPolicyDefinition(onlyPlatoPolicy); + var onlyDiogenesId = SOKRATES.createPolicyDefinition(onlyDiogenesPolicy); + var noConstraintPolicyId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); SOKRATES.createAsset("test-asset1"); SOKRATES.createAsset("test-asset2"); @@ -99,16 +101,13 @@ void requestCatalog_filteredByBpnLegacy_shouldReject() { @Test @DisplayName("Verify that Plato receives only the offers he is permitted to (using the legacy BPN validation)") void requestCatalog_filteredByBpnLegacy_WithNamespace_shouldReject() { - var onlyPlatoId = "ap"; - var onlyDiogenesId = "db"; - var onlyPlatoPolicy = businessPartnerNumberPolicy(onlyPlatoId, "BPN1", "BPN2", PLATO.getBpn()); - var onlyDiogenesPolicy = frameworkPolicy(onlyDiogenesId, Map.of(BUSINESS_PARTNER_LEGACY_EVALUATION_KEY, "ARISTOTELES-BPN")); - var noConstraintPolicyId = "no-constraint"; + var onlyPlatoPolicy = bnpPolicy("BPN1", "BPN2", PLATO.getBpn()); + var onlyDiogenesPolicy = frameworkPolicy(Map.of(BUSINESS_PARTNER_LEGACY_EVALUATION_KEY, "ARISTOTELES-BPN")); - SOKRATES.createPolicy(onlyPlatoPolicy); - SOKRATES.createPolicy(onlyDiogenesPolicy); - SOKRATES.createPolicy(noConstraintPolicyDefinition(noConstraintPolicyId)); + var onlyPlatoId = SOKRATES.createPolicyDefinition(onlyPlatoPolicy); + var onlyDiogenesId = SOKRATES.createPolicyDefinition(onlyDiogenesPolicy); + var noConstraintPolicyId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); SOKRATES.createAsset("test-asset1"); SOKRATES.createAsset("test-asset2"); @@ -127,18 +126,15 @@ void requestCatalog_filteredByBpnLegacy_WithNamespace_shouldReject() { @Test @DisplayName("Verify that Plato receives only the offers he is permitted to (using the new BPN validation)") void requestCatalog_filteredByBpn_shouldReject() { - var philosopherId = "ap"; - var mathId = "db"; - var mustBeGreekPhilosopher = businessPartnerGroupPolicy(philosopherId, Operator.IS_ANY_OF, "greek_customer", "philosopher"); - var mustBeGreekMathematician = businessPartnerGroupPolicy(mathId, Operator.IS_ALL_OF, "greek_customer", "mathematician"); - var noConstraintPolicyId = "no-constraint"; + var mustBeGreekPhilosopher = bpnGroupPolicy(Operator.IS_ANY_OF, "greek_customer", "philosopher"); + var mustBeGreekMathematician = bpnGroupPolicy(Operator.IS_ALL_OF, "greek_customer", "mathematician"); SOKRATES.storeBusinessPartner(PLATO.getBpn(), "greek_customer", "philosopher"); - SOKRATES.createPolicy(mustBeGreekPhilosopher); - SOKRATES.createPolicy(mustBeGreekMathematician); - SOKRATES.createPolicy(noConstraintPolicyDefinition(noConstraintPolicyId)); + var philosopherId = SOKRATES.createPolicyDefinition(mustBeGreekPhilosopher); + var mathId = SOKRATES.createPolicyDefinition(mustBeGreekMathematician); + var noConstraintPolicyId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); SOKRATES.createAsset("test-asset1"); SOKRATES.createAsset("test-asset2"); @@ -159,11 +155,11 @@ void requestCatalog_filteredByBpn_shouldReject() { void requestCatalog_multipleOffersForAsset() { SOKRATES.storeBusinessPartner(PLATO.getBpn(), "test-group"); SOKRATES.createAsset("asset-1"); - SOKRATES.createPolicy(noConstraintPolicyDefinition("policy-1")); - SOKRATES.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ANY_OF, "test-group")); + var noConstraintId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); + var groupConstraintId = SOKRATES.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ANY_OF, "test-group")); - SOKRATES.createContractDefinition("asset-1", "def1", "policy-1", "policy-1"); - SOKRATES.createContractDefinition("asset-1", "def2", "policy-2", "policy-1"); + SOKRATES.createContractDefinition("asset-1", "def1", noConstraintId, noConstraintId); + SOKRATES.createContractDefinition("asset-1", "def2", groupConstraintId, noConstraintId); var catalog = PLATO.getCatalogDatasets(SOKRATES); assertThat(catalog).hasSize(1) @@ -176,17 +172,16 @@ void requestCatalog_multipleOffersForAsset() { @Test @DisplayName("Catalog with 1000 offers") void requestCatalog_of1000Assets_shouldContainAll() { - var policyId = "policy-1"; - var policy = businessPartnerGroupPolicy(policyId, Operator.IS_NONE_OF, "test-group1", "test-group2"); - SOKRATES.createPolicy(policy); - SOKRATES.createPolicy(noConstraintPolicyDefinition("noconstraint")); + var policy = bpnGroupPolicy(Operator.IS_NONE_OF, "test-group1", "test-group2"); + var policyId = SOKRATES.createPolicyDefinition(policy); + var noConstraintId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); SOKRATES.storeBusinessPartner(PLATO.getBpn(), "test-group-3"); range(0, 1000) .forEach(i -> { var assetId = "asset-" + i; SOKRATES.createAsset(assetId); - SOKRATES.createContractDefinition(assetId, "def-" + i, policyId, "noconstraint"); + SOKRATES.createContractDefinition(assetId, "def-" + i, policyId, noConstraintId); }); // request all at once diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogInMemoryTest.java index 7cbb8b2e4..651fd5472 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogInMemoryTest.java @@ -18,29 +18,22 @@ import org.eclipse.tractusx.edc.lifecycle.ParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class CatalogInMemoryTest extends AbstractCatalogTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogPostgresqlTest.java index 4ded2fc29..3fd8297f5 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/CatalogPostgresqlTest.java @@ -18,28 +18,21 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class CatalogPostgresqlTest extends AbstractCatalogTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/MiwSsiCatalogTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/MiwSsiCatalogTest.java index 5cf929984..b3a6aef9a 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/MiwSsiCatalogTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/catalog/MiwSsiCatalogTest.java @@ -14,8 +14,8 @@ package org.eclipse.tractusx.edc.tests.catalog; -import org.eclipse.tractusx.edc.lifecycle.Participant; import org.eclipse.tractusx.edc.lifecycle.ParticipantRuntime; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.eclipse.tractusx.edc.tag.MiwIntegrationTest; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -25,27 +25,29 @@ import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; +import static org.eclipse.edc.test.system.utils.PolicyFixtures.noConstraintPolicy; import static org.eclipse.tractusx.edc.helpers.CatalogHelperFunctions.getDatasetAssetId; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.TX_NAMESPACE; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.frameworkPolicy; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.frameworkTemplatePolicy; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.noConstraintPolicyDefinition; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_DSP_CALLBACK; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; @MiwIntegrationTest public class MiwSsiCatalogTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); static final String MIW_SOKRATES_URL = "http://localhost:8000"; static final String OAUTH_TOKEN_URL = "http://localhost:8080/realms/miw_test/protocol/openid-connect/token"; @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory-ssi", - SOKRATES_NAME, - SOKRATES_BPN, + SOKRATES.getName(), + SOKRATES.getBpn(), sokratesSsiMiwConfiguration() ); @@ -59,10 +61,10 @@ public static Map sokratesSsiMiwConfiguration() { put("tx.ssi.miw.authority.id", "BPNL000000000000"); put("tx.ssi.miw.authority.issuer", "did:web:localhost%3A8000:BPNL000000000000"); put("tx.vault.seed.secrets", "client_secret_alias:miw_private_client"); - put("tx.ssi.endpoint.audience", SOKRATES_DSP_CALLBACK); + put("tx.ssi.endpoint.audience", SOKRATES.getProtocolEndpoint().getUrl().toString()); } }; - var baseConfiguration = sokratesConfiguration(); + var baseConfiguration = SOKRATES.getConfiguration(); ssiConfiguration.putAll(baseConfiguration); return ssiConfiguration; } @@ -74,16 +76,15 @@ void requestCatalog_fulfillsPolicy_shouldReturnOffer() { SOKRATES.createAsset("test-asset"); SOKRATES.createAsset("test-asset-1"); - var bpnAccessPolicy = frameworkPolicy("test-ap1", Map.of("BPN", "active")); - var contractPolicy = noConstraintPolicyDefinition("test-cp1"); - var dismantlerAccessPolicy = frameworkPolicy("test-ap2", Map.of("Dismantler", "active")); + var bpnAccessPolicy = frameworkPolicy(Map.of(TX_NAMESPACE + "BPN", "active")); + var dismantlerAccessPolicy = frameworkPolicy(Map.of(TX_NAMESPACE + "Dismantler", "active")); - SOKRATES.createPolicy(bpnAccessPolicy); - SOKRATES.createPolicy(contractPolicy); - SOKRATES.createPolicy(dismantlerAccessPolicy); + var bpnAccessId = SOKRATES.createPolicyDefinition(bpnAccessPolicy); + var contractPolicyId = SOKRATES.createPolicyDefinition(noConstraintPolicy()); + var dismantlerAccessPolicyId = SOKRATES.createPolicyDefinition(dismantlerAccessPolicy); - SOKRATES.createContractDefinition("test-asset", "test-def", "test-ap1", "test-cp1"); - SOKRATES.createContractDefinition("test-asset-1", "test-def-2", "test-ap2", "test-cp1"); + SOKRATES.createContractDefinition("test-asset", "test-def", bpnAccessId, contractPolicyId); + SOKRATES.createContractDefinition("test-asset-1", "test-def-2", dismantlerAccessPolicyId, contractPolicyId); // act @@ -107,16 +108,15 @@ void requestCatalog_fulfillsPolicy_shouldReturnOffer_withContexts() { SOKRATES.createAsset("test-asset-1"); var bpnAccessPolicy = frameworkTemplatePolicy("test-ap1", "BPN"); - var contractPolicy = noConstraintPolicyDefinition("test-cp1"); + var contractPolicy = noConstraintPolicy(); var dismantlerAccessPolicy = frameworkTemplatePolicy("test-ap2", "Dismantler"); SOKRATES.createPolicy(bpnAccessPolicy); - SOKRATES.createPolicy(contractPolicy); + var contractPolicyId = SOKRATES.createPolicyDefinition(contractPolicy); SOKRATES.createPolicy(dismantlerAccessPolicy); - SOKRATES.createContractDefinition("test-asset", "test-def", "test-ap1", "test-cp1"); - SOKRATES.createContractDefinition("test-asset-1", "test-def-2", "test-ap2", "test-cp1"); - + SOKRATES.createContractDefinition("test-asset", "test-def", "test-ap1", contractPolicyId); + SOKRATES.createContractDefinition("test-asset-1", "test-def-2", "test-ap2", contractPolicyId); // act var catalog = SOKRATES.getCatalogDatasets(SOKRATES); diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractDeleteEdrTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractDeleteEdrTest.java index 9ca50cddd..cb1a6637c 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractDeleteEdrTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractDeleteEdrTest.java @@ -18,7 +18,7 @@ import okhttp3.mockwebserver.MockWebServer; import org.assertj.core.api.Condition; import org.eclipse.edc.policy.model.Operator; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -26,25 +26,30 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Map; import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntryStates.EXPIRED; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractDeleteEdrTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); MockWebServer server; @BeforeEach @@ -60,29 +65,32 @@ void negotiateEdr_shouldRemoveExpiredEdrs() throws IOException { var authCodeHeaderName = "test-authkey"; var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", "http://test:8080") - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", "http://test:8080", + "type", "HttpData", + "contentType", "application/json", + "authKey", authCodeHeaderName, + "authCode", authCode + ); + PLATO.createAsset(assetId, Map.of(), dataAddress); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.NEQ, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.EQ, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.NEQ, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.EQ, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .build(); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var expired = new ArrayList(); await().atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); var localExpired = edrCaches.stream() .filter(json -> json.asJsonObject().getJsonString("tx:edrState").getString().equals(EXPIRED.name())) .map(json -> json.asJsonObject().getJsonString("transferProcessId").getString()) @@ -92,7 +100,7 @@ void negotiateEdr_shouldRemoveExpiredEdrs() throws IOException { }); await().atMost(ASYNC_TIMEOUT) - .untilAsserted(() -> expired.forEach((id) -> SOKRATES.getEdrRequest(id).statusCode(404))); + .untilAsserted(() -> expired.forEach((id) -> SOKRATES.edrs().getEdrRequest(id).statusCode(404))); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractNegotiateEdrTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractNegotiateEdrTest.java index e696d8065..d4caf4239 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractNegotiateEdrTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractNegotiateEdrTest.java @@ -27,7 +27,7 @@ import org.eclipse.edc.connector.transfer.spi.event.TransferProcessRequested; import org.eclipse.edc.connector.transfer.spi.event.TransferProcessStarted; import org.eclipse.edc.policy.model.Operator; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -35,30 +35,35 @@ import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; import static org.eclipse.edc.spi.types.domain.edr.EndpointDataReference.EDR_SIMPLE_TYPE; import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createCallback; import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createEvent; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.waitForEvent; public abstract class AbstractNegotiateEdrTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); MockWebServer server; @@ -88,18 +93,21 @@ void negotiateEdr_shouldInvokeCallbacks() throws IOException { var authCodeHeaderName = "test-authkey"; var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", url.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", url.toString(), + "type", "HttpData", + "contentType", "application/json", + "authKey", authCodeHeaderName, + "authCode", authCode + ); + + PLATO.createAsset(assetId, Map.of(), dataAddress); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.IS_NONE_OF, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ALL_OF, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_NONE_OF, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ALL_OF, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); expectedEvents.forEach(event -> server.enqueue(new MockResponse())); @@ -108,27 +116,27 @@ void negotiateEdr_shouldInvokeCallbacks() throws IOException { .add(createCallback(url.toString(), true, Set.of("contract.negotiation", "transfer.process"))) .build(); - var contractNegotiationId = SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + var contractNegotiationId = SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var events = expectedEvents.stream() - .map(receivedEvent -> waitForEvent(server, receivedEvent)) + .map(receivedEvent -> waitForEvent(server)) .collect(Collectors.toList()); await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(1); }); assertThat(expectedEvents).usingRecursiveFieldByFieldElementComparator().containsAll(events); - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(1); - assertThat(SOKRATES.getEdrEntriesByContractNegotiationId(contractNegotiationId)).hasSize(1); + assertThat(SOKRATES.edrs().getEdrEntriesByContractNegotiationId(contractNegotiationId)).hasSize(1); assertThat(edrCaches).hasSize(1); @@ -137,10 +145,10 @@ void negotiateEdr_shouldInvokeCallbacks() throws IOException { var agreementId = edrCaches.get(0).asJsonObject().getString("agreementId"); assertThat(cnId).isEqualTo(contractNegotiationId); - assertThat(SOKRATES.getEdrEntriesByAgreementId(agreementId)).hasSize(1); + assertThat(SOKRATES.edrs().getEdrEntriesByAgreementId(agreementId)).hasSize(1); - var edr = SOKRATES.getEdr(transferProcessId); + var edr = SOKRATES.edrs().getEdr(transferProcessId); assertThat(edr.getJsonString("type").getString()).isEqualTo(EDR_SIMPLE_TYPE); assertThat(edr.getJsonString("authCode").getString()).isNotNull(); diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractRenewalEdrTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractRenewalEdrTest.java index aad06babb..304f27535 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractRenewalEdrTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/AbstractRenewalEdrTest.java @@ -21,7 +21,7 @@ import org.eclipse.edc.connector.transfer.spi.event.TransferProcessStarted; import org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates; import org.eclipse.edc.policy.model.Operator; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -29,6 +29,7 @@ import java.io.IOException; import java.util.List; +import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; @@ -37,27 +38,31 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; import static org.awaitility.pollinterval.FibonacciPollInterval.fibonacci; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntryStates.EXPIRED; import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntryStates.NEGOTIATED; import static org.eclipse.tractusx.edc.edr.spi.types.EndpointDataReferenceEntryStates.REFRESHING; import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createCallback; import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createEvent; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.waitForEvent; public abstract class AbstractRenewalEdrTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); MockWebServer server; @@ -80,18 +85,22 @@ void negotiateEdr_shouldRenewTheEdr() throws IOException { var authCodeHeaderName = "test-authkey"; var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", url.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", url.toString(), + "type", "HttpData", + "contentType", "application/json", + "authKey", authCodeHeaderName, + "authCode", authCode + ); + + PLATO.createAsset(assetId, Map.of(), dataAddress); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.IS_NONE_OF, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ANY_OF, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_NONE_OF, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ANY_OF, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .add(createCallback(url.toString(), true, Set.of("transfer.process.started"))) @@ -99,10 +108,10 @@ void negotiateEdr_shouldRenewTheEdr() throws IOException { expectedEvents.forEach(event -> server.enqueue(new MockResponse())); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var events = expectedEvents.stream() - .map(receivedEvent -> waitForEvent(server, receivedEvent)) + .map(receivedEvent -> waitForEvent(server)) .collect(Collectors.toList()); assertThat(expectedEvents).usingRecursiveFieldByFieldElementComparator().containsAll(events); @@ -112,7 +121,7 @@ void negotiateEdr_shouldRenewTheEdr() throws IOException { await().atMost(ASYNC_TIMEOUT) .pollInterval(ASYNC_POLL_INTERVAL) .untilAsserted(() -> { - var localEdrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var localEdrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(localEdrCaches).hasSizeGreaterThan(1); localEdrCaches.forEach(edrCachesBuilder::add); }); @@ -143,7 +152,7 @@ void negotiateEdr_shouldRenewTheEdr() throws IOException { await().pollInterval(fibonacci()) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var tpState = PLATO.getAllTransferProcess() + var tpState = PLATO.getTransferProcesses() .stream() .filter(json -> json.asJsonObject().getJsonString("correlationId").getString().equals(transferProcessId)) .map(json -> json.asJsonObject().getJsonString("state").getString()) diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrInMemoryTest.java index b530e4da0..52b287759 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrInMemoryTest.java @@ -24,31 +24,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; -import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.renewalConfiguration; - @EndToEndTest public class DeleteEdrInMemoryTest extends AbstractDeleteEdrTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - renewalConfiguration(sokratesConfiguration(), "5") + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.renewalConfiguration("5") ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - renewalConfiguration(platoConfiguration()) + PLATO.getName(), + PLATO.getBpn(), + PLATO.renewalConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrPostgresqlTest.java index c1b3f96b9..6ea18dc3e 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/DeleteEdrPostgresqlTest.java @@ -18,30 +18,22 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; -import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.renewalConfiguration; - @PostgresqlDbIntegrationTest public class DeleteEdrPostgresqlTest extends AbstractDeleteEdrTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - renewalConfiguration(sokratesConfiguration(), "5") + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.renewalConfiguration("5") ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - renewalConfiguration(platoConfiguration()) + PLATO.getName(), + PLATO.getBpn(), + PLATO.renewalConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrInMemoryTest.java index 1248a0eec..9dc4b6723 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrInMemoryTest.java @@ -24,30 +24,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class NegotiateEdrInMemoryTest extends AbstractNegotiateEdrTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlHashicorpVaultTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlHashicorpVaultTest.java index 89390da8b..7d9198230 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlHashicorpVaultTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlHashicorpVaultTest.java @@ -19,32 +19,25 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class NegotiateEdrPostgresqlHashicorpVaultTest extends AbstractNegotiateEdrTest { @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); private static final String VAULT_DIRECTORY = "testDir/"; @RegisterExtension protected static final PgHashicorpParticipantRuntime SOKRATES_RUNTIME = new PgHashicorpParticipantRuntime( ":edc-tests:runtime:runtime-postgresql-hashicorp", - SOKRATES_NAME, - SOKRATES_BPN, + SOKRATES.getName(), + SOKRATES.getBpn(), VAULT_DIRECTORY, - sokratesConfiguration() + SOKRATES.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlTest.java index 37f1e72f7..363500b04 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/NegotiateEdrPostgresqlTest.java @@ -18,29 +18,22 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class NegotiateEdrPostgresqlTest extends AbstractNegotiateEdrTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrInMemoryTest.java index 1bcc7df8f..460d26165 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrInMemoryTest.java @@ -24,31 +24,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; -import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.renewalConfiguration; - @EndToEndTest public class RenewalEdrInMemoryTest extends AbstractRenewalEdrTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - renewalConfiguration(sokratesConfiguration()) + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.renewalConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - renewalConfiguration(platoConfiguration()) + PLATO.getName(), + PLATO.getBpn(), + PLATO.renewalConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrPostgresqlTest.java index 93cb8117e..a4f3d3c09 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/RenewalEdrPostgresqlTest.java @@ -18,30 +18,22 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; -import static org.eclipse.tractusx.edc.tests.edr.TestFunctions.renewalConfiguration; - @PostgresqlDbIntegrationTest public class RenewalEdrPostgresqlTest extends AbstractRenewalEdrTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - renewalConfiguration(sokratesConfiguration()) + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.renewalConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - renewalConfiguration(platoConfiguration()) + PLATO.getName(), + PLATO.getBpn(), + PLATO.renewalConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/TestFunctions.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/TestFunctions.java index e123c61f1..7e1938df6 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/TestFunctions.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/edr/TestFunctions.java @@ -18,8 +18,6 @@ import okhttp3.mockwebserver.MockWebServer; import org.eclipse.tractusx.edc.helpers.ReceivedEvent; -import java.util.HashMap; -import java.util.Map; import java.util.concurrent.TimeUnit; public class TestFunctions { @@ -27,25 +25,9 @@ public class TestFunctions { private static final ObjectMapper MAPPER = new ObjectMapper(); - public static Map renewalConfiguration(Map config) { - return renewalConfiguration(config, "10"); - } - - public static Map renewalConfiguration(Map config, String retention) { - var ssiConfiguration = new HashMap() { - { - put("edc.edr.state-machine.expiring-duration", "10"); - put("edc.edr.state-machine.expired-retention", retention); - put("edc.transfer.proxy.token.validity.seconds", "15"); - } - }; - ssiConfiguration.putAll(config); - return ssiConfiguration; - } - - public static ReceivedEvent waitForEvent(MockWebServer server, ReceivedEvent event) { + public static ReceivedEvent waitForEvent(MockWebServer server) { try { - var request = server.takeRequest(20, TimeUnit.SECONDS); + var request = server.takeRequest(60, TimeUnit.SECONDS); if (request != null) { return MAPPER.readValue(request.getBody().inputStream(), ReceivedEvent.class); } else { diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/AbstractContractNegotiateTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/AbstractContractNegotiateTest.java index 25fbb497e..d574d3e15 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/AbstractContractNegotiateTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/AbstractContractNegotiateTest.java @@ -14,33 +14,38 @@ package org.eclipse.tractusx.edc.tests.negotiation; -import jakarta.json.Json; import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiationStates; import org.eclipse.edc.policy.model.Operator; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import java.util.Map; +import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.TX_NAMESPACE; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.frameworkPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractContractNegotiateTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); @Test @DisplayName("Verify contract negotiation fails with wrong policy") @@ -49,31 +54,34 @@ void contractNegotiation_shouldFail_whenPolicyEvaluationFails() { var authCodeHeaderName = "test-authkey"; var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", "http://testurl") - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", "http://testurl", + "type", "HttpData", + "contentType", "application/json", + "authKey", authCodeHeaderName, + "authCode", authCode + ); + + PLATO.createAsset(assetId, Map.of(), dataAddress); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "allowed-group"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.NEQ, "forbidden-group")); - PLATO.createPolicy(frameworkPolicy("policy-2", Map.of("Dismantler", "active"))); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicyId = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.NEQ, "forbidden-group")); + var contractPolicyId = PLATO.createPolicyDefinition(frameworkPolicy(Map.of(TX_NAMESPACE + "Dismantler", "active"))); + PLATO.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); - var negotiationId = SOKRATES.negotiateContract(PLATO, assetId); + var negotiationId = SOKRATES.initContractNegotiation(PLATO, assetId); // wait for the failed contract negotiation await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var negotiationState = SOKRATES.getNegotiationState(negotiationId); + var negotiationState = SOKRATES.getContractNegotiationState(negotiationId); assertThat(negotiationState).isEqualTo(ContractNegotiationStates.TERMINATED.toString()); var error = SOKRATES.getContractNegotiationError(negotiationId); assertThat(error).isNotNull(); - assertThat(error).contains("Contract offer is not valid: Policy policy-2 not fulfilled"); + assertThat(error).contains(format("Contract offer is not valid: Policy %s not fulfilled", contractPolicyId)); }); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/SsiContractNegotiationInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/SsiContractNegotiationInMemoryTest.java index c55affeee..f4986b4ef 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/SsiContractNegotiationInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/negotiation/SsiContractNegotiationInMemoryTest.java @@ -25,17 +25,8 @@ import java.io.IOException; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.MIW_PLATO_PORT; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.MIW_SOKRATES_PORT; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.OAUTH_PORT; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_DSP_CALLBACK; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_DSP_CALLBACK; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoSsiConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesSsiConfiguration; @EndToEndTest public class SsiContractNegotiationInMemoryTest extends AbstractContractNegotiateTest { @@ -44,45 +35,53 @@ public class SsiContractNegotiationInMemoryTest extends AbstractContractNegotiat @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory-ssi", - PLATO_NAME, - PLATO_BPN, - platoSsiConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.ssiConfiguration() ); @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory-ssi", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesSsiConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.ssiConfiguration() ); private static MockWebServer miwSokratesServer; private static MockWebServer miwPlatoServer; - private static MockWebServer oauthServer; + private static MockWebServer sokratesOauthServer; + private static MockWebServer platoOauthServer; @BeforeAll static void setup() throws IOException { miwSokratesServer = new MockWebServer(); miwPlatoServer = new MockWebServer(); - oauthServer = new MockWebServer(); + sokratesOauthServer = new MockWebServer(); + platoOauthServer = new MockWebServer(); - var credentialSubjectId = "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000"; - miwSokratesServer.start(MIW_SOKRATES_PORT); - miwSokratesServer.setDispatcher(new MiwDispatcher(SOKRATES_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, PLATO_DSP_CALLBACK)); + var credentialSubjectId = "did:web:example.com"; - miwPlatoServer.start(MIW_PLATO_PORT); - miwPlatoServer.setDispatcher(new MiwDispatcher(PLATO_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, SOKRATES_DSP_CALLBACK)); + miwSokratesServer.start(SOKRATES.miwEndpoint().getPort()); + miwSokratesServer.setDispatcher(new MiwDispatcher(SOKRATES_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, PLATO.getProtocolEndpoint().getUrl().toString())); - oauthServer.start(OAUTH_PORT); - oauthServer.setDispatcher(new KeycloakDispatcher()); + miwPlatoServer.start(PLATO.miwEndpoint().getPort()); + miwPlatoServer.setDispatcher(new MiwDispatcher(PLATO_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, SOKRATES.getProtocolEndpoint().getUrl().toString())); + + sokratesOauthServer.start(SOKRATES.authTokenEndpoint().getPort()); + sokratesOauthServer.setDispatcher(new KeycloakDispatcher()); + + platoOauthServer.start(PLATO.authTokenEndpoint().getPort()); + platoOauthServer.setDispatcher(new KeycloakDispatcher()); } @AfterAll static void teardown() throws IOException { miwSokratesServer.shutdown(); miwPlatoServer.shutdown(); - oauthServer.shutdown(); + sokratesOauthServer.shutdown(); + platoOauthServer.shutdown(); + } } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/AbstractPolicyMonitorTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/AbstractPolicyMonitorTest.java index 0b9f61a23..25daa5fec 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/AbstractPolicyMonitorTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/AbstractPolicyMonitorTest.java @@ -20,11 +20,12 @@ import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.Test; import java.io.IOException; +import java.util.Map; import java.util.UUID; import static jakarta.json.Json.createObjectBuilder; @@ -35,39 +36,48 @@ import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE; import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; import static org.eclipse.edc.test.system.utils.PolicyFixtures.inForceDatePolicy; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.policyDefinitionBuilder; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractPolicyMonitorTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); private final MockWebServer server = new MockWebServer(); @Test void shouldTerminateTransfer_whenPolicyExpires() throws IOException { var assetId = UUID.randomUUID().toString(); - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", "http://localhost:" + server.getPort()) - .build()); + + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", "http://localhost:" + server.getPort(), + "type", "HttpData", + "contentType", "application/json", + "proxyQueryParams", "true" + ); + PLATO.createAsset(assetId, Map.of(), dataAddress); startHttpServerProvider(); var policy = inForceDatePolicy("gteq", "contractAgreement+0s", "lteq", "contractAgreement+10s"); - var policyId = PLATO.createPolicy(policyDefinitionBuilder(policy).build()); + var policyId = PLATO.createPolicyDefinition(policy); PLATO.createContractDefinition(assetId, UUID.randomUUID().toString(), policyId, policyId); var consumerUrl = server.url("/mock/api/consumer"); var destination = httpDataAddress(consumerUrl.toString()); - var transferProcessId = SOKRATES.requestAsset(PLATO, assetId, destination); + var transferProcessId = SOKRATES.requestAsset(PLATO, assetId, Json.createObjectBuilder().build(), destination); await().atMost(ASYNC_TIMEOUT).untilAsserted(() -> { var state = SOKRATES.getTransferProcessState(transferProcessId); assertThat(state).isEqualTo(STARTED.name()); diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorInMemoryTest.java index bc1102c09..5829c3409 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorInMemoryTest.java @@ -23,30 +23,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class PolicyMonitorInMemoryTest extends AbstractPolicyMonitorTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorPostgresqlTest.java index 227587175..cd0b4b08d 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/policy/PolicyMonitorPostgresqlTest.java @@ -18,28 +18,21 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class PolicyMonitorPostgresqlTest extends AbstractPolicyMonitorTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/AbstractDataPlaneProxyTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/AbstractDataPlaneProxyTest.java index 44cb86a2e..6453c7a81 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/AbstractDataPlaneProxyTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/AbstractDataPlaneProxyTest.java @@ -24,7 +24,7 @@ import org.eclipse.edc.connector.transfer.spi.event.TransferProcessStarted; import org.eclipse.edc.policy.model.Operator; import org.eclipse.edc.spi.event.EventEnvelope; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -32,30 +32,33 @@ import org.junit.jupiter.api.Test; import java.io.IOException; +import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; import static org.eclipse.tractusx.edc.helpers.EdrNegotiationHelperFunctions.createCallback; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerGroupPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bpnGroupPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_PROXIED_AAS_BACKEND_PORT; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PROXIED_PATH; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractDataPlaneProxyTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); private static final String CUSTOM_BASE_PATH = "/custom"; private static final String CUSTOM_SUB_PATH = "/sub"; private static final String CUSTOM_QUERY_PARAMS = "foo=bar"; @@ -63,28 +66,35 @@ public abstract class AbstractDataPlaneProxyTest { private final ObjectMapper mapper = new ObjectMapper(); private MockWebServer server; + @NotNull + private static Map dataAddress(String url) { + return Map.of( + "baseUrl", url, + "type", "HttpData", + "contentType", "application/json", + "authKey", "test-authkey", + "authCode", "test-authcode", + "proxyPath", "true", + "proxyQueryParams", "true" + ); + } @Test @DisplayName("Verify E2E flow with Data Plane proxies and EDR") void httpPullDataTransfer_withEdrAndProxy() { - var eventsUrl = server.url(PROXIED_PATH); + var eventsUrl = server.url(PLATO.backendProviderProxy().getPath()); var assetId = UUID.randomUUID().toString(); - var authCodeHeaderName = "test-authkey"; - var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", eventsUrl.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + + var dataAddress = dataAddress(eventsUrl.url().toString()); + + PLATO.createAsset(assetId, Map.of(), dataAddress); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.IS_ANY_OF, "test-group1")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ALL_OF, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ANY_OF, "test-group1")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ALL_OF, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .add(createCallback(eventsUrl.toString(), true, Set.of("transfer.process.started"))) @@ -93,25 +103,25 @@ void httpPullDataTransfer_withEdrAndProxy() { // response to callback server.enqueue(new MockResponse()); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var transferEvent = waitForTransferCompletion(); await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(1); }); - + var body = "{\"response\": \"ok\"}"; server.enqueue(new MockResponse().setBody(body)); - var data = SOKRATES.pullProxyDataByAssetId(PLATO, assetId); + var data = SOKRATES.data().pullProxyDataByAssetId(PLATO, assetId); assertThat(data).isEqualTo(body); server.enqueue(new MockResponse().setBody(body)); - data = SOKRATES.pullProxyDataByTransferProcessId(PLATO, transferEvent.getPayload().getTransferProcessId()); + data = SOKRATES.data().pullProxyDataByTransferProcessId(PLATO, transferEvent.getPayload().getTransferProcessId()); assertThat(data).isEqualTo(body); } @@ -119,26 +129,19 @@ void httpPullDataTransfer_withEdrAndProxy() { @DisplayName("Verify E2E flow with Data Plane proxies fails when EDR is not found") void httpPullDataTransfer_withoutEdr() throws IOException { - var eventsUrl = server.url(PROXIED_PATH); - + var eventsUrl = server.url(PLATO.backendProviderProxy().getPath()); var assetId = UUID.randomUUID().toString(); - var authCodeHeaderName = "test-authkey"; - var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", eventsUrl.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + + PLATO.createAsset(assetId, Map.of(), dataAddress(eventsUrl.url().toString())); + PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.NEQ, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.EQ, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.NEQ, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.EQ, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); - SOKRATES.pullProxyDataResponseByAssetId(PLATO, assetId) + SOKRATES.data().pullProxyDataResponseByAssetId(PLATO, assetId) .then() .assertThat().statusCode(400); @@ -148,23 +151,16 @@ void httpPullDataTransfer_withoutEdr() throws IOException { @DisplayName("Verify E2E flow with Data Plane proxies and Two EDR") void httpPullDataTransfer_shouldFailForAsset_withTwoEdrAndProxy() throws IOException { - var eventsUrl = server.url(PROXIED_PATH); + var eventsUrl = server.url(PLATO.backendProviderProxy().getPath()); var assetId = UUID.randomUUID().toString(); - var authCodeHeaderName = "test-authkey"; - var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", eventsUrl.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + + PLATO.createAsset(assetId, Map.of(), dataAddress(eventsUrl.url().toString())); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.IS_NONE_OF, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ALL_OF, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_NONE_OF, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ALL_OF, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .add(createCallback(eventsUrl.toString(), true, Set.of("transfer.process.started"))) @@ -174,8 +170,8 @@ void httpPullDataTransfer_shouldFailForAsset_withTwoEdrAndProxy() throws IOExcep server.enqueue(new MockResponse()); server.enqueue(new MockResponse()); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var transferEvent1 = waitForTransferCompletion(); var transferEvent2 = waitForTransferCompletion(); @@ -183,7 +179,7 @@ void httpPullDataTransfer_shouldFailForAsset_withTwoEdrAndProxy() throws IOExcep await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(2); }); @@ -191,15 +187,15 @@ void httpPullDataTransfer_shouldFailForAsset_withTwoEdrAndProxy() throws IOExcep var body = "{\"response\": \"ok\"}"; server.enqueue(new MockResponse().setBody(body)); - SOKRATES.pullProxyDataResponseByAssetId(PLATO, assetId).then() + SOKRATES.data().pullProxyDataResponseByAssetId(PLATO, assetId).then() .assertThat().statusCode(428); server.enqueue(new MockResponse().setBody(body)); - var data = SOKRATES.pullProxyDataByTransferProcessId(PLATO, transferEvent1.getPayload().getTransferProcessId()); + var data = SOKRATES.data().pullProxyDataByTransferProcessId(PLATO, transferEvent1.getPayload().getTransferProcessId()); assertThat(data).isEqualTo(body); server.enqueue(new MockResponse().setBody(body)); - data = SOKRATES.pullProxyDataByTransferProcessId(PLATO, transferEvent2.getPayload().getTransferProcessId()); + data = SOKRATES.data().pullProxyDataByTransferProcessId(PLATO, transferEvent2.getPayload().getTransferProcessId()); assertThat(data).isEqualTo(body); } @@ -207,23 +203,14 @@ void httpPullDataTransfer_shouldFailForAsset_withTwoEdrAndProxy() throws IOExcep @DisplayName("Verify E2E flow with Data Plane provider and EDR") void httpPullDataTransfer_withEdrAndProviderDataPlaneProxy() throws IOException { - var eventsUrl = server.url(PROXIED_PATH); - + var eventsUrl = server.url(PLATO.backendProviderProxy().getPath()); var assetId = UUID.randomUUID().toString(); - var authCodeHeaderName = "test-authkey"; - var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", eventsUrl.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build()); + PLATO.createAsset(assetId, Map.of(), dataAddress(eventsUrl.url().toString())); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.IS_ANY_OF, "test-group1")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.IS_ALL_OF, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ANY_OF, "test-group1")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.IS_ALL_OF, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .add(createCallback(eventsUrl.toString(), true, Set.of("transfer.process.started"))) @@ -232,25 +219,25 @@ void httpPullDataTransfer_withEdrAndProviderDataPlaneProxy() throws IOException // response to callback server.enqueue(new MockResponse()); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); var transferEvent = waitForTransferCompletion(); await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(1); }); var body = "{\"response\": \"ok\"}"; server.enqueue(new MockResponse().setBody(body)); - var data = SOKRATES.pullProviderDataPlaneDataByAssetId(PLATO, assetId); + var data = SOKRATES.data().pullProviderDataPlaneDataByAssetId(PLATO, assetId); assertThat(data).isEqualTo(body); server.enqueue(new MockResponse().setBody(body)); - data = SOKRATES.pullProviderDataPlaneDataByTransferProcessId(PLATO, transferEvent.getPayload().getTransferProcessId()); + data = SOKRATES.data().pullProviderDataPlaneDataByTransferProcessId(PLATO, transferEvent.getPayload().getTransferProcessId()); assertThat(data).isEqualTo(body); } @@ -258,7 +245,8 @@ void httpPullDataTransfer_withEdrAndProviderDataPlaneProxy() throws IOException @DisplayName("Verify E2E flow with Data Plane provider and EDR") void httpPullDataTransfer_withEdrAndProviderDataPlaneProxyAndCustomProperties() throws IOException { - var eventsUrl = server.url(PROXIED_PATH); + var eventsPath = PLATO.backendProviderProxy().getPath(); + var eventsUrl = server.url(eventsPath); var customUrl = server.url(CUSTOM_BASE_PATH); @@ -268,48 +256,41 @@ void httpPullDataTransfer_withEdrAndProviderDataPlaneProxyAndCustomProperties() @NotNull @Override public MockResponse dispatch(@NotNull RecordedRequest recordedRequest) throws InterruptedException { - return switch (recordedRequest.getPath()) { - case PROXIED_PATH -> new MockResponse(); - case CUSTOM_FULL_PATH -> new MockResponse().setBody(body); - default -> new MockResponse().setResponseCode(404); - }; + var path = recordedRequest.getPath(); + if (PLATO.backendProviderProxy().getPath().equals(path)) { + return new MockResponse(); + } else if (CUSTOM_FULL_PATH.equals(path)) { + return new MockResponse().setBody(body); + } else { + return new MockResponse().setResponseCode(404); + } } }); var assetId = UUID.randomUUID().toString(); - var authCodeHeaderName = "test-authkey"; - var authCode = "test-authcode"; - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", customUrl.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .add(EDC_NAMESPACE + "proxyPath", "true") - .add(EDC_NAMESPACE + "proxyQueryParams", "true") - .build()); + PLATO.createAsset(assetId, Map.of(), dataAddress(customUrl.url().toString())); PLATO.storeBusinessPartner(SOKRATES.getBpn(), "test-group1", "test-group2"); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-1", Operator.NEQ, "forbidden-policy")); - PLATO.createPolicy(businessPartnerGroupPolicy("policy-2", Operator.EQ, "test-group1", "test-group2")); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); + var accessPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.NEQ, "forbidden-policy")); + var contractPolicy = PLATO.createPolicyDefinition(bpnGroupPolicy(Operator.EQ, "test-group1", "test-group2")); + PLATO.createContractDefinition(assetId, "def-1", accessPolicy, contractPolicy); var callbacks = Json.createArrayBuilder() .add(createCallback(eventsUrl.toString(), true, Set.of("transfer.process.started"))) .build(); - SOKRATES.negotiateEdr(PLATO, assetId, callbacks); + SOKRATES.edrs().negotiateEdr(PLATO, assetId, callbacks); waitForTransferCompletion(); await().pollInterval(ASYNC_POLL_INTERVAL) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var edrCaches = SOKRATES.getEdrEntriesByAssetId(assetId); + var edrCaches = SOKRATES.edrs().getEdrEntriesByAssetId(assetId); assertThat(edrCaches).hasSize(1); }); - var data = SOKRATES.pullProviderDataPlaneDataByAssetIdAndCustomProperties(PLATO, assetId, CUSTOM_SUB_PATH, CUSTOM_QUERY_PARAMS); + var data = SOKRATES.data().pullProviderDataPlaneDataByAssetIdAndCustomProperties(PLATO, assetId, CUSTOM_SUB_PATH, CUSTOM_QUERY_PARAMS); assertThat(data).isEqualTo(body); } @@ -317,7 +298,7 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest) throws In @BeforeEach void setup() throws IOException { server = new MockWebServer(); - server.start(PLATO_PROXIED_AAS_BACKEND_PORT); + server.start(PLATO.backendProviderProxy().getPort()); } @AfterEach diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyInMemoryTest.java index ede482fe9..9bc9eb938 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyInMemoryTest.java @@ -23,30 +23,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class DataPlaneProxyInMemoryTest extends AbstractDataPlaneProxyTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyPostgresqlTest.java index d6ce2d6bc..1911ed0f4 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/proxy/DataPlaneProxyPostgresqlTest.java @@ -18,28 +18,21 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class DataPlaneProxyPostgresqlTest extends AbstractDataPlaneProxyTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpConsumerPullWithProxyTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpConsumerPullWithProxyTest.java index 66568a174..14e62ae36 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpConsumerPullWithProxyTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpConsumerPullWithProxyTest.java @@ -18,38 +18,39 @@ import jakarta.json.JsonObject; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; -import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiationStates; import org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates; import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.io.IOException; import java.util.Map; -import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; import static org.awaitility.pollinterval.FibonacciPollInterval.fibonacci; -import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerNumberPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bnpPolicy; import static org.eclipse.tractusx.edc.helpers.TransferProcessHelperFunctions.createProxyRequest; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; -import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_POLL_INTERVAL; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractHttpConsumerPullWithProxyTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); private MockWebServer server; @@ -67,48 +68,30 @@ void transferData_privateBackend() throws IOException, InterruptedException { var authCodeHeaderName = "test-authkey"; var authCode = "test-authcode"; - var dataAddress = Json.createObjectBuilder() - .add(EDC_NAMESPACE + "type", "HttpData") - .add(EDC_NAMESPACE + "contentType", "application/json") - .add(EDC_NAMESPACE + "baseUrl", url.toString()) - .add(EDC_NAMESPACE + "authKey", authCodeHeaderName) - .add(EDC_NAMESPACE + "authCode", authCode) - .build(); - - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), dataAddress); - - PLATO.createPolicy(createTestPolicy("policy-1", SOKRATES.getBpn())); - PLATO.createPolicy(createTestPolicy("policy-2", SOKRATES.getBpn())); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-2"); - var negotiationId = SOKRATES.negotiateContract(PLATO, assetId); - - // forward declarations of our actual values - var transferProcessId = new AtomicReference(); - var dataRequestId = UUID.randomUUID().toString(); - var contractAgreementId = new AtomicReference(); - var edr = new AtomicReference(); - // wait for the successful contract negotiation - await().pollInterval(ASYNC_POLL_INTERVAL) - .atMost(ASYNC_TIMEOUT) - .untilAsserted(() -> { - var negotiationState = SOKRATES.getNegotiationState(negotiationId); - assertThat(negotiationState).isEqualTo(ContractNegotiationStates.FINALIZED.toString()); + Map dataAddress = Map.of( + "baseUrl", url.toString(), + "type", "HttpData", + "contentType", "application/json", + "authKey", authCodeHeaderName, + "authCode", authCode + ); - var agreementId = SOKRATES.getContractAgreementId(negotiationId); - assertThat(agreementId).isNotNull(); - contractAgreementId.set(agreementId); + PLATO.createAsset(assetId, Map.of(), dataAddress); - var tpId = SOKRATES.requestTransfer(dataRequestId, contractAgreementId.get(), assetId, PLATO, createProxyRequest()); - transferProcessId.set(tpId); - assertThat(transferProcessId).isNotNull(); - }); + var accessPolicyId = PLATO.createPolicyDefinition(createTestPolicy(SOKRATES.getBpn())); + var contractPolicyId = PLATO.createPolicyDefinition(createTestPolicy(SOKRATES.getBpn())); + PLATO.createContractDefinition(assetId, "def-1", accessPolicyId, contractPolicyId); + var transferProcessId = SOKRATES.requestAsset(PLATO, assetId, Json.createObjectBuilder().build(), createProxyRequest()); + + var contractAgreementId = new AtomicReference(); + var edr = new AtomicReference(); // wait until transfer process completes await().pollInterval(fibonacci()) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - var tpState = SOKRATES.getTransferProcessState(transferProcessId.get()); + var tpState = SOKRATES.getTransferProcessState(transferProcessId); assertThat(tpState).isNotNull().isEqualTo(TransferProcessStates.STARTED.toString()); }); @@ -117,16 +100,16 @@ void transferData_privateBackend() throws IOException, InterruptedException { await().pollInterval(fibonacci()) .atMost(ASYNC_TIMEOUT) .untilAsserted(() -> { - edr.set(SOKRATES.getDataReference(dataRequestId)); + edr.set(SOKRATES.edrs().getDataReferenceFromBackend(transferProcessId)); assertThat(edr).isNotNull(); }); // pull data out of provider's backend service: // Cons-DP -> Prov-DP -> Prov-backend - assertThat(SOKRATES.pullData(edr.get(), Map.of())).isEqualTo("test response"); + assertThat(SOKRATES.data().pullData(edr.get(), Map.of())).isEqualTo("test response"); var rq = server.takeRequest(); assertThat(rq.getHeader(authCodeHeaderName)).isEqualTo(authCode); - assertThat(rq.getHeader("Edc-Contract-Agreement-Id")).isEqualTo(contractAgreementId.get()); + assertThat(rq.getHeader("Edc-Contract-Agreement-Id")).isEqualTo(edr.get().getContractId()); assertThat(rq.getHeader("Edc-Bpn")).isEqualTo(SOKRATES.getBpn()); assertThat(rq.getMethod()).isEqualToIgnoringCase("GET"); } @@ -136,7 +119,7 @@ void teardown() throws IOException { server.shutdown(); } - protected JsonObject createTestPolicy(String policyId, String bpn) { - return businessPartnerNumberPolicy(policyId, bpn); + protected JsonObject createTestPolicy(String bpn) { + return bnpPolicy(bpn); } } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpProviderPushTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpProviderPushTest.java index 36145618d..a875504d6 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpProviderPushTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/AbstractHttpProviderPushTest.java @@ -14,19 +14,19 @@ package org.eclipse.tractusx.edc.tests.transfer; -import jakarta.json.Json; import jakarta.json.JsonObject; import okhttp3.mockwebserver.Dispatcher; import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.RecordedRequest; -import org.eclipse.tractusx.edc.lifecycle.Participant; +import org.eclipse.tractusx.edc.lifecycle.tx.TxParticipant; import org.jetbrains.annotations.NotNull; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.io.IOException; +import java.util.Map; import java.util.UUID; import static jakarta.json.Json.createObjectBuilder; @@ -35,19 +35,24 @@ import static org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates.COMPLETED; import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE; import static org.eclipse.edc.spi.CoreConstants.EDC_NAMESPACE; -import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.businessPartnerNumberPolicy; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.bnpPolicy; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; import static org.eclipse.tractusx.edc.tests.TestCommon.ASYNC_TIMEOUT; public abstract class AbstractHttpProviderPushTest { - protected static final Participant SOKRATES = new Participant(SOKRATES_NAME, SOKRATES_BPN, sokratesConfiguration()); - protected static final Participant PLATO = new Participant(PLATO_NAME, PLATO_BPN, platoConfiguration()); + protected static final TxParticipant SOKRATES = TxParticipant.Builder.newInstance() + .name(SOKRATES_NAME) + .id(SOKRATES_BPN) + .build(); + + protected static final TxParticipant PLATO = TxParticipant.Builder.newInstance() + .name(PLATO_NAME) + .id(PLATO_BPN) + .build(); private MockWebServer server; @@ -77,13 +82,20 @@ public MockResponse dispatch(@NotNull RecordedRequest recordedRequest) throws In server.start(); - PLATO.createAsset(assetId, Json.createObjectBuilder().build(), httpDataAddress(providerUrl.toString())); - PLATO.createPolicy(createTestPolicy("policy-1", SOKRATES.getBpn())); - PLATO.createContractDefinition(assetId, "def-1", "policy-1", "policy-1"); + Map dataAddress = Map.of( + "name", "transfer-test", + "baseUrl", providerUrl.toString(), + "type", "HttpData", + "contentType", "application/json" + ); + + PLATO.createAsset(assetId, Map.of(), dataAddress); + var policyId = PLATO.createPolicyDefinition(bnpPolicy(SOKRATES.getBpn())); + PLATO.createContractDefinition(assetId, "def-1", policyId, policyId); var destination = httpDataAddress(consumerUrl.toString()); - var transferProcessId = SOKRATES.requestAsset(PLATO, assetId, destination); + var transferProcessId = SOKRATES.requestAsset(PLATO, assetId, createObjectBuilder().build(), destination); await().atMost(ASYNC_TIMEOUT).untilAsserted(() -> { var state = SOKRATES.getTransferProcessState(transferProcessId); assertThat(state).isEqualTo(COMPLETED.name()); @@ -95,10 +107,6 @@ void teardown() throws IOException { server.shutdown(); } - protected JsonObject createTestPolicy(String policyId, String bpn) { - return businessPartnerNumberPolicy(policyId, bpn); - } - private JsonObject httpDataAddress(String baseUrl) { return createObjectBuilder() .add(TYPE, EDC_NAMESPACE + "DataAddress") diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyInMemoryTest.java index bb94a1599..414476145 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyInMemoryTest.java @@ -23,30 +23,23 @@ import java.security.SecureRandom; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class HttpConsumerPullWithProxyInMemoryTest extends AbstractHttpConsumerPullWithProxyTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); @BeforeAll diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyPostgresqlTest.java index 61892beff..279d69f9f 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpConsumerPullWithProxyPostgresqlTest.java @@ -18,13 +18,6 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class HttpConsumerPullWithProxyPostgresqlTest extends AbstractHttpConsumerPullWithProxyTest { @@ -32,16 +25,16 @@ public class HttpConsumerPullWithProxyPostgresqlTest extends AbstractHttpConsume @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInMemoryTest.java index 2b32b3e9c..aae2e15af 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInMemoryTest.java @@ -18,29 +18,22 @@ import org.eclipse.tractusx.edc.lifecycle.ParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @EndToEndTest public class HttpProviderPushInMemoryTest extends AbstractHttpProviderPushTest { @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInPostgresqlTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInPostgresqlTest.java index 4946c9934..4d8ee5024 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInPostgresqlTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/HttpProviderPushInPostgresqlTest.java @@ -18,28 +18,21 @@ import org.eclipse.tractusx.edc.lifecycle.PgParticipantRuntime; import org.junit.jupiter.api.extension.RegisterExtension; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesConfiguration; - @PostgresqlDbIntegrationTest public class HttpProviderPushInPostgresqlTest extends AbstractHttpProviderPushTest { @RegisterExtension protected static final PgParticipantRuntime SOKRATES_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.getConfiguration() ); @RegisterExtension protected static final PgParticipantRuntime PLATO_RUNTIME = new PgParticipantRuntime( ":edc-tests:runtime:runtime-postgresql", - PLATO_NAME, - PLATO_BPN, - platoConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.getConfiguration() ); } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/SsiHttpConsumerPullWithProxyInMemoryTest.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/SsiHttpConsumerPullWithProxyInMemoryTest.java index 5879e130a..43ea14943 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/SsiHttpConsumerPullWithProxyInMemoryTest.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/tests/transfer/SsiHttpConsumerPullWithProxyInMemoryTest.java @@ -28,18 +28,10 @@ import java.io.IOException; import java.util.Map; +import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.TX_NAMESPACE; import static org.eclipse.tractusx.edc.helpers.PolicyHelperFunctions.frameworkPolicy; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.MIW_PLATO_PORT; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.MIW_SOKRATES_PORT; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.OAUTH_PORT; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_DSP_CALLBACK; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.PLATO_NAME; import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_BPN; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_DSP_CALLBACK; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.SOKRATES_NAME; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.platoSsiConfiguration; -import static org.eclipse.tractusx.edc.lifecycle.TestRuntimeConfiguration.sokratesSsiConfiguration; @EndToEndTest public class SsiHttpConsumerPullWithProxyInMemoryTest extends AbstractHttpConsumerPullWithProxyTest { @@ -48,19 +40,20 @@ public class SsiHttpConsumerPullWithProxyInMemoryTest extends AbstractHttpConsum @RegisterExtension protected static final ParticipantRuntime SOKRATES_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory-ssi", - SOKRATES_NAME, - SOKRATES_BPN, - sokratesSsiConfiguration() + SOKRATES.getName(), + SOKRATES.getBpn(), + SOKRATES.ssiConfiguration() ); @RegisterExtension protected static final ParticipantRuntime PLATO_RUNTIME = new ParticipantRuntime( ":edc-tests:runtime:runtime-memory-ssi", - PLATO_NAME, - PLATO_BPN, - platoSsiConfiguration() + PLATO.getName(), + PLATO.getBpn(), + PLATO.ssiConfiguration() ); - private static MockWebServer oauthServer; + private static MockWebServer sokratesOauthServer; + private static MockWebServer platoOauthServer; private static MockWebServer miwPlatoServer; private static MockWebServer miwSokratesServer; @@ -68,25 +61,30 @@ public class SsiHttpConsumerPullWithProxyInMemoryTest extends AbstractHttpConsum static void prepare() throws IOException { miwSokratesServer = new MockWebServer(); miwPlatoServer = new MockWebServer(); - oauthServer = new MockWebServer(); + sokratesOauthServer = new MockWebServer(); + platoOauthServer = new MockWebServer(); - var credentialSubjectId = "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000"; + var credentialSubjectId = "did:web:example.com"; - miwSokratesServer.start(MIW_SOKRATES_PORT); - miwSokratesServer.setDispatcher(new MiwDispatcher(SOKRATES_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, PLATO_DSP_CALLBACK)); + miwSokratesServer.start(SOKRATES.miwEndpoint().getPort()); + miwSokratesServer.setDispatcher(new MiwDispatcher(SOKRATES_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, PLATO.getProtocolEndpoint().getUrl().toString())); - miwPlatoServer.start(MIW_PLATO_PORT); - miwPlatoServer.setDispatcher(new MiwDispatcher(PLATO_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, SOKRATES_DSP_CALLBACK)); + miwPlatoServer.start(PLATO.miwEndpoint().getPort()); + miwPlatoServer.setDispatcher(new MiwDispatcher(PLATO_BPN, SUMMARY_VC_TEMPLATE, credentialSubjectId, SOKRATES.getProtocolEndpoint().getUrl().toString())); - oauthServer.start(OAUTH_PORT); - oauthServer.setDispatcher(new KeycloakDispatcher()); + sokratesOauthServer.start(SOKRATES.authTokenEndpoint().getPort()); + sokratesOauthServer.setDispatcher(new KeycloakDispatcher()); + + platoOauthServer.start(PLATO.authTokenEndpoint().getPort()); + platoOauthServer.setDispatcher(new KeycloakDispatcher()); } @AfterAll static void unwind() throws IOException { miwSokratesServer.shutdown(); miwPlatoServer.shutdown(); - oauthServer.shutdown(); + sokratesOauthServer.shutdown(); + platoOauthServer.shutdown(); } @BeforeEach @@ -96,7 +94,7 @@ void setup() throws IOException { } @Override - protected JsonObject createTestPolicy(String policyId, String bpn) { - return frameworkPolicy(policyId, Map.of("Dismantler", "active")); + protected JsonObject createTestPolicy(String bpn) { + return frameworkPolicy(Map.of(TX_NAMESPACE + "Dismantler", "active")); } } diff --git a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/token/MockBpnIdentityService.java b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/token/MockBpnIdentityService.java index 7db813b43..617b54161 100644 --- a/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/token/MockBpnIdentityService.java +++ b/edc-tests/e2e-tests/src/test/java/org/eclipse/tractusx/edc/token/MockBpnIdentityService.java @@ -18,6 +18,7 @@ import org.eclipse.edc.spi.iam.IdentityService; import org.eclipse.edc.spi.iam.TokenParameters; import org.eclipse.edc.spi.iam.TokenRepresentation; +import org.eclipse.edc.spi.iam.VerificationContext; import org.eclipse.edc.spi.result.Result; import org.eclipse.edc.spi.types.TypeManager; @@ -50,7 +51,7 @@ public Result obtainClientCredentials(TokenParameters param } @Override - public Result verifyJwtToken(TokenRepresentation tokenRepresentation, String audience) { + public Result verifyJwtToken(TokenRepresentation tokenRepresentation, VerificationContext verificationContext) { var token = typeManager.readValue(tokenRepresentation.getToken(), Map.class); if (token.containsKey(BUSINESS_PARTNER_NUMBER_CLAIM)) { diff --git a/edc-tests/e2e-tests/src/test/resources/summary-vc-no-dismantler.json b/edc-tests/e2e-tests/src/test/resources/summary-vc-no-dismantler.json index 89e89a518..750648f04 100644 --- a/edc-tests/e2e-tests/src/test/resources/summary-vc-no-dismantler.json +++ b/edc-tests/e2e-tests/src/test/resources/summary-vc-no-dismantler.json @@ -8,11 +8,11 @@ "VerifiableCredential", "SummaryCredential" ], - "issuer": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:example.com", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z", "credentialSubject": { - "id": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "id": "did:web:example.com", "holderIdentifier": "%s", "type": "Summary-List", "name": "CX-Credentials", diff --git a/edc-tests/e2e-tests/src/test/resources/summary-vc.json b/edc-tests/e2e-tests/src/test/resources/summary-vc.json index 70fd26a47..01c640a70 100644 --- a/edc-tests/e2e-tests/src/test/resources/summary-vc.json +++ b/edc-tests/e2e-tests/src/test/resources/summary-vc.json @@ -8,11 +8,11 @@ "VerifiableCredential", "SummaryCredential" ], - "issuer": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:example.com", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z", "credentialSubject": { - "id": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "id": "did:web:example.com", "holderIdentifier": "%s", "type": "Summary-List", "name": "CX-Credentials", diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9ad4a839c..c91ff4434 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ format.version = "1.1" [versions] -edc = "0.4.1" +edc = "0.4.2-20240103-SNAPSHOT" postgres = "42.7.1" awaitility = "4.2.0" nimbus = "9.37.3" @@ -116,7 +116,6 @@ edc-spi-dataplane-transfer = { module = "org.eclipse.edc:transfer-data-plane-spi edc-spi-dataplane-selector = { module = "org.eclipse.edc:data-plane-selector-spi", version.ref = "edc" } edc-spi-dataplane-http = { module = "org.eclipse.edc:data-plane-http-spi", version.ref = "edc" } edc-dpf-transferclient = { module = "org.eclipse.edc:data-plane-transfer-client", version.ref = "edc" } -edc-dpf-selector-client = { module = "org.eclipse.edc:data-plane-selector-client", version.ref = "edc" } edc-dpf-selector-spi = { module = "org.eclipse.edc:data-plane-selector-spi", version.ref = "edc" } edc-dpf-selector-core = { module = "org.eclipse.edc:data-plane-selector-core", version.ref = "edc" } edc-dpf-transfer = { module = "org.eclipse.edc:transfer-data-plane", version.ref = "edc" } @@ -126,7 +125,8 @@ edc-dpf-util = { module = "org.eclipse.edc:data-plane-util", version.ref = "edc" edc-dpf-azblob = { module = "org.eclipse.edc:data-plane-azure-storage", version.ref = "edc" } edc-dpf-http = { module = "org.eclipse.edc:data-plane-http", version.ref = "edc" } edc-dpf-oauth2 = { module = "org.eclipse.edc:data-plane-http-oauth2", version.ref = "edc" } -edc-dpf-api = { module = "org.eclipse.edc:data-plane-api", version.ref = "edc" } +edc-dpf-api-control = { module = "org.eclipse.edc:data-plane-control-api", version.ref = "edc" } +edc-dpf-api-public = { module = "org.eclipse.edc:data-plane-public-api", version.ref = "edc" } # micrometer and other infra stuff edc-micrometer-core = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" } @@ -157,6 +157,7 @@ aws-s3transfer = { module = "software.amazon.awssdk:s3-transfer-manager", versio jakarta-rsApi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "rsApi" } jakartaJson = { module = "org.glassfish:jakarta.json", version.ref = "jakarta-json" } jacksonJsonP = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp", version.ref = "jackson" } +jackson-datatypeJsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "jackson" } titaniumJsonLd = { module = "com.apicatalog:titanium-json-ld", version.ref = "titanium" } junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "jupiter" } assertj = { module = "org.assertj:assertj-core", version.ref = "assertj" } @@ -165,6 +166,6 @@ apicatalog-iron-vc = { module = "com.apicatalog:iron-verifiable-credentials", ve [bundles] edc-connector = ["edc.boot", "edc.core-connector", "edc.core-controlplane", "edc.api-observability"] -edc-dpf = ["edc.dpf-transfer", "edc.dpf-selector-core", "edc.dpf-selector-client", "edc.spi-dataplane-selector"] +edc-dpf = ["edc.dpf-transfer", "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-monitoring = ["edc.micrometer-core", "edc.micrometer-jersey", "edc.micrometer-jetty"] diff --git a/spi/ssi-spi/build.gradle.kts b/spi/ssi-spi/build.gradle.kts index 24289ef22..c1733a4cc 100644 --- a/spi/ssi-spi/build.gradle.kts +++ b/spi/ssi-spi/build.gradle.kts @@ -24,4 +24,5 @@ dependencies { testFixturesImplementation(libs.jacksonJsonP) testFixturesImplementation(libs.titaniumJsonLd) + testFixturesImplementation(libs.jackson.datatypeJsr310) } diff --git a/spi/ssi-spi/src/testFixtures/java/org/eclipse/tractusx/edc/iam/ssi/spi/jsonld/SummaryCredential.java b/spi/ssi-spi/src/testFixtures/java/org/eclipse/tractusx/edc/iam/ssi/spi/jsonld/SummaryCredential.java index 207194ded..f04b00b48 100644 --- a/spi/ssi-spi/src/testFixtures/java/org/eclipse/tractusx/edc/iam/ssi/spi/jsonld/SummaryCredential.java +++ b/spi/ssi-spi/src/testFixtures/java/org/eclipse/tractusx/edc/iam/ssi/spi/jsonld/SummaryCredential.java @@ -35,11 +35,11 @@ public interface SummaryCredential { "VerifiableCredential", "SummaryCredential" ], - "issuer": "did:web:issuer-a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:issuer-example.com", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z", "credentialSubject": { - "id": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "id": "did:web:example.com", "holderIdentifier": "BPN of holder", "type": "Summary-List", "name": "CX-Credentials", @@ -82,11 +82,11 @@ public interface SummaryCredential { "type": [ "VerifiableCredential" ], - "issuer": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:example.com", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z", "credentialSubject": { - "id": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000" + "id": "did:web:example.com" } } ] @@ -110,11 +110,11 @@ public interface SummaryCredential { "VerifiableCredential", "SummaryCredential" ], - "issuer": "did:web:no-holder.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:no-holder.example.com:BPNL000000000000", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z", "credentialSubject": { - "id": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000" + "id": "did:web:example.com" } } ] @@ -138,7 +138,7 @@ public interface SummaryCredential { "VerifiableCredential", "SummaryCredential" ], - "issuer": "did:web:a016-203-129-213-99.ngrok-free.app:BPNL000000000000", + "issuer": "did:web:example.com", "issuanceDate": "2023-06-02T12:00:00Z", "expirationDate": "2022-06-16T18:56:59Z" }