diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c7350c18..2716573f2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed +- Updated edc dependencies to 0.2.1 +- Update deprecated field `providerUrl` to `counterPartyAddress` in EDC catalog request +- Update ESS EDC notification creation asset endpoint to v3 + + +## [4.2.0] - 2023-11-28 +### Changed - Changed default behaviour of IRS - when aspects list is not provided or empty in request body, IRS will not collect any submodel now (previously default aspects were collected). - ESS - Added 'hops' parameter to SupplyChainImpacted Aspect model - contains relative distance in the supply chain - Added `impactedSuppliersOnFirstTier` parameter to Supply SupplyChainImpacted Aspect model - contains information of first level supply chain impacted +- Exported health endpoints to prometheus (see HealthMetricsExportConfiguration, + DependenciesHealthMetricsExportConfiguration) and + added [system health dashboard](charts/irs-helm/dashboards/system-health-dashboard.json) in order to visualize health + metrics of IRS and its dependencies + +### Fixed +- Fixed incorrect passing of incidentBPNS for ESS Orders ### Known knowns - [#253] Cancelation of order jobs is not working stable @@ -52,10 +66,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 token-uri: ``` - Update IRS API Swagger documentation to match AAS 3.0.0 - + ### Fixed - IRS will return 206 Http status from GET /jobs/{id} endpoint if Job is still running - + +## [4.0.2] - 2023-11-20 +### Changed +- Remove `apk upgrade --no-cache libssl3 libcrypto3` in Docker base image to be TRG compliant + ## [4.0.1] - 2023-11-10 ### Changed - Added state `STARTED` as acceptable state to complete the EDC transfer process to be compatible with EDC 0.5.1 @@ -455,8 +473,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Unresolved - **Select Aspects you need** You are able to select the needed aspects for which you want to collect the correct endpoint information. -[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.1.0...HEAD -[4.1.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.1...4.1.0 +[Unreleased]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.2.0...HEAD +[4.2.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.1.0...4.2.0 +[4.1.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.2...4.1.0 +[4.0.2]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.1...4.0.2 [4.0.1]: https://github.com/eclipse-tractusx/item-relationship-service/compare/4.0.0...4.0.1 [4.0.0]: https://github.com/eclipse-tractusx/item-relationship-service/compare/3.5.4...4.0.0 [3.5.4]: https://github.com/eclipse-tractusx/item-relationship-service/compare/3.5.3...3.5.4 diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md new file mode 100644 index 0000000000..56521bb972 --- /dev/null +++ b/COMPATIBILITY_MATRIX.md @@ -0,0 +1,31 @@ +# Compatibility matrix IRS + +Full changelog of IRS: [changelog](CHANGELOG.md) + +## [4.2.0] - 2023-11-28 +| Name of service | Version | Helm | Comments | +|---------------------------|------------------------------|------------|-----------------| +| EDC | 0.5.3 | 0.5.3 | | +| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional | +| MIW | 0.1.0 | 0.1.0 | REST connection | +| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection | +| DTR | 0.3.14-M1 | 0.3.22 | REST connection | +| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | +| SingleLevelBomAsBuilt | 2.0.0 | - | Model version | +| SingleLevelBomAsPlanned | 2.0.0 | - | Model version | +| SingleLevelBomAsSpecified | 1.0.0 | - | Model version | +| SingleLevelUsageAsBuilt | 2.0.0 | - | Model version | + +## [4.1.0] - 2023-11-15 +| Name of service | Version | Helm | Comments | +|---------------------------|------------------------------|------------|-----------------| +| EDC | 0.5.3 | 0.5.3 | | +| EDC PostgresSQL | 15.1.0-debian-11-r12 | 12.1.6 | Optional | +| MIW | 0.1.0 | 0.1.0 | REST connection | +| Semantics Hub | 0.1.29 | v0.2.11-M1 | REST connection | +| DTR | 0.3.14-M1 | 0.3.22 | REST connection | +| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | +| SingleLevelBomAsBuilt | 2.0.0 | - | Model version | +| SingleLevelBomAsPlanned | 2.0.0 | - | Model version | +| SingleLevelBomAsSpecified | 1.0.0 | - | Model version | +| SingleLevelUsageAsBuilt | 2.0.0 | - | Model version | \ No newline at end of file diff --git a/DEPENDENCIES b/DEPENDENCIES index e2e70ab526..e4fcebe9dc 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -124,37 +124,37 @@ maven/mavencentral/io.github.resilience4j/resilience4j-retry/2.1.0, Apache-2.0, maven/mavencentral/io.github.resilience4j/resilience4j-spring-boot3/2.1.0, Apache-2.0, approved, #10913 maven/mavencentral/io.github.resilience4j/resilience4j-spring6/2.1.0, Apache-2.0, approved, #10915 maven/mavencentral/io.github.resilience4j/resilience4j-timelimiter/2.1.0, Apache-2.0, approved, #10166 -maven/mavencentral/io.micrometer/micrometer-commons/1.11.5, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9243 -maven/mavencentral/io.micrometer/micrometer-core/1.11.5, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9238 -maven/mavencentral/io.micrometer/micrometer-observation/1.11.5, Apache-2.0, approved, #9242 +maven/mavencentral/io.micrometer/micrometer-commons/1.11.6, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9243 +maven/mavencentral/io.micrometer/micrometer-core/1.11.6, Apache-2.0 AND (Apache-2.0 AND MIT), approved, #9238 +maven/mavencentral/io.micrometer/micrometer-observation/1.11.6, Apache-2.0, approved, #9242 maven/mavencentral/io.micrometer/micrometer-registry-prometheus/1.11.4, Apache-2.0, approved, #9805 maven/mavencentral/io.minio/minio/8.5.6, Apache-2.0, approved, #9097 maven/mavencentral/io.netty.incubator/netty-incubator-transport-classes-io_uring/0.0.21.Final, Apache-2.0, approved, #9622 maven/mavencentral/io.netty.incubator/netty-incubator-transport-native-io_uring/0.0.21.Final, GPL-2.0-only WITH Linux-syscall-note OR MIT AND Apache-2.0 AND MIT, approved, #9649 -maven/mavencentral/io.netty/netty-buffer/4.1.100.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-http/4.1.100.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-mqtt/4.1.100.Final, Apache-2.0 OR LicenseRef-Public-Domain OR BSD-2-Clause OR MIT, approved, CQ15280 -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/4.1.100.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-handler-proxy/4.1.100.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-resolver-dns-classes-macos/4.1.100.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/4.1.100.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-buffer/4.1.101.Final, Apache-2.0, approved, CQ21842 +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-http/4.1.101.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-mqtt/4.1.101.Final, Apache-2.0 OR LicenseRef-Public-Domain OR BSD-2-Clause OR MIT, approved, CQ15280 +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/4.1.101.Final, Apache-2.0 AND BSD-3-Clause AND MIT, approved, CQ20926 +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-handler-proxy/4.1.101.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-resolver-dns-classes-macos/4.1.101.Final, Apache-2.0, approved, #6367 +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/4.1.101.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-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-classes/2.0.61.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-native-epoll/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.100.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-classes-epoll/4.1.101.Final, Apache-2.0, approved, #6366 +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-unix-common/4.1.101.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.opentelemetry/opentelemetry-api/1.25.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/io.opentelemetry/opentelemetry-api/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-api/1.29.0, Apache-2.0, approved, #10088 maven/mavencentral/io.opentelemetry/opentelemetry-context/1.25.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/io.opentelemetry/opentelemetry-context/1.27.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/io.opentelemetry/opentelemetry-context/1.29.0, Apache-2.0, approved, #10090 maven/mavencentral/io.pebbletemplates/pebble/3.2.1, BSD-3-Clause, approved, clearlydefined maven/mavencentral/io.prometheus/simpleclient/0.16.0, Apache-2.0, approved, clearlydefined maven/mavencentral/io.prometheus/simpleclient_common/0.16.0, Apache-2.0, approved, clearlydefined @@ -177,7 +177,7 @@ maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.2, EPL-2.0 OR B maven/mavencentral/jakarta.annotation/jakarta.annotation-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.ca maven/mavencentral/jakarta.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, clearlydefined maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 -maven/mavencentral/jakarta.json/jakarta.json-api/2.1.2, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 +maven/mavencentral/jakarta.json/jakarta.json-api/2.1.3, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7907 maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.0, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0, approved, #7697 maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation @@ -186,10 +186,10 @@ maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.1, BSD-3-Clause, ap maven/mavencentral/javax.jms/javax.jms-api/2.0.1, CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0, approved, #1516 maven/mavencentral/joda-time/joda-time/2.10.2, Apache-2.0, approved, clearlydefined maven/mavencentral/junit/junit/4.13.2, EPL-2.0, approved, CQ23636 +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.10, Apache-2.0, approved, #7164 maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.4, Apache-2.0, approved, #7164 -maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.14.9, 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.9, 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.datafaker/datafaker/1.9.0, Apache-2.0, approved, #8797 maven/mavencentral/net.debasishg/redisclient_2.13/3.42, Apache-2.0, approved, clearlydefined maven/mavencentral/net.java.dev.jna/jna/5.12.1, Apache-2.0 OR LGPL-2.1-or-later, approved, #3217 @@ -220,11 +220,11 @@ maven/mavencentral/org.apache.logging.log4j/log4j-core/2.20.0, Apache-2.0 AND (A maven/mavencentral/org.apache.logging.log4j/log4j-jul/2.20.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.apache.logging.log4j/log4j-slf4j2-impl/2.20.0, Apache-2.0, approved, #8801 maven/mavencentral/org.apache.logging.log4j/log4j-to-slf4j/2.20.0, Apache-2.0, approved, #8799 -maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.15, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949 -maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.15, Apache-2.0, approved, #6997 -maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.15, Apache-2.0, approved, #7920 +maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-core/10.1.16, Apache-2.0 AND (EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND (CDDL-1.0 OR GPL-2.0-only WITH Classpath-exception-2.0) AND W3C AND CC0-1.0, approved, #5949 +maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-el/10.1.16, Apache-2.0, approved, #6997 +maven/mavencentral/org.apache.tomcat.embed/tomcat-embed-websocket/10.1.16, Apache-2.0, approved, #7920 maven/mavencentral/org.apiguardian/apiguardian-api/1.1.2, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.aspectj/aspectjweaver/1.9.20, EPL-1.0, approved, tools.aspectj +maven/mavencentral/org.aspectj/aspectjweaver/1.9.20.1, Apache-2.0 AND BSD-3-Clause AND EPL-1.0 AND BSD-3-Clause AND Apache-1.1, approved, #7695 maven/mavencentral/org.assertj/assertj-core/3.24.2, Apache-2.0, approved, #6161 maven/mavencentral/org.awaitility/awaitility/4.2.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.bouncycastle/bcpkix-jdk18on/1.76, MIT, approved, #9825 @@ -234,74 +234,95 @@ maven/mavencentral/org.bouncycastle/bcutil-jdk18on/1.76, MIT, approved, #9828 maven/mavencentral/org.ccil.cowan.tagsoup/tagsoup/1.2.1, Apache-2.0, approved, clearlydefined maven/mavencentral/org.checkerframework/checker-qual/3.33.0, MIT, approved, clearlydefined maven/mavencentral/org.checkerframework/checker-qual/3.37.0, MIT, approved, clearlydefined -maven/mavencentral/org.eclipse.edc/aggregate-service-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/asset-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/catalog-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/connector-core/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/contract-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/control-plane-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/core-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-api-configuration/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-api/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-http-dispatcher/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog-transform/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-catalog/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-http-core/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-http-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-api/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-http-dispatcher/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation-transform/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-negotiation/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-api/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-http-dispatcher/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process-transform/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transfer-process/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp-transform/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/dsp/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/http-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/http/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jersey-core/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jersey-providers/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/jetty-core/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/json-ld-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/json-ld/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-engine/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-evaluator/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-model/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/policy-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transaction-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transfer-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/transform-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/util/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/validator-spi/0.1.3, Apache-2.0, approved, technology.edc -maven/mavencentral/org.eclipse.edc/web-spi/0.1.3, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/aggregate-service-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/asset-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/catalog-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/connector-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/contract-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/control-plane-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/core-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-api-configuration/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-api/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-http-dispatcher/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog-transform/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-catalog/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-http-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-http-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-api/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-http-dispatcher/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation-transform/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-negotiation/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-api/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-http-dispatcher/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process-transform/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp-transfer-process/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/dsp/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/http-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/http/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jersey-providers/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/jetty-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/json-ld-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/json-ld/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-engine/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-evaluator/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-model/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/policy-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/runtime-metamodel/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transaction-datasource-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transaction-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-data-plane-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transfer-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transform-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/transform-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/util/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/validator-core/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/validator-spi/0.2.1, Apache-2.0, approved, technology.edc +maven/mavencentral/org.eclipse.edc/web-spi/0.2.1, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.17, 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.tractusx.irs/irs-api/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.irs/irs-common/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx maven/mavencentral/org.eclipse.tractusx.irs/irs-edc-client/1.5.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx @@ -314,23 +335,14 @@ maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.4, EPL-2.0 OR GPL-2.0-only with 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/osgi-resource-locator/1.0.3, CDDL-1.0, approved, CQ10889 -maven/mavencentral/org.glassfish.jersey.containers/jersey-container-servlet-core/3.1.2, 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.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.2, 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.2, 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.2, 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.2, 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.2, 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.2, 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.2, 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.2, 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/jakarta.json/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp maven/mavencentral/org.graalvm.js/js/21.2.0, UPL-1.0 AND (MPL-2.0 AND LicenseRef-MIT-style) AND (BSD-3-Clause AND UPL-1.0) AND (GPL-2.0-only WITH Classpath-exception-2.0 AND UPL-1.0) AND (UPL-1.0 AND LicenseRef-Permission-Notice), approved, #10176 @@ -341,7 +353,6 @@ maven/mavencentral/org.hamcrest/hamcrest-core/2.2, BSD-3-Clause, approved, clear maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-3-Clause, approved, clearlydefined maven/mavencentral/org.hdrhistogram/HdrHistogram/2.1.12, BSD-2-Clause OR LicenseRef-Public-Domain, approved, CQ13192 maven/mavencentral/org.hibernate.validator/hibernate-validator/8.0.1.Final, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.javassist/javassist/3.29.0-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 maven/mavencentral/org.javassist/javassist/3.29.2-GA, Apache-2.0 AND LGPL-2.1-or-later AND MPL-1.1, approved, #6023 maven/mavencentral/org.jboss.logging/jboss-logging/3.4.3.Final, Apache-2.0, approved, CQ21255 maven/mavencentral/org.jboss.logging/jboss-logging/3.5.3.Final, Apache-2.0, approved, #9471 @@ -402,28 +413,28 @@ maven/mavencentral/org.slf4j/slf4j-api/2.0.9, MIT, approved, #5915 maven/mavencentral/org.springdoc/springdoc-openapi-starter-common/2.2.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-api/2.2.0, Apache-2.0, approved, clearlydefined maven/mavencentral/org.springdoc/springdoc-openapi-starter-webmvc-ui/2.2.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.springframework.boot/spring-boot-actuator-autoconfigure/3.1.5, Apache-2.0, approved, #9348 -maven/mavencentral/org.springframework.boot/spring-boot-actuator/3.1.5, Apache-2.0, approved, #9342 -maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.1.5, Apache-2.0, approved, #9341 -maven/mavencentral/org.springframework.boot/spring-boot-configuration-metadata/3.1.5, Apache-2.0, approved, #11032 -maven/mavencentral/org.springframework.boot/spring-boot-properties-migrator/3.1.5, Apache-2.0, approved, #10675 -maven/mavencentral/org.springframework.boot/spring-boot-starter-actuator/3.1.5, Apache-2.0, approved, #9344 -maven/mavencentral/org.springframework.boot/spring-boot-starter-aop/3.1.5, Apache-2.0, approved, #9338 -maven/mavencentral/org.springframework.boot/spring-boot-starter-json/3.1.5, Apache-2.0, approved, #9336 -maven/mavencentral/org.springframework.boot/spring-boot-starter-log4j2/3.1.5, Apache-2.0, approved, #8800 -maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.5, Apache-2.0, approved, #9343 -maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.5, Apache-2.0, approved, #8806 -maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.5, Apache-2.0, approved, #8804 -maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.5, Apache-2.0, approved, #9337 -maven/mavencentral/org.springframework.boot/spring-boot-starter-test/3.1.5, Apache-2.0, approved, #9353 -maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.5, Apache-2.0, approved, #9351 -maven/mavencentral/org.springframework.boot/spring-boot-starter-validation/3.1.5, Apache-2.0, approved, #9335 -maven/mavencentral/org.springframework.boot/spring-boot-starter-web/3.1.5, Apache-2.0, approved, #9347 -maven/mavencentral/org.springframework.boot/spring-boot-starter/3.1.5, Apache-2.0, approved, #9349 -maven/mavencentral/org.springframework.boot/spring-boot-test-autoconfigure/3.1.5, Apache-2.0, approved, #9339 -maven/mavencentral/org.springframework.boot/spring-boot-test/3.1.5, Apache-2.0, approved, #9346 -maven/mavencentral/org.springframework.boot/spring-boot/3.1.5, Apache-2.0, approved, #9352 -maven/mavencentral/org.springframework.data/spring-data-commons/3.1.5, Apache-2.0, approved, #8805 +maven/mavencentral/org.springframework.boot/spring-boot-actuator-autoconfigure/3.1.6, Apache-2.0, approved, #9348 +maven/mavencentral/org.springframework.boot/spring-boot-actuator/3.1.6, Apache-2.0, approved, #9342 +maven/mavencentral/org.springframework.boot/spring-boot-autoconfigure/3.1.6, Apache-2.0, approved, #9341 +maven/mavencentral/org.springframework.boot/spring-boot-configuration-metadata/3.1.6, Apache-2.0, approved, #11032 +maven/mavencentral/org.springframework.boot/spring-boot-properties-migrator/3.1.6, Apache-2.0, approved, #10675 +maven/mavencentral/org.springframework.boot/spring-boot-starter-actuator/3.1.6, Apache-2.0, approved, #9344 +maven/mavencentral/org.springframework.boot/spring-boot-starter-aop/3.1.6, Apache-2.0, approved, #9338 +maven/mavencentral/org.springframework.boot/spring-boot-starter-json/3.1.6, Apache-2.0, approved, #9336 +maven/mavencentral/org.springframework.boot/spring-boot-starter-log4j2/3.1.6, Apache-2.0, approved, #8800 +maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.6, Apache-2.0, approved, #9343 +maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.6, Apache-2.0, approved, #8806 +maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.6, Apache-2.0, approved, #8804 +maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.6, Apache-2.0, approved, #9337 +maven/mavencentral/org.springframework.boot/spring-boot-starter-test/3.1.6, Apache-2.0, approved, #9353 +maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.6, Apache-2.0, approved, #9351 +maven/mavencentral/org.springframework.boot/spring-boot-starter-validation/3.1.6, Apache-2.0, approved, #9335 +maven/mavencentral/org.springframework.boot/spring-boot-starter-web/3.1.6, Apache-2.0, approved, #9347 +maven/mavencentral/org.springframework.boot/spring-boot-starter/3.1.6, Apache-2.0, approved, #9349 +maven/mavencentral/org.springframework.boot/spring-boot-test-autoconfigure/3.1.6, Apache-2.0, approved, #9339 +maven/mavencentral/org.springframework.boot/spring-boot-test/3.1.6, Apache-2.0, approved, #9346 +maven/mavencentral/org.springframework.boot/spring-boot/3.1.6, Apache-2.0, approved, #9352 +maven/mavencentral/org.springframework.data/spring-data-commons/3.1.6, Apache-2.0, approved, #8805 maven/mavencentral/org.springframework.security/spring-security-config/6.1.5, Apache-2.0, approved, #9736 maven/mavencentral/org.springframework.security/spring-security-core/6.1.5, Apache-2.0, approved, #9801 maven/mavencentral/org.springframework.security/spring-security-crypto/6.1.5, Apache-2.0 AND ISC, approved, #9735 @@ -433,15 +444,15 @@ maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.1. maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.1.5, Apache-2.0, approved, #8798 maven/mavencentral/org.springframework.security/spring-security-test/6.1.5, Apache-2.0, approved, #10674 maven/mavencentral/org.springframework.security/spring-security-web/6.1.5, Apache-2.0, approved, #9800 -maven/mavencentral/org.springframework/spring-aop/6.0.13, Apache-2.0, approved, #5940 -maven/mavencentral/org.springframework/spring-beans/6.0.13, Apache-2.0, approved, #5937 -maven/mavencentral/org.springframework/spring-context/6.0.13, Apache-2.0, approved, #5936 -maven/mavencentral/org.springframework/spring-core/6.0.13, Apache-2.0 AND BSD-3-Clause, approved, #5948 -maven/mavencentral/org.springframework/spring-expression/6.0.13, Apache-2.0, approved, #3284 -maven/mavencentral/org.springframework/spring-jcl/6.0.13, Apache-2.0, approved, #3283 -maven/mavencentral/org.springframework/spring-test/6.0.13, Apache-2.0, approved, #7003 -maven/mavencentral/org.springframework/spring-web/6.0.13, Apache-2.0, approved, #5942 -maven/mavencentral/org.springframework/spring-webmvc/6.0.13, Apache-2.0, approved, #5944 +maven/mavencentral/org.springframework/spring-aop/6.0.14, Apache-2.0, approved, #5940 +maven/mavencentral/org.springframework/spring-beans/6.0.14, Apache-2.0, approved, #5937 +maven/mavencentral/org.springframework/spring-context/6.0.14, Apache-2.0, approved, #5936 +maven/mavencentral/org.springframework/spring-core/6.0.14, Apache-2.0 AND BSD-3-Clause, approved, #5948 +maven/mavencentral/org.springframework/spring-expression/6.0.14, Apache-2.0, approved, #3284 +maven/mavencentral/org.springframework/spring-jcl/6.0.14, Apache-2.0, approved, #3283 +maven/mavencentral/org.springframework/spring-test/6.0.14, Apache-2.0, approved, #7003 +maven/mavencentral/org.springframework/spring-web/6.0.14, Apache-2.0, approved, #5942 +maven/mavencentral/org.springframework/spring-webmvc/6.0.14, Apache-2.0, approved, #5944 maven/mavencentral/org.testcontainers/junit-jupiter/1.18.3, MIT, approved, #7941 maven/mavencentral/org.testcontainers/junit-jupiter/1.19.1, MIT, approved, #10344 maven/mavencentral/org.testcontainers/testcontainers/1.18.3, MIT, approved, #7938 diff --git a/Dockerfile b/Dockerfile index 913e1c5e57..7d605a7861 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ # * SPDX-License-Identifier: Apache-2.0 # Dependencies -FROM maven:3-openjdk-18-slim AS maven +FROM maven:3-eclipse-temurin-17-alpine AS maven ARG BUILD_TARGET=irs-api WORKDIR /build @@ -49,9 +49,7 @@ RUN --mount=type=cache,target=/root/.m2 mvn -B clean package -pl :$BUILD_TARGET # Copy the jar and build image -FROM eclipse-temurin:20-jre-alpine AS irs-api - -RUN apk upgrade --no-cache libssl3 libcrypto3 +FROM eclipse-temurin:17-jre-alpine AS irs-api ARG UID=10000 ARG GID=3000 diff --git a/charts/irs-helm/CHANGELOG.md b/charts/irs-helm/CHANGELOG.md index a00af20634..ccdb952c36 100644 --- a/charts/irs-helm/CHANGELOG.md +++ b/charts/irs-helm/CHANGELOG.md @@ -5,10 +5,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed +- Changed configuration from `ess.managementPath` to options for each endpoint `ess.assetsPath` `ess.policydefinitionsPath` `ess.contractdefinitionsPath`. E.g. `ess.assetsPath: /management/v3/assets` + +## [6.11.0] - 2023-11-28 ### Fixed - Fixed templating for `management.health.dependencies` -## [6.10.0] +### Added +- Added [system health dashboard](dashboards/system-health-dashboard.json) in order to visualize health metrics of IRS + and its dependencies +- Added configuration for the Discovery Finder cache time to live value in `edc.connectorEndpointService.cacheTTL` + +## [6.10.0] - 2023-11-15 ### Changed - Update IRS version to 4.1.0 - Changed configuration for OAuth2 client from: @@ -29,11 +38,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 jwkSetUri: ``` -## [6.9.1] +## [6.9.2] - 2023-11-20 +### Changed +- Update IRS version to 4.0.2 + +## [6.9.1] - 2023-11-10 ### Changed - Update IRS version to 4.0.1 -## [6.9.0] +## [6.9.0] - 2023-10-27 ### Changed - Update IRS version to 4.0.0 diff --git a/charts/irs-helm/Chart.yaml b/charts/irs-helm/Chart.yaml index 786bd44c4f..fbb9ae21a8 100644 --- a/charts/irs-helm/Chart.yaml +++ b/charts/irs-helm/Chart.yaml @@ -35,12 +35,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 6.10.0 +version: 6.11.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "4.1.0" +appVersion: "4.2.0" dependencies: - name: common repository: https://charts.bitnami.com/bitnami diff --git a/charts/irs-helm/dashboards/system-health-dashboard.json b/charts/irs-helm/dashboards/system-health-dashboard.json new file mode 100644 index 0000000000..fb704c3c92 --- /dev/null +++ b/charts/irs-helm/dashboards/system-health-dashboard.json @@ -0,0 +1,249 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 7, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "0": { + "color": "purple", + "index": 3, + "text": "UNKNOWN" + }, + "1": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "2": { + "color": "#808080", + "index": 2, + "text": "OUT" + }, + "3": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 23, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.2.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "IRS Health", + "range": true, + "refId": "health_irs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs_dependency_overall", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "Dependency Overall Status", + "range": true, + "refId": "health_irs_dependencies_overall" + } + ], + "title": "IRS Health", + "type": "status-history" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "3": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + }, + { + "options": { + "from": 0, + "result": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "to": 2 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 23, + "x": 0, + "y": 9 + }, + "id": 6, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs_dependency", + "instant": false, + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "IRS Dependencies Health", + "type": "status-history" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "System Health", + "uid": "_3NCxeSSk1", + "version": 1, + "weekStart": "" +} diff --git a/charts/irs-helm/templates/configmap-spring-app-config.yaml b/charts/irs-helm/templates/configmap-spring-app-config.yaml index 5c56bec786..2c6e4b1fd1 100644 --- a/charts/irs-helm/templates/configmap-spring-app-config.yaml +++ b/charts/irs-helm/templates/configmap-spring-app-config.yaml @@ -119,7 +119,9 @@ data: ess: localBpn: {{ tpl (.Values.bpn | default "") . | quote }} localEdcEndpoint: {{ tpl (.Values.edc.provider.host | default "") . | quote }} - managementPath: {{ tpl (.Values.ess.managementPath | default "/management/v2") . | quote }} + assetsPath: {{ tpl (.Values.ess.assetsPath | default "/management/v3/assets") . | quote }} + policydefinitionsPath: {{ tpl (.Values.ess.policydefinitionsPath | default "/management/v2/policydefinitions") . | quote }} + contractdefinitionsPath: {{ tpl (.Values.ess.contractdefinitionsPath | default "/management/v2/contractdefinitions") . | quote }} irs: url: {{ tpl (.Values.irsUrl | default "") . | quote }} discovery: diff --git a/charts/irs-helm/values.yaml b/charts/irs-helm/values.yaml index 573713e871..635d68bac7 100644 --- a/charts/irs-helm/values.yaml +++ b/charts/irs-helm/values.yaml @@ -210,7 +210,9 @@ discovery: ess: mockEdcResult: # Map of BPNs and YES/NO strings - this configures the ESS mock response in case it called to investigate a BPN mockRecursiveEdcAsset: # List of BPNs for which the special, mocked notification asset should be used - managementPath: "/management/v2" # EDC management API path - used for notification asset creation + assetsPath: /management/v3/assets # EDC management API "assets" path - used for notification asset creation + policydefinitionsPath: /management/v2/policydefinitions # EDC management API "policydefinitions" path - used for notification policy definition creation + contractdefinitionsPath: /management/v2/contractdefinitions # EDC management API "contractdefinitions" path - used for notification contract definitions creation oauth: resourceClaim: "resource_access" # Name of the JWT claim for roles @@ -333,6 +335,257 @@ grafana: dashboards: default: + system-health-dashboard: + json: | + { + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 7, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "0": { + "color": "purple", + "index": 3, + "text": "UNKNOWN" + }, + "1": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "2": { + "color": "#808080", + "index": 2, + "text": "OUT" + }, + "3": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 23, + "x": 0, + "y": 0 + }, + "id": 4, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.2.5", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "IRS Health", + "range": true, + "refId": "health_irs" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs_dependency_overall", + "format": "time_series", + "instant": false, + "interval": "", + "legendFormat": "Dependency Overall Status", + "range": true, + "refId": "health_irs_dependencies_overall" + } + ], + "title": "IRS Health", + "type": "status-history" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "fillOpacity": 70, + "lineWidth": 1 + }, + "mappings": [ + { + "options": { + "3": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + }, + { + "options": { + "from": 0, + "result": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "to": 2 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "transparent", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 23, + "x": 0, + "y": 9 + }, + "id": 6, + "options": { + "colWidth": 0.9, + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "rowHeight": 0.9, + "showValue": "auto", + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "health_irs_dependency", + "instant": false, + "interval": "", + "legendFormat": "{{name}}", + "range": true, + "refId": "A" + } + ], + "title": "IRS Dependencies Health", + "type": "status-history" + } + ], + "refresh": "5s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "System Health", + "uid": "_3NCxeSSk1", + "version": 1, + "weekStart": "" + } irs-api-dashboard: json: | { diff --git a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md index 15bb118639..86c805bb9a 100644 --- a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md +++ b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md @@ -67,7 +67,7 @@ Description of the main property 'SingleLevelBomAsBuild' was adapted to the new "lastModifiedOn": "2022-02-03T14:48:54.709Z", "lifecycleContext": "<>", // If there is a change of BomLifecycle "quantity": {...}, - "alternative": "true" // == hasAlternatices + "hasAlternatives": "true" // == hasAlternatives } } ], @@ -76,7 +76,7 @@ Description of the main property 'SingleLevelBomAsBuild' was adapted to the new | Change | Description | |------------------|----------------------------------------------------------------------------------------------------| | lifecycleContext | Lifecycle context is adjusted to asPlanned or asBuilt in relation in case of a switch | -| alternative | Reflects the state of property hasAlternative of item in SingleLevelBomAsBuilt chldItems structure | +| hasAlternatives | Reflects the state of property hasAlternative of item in SingleLevelBomAsBuilt chldItems structure | ## SingleLevelBomAsBuilt childItems contains asBuilt aspects hasAlternatives=false @@ -97,8 +97,10 @@ flowchart LR s1 --> SingleLevelBomAsBuilt2 SingleLevelBomAsBuilt2(SingleLevelBomAsBuilt) --> s4((AAS C-X 2 \n hasAlternatives=false)) s4 --> SerialPart3(SerialPart) + s4 --> SingleLevelBomAsBuilt5(SingleLevelBomAsBuilt2.0.0) SingleLevelBomAsBuilt2 --> s5((AAS C-X 3 \n hasAlternatives=false)) s5 --> SerialPart2(SerialPart) + s5 --> SingleLevelBomAsBuilt4(SingleLevelBomAsBuilt2.0.0) ``` ## SingleLevelBomAsBuilt childItems contains asPlanned aspects hasAlternatives=false @@ -152,10 +154,11 @@ flowchart LR s2 --> p1(PartAsPlanned) s3 --> p2(PartAsPlanned) - s2 --> stop1((stop)) - s3 --> stop2((stop)) + s2 --> stop1{stop processing} + s3 --> stop2{stop processing} s1 --> SingleLevelBomAsBuilt3[SingleLevelBomAsBuilt] + s1 --> p3[SerialPart] SingleLevelBomAsBuilt3 --> s4((AAS C-X 4)) classDef asPlanned fill: #9f6,stroke: #333, stroke-width: 2px; diff --git a/docs/src/docs/administration/configuration.adoc b/docs/src/docs/administration/configuration.adoc index b556b525e1..b7ed1c9cdb 100644 --- a/docs/src/docs/administration/configuration.adoc +++ b/docs/src/docs/administration/configuration.adoc @@ -78,6 +78,9 @@ If left empty, this defaults to the internal endpoint of the controlplane provid When IRS calls EDC Discovery Service to fetch endpoints for BPNL's there is a cache mechanism between them, to improve performance. This parameter define how long cache is maintained before it is cleared. Data is in ISO 8601. +== OAuth2 Configuration +OAuth2 protocol is used by IRS to protect the APIs and other resources. This means it is possible to configure and use any identity and access management tool that provides OAuth 2.0 functionality. + === Semantic Model Provisioning The IRS can retrieve semantic models in two ways: diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml index 4a4a262dd5..7cbabcae22 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/activity/1_incident_scenario_ess-bottom_up-activity.puml @@ -30,10 +30,12 @@ endif : Extract and collect globalAssetIds for own twins (AsPlanned); : Request batch call for globalAssetIds -POST /ess/customers/investigations/orders; +POST /irs/ess/orders; +: Call POST /ess/customer/investigation for each globalAsset; + : Filter for incident BPNS -in PartSiteInformationAsPlanned; +in PartSiteInformationAsPlanned on own parts; if(!twin.contains(incidentBpns)) then (no) : skip twin; @@ -41,7 +43,7 @@ else (yes) : add twin; endif -: ValidityPeriodChecker in own aas; +: ValidityPeriodChecker in own PartAsPlanned; if(timestamp is in validity period) then (yes) note left PartAsPlanned.validityPeriod.validFrom @@ -58,7 +60,25 @@ endif tier level upwards; : aggregateBPNLs Aggregate bpns numbers for each bpnl; -: increment hops count for each twin ; + note left + { + customers : [ + { + businessPartnerNumberLegalEntity : , + "customerParts" [ + { + globalAssetId: , + sites : [ + {}, + ], + }, ... + ] + }, + ] + } + end note stop +: Request for results "ESSCustomerNotificationsSubmodel "; + @enduml \ No newline at end of file diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml index d256bd4332..756a98fd25 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-customer-highlevel.puml @@ -14,7 +14,6 @@ participant EDC box Customer Company (Tier 3) participant "Incident App" as BusinessApp_Tier_3 - BusinessApp_Tier_4 -> BusinessApp_Tier_3 : notification BusinessApp_Tier_4 <-- BusinessApp_Tier_3 : 200 ack note left @@ -27,7 +26,6 @@ note left "incidentBPNSs" : ["BPNS123456"] "concernedCatenaXIds" : [ { globalAssetId : , - hopsCount: , bpns: [ ] @@ -62,6 +60,4 @@ end note end ref BusinessApp_Tier_3 <-- IRS_Tier_3 : Return job with item graph for the requested id. - - @enduml \ No newline at end of file diff --git a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml index 26d169e943..3f4735e252 100644 --- a/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml +++ b/docs/src/uml-diagrams/irs-recursive/ess-bottom-up/sequence/ess-bottom-up-sequence-originator-highlevel.puml @@ -7,58 +7,17 @@ autonumber "[000]" actor "Client" as User -participant "Client App (Script)" as ClientApp -box Incident Company (Tier 4) -participant "Digital Twin Registry" as dDTR_Tier_N -participant "IRS Incident" as IRS_Tier_N -end box - -participant EDC +User -> IncidentApp : Incident notification (incidentID) +activate IncidentApp -box Tier3 Company -participant "Digital Twin Registry" as dDTR_Tier_3 -participant "SubmodelServer" as SubmodelServer_Tier_3 -participant "IRS Customer Tier 3" as IRS_Tier_3 +box Incident Company (Tier 4) +participant "IRS" as IRS_Tier_N +participant "dDTR_Tier_Incident" as dDTR_Tier_N +participant "SubmodelServer_Tier_Incident" as SubmodelServer_Tier_N end box - -User -> ClientApp : Incident notification (incidentID) -activate ClientApp - -ClientApp -> dDTR_Tier_N : getAAShells () -ref over dDTR_Tier_N - GET AAShells from dDTR for own BPNL -end ref -ClientApp <-- dDTR_Tier_N : Array [{AAS shells}] - -ClientApp -> ClientApp : Extract globalAssetId - - -ClientApp <-- dDTR_Tier_N : return array of {aasIdentifier} - -ClientApp -> ClientApp : filter aas for submodelDescriptor (asPlanned) - note left - semanticId/ - ["type"="ExternalReference"]/ - keys["type"="GlobalReference"]/ - ["value".contains("SingleLevelBomAsPlanned")] - SingleLevelBomAsPlanned (only downwards supported!!) - end note - -opt aas is asPlanned - - ClientApp -> ClientApp : add aas to aasResultSet - note right - Requesting all twins for a given "bomLifecycle" - end note - -end opt - -ClientApp <-- ClientApp : aasResultSet - - -ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders +IncidentApp -> IRS_Tier_N : /irs/ess/orders note left Investigation of customers who must be notified about an incident. parameters: @@ -79,50 +38,58 @@ ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders } end note - IRS_Tier_N -> IRS_Tier_N : Check PartSiteInformationAsPlanned if BPNS matches - note left - Check if bpns contains any catenaXsiteId in PartSiteInformationAsPlanned - end note - opt "!bpns.containsAny(catenaXsiteIds) then" - IRS_Tier_N -> IRS_Tier_N : skip twin; - end - - ref over dDTR_Tier_N, dDTR_Tier_3, SubmodelServer_Tier_3 - Determining relationships 1 tier level upwards - end ref - - IRS_Tier_N -> IRS_Tier_N : validityPeriodChecker - note left - validityPeriodCheck: Checks if passed timestamp is in validity period defined with - validityPeriod.validFrom and PartAsPlanned.validityPeriod.validTo - - PartAsPlanned.validityPeriod.validFrom - >= validityTimestamp - >= PartAsPlanned.validityPeriod.validTo - end note - - IRS_Tier_N -> IRS_Tier_N : aggregateBPNLs - note left - Aggregate bpns numbers for each bpnl - end note - IRS_Tier_N -> IRS_Tier_N : incrementHopsCount - note left - increment hopsCount on twin level - end note - - - IRS_Tier_N <-- IRS_Tier_N : [{globalAssetId,businessPartnerNumberLegalEntity, [businessPartnerNumberSite]}] - - - - - ClientApp --> IRS_Tier_N : GET /irs/orders/{orderId} - ClientApp <-- IRS_Tier_N : Get a batch order for a given orderId. - ClientApp --> IRS_Tier_N : GET /irs/orders/{orderId}/batches/{batchId} - ClientApp <-- IRS_Tier_N : Get a batch with a given batchId for a given orderId. - ClientApp --> IRS_Tier_N : GET /irs/jobs/{id} - ClientApp <-- IRS_Tier_N : Return job with item graph for the requested id. - User <-- ClientApp : Return job with item graph for the requested id. + loop over globalAssetIds + IRS_Tier_N -> IRS_Tier_N : /ess/customer/investigation + ref over IRS_Tier_N, dDTR_Tier_N + GET aas for globalAssetId from dDTR + end ref + IRS_Tier_N -> IRS_Tier_N : detect endpoint for submodel "PartAsPlanned" + IRS_Tier_N -> IRS_Tier_N : validityPeriodChecker + note left + validityPeriodCheck: Checks if passed timestamp is in validity period defined with + validityPeriod.validFrom and PartAsPlanned.validityPeriod.validTo + + PartAsPlanned.validityPeriod.validFrom + >= validityTimestamp + >= PartAsPlanned.validityPeriod.validTo + end note + opt validityCheck == false + IRS_Tier_N -> IRS_Tier_N : skip globalAssetId; + else + IRS_Tier_N -> IRS_Tier_N : detect endpoint for submodel "PartSiteInformationAsPlanned" + ref over IRS_Tier_N, SubmodelServer_Tier_N + GET PartSiteInformationAsPlanned for globalAssetId from dDTR + end ref + IRS_Tier_N -> IRS_Tier_N : Check PartSiteInformationAsPlanned if BPNS matches + note left + Check if bpns contains any catenaXsiteId in PartSiteInformationAsPlanned + end note + opt "!bpns.containsAny(catenaXsiteIds) then" + IRS_Tier_N -> IRS_Tier_N : skip globalAssetId; + else + + ref over dDTR_Tier_N, dDTR_Tier_Customer, SubmodelServer_Tier_Customer + Determining relationships 1 tier level upwards + end ref + + + + IRS_Tier_N -> IRS_Tier_N : aggregateBPNLs + note left + Aggregate globalAssetIds and bpns numbers for each bpnl + [{globalAssetId,businessPartnerNumberLegalEntity, [businessPartnerNumberSite]}] + end note + end opt + end opt + end loop + + IncidentApp --> IRS_Tier_N : GET /irs/orders/{orderId} + IncidentApp <-- IRS_Tier_N : Get a batch order for a given orderId. + IncidentApp --> IRS_Tier_N : GET /irs/orders/{orderId}/batches/{batchId} + IncidentApp <-- IRS_Tier_N : Get a batch with a given batchId for a given orderId. + IncidentApp --> IRS_Tier_N : GET /irs/customer/investigation/{id} + IncidentApp <-- IRS_Tier_N : Return job with item graph for the requested id. + User <-- IncidentApp : Return job with item graph for the requested id. note left { customers : [ @@ -131,7 +98,6 @@ ClientApp -> IRS_Tier_N : /ess/customers/investigations/orders "customerParts" [ { globalAssetId: , - hopsCount: , sites : [ {}, ], diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthConfiguration.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthConfiguration.java index 8fdf7f911b..15a736c51d 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthConfiguration.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthConfiguration.java @@ -33,9 +33,11 @@ * Config values for external dependencies health URLs */ @Component -@ConfigurationProperties(prefix = "management.health.dependencies") +@ConfigurationProperties(prefix = DependenciesHealthConfiguration.MANAGEMENT_HEALTH_DEPENDENCIES) @Data public class DependenciesHealthConfiguration { + public static final String MANAGEMENT_HEALTH_DEPENDENCIES = "management.health.dependencies"; + private Map urls; } diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthIndicator.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthIndicator.java index 94545d4db1..5141352bf1 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthIndicator.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthIndicator.java @@ -49,17 +49,21 @@ @Component @Slf4j @ConditionalOnEnabledHealthIndicator("dependencies") -class DependenciesHealthIndicator implements HealthIndicator { +public class DependenciesHealthIndicator implements HealthIndicator { private final DependenciesHealthConfiguration dependenciesHealthConfiguration; private final RestTemplate restTemplate; - /* package */ DependenciesHealthIndicator(@Qualifier(NO_ERROR_REST_TEMPLATE) final RestTemplate noErrorRestTemplate, + public DependenciesHealthIndicator(@Qualifier(NO_ERROR_REST_TEMPLATE) final RestTemplate noErrorRestTemplate, final DependenciesHealthConfiguration dependenciesHealthConfiguration) { this.dependenciesHealthConfiguration = dependenciesHealthConfiguration; this.restTemplate = noErrorRestTemplate; } + public DependenciesHealthConfiguration getConfig() { + return dependenciesHealthConfiguration; + } + @Override public Health health() { final Map details = details(); diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfiguration.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfiguration.java new file mode 100644 index 0000000000..fee6f78ca5 --- /dev/null +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfiguration.java @@ -0,0 +1,133 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.configuration; + +import java.util.Map; +import java.util.Set; +import java.util.function.ToDoubleFunction; + +import io.micrometer.core.instrument.Gauge; +import io.micrometer.core.instrument.MeterRegistry; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.actuate.autoconfigure.health.ConditionalOnEnabledHealthIndicator; +import org.springframework.boot.actuate.health.Health; +import org.springframework.boot.actuate.health.Status; +import org.springframework.context.annotation.Configuration; + +/** + * Exports the metrics from {@link DependenciesHealthIndicator} to prometheus. + */ +@Configuration(proxyBeanMethods = false) +@Slf4j +@ConditionalOnEnabledHealthIndicator("dependencies") +public class DependenciesHealthMetricsExportConfiguration { + + private static final MetricDescriptor HEALTH_IRS_DEPENDENCY_OVERALL = // + new MetricDescriptor("health-irs-dependency-overall", + "The overall health status of the IRS dependencies. See configuration under '%s'.".formatted( + DependenciesHealthConfiguration.MANAGEMENT_HEALTH_DEPENDENCIES)); + + private static final MetricDescriptor HEALTH_IRS_DEPENDENCY = // + new MetricDescriptor("health-irs-dependency", + "The health status of the IRS dependencies configured under '%s'.".formatted( + DependenciesHealthConfiguration.MANAGEMENT_HEALTH_DEPENDENCIES)); + private static final String HEALTH_IRS_DEPENDENCY_TAG_NAME = "name"; + + /** + * Constructor. + * + * @param registry the metrics registry + * @param dependenciesHealthIndicator the health indicator for the IRS dependencies + */ + public DependenciesHealthMetricsExportConfiguration(final MeterRegistry registry, + final DependenciesHealthIndicator dependenciesHealthIndicator) { + registerOverallHealthMetric(registry, dependenciesHealthIndicator); + registerDependenciesMetrics(registry, dependenciesHealthIndicator); + } + + private void registerOverallHealthMetric(final MeterRegistry registry, + final DependenciesHealthIndicator dependenciesHealthIndicator) { + + final MetricDescriptor metricDescriptor = HEALTH_IRS_DEPENDENCY_OVERALL; + log.debug("Registering metric '{}'", metricDescriptor.name); + + final ToDoubleFunction statusProvider = // + healthIndicator -> HealthStatusHelper.healthStatustoNumeric(overallStatus(healthIndicator)); + + Gauge.builder(metricDescriptor.name, dependenciesHealthIndicator, statusProvider) + .description(metricDescriptor.description()) + .strongReference(true) + .register(registry); + } + + private void registerDependenciesMetrics(final MeterRegistry registry, + final DependenciesHealthIndicator dependenciesHealthIndicator) { + + final Set dependencyNames = getDependencyNamesFromConfiguration(dependenciesHealthIndicator); + for (final String dependencyName : dependencyNames) { + registerIrsDependencyHealthMetric(registry, dependenciesHealthIndicator, dependencyName); + } + } + + private Set getDependencyNamesFromConfiguration( + final DependenciesHealthIndicator dependenciesHealthIndicator) { + final DependenciesHealthConfiguration config = dependenciesHealthIndicator.getConfig(); + return config.getUrls().keySet(); + } + + private void registerIrsDependencyHealthMetric(final MeterRegistry registry, + final DependenciesHealthIndicator dependenciesHealthIndicator, final String dependencyName) { + + final MetricDescriptor metricDescriptor = HEALTH_IRS_DEPENDENCY; + log.debug("Registering metric '{}' tag '{}'", metricDescriptor.name, dependencyName); + + final ToDoubleFunction statusProvider = // + healthIndicator -> HealthStatusHelper.healthStatustoNumeric( + getIrsDependencyStatus(healthIndicator, dependencyName)); + + Gauge.builder(metricDescriptor.name, dependenciesHealthIndicator, statusProvider) + .tag(HEALTH_IRS_DEPENDENCY_TAG_NAME, dependencyName) + .description(metricDescriptor.description) + .strongReference(true) + .register(registry); + } + + private static Status overallStatus(final DependenciesHealthIndicator healthIndicator) { + final Status status = healthIndicator.getHealth(false).getStatus(); + log.debug("Overall IRS dependency health status is '{}'", status); + return status; + } + + private Status getIrsDependencyStatus(final DependenciesHealthIndicator healthIndicator, + final String dependencyName) { + final Health health = healthIndicator.getHealth(true); + final Map healthDetails = health.getDetails(); + final Status status = (Status) healthDetails.get(dependencyName); + log.debug("Health status for IRS dependency '{}' is '{}'", dependencyName, status); + return status; + } + + private record MetricDescriptor(String name, String description) { + } +} diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfiguration.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfiguration.java new file mode 100644 index 0000000000..4f3f323fcf --- /dev/null +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfiguration.java @@ -0,0 +1,72 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.configuration; + +import java.util.function.ToDoubleFunction; + +import io.micrometer.core.instrument.Gauge; +import io.micrometer.core.instrument.MeterRegistry; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.actuate.health.HealthEndpoint; +import org.springframework.boot.actuate.health.Status; +import org.springframework.context.annotation.Configuration; + +/** + * Exports the IRS health status to prometheus. + */ +@Configuration(proxyBeanMethods = false) +@Slf4j +public class HealthMetricsExportConfiguration { + + /** + * Constructor. + * + * @param registry the metrics registry + * @param healthEndpoint the IRS health endpoint + */ + public HealthMetricsExportConfiguration(final MeterRegistry registry, final HealthEndpoint healthEndpoint) { + registerIrsHealthMetrics(registry, healthEndpoint); + } + + private void registerIrsHealthMetrics(final MeterRegistry registry, final HealthEndpoint irsHealthEndpoint) { + + final String metricName = "health-irs"; + log.debug("Registering metric '{}'", metricName); + + final ToDoubleFunction statusProvider = // + healthEndpoint -> HealthStatusHelper.healthStatustoNumeric(getIrsStatus(healthEndpoint)); + + Gauge.builder(metricName, irsHealthEndpoint, statusProvider) + .description("The IRS health status.") + .strongReference(true) + .register(registry); + } + + private Status getIrsStatus(final HealthEndpoint healthEndpoint) { + final Status status = healthEndpoint.health().getStatus(); + log.debug("Health status for IRS is '{}'", status); + return status; + } + +} diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelper.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelper.java new file mode 100644 index 0000000000..c531a0e4ca --- /dev/null +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelper.java @@ -0,0 +1,66 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.irs.configuration; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import org.springframework.boot.actuate.health.Status; + +/** + * Utility class with helper methods for health status + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class HealthStatusHelper { + + public static final int STATUS_UNKNOWN = 0; + public static final int STATUS_DOWN = 1; + public static final int STATUS_OUT_OF_SERVICE = 2; + public static final int STATUS_UP = 3; + + /** + * Converts health status for usage with Gauge. + * + * @param status the health status + * @return the numeric representation of the health status + */ + public static int healthStatustoNumeric(final Status status) { + + // see Spring documentation - map health indicators to metrics: + // https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/ + // #howto.actuator.map-health-indicators-to-metrics + + if (Status.UP.equals(status)) { + return STATUS_UP; + } + if (Status.OUT_OF_SERVICE.equals(status)) { + return STATUS_OUT_OF_SERVICE; + } + if (Status.DOWN.equals(status)) { + return STATUS_DOWN; + } + + return STATUS_UNKNOWN; + } +} diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EdcRegistration.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EdcRegistration.java index 286bbd597d..83c77727b9 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EdcRegistration.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/ess/service/EdcRegistration.java @@ -56,20 +56,26 @@ public class EdcRegistration { private final String essBaseUrl; private final String apiKeyHeader; private final String apiKeySecret; - private final String managementPath; + private final String assetsPath; + private final String policydefinitionsPath; + private final String contractdefinitionsPath; public EdcRegistration(@Qualifier("noErrorRestTemplate") final RestTemplate restTemplate, @Value("${ess.localEdcEndpoint}") final String edcProviderUrl, @Value("${ess.irs.url}") final String essBaseUrl, @Value("${irs-edc-client.controlplane.api-key.header}") final String apiKeyHeader, @Value("${irs-edc-client.controlplane.api-key.secret}") final String apiKeySecret, - @Value("${ess.managementPath}") final String managementPath) { + @Value("${ess.assetsPath}") final String assetsPath, + @Value("${ess.policydefinitionsPath}") final String policydefinitionsPath, + @Value("${ess.contractdefinitionsPath}") final String contractdefinitionsPath) { this.restTemplate = restTemplate; this.edcProviderUrl = edcProviderUrl; this.essBaseUrl = essBaseUrl; this.apiKeyHeader = apiKeyHeader; this.apiKeySecret = apiKeySecret; - this.managementPath = managementPath; + this.assetsPath = assetsPath; + this.policydefinitionsPath = policydefinitionsPath; + this.contractdefinitionsPath = contractdefinitionsPath; } @EventListener(ApplicationReadyEvent.class) @@ -107,14 +113,12 @@ private void registerAsset(final String assetId, final String notificationType, final var body = """ { "@context": {}, - "asset": { - "@id": "%s", - "properties": { - "description": "ESS notification endpoint", - "contenttype": "application/json", - "notificationtype":"%s", - "notificationmethod": "receive" - } + "@id": "%s", + "properties": { + "description": "ESS notification endpoint", + "contenttype": "application/json", + "notificationtype":"%s", + "notificationmethod": "receive" }, "dataAddress": { "baseUrl": "%s", @@ -124,7 +128,7 @@ private void registerAsset(final String assetId, final String notificationType, } } """.formatted(assetId, notificationType, essBaseUrl + path); - final var entity = restTemplate.exchange(edcProviderUrl + managementPath + "/assets", HttpMethod.POST, + final var entity = restTemplate.exchange(edcProviderUrl + assetsPath, HttpMethod.POST, toEntity(body), String.class); if (entity.getStatusCode().is2xxSuccessful()) { @@ -165,7 +169,7 @@ private void registerPolicy(final String policyId) { } } """.formatted(policyId); - final var entity = restTemplate.exchange(edcProviderUrl + managementPath + "/policydefinitions", + final var entity = restTemplate.exchange(edcProviderUrl + policydefinitionsPath, HttpMethod.POST, toEntity(body), String.class); if (entity.getStatusCode().is2xxSuccessful()) { @@ -190,7 +194,7 @@ private void registerContractDefinition(final String contractId, final String as } """.formatted(contractId, contractId, assetId); - final var entity = restTemplate.exchange(edcProviderUrl + managementPath + "/contractdefinitions", + final var entity = restTemplate.exchange(edcProviderUrl + contractdefinitionsPath, HttpMethod.POST, toEntity(body), String.class); if (entity.getStatusCode().is2xxSuccessful()) { log.info("Notification contract definition registered successfully."); @@ -215,7 +219,7 @@ private HttpHeaders headers() { private boolean assetIsNotRegisteredYet(final String assetId) { if (restTemplate != null && StringUtils.isNotBlank(edcProviderUrl)) { - final var url = edcProviderUrl + managementPath + "/assets/request"; + final var url = edcProviderUrl + assetsPath + "/request"; log.info("Requesting asset from EDC provider with url {}", url); final String filter = """ { diff --git a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/BatchOrderEventListener.java b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/BatchOrderEventListener.java index 6214fd9d8e..97adc7b007 100644 --- a/irs-api/src/main/java/org/eclipse/tractusx/irs/services/BatchOrderEventListener.java +++ b/irs-api/src/main/java/org/eclipse/tractusx/irs/services/BatchOrderEventListener.java @@ -167,7 +167,7 @@ private RegisterBpnInvestigationJob createRegisterBpnInvestigationBatchOrder(fin .key(identificationKey) .bomLifecycle(batchOrder.getBomLifecycle()) .callbackUrl(batchOrder.getCallbackUrl()) - .incidentBPNSs(List.of()) + .incidentBPNSs(batchOrder.getIncidentBPNSs()) .build(); } diff --git a/irs-api/src/main/resources/application.yml b/irs-api/src/main/resources/application.yml index cc5bf4150f..4940e3f524 100644 --- a/irs-api/src/main/resources/application.yml +++ b/irs-api/src/main/resources/application.yml @@ -223,7 +223,9 @@ bpdm: ess: localBpn: ${ESS_LOCAL_BPN:} # BPN value of product - used during EDC notification communication localEdcEndpoint: ${EDC_PROVIDER_URL:} # EDC Provider Url - used during EDC notification communication - managementPath: ${EDC_MANAGEMENT_PATH:/management/v2} # EDC management API path - used for notification asset creation + assetsPath: ${EDC_MANAGEMENT_PATH:/management/v3/assets} # EDC management API "assets" path - used for notification asset creation + policydefinitionsPath: ${EDC_MANAGEMENT_PATH:/management/v2/policydefinitions} # EDC management API "policydefinitions" path - used for notification policy definition creation + contractdefinitionsPath: ${EDC_MANAGEMENT_PATH:/management/v2/contractdefinitions} # EDC management API "contractdefinitions" path - used for notification contract definitions creation irs: url: "${IRS_URL:}" # IRS Url to connect with discovery: diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfigurationTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfigurationTest.java new file mode 100644 index 0000000000..a6dbc3ccd9 --- /dev/null +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/DependenciesHealthMetricsExportConfigurationTest.java @@ -0,0 +1,103 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.configuration; + +import static java.util.stream.Collectors.toMap; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import io.micrometer.core.instrument.ImmutableTag; +import io.micrometer.core.instrument.Meter; +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.Tags; +import io.micrometer.core.instrument.simple.SimpleMeterRegistry; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.web.client.RestTemplate; + +@ExtendWith(MockitoExtension.class) +class DependenciesHealthMetricsExportConfigurationTest { + + private final MeterRegistry meterRegistry = new SimpleMeterRegistry(); + + @Mock + private RestTemplate restTemplateMock; + + private record IrsDependency(String name, String url) { + } + + @Test + void shouldRegisterHealthMetricsWithPrometheus() { + + // ARRANGE + final DependenciesHealthConfiguration dependenciesHealthConfig = new DependenciesHealthConfiguration(); + dependenciesHealthConfig.setUrls(simulateIrsDependencies()); + + // ACT + new DependenciesHealthMetricsExportConfiguration(meterRegistry, + new DependenciesHealthIndicator(restTemplateMock, dependenciesHealthConfig)); + + // ASSERT + final List meterIds = meterRegistry.getMeters() + .stream() + .map(Meter::getId) + .collect(Collectors.toList()); + + assertThat(meterIds).describedAs("should have registered the given health metrics") // + .hasSize(3) // + .containsAll(List.of( + // IRS dependencies overall health + createMeterId("health-irs-dependency-overall", Tags.empty()), + // health of each IRS dependency + createMeterId("health-irs-dependency", + Tags.of(new ImmutableTag("name", "first-dependency"))), + createMeterId("health-irs-dependency", + Tags.of(new ImmutableTag("name", "second-dependency"))) // + )); + } + + @NotNull + private Map simulateIrsDependencies() { + return createDummyIrsDependencies().stream().collect(toMap(IrsDependency::name, IrsDependency::url)); + } + + private static List createDummyIrsDependencies() { + return List.of( + // first dependency + new IrsDependency("first-dependency", "http://first-dependency.de"), + // second dependency + new IrsDependency("second-dependency", "http://second-dependency.de")); + } + + private static Meter.Id createMeterId(final String name, final Tags tags) { + return new Meter.Id(name, tags, null, null, Meter.Type.GAUGE); + } + +} diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfigurationTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfigurationTest.java new file mode 100644 index 0000000000..367977240a --- /dev/null +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthMetricsExportConfigurationTest.java @@ -0,0 +1,66 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +package org.eclipse.tractusx.irs.configuration; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.List; +import java.util.stream.Collectors; + +import io.micrometer.core.instrument.Meter; +import io.micrometer.core.instrument.MeterRegistry; +import io.micrometer.core.instrument.Tags; +import io.micrometer.core.instrument.simple.SimpleMeterRegistry; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.boot.actuate.health.HealthEndpoint; + +@ExtendWith(MockitoExtension.class) +class HealthMetricsExportConfigurationTest { + + private final MeterRegistry meterRegistry = new SimpleMeterRegistry(); + + @Mock + private HealthEndpoint healthEndpointMock; + + @Test + void shouldRegisterHealthMetricsWithPrometheus() { + + // ACT + new HealthMetricsExportConfiguration(meterRegistry, healthEndpointMock); + + // ASSERT + final List meterIds = meterRegistry.getMeters() + .stream() + .map(Meter::getId) + .collect(Collectors.toList()); + + assertThat(meterIds).describedAs("should have registered the IRS health metric") // + .hasSize(1) // + .contains(new Meter.Id("health-irs", Tags.empty(), null, null, Meter.Type.GAUGE)); + } + +} diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelperTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelperTest.java new file mode 100644 index 0000000000..2aab79b058 --- /dev/null +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/configuration/HealthStatusHelperTest.java @@ -0,0 +1,48 @@ +/******************************************************************************** + * Copyright (c) 2021,2022,2023 + * 2022: ZF Friedrichshafen AG + * 2022: ISTOS GmbH + * 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) + * 2022,2023: BOSCH AG + * Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +package org.eclipse.tractusx.irs.configuration; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.List; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.springframework.boot.actuate.health.Status; + +class HealthStatusHelperTest { + + public static List healthStatusToNumeric() { + return List.of(Arguments.of(Status.UP, 3), Arguments.of(Status.OUT_OF_SERVICE, 2), Arguments.of(Status.DOWN, 1), + Arguments.of(Status.UNKNOWN, 0), Arguments.of(null, 0)); + } + + @ParameterizedTest + @MethodSource + void healthStatusToNumeric(final Status status, final int numericStatus) { + assertThat(HealthStatusHelper.healthStatustoNumeric(status)).isEqualTo(numericStatus); + } +} diff --git a/irs-api/src/test/java/org/eclipse/tractusx/irs/ess/service/EdcRegistrationTest.java b/irs-api/src/test/java/org/eclipse/tractusx/irs/ess/service/EdcRegistrationTest.java index ee40262de7..4f9d19ca78 100644 --- a/irs-api/src/test/java/org/eclipse/tractusx/irs/ess/service/EdcRegistrationTest.java +++ b/irs-api/src/test/java/org/eclipse/tractusx/irs/ess/service/EdcRegistrationTest.java @@ -48,13 +48,17 @@ class EdcRegistrationTest { @Mock private RestTemplate restTemplate; private String edcUrl; - private String managementPath; + private String assetsPath; + private String policydefinitionsPath; + private String contractdefinitionsPath; @BeforeEach void setUp() { edcUrl = "http://localhost"; - managementPath = "/path"; - testee = new EdcRegistration(restTemplate, edcUrl, "", "", "", managementPath); + assetsPath = "/assets"; + policydefinitionsPath = "/policydefinitions"; + contractdefinitionsPath = "/contractdefinitions"; + testee = new EdcRegistration(restTemplate, edcUrl, "", "", "", assetsPath, policydefinitionsPath, contractdefinitionsPath); } @Test @@ -64,31 +68,31 @@ void shouldRegisterAssets_whenGetRequestReturnsNoResults() { testee.registerEdcAsset(); - verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + managementPath + "/assets/request"), + verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + assetsPath + "/request"), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + managementPath + "/assets"), + verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + assetsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + managementPath + "/policydefinitions"), + verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + policydefinitionsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + managementPath + "/contractdefinitions"), + verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + contractdefinitionsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); } @Test void shouldNotRegisterAssets_whenGetRequestReturnsResults() { - when(restTemplate.exchange(Mockito.eq(edcUrl + managementPath + "/assets/request"), + when(restTemplate.exchange(Mockito.eq(edcUrl + assetsPath + "/request"), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class))).thenReturn( ResponseEntity.ok().body("[{}]")); testee.registerEdcAsset(); - verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + managementPath + "/assets/request"), + verify(restTemplate, times(3)).exchange(Mockito.eq(edcUrl + assetsPath + "/request"), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + managementPath + "/assets"), + verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + assetsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + managementPath + "/policydefinitions"), + verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + policydefinitionsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); - verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + managementPath + "/contractdefinitions"), + verify(restTemplate, never()).exchange(Mockito.eq(edcUrl + contractdefinitionsPath), Mockito.eq(HttpMethod.POST), any(), Mockito.eq(String.class)); } diff --git a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitions.java b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitions.java index 3f6e2597f2..9bb8adf948 100644 --- a/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitions.java +++ b/irs-cucumber-tests/src/test/java/org/eclipse/tractusx/irs/cucumber/E2ETestStepDefinitions.java @@ -37,13 +37,13 @@ import java.util.Set; import java.util.UUID; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import io.cucumber.java.After; import io.cucumber.java.Before; +import io.cucumber.java.DataTableType; import io.cucumber.java.PendingException; import io.cucumber.java.Scenario; import io.cucumber.java.en.And; @@ -95,6 +95,11 @@ public void setup() { objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); } + @DataTableType + public PartChainIdentificationKey definePartChainIdentificationKey(Map entry) { + return new PartChainIdentificationKey(entry.get("globalAssetId"), entry.get("bpn")); + } + @Given("the IRS URL {string}") public void theIRSURL(String irsUrl) { authenticationPropertiesBuilder.uri(irsUrl); @@ -127,13 +132,9 @@ public void iRegisterAnIRSJobForGlobalAssetIdAndBpn(String globalAssetId, String registerJobBuilder.key(PartChainIdentificationKey.builder().globalAssetId(globalAssetId).bpn(bpn).build()); } - @Given("I register an IRS batch job for globalAssetIds:") - public void iRegisterAnIRSBatchForGlobalAssetIds(List globalAssetIds) { - registerBatchOrderBuilder.keys(globalAssetIds.stream() - .map(x -> PartChainIdentificationKey.builder() - .globalAssetId(x) - .build()) - .collect(Collectors.toSet())); + @Given("I register an IRS batch job for globalAssetIds and BPNs:") + public void iRegisterAnIRSBatchForGlobalAssetIdsAndBpns(List keys) { + registerBatchOrderBuilder.keys(Set.copyOf(keys)); } @Given("I register an IRS batch job for globalAssetIds and BPN:") diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcControlPlaneClient.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcControlPlaneClient.java index b6b3378973..236db963ea 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcControlPlaneClient.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/EdcControlPlaneClient.java @@ -111,7 +111,7 @@ private CatalogRequest buildCatalogRequest(final int offset, final String provid querySpec.limit(limit); } return CatalogRequest.Builder.newInstance() - .providerUrl(providerUrl) + .counterPartyAddress(providerUrl) .protocol(DATASPACE_PROTOCOL_HTTP) .querySpec(querySpec.build()) .build(); @@ -121,7 +121,7 @@ private CatalogRequest buildCatalogRequest(final int offset, final String provid final String value) { final QuerySpec querySpec = QuerySpec.Builder.newInstance().filter(new Criterion(key, "=", value)).build(); final var catalogRequest = CatalogRequest.Builder.newInstance() - .providerUrl(providerConnectorUrl) + .counterPartyAddress(providerConnectorUrl) .protocol(DATASPACE_PROTOCOL_HTTP) .querySpec(querySpec) .build(); diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformer.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformer.java index 32cc9d0967..b48ad6ea50 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformer.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformer.java @@ -35,33 +35,33 @@ import jakarta.json.JsonReader; import org.eclipse.edc.catalog.spi.Catalog; import org.eclipse.edc.catalog.spi.CatalogRequest; -import org.eclipse.edc.connector.core.transform.TransformerContextImpl; -import org.eclipse.edc.connector.core.transform.TypeTransformerRegistryImpl; +import org.eclipse.edc.core.transform.TransformerContextImpl; +import org.eclipse.edc.core.transform.TypeTransformerRegistryImpl; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromAssetTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromCatalogTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromCriterionTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromDataAddressTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromDataServiceTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromDatasetTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromDistributionTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromPolicyTransformer; +import org.eclipse.edc.core.transform.transformer.from.JsonObjectFromQuerySpecTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToActionTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToAssetTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToCatalogTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToConstraintTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToCriterionTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToDataServiceTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToDatasetTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToDistributionTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToDutyTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToOperatorTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToPermissionTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToPolicyTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToProhibitionTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonObjectToQuerySpecTransformer; +import org.eclipse.edc.core.transform.transformer.to.JsonValueToGenericTypeTransformer; import org.eclipse.edc.jsonld.TitaniumJsonLd; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromAssetTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromCatalogTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromCriterionTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDataServiceTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDatasetTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromDistributionTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromPolicyTransformer; -import org.eclipse.edc.jsonld.transformer.from.JsonObjectFromQuerySpecTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToActionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToAssetTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToCatalogTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToConstraintTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToCriterionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDataServiceTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDatasetTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDistributionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToDutyTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToOperatorTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToPermissionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToPolicyTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToProhibitionTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonObjectToQuerySpecTransformer; -import org.eclipse.edc.jsonld.transformer.to.JsonValueToGenericTypeTransformer; -import org.eclipse.edc.protocol.dsp.transferprocess.transformer.type.from.JsonObjectFromDataAddressTransformer; import org.eclipse.edc.spi.result.Result; import org.eclipse.edc.transform.spi.TypeTransformerRegistry; import org.eclipse.tractusx.irs.edc.client.model.ContractOfferDescription; @@ -84,7 +84,8 @@ public class EdcTransformer { private final TitaniumJsonLd titaniumJsonLd; private final TransformerContextImpl transformerContext; - public EdcTransformer(@Qualifier("jsonLdObjectMapper") final ObjectMapper objectMapper, final TitaniumJsonLd titaniumJsonLd) { + public EdcTransformer(@Qualifier("jsonLdObjectMapper") final ObjectMapper objectMapper, + final TitaniumJsonLd titaniumJsonLd) { this.titaniumJsonLd = titaniumJsonLd; final JsonBuilderFactory jsonBuilderFactory = Json.createBuilderFactory(Map.of()); diff --git a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/JsonObjectFromCatalogRequestTransformer.java b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/JsonObjectFromCatalogRequestTransformer.java index 0c3ee35ba7..357f72672b 100644 --- a/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/JsonObjectFromCatalogRequestTransformer.java +++ b/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/transformer/JsonObjectFromCatalogRequestTransformer.java @@ -50,11 +50,11 @@ public JsonObjectFromCatalogRequestTransformer(final JsonBuilderFactory jsonFact public @Nullable JsonObject transform(@NotNull final CatalogRequest dto, @NotNull final TransformerContext context) { final JsonObjectBuilder builder = this.jsonFactory.createObjectBuilder(); - builder.add(JsonLdKeywords.TYPE, CatalogRequest.EDC_CATALOG_REQUEST_TYPE) - .add(CatalogRequest.EDC_CATALOG_REQUEST_PROVIDER_URL, dto.getProviderUrl()) - .add(CatalogRequest.EDC_CATALOG_REQUEST_PROTOCOL, dto.getProtocol()); + builder.add(JsonLdKeywords.TYPE, CatalogRequest.CATALOG_REQUEST_TYPE) + .add(CatalogRequest.CATALOG_REQUEST_COUNTER_PARTY_ADDRESS, dto.getCounterPartyAddress()) + .add(CatalogRequest.CATALOG_REQUEST_PROTOCOL, dto.getProtocol()); Optional.ofNullable(dto.getQuerySpec()) - .ifPresent(s -> builder.add(CatalogRequest.EDC_CATALOG_REQUEST_QUERY_SPEC, + .ifPresent(s -> builder.add(CatalogRequest.CATALOG_REQUEST_QUERY_SPEC, context.transform(dto.getQuerySpec(), JsonObject.class))); return builder.build(); diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformerTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformerTest.java index ea10f4936c..6f95901fd8 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformerTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/transformer/EdcTransformerTest.java @@ -329,7 +329,7 @@ void shouldSerializeCatalogRequestToJsonObject() { final String providerConnector = "https://provider.edc/api/v1/dsp"; final String protocol = "dataspace-protocol-http"; final CatalogRequest catalogRequest = CatalogRequest.Builder.newInstance() - .providerUrl(providerConnector) + .counterPartyAddress(providerConnector) .protocol(protocol) .build(); final JsonObject requestJson = edcTransformer.transformCatalogRequestToJson(catalogRequest); diff --git a/local/demo/README.md b/local/demo/README.md new file mode 100644 index 0000000000..47ca7d7a34 --- /dev/null +++ b/local/demo/README.md @@ -0,0 +1,85 @@ +# ess-demo.py + +## Prerequisites + +- Python 3.10 or higher +- Requirements need to be installed + ```shell + pip install -r requirements.txt + ``` + +## Usage + +```shell +python ess-demo.py [ options ] +``` + +## Description + +This script showcases the IRS ESS top-down investigation use-case. + +The demo consists of four steps: + +1. Request all digital twins of the provided Digital Twin Registry for the requested company. +2. Filter these Twins for the lifecycle asPlanned and collect their BPN and globalAssetId +3. Start an ESS Batch investigation with these twins +4. Wait for completion and print the result of the investigation + +## Demo cases for IRS ESS INT environment + +### Case 1 (incident and no issues in tree) + +searchBPN: BPNL00ARBITRARY4 +incidentBPNS: BPNS00ARBITRARY6 + +### Case 2 (no incident and no issues in tree) + +searchBPN: BPNL00ARBITRARY4 +incidentBPNS: BPNS00ARBITRARY8 + +### Case 3 (incident and not resolvable path in tree) + +searchBPN: BPNL00ARBITRARY8 +incidentBPNS: BPNS0ARBITRARY10 + +### Case 4 (no incident and not resolvable path in tree) + +searchBPN: BPNL00ARBITRARY8 +incidentBPNS: BPNS0ARBITRARY12 + +## Example usage + +```shell +python ess-demo.py \ + --aas "https://registry.example/api/v3.0/shell-descriptors" \ + --ownBPN "BPNL0000000XYZ00" \ + --searchBPN "BPNL0000000XYZ11" \ + --incidentBPNS "BPNS0000000XYZ22" "BPNS0000000XYZ33" \ + --irs "https://irs.example" \ + --tokenurl "https://oauth2.example/auth/EXAMPLE/openid-connect/token" \ + --clientid "exampleuser" \ + --clientsecret "examplepass" +``` + +### Authentication + +IRS is secured by OAuth2. This requires the user of this demo script to provide the token URL of the OAuth2 provider which is used by the IRS as well as a valid clientId and clientSecret. + +For more information regarding IRS authentication, see: [Safety and security concepts](https://eclipse-tractusx.github.io/item-relationship-service/docs/arc42/full.html#_safety_and_security_concepts) + +## Parameters + +| Parameter | Example | Description | +|----------------|----------------------------------------------------------|--------------------------------------------------------------------| +| -h, --help | | show help message | +| --aas | https://registry.example/api/v3.0/shell-descriptors | AAS registry URL | +| --ownBPN | BPNL0000000XYZ00 | BPN of the requesting Company | +| --searchBPN | BPNL0000000XYZ11 | BPN of the Company to search for | +| --incidentBPNS | BPNS0000000XYZ22 BPNS0000000XYZ33 | List of BPNS of the Companies where the incidents occurred | +| --irs | https://irs.example | IRS base URL | +| --tokenurl | https://oauth2.example/auth/EXAMPLE/openid-connect/token | OAuth2 token URL | +| --clientid | exampleuser | Client ID | +| --clientsecret | examplepass | Client Secret | +| --batchsize | 10 | The batch size for a ESS investigation. Must be mod 10. Default 10 | +| --debug | | debug logging (optional) | + diff --git a/local/demo/ess-demo.py b/local/demo/ess-demo.py new file mode 100644 index 0000000000..0fbeebfb6c --- /dev/null +++ b/local/demo/ess-demo.py @@ -0,0 +1,353 @@ +# Copyright (c) 2021,2022,2023 +# 2022: ZF Friedrichshafen AG +# 2022: ISTOS GmbH +# 2022,2023: Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# 2022,2023: BOSCH AG +# Copyright (c) 2021,2022,2023 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +import argparse +import json +import logging +import sys +import time +from datetime import datetime +from types import SimpleNamespace + +import jwt +import requests +from colorlog import ColoredFormatter +from oauthlib.oauth2 import BackendApplicationClient +from requests.adapters import HTTPAdapter, Retry +from requests.auth import HTTPBasicAuth +from requests_oauthlib import OAuth2Session + + +def get_semantic_ids_from_twin(digital_twin_): + semantic_ids_ = [] + for submodel_descriptor in digital_twin_.submodelDescriptors: + keys = submodel_descriptor.semanticId.keys + for key in keys: + semantic_ids_.append(key.value) + return semantic_ids_ + + +def get_bpn_from_twin(digital_twin_): + bpn_ = None + for specific_asset_id in digital_twin_.specificAssetIds: + if "manufacturerId" == specific_asset_id.name: + bpn_ = specific_asset_id.value + return bpn_ + + +def fetch_all_registry_data(registry_url_, bpn_): + twins_ = [] + cursor = None + while True: + params = {'cursor': cursor} if cursor else None + registry_response = fetch_registry_data(registry_url_, bpn_, params) + + if not registry_response: + logger.info(f"No registry response: '{registry_response}'") + break + + result = registry_response.result + logger.debug(f"Adding {len(result)} twins to result list.") + twins_.extend(result) + + if hasattr(registry_response.paging_metadata, 'cursor'): + cursor = registry_response.paging_metadata.cursor + logger.debug(f"Setting cursor: '{cursor}'") + else: + logger.debug("No cursor found.") + break + logger.info(f"Found a {len(twins_)} twins in the DTR.") + return twins_ + + +def fetch_registry_data(registry_url_, bpn_, params_=None): + headers_ = {"Edc-Bpn": bpn_} + response_ = session.get(registry_url_, headers=headers_, params=params_) + if response_.status_code == 200: + registry_response = json.loads(response_.text, object_hook=lambda d: SimpleNamespace(**d)) + return registry_response + else: + logger.error(f"Failed to fetch registry data. Status code: {response_.status_code}") + sys.exit("Failed to fetch registry data.") + + +def filter_for_as_planned_and_bpn(search_bpn_): + filtered_twins_ = [] + for twin in digital_twins: + semantic_ids = get_semantic_ids_from_twin(twin) + if any("AsPlanned" in x for x in semantic_ids): + global_asset_id = twin.globalAssetId + bpn = get_bpn_from_twin(twin) + if bpn in search_bpn_: + x = { + "globalAssetId": global_asset_id, + "bpn": bpn + } + filtered_twins_.append(x) + return filtered_twins_ + + +def poll_batch_job(batch_url, token_): + header_ = create_header_with_token(token_) + while True: + try: + response_ = session.get(batch_url, headers=header_) + response_json = response_.json() + print_order(response_json) + + state = response_json.get("state") + if state in ("COMPLETED", "ERROR", "CANCELED"): + logger.info(f"ESS Batch Investigation completed in state '{state}'") + return response_json + + time.sleep(5) + except requests.exceptions.RequestException as e: + logger.error(f"Error: {e}") + sys.exit("Failed to poll ESS Batch Investigation.") + + +def create_header_with_token(token_): + header_ = { + "Content-Type": "application/json", + "Authorization": f"Bearer {get_or_refresh_oauth_token(token_url, client_id, client_secret, token_)}" + } + return header_ + + +def print_order(response_json): + fields_to_print = ["orderId", "state", "batches"] + fields_to_print_nested = ["batchId", "batchUrl", "batchProcessingState"] + selected_fields = {key: response_json[key] for key in fields_to_print if key in response_json} + if "batches" in response_json: + selected_fields["batches"] = [ + {nested_key: item[nested_key] for nested_key in fields_to_print_nested if nested_key in item} + for item in response_json["batches"] + ] + # Pretty print the selected fields + pretty_selected_fields = json.dumps(selected_fields, indent=4) + logger.info("Polling ESS Batch. Status: " + pretty_selected_fields) + + +def get_oauth_token(token_url_, client_id_, client_secret_): + client = BackendApplicationClient(client_id=client_id_) + oauth_ = OAuth2Session(client=client) + token_ = oauth_.fetch_token(token_url=token_url_, auth=HTTPBasicAuth(client_id_, client_secret_))["access_token"] + return token_ + + +def get_or_refresh_oauth_token(token_url_, client_id_, client_secret_, token_: None): + global token + if token_ is None: + token = get_oauth_token(token_url_, client_id_, client_secret_) + else: + decoded_token = jwt.decode(token_, options={"verify_signature": False}) + exp_timestamp = datetime.fromtimestamp(decoded_token["exp"]) + current_timestamp = datetime.now() + if exp_timestamp < current_timestamp: + logger.info("Token expired. Requesting new.") + token = get_oauth_token(token_url_, client_id_, client_secret_) + else: + token = token_ + return token + + +def start_ess_investigation(irs_ess_url_, incident_bpns_, filtered_twins_, batch_size_, token_): + payload_ = { + "batchSize": batch_size_, + "batchStrategy": "PRESERVE_BATCH_JOB_ORDER", + "incidentBPNSs": incident_bpns_, + "keys": filtered_twins_ + } + headers_ = create_header_with_token(token_) + logger.info(f"Starting ESS batch investigation with \n{json.dumps(payload_, indent=4)}") + response_ = session.post(url=irs_ess_url_, json=payload_, headers=headers_) + + if response_.status_code != 201: + logger.error(f"Failed to start ESS Batch Investigation. Status code: {response_.status_code}") + logger.info(response_.text) + sys.exit("Failed to start ESS Batch Investigation.") + else: + batch_id_ = response_.json().get("id") + logger.info(f"Started ESS Batch Investigation with id {batch_id_}") + return batch_id_ + + +def get_jobs_for_batch(url_, token_): + headers_ = create_header_with_token(token_) + response_ = session.get(url_, headers=headers_) + return response_.json().get("jobs") + + +def get_job_for_id(url_, token_): + headers_ = create_header_with_token(token_) + response_ = session.get(url_, headers=headers_) + + return response_.json() + + +def prepare_arguments(): + parser = argparse.ArgumentParser(description="Script to demonstrate the ESS Batch Investigation flow.", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument("--aas", type=str, help="AAS registry URL", required=True) + parser.add_argument("--ownBPN", type=str, help="BPN of the requesting Company", required=True) + parser.add_argument("--searchBPN", type=str, help="BPN of the Company to search for", required=True) + parser.add_argument("--incidentBPNS", type=str, nargs="*", + help="List of BPNS of the Companies where the incidents occurred", required=True) + parser.add_argument("--irs", type=str, help="IRS base URL", required=True) + parser.add_argument("--tokenurl", type=str, help="OAuth2 token URL", required=True) + parser.add_argument("--clientid", type=str, help="Client ID", required=True) + parser.add_argument("--clientsecret", type=str, help="Client Secret", required=True) + parser.add_argument("--debug", help="debug logging", action='store_true', required=False) + parser.add_argument("--batchsize", help="Batch size for ESS Investigation", type=int, default=10, required=False) + return parser.parse_args() + + +def wait_for_job_completion(job_ids_): + while True: + states = [] + logger.info("------------------------------") + for job_id_ in job_ids_: + job_ = get_job_for_id(f"{irs_ess_url}/{job_id_}", token) + job_state = job_.get("job").get("state") + logger.info(f"Job {job_id_} is in state {job_state}") + states.append(job_state) + + if all(state == "COMPLETED" for state in states): + break + + time.sleep(5) + + +def get_job_ids_from_batch(batches): + job_ids_ = [] + for batch in batches: + url = batch.get("batchUrl") + jobs_ = get_jobs_for_batch(url, token) + for job_ in jobs_: + job_id_ = job_.get("id") + job_ids_.append(job_id_) + logger.debug(f"Adding jobId {job_id_}") + return job_ids_ + + +def get_and_print_investigation_result(job_ids_): + logger.info("-------------------------------------------------------------------------------") + logger.info("Investigation completed.") + for job_id in job_ids_: + logger.info("------------------------------") + job = get_job_for_id(f"{irs_ess_url}/{job_id}", token) + for submodel in job.get("submodels"): + submodel_payload = submodel.get('payload') + impacted = submodel_payload.get("supplyChainImpacted") + impacted_suppliers = submodel_payload.get("impactedSuppliersOnFirstTier") + logger.info(f"Investigation result for Job {job_id} resulted in {impacted}.") + if impacted_suppliers: + logger.info(f"Impacted Suppliers on first level: {impacted_suppliers}.") + logger.info("-------------------------------------------------------------------------------") + + +def configure_logger(is_debug_): + logging_level = logging.INFO + if is_debug_: + logging_level = logging.DEBUG + logger_ = logging.getLogger(__name__) + logger_.setLevel(logging_level) + formatter = ColoredFormatter( + "%(white)s%(asctime)s %(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s", + datefmt="%H:%M:%S", + reset=True, + log_colors={ + 'DEBUG': 'cyan', + 'INFO': 'green', + 'WARNING': 'yellow', + 'ERROR': 'red', + 'CRITICAL': 'red,bg_white', + }, + secondary_log_colors={}, + style='%' + ) + sh = logging.StreamHandler() + sh.setFormatter(formatter) + logger_.addHandler(sh) + return logger_ + + +def wait_for_user_input(): + prompt = "Press ENTER to continue..." + time.sleep(0.1) + input(prompt) + + +if __name__ == "__main__": + config = prepare_arguments() + registry_url = config.aas + own_BPN = config.ownBPN + search_BPN = config.searchBPN + incident_BPNSs = config.incidentBPNS + irs_base_url = config.irs + token_url = config.tokenurl + client_id = config.clientid + client_secret = config.clientsecret + is_debug = config.debug + batch_size = config.batchsize + + irs_ess_url = f"{irs_base_url}/ess/bpn/investigations" + irs_ess_batch_url = f"{irs_base_url}/irs/ess/orders" + irs_batch_url = f"{irs_base_url}/irs/orders" + + logger = configure_logger(is_debug) + + retries = Retry(total=3, + backoff_factor=0.1) + session = requests.Session() + session.mount('https://', HTTPAdapter(max_retries=retries)) + + # Fetch all digital Twins from the DTR + digital_twins = fetch_all_registry_data(registry_url, own_BPN) + + wait_for_user_input() + + # Filter for bomLifecycle "asPlanned" and the provided BPN + filtered_twins = filter_for_as_planned_and_bpn(search_BPN) + logger.info(f"Found {len(filtered_twins)} twin(s) after filtering for lifecycle AsPlanned.") + logger.info(json.dumps(filtered_twins, indent=4)) + + wait_for_user_input() + + # Authenticate + token = get_oauth_token(token_url, client_id, client_secret) + + # Start ESS batch investigation + batch_id = start_ess_investigation(irs_ess_batch_url, incident_BPNSs, filtered_twins, batch_size, token) + + wait_for_user_input() + + # Poll batch until it is completed + completed_batch = poll_batch_job(f"{irs_batch_url}/{batch_id}", token) + job_ids = get_job_ids_from_batch(completed_batch.get("batches")) + + # TODO remove this step, once ESS Batch states works properly + wait_for_job_completion(job_ids) + + wait_for_user_input() + + # Get the ESS investigation result for all jobs of the batch and pretty print the result + get_and_print_investigation_result(job_ids) diff --git a/local/demo/requirements.txt b/local/demo/requirements.txt new file mode 100644 index 0000000000..5187afb459 --- /dev/null +++ b/local/demo/requirements.txt @@ -0,0 +1,5 @@ +requests~=2.27.1 +requests_oauthlib~=1.3.1 +oauthlib~=3.2.2 +PyJWT~=2.6.0 +colorlog~=6.7.0 \ No newline at end of file diff --git a/local/deployment/full-irs/README.md b/local/deployment/full-irs/README.md index 39bf7ffdc7..79d1df95f0 100644 --- a/local/deployment/full-irs/README.md +++ b/local/deployment/full-irs/README.md @@ -1,5 +1,7 @@ # Item Relationship Service +> **Please note that this demo is currently based on IRS version 2.4.0.** + ## Deployment of the IRS with all dependencies ### Step 1: Prerequisites @@ -25,6 +27,12 @@ Check out the project [Item Relationship Service](https://github.com/eclipse-tractusx/item-relationship-service) or download a [released version](https://github.com/eclipse-tractusx/item-relationship-service/releases) of the Item Relationship Service +> 👉 **Please use [tag 2.6.0](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/2.6.0) instead +of the latest version currently (this is the version compatible with IRS 2.4.0).** +> +> ```git clone -b 2.6.0 https://github.com/catenax-ng/tx-item-relationship-service``` + + ### Step 3: Installing the services #### 1. Start the cluster diff --git a/local/deployment/full-irs/values-dev.yaml b/local/deployment/full-irs/values-dev.yaml index 79e4bd5c11..baede85773 100644 --- a/local/deployment/full-irs/values-dev.yaml +++ b/local/deployment/full-irs/values-dev.yaml @@ -708,4 +708,4 @@ discovery: - *discovery-host secretName: tls-secret wiremock: - host: *discovery-host \ No newline at end of file + host: *discovery-host diff --git a/local/deployment/full-irs/values.yaml b/local/deployment/full-irs/values.yaml index d03f02c06a..e18558a24a 100644 --- a/local/deployment/full-irs/values.yaml +++ b/local/deployment/full-irs/values.yaml @@ -663,4 +663,4 @@ discovery: ingress: enabled: false wiremock: - host: *discovery-host \ No newline at end of file + host: *discovery-host diff --git a/local/testing/api-tests/irs-api-tests.tavern.yaml b/local/testing/api-tests/irs-api-tests.tavern.yaml index d7e7a3f840..f78c7ebebb 100644 --- a/local/testing/api-tests/irs-api-tests.tavern.yaml +++ b/local/testing/api-tests/irs-api-tests.tavern.yaml @@ -631,7 +631,7 @@ stages: - function: local.testing.api-tests.tavern_helpers:ESS_job_parameter_are_as_requested - function: local.testing.api-tests.tavern_helpers:supplyChainFirstLevelBpn_is_as_expected extra_kwargs: - expectedBpnl: BPNS00000003B6LU + expectedBpnl: BPNL00000003B6LU headers: content-type: application/json @@ -1035,7 +1035,7 @@ stages: $ext: function: local.testing.api-tests.tavern_helpers:create_bearer_token response: - status_code: 200 + status_code: 206 headers: content-type: application/json @@ -2516,7 +2516,7 @@ stages: $ext: function: local.testing.api-tests.tavern_helpers:create_bearer_token response: - status_code: 200 + status_code: 206 verify_response_with: - function: local.testing.api-tests.tavern_helpers:job_parameter_are_as_requested headers: diff --git a/local/testing/api-tests/tavern_helpers.py b/local/testing/api-tests/tavern_helpers.py index 19729bc7c9..fd0ef5ec75 100644 --- a/local/testing/api-tests/tavern_helpers.py +++ b/local/testing/api-tests/tavern_helpers.py @@ -16,21 +16,15 @@ def supplyChainImpacted_is_as_expected(response, expectedSupplyChainImpacted): def supplyChainFirstLevelBpn_is_as_expected(response, expectedBpnl): - bpnl = response.json().get("submodels").get("payload").get("impactedSuppliersOnFirstTier").get("bpnl") - assert expectedBpnl == bpnl - # for i in submodels: - # impactedSuppliersOnFirstTier = i.get("payload").get("impactedSuppliersOnFirstTier") - # for ii in impactedSuppliersOnFirstTier: - # assert expectedBpnl in ii.get('bpnl') + submodels = response.json().get("submodels") + for i in submodels: + assert expectedBpnl in i.get("payload").get("impactedSuppliersOnFirstTier").get("bpnl") def supplyChainhops_is_as_expected(response, expectedHops): - hops = response.json().get("submodels").get("payload").get("impactedSuppliersOnFirstTier").get("hops") - assert expectedHops == hops - # for i in submodels: - # impactedSuppliersOnFirstTier = i.get("payload").get("impactedSuppliersOnFirstTier") - # for ii in impactedSuppliersOnFirstTier: - # assert ii.get('hops') == expectedHops + submodels = response.json().get("submodels") + for i in submodels: + assert expectedHops is i.get("payload").get("impactedSuppliersOnFirstTier").get("hops") def errors_for_invalid_investigation_request_are_correct(response): @@ -47,6 +41,7 @@ def relationships_for_BPN_investigations_contains_several_childs(response): print("Länge: ", len(relationships)) assert len(relationships) != 0 + def ESS_job_parameter_are_as_requested(response): print("Check if ESS-job parameter are as requested:") parameter = response.json().get('job').get('parameter') @@ -61,6 +56,7 @@ def ESS_job_parameter_are_as_requested(response): assert 'PartSiteInformationAsPlanned' in aspects_list assert 'PartAsPlanned' in aspects_list + def tombstone_for_EssValidation_are_correct(response, expectedTombstone): error_list = response.json().get("tombstones") diff --git a/local/testing/testdata/ESS_Testdata_v2.0.0-AsPlanned.json b/local/testing/testdata/ESS_Testdata_v2.0.0-AsPlanned.json index cd10c257bc..a68de610f5 100644 --- a/local/testing/testdata/ESS_Testdata_v2.0.0-AsPlanned.json +++ b/local/testing/testdata/ESS_Testdata_v2.0.0-AsPlanned.json @@ -13,7 +13,7 @@ "odrl:action": "USE", "odrl:constraint": { "@type": "AtomicConstraint", - "odrl:or": [ + "odrl:and": [ { "@type": "Constraint", "odrl:leftOperand": "PURPOSE", @@ -21,6 +21,14 @@ "@id": "odrl:eq" }, "odrl:rightOperand": "ID 3.0 Trace" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "Membership", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "active" } ] } @@ -532,7 +540,7 @@ "partTypeInformation": { "manufacturerPartId": "ZX-55", "classification": "product", - "nameAtManufacturer": "Vehicle Model A" + "nameAtManufacturer": "Vehicle Model C" } } ], @@ -1114,6 +1122,478 @@ "childItems": [] } ] + }, + { + "catenaXId": "urn:uuid:e1bc2e62-165e-4f37-9d06-214476d5547f", + "bpnl": "BPNL00ARBITRARY8", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2013-09-21T23:24:07.000Z", + "validTo": "2026-11-22T17:35:54.000Z" + }, + "catenaXId": "urn:uuid:e1bc2e62-165e-4f37-9d06-214476d5547f", + "partTypeInformation": { + "manufacturerPartId": "FJ-87", + "classification": "product", + "nameAtManufacturer": "Vehicle Model D 2" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:e1bc2e62-165e-4f37-9d06-214476d5547f", + "sites": [ + { + "functionValidUntil": "2025-03-23T05:10:13.000Z", + "function": "production", + "functionValidFrom": "2018-12-09T05:11:28.000Z", + "catenaXSiteId": "BPNS00ARBITRARY8" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:e1bc2e62-165e-4f37-9d06-214476d5547f", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00000004FAIL", + "catenaXId": "urn:uuid:9846f1c6-0dd0-4d5a-9c7a-30af0b7e0247" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY10", + "catenaXId": "urn:uuid:22847bfd-eb8d-41b7-b088-3a548b7541a8" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:642702fc-0987-4fd6-b29c-4b623a005c32", + "bpnl": "BPNL00ARBITRARY8", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2013-09-21T23:24:07.000Z", + "validTo": "2026-11-22T17:35:54.000Z" + }, + "catenaXId": "urn:uuid:642702fc-0987-4fd6-b29c-4b623a005c32", + "partTypeInformation": { + "manufacturerPartId": "FJ-87", + "classification": "product", + "nameAtManufacturer": "Vehicle Model D 3" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:642702fc-0987-4fd6-b29c-4b623a005c32", + "sites": [ + { + "functionValidUntil": "2025-03-23T05:10:13.000Z", + "function": "production", + "functionValidFrom": "2018-12-09T05:11:28.000Z", + "catenaXSiteId": "BPNS00ARBITRARY8" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:642702fc-0987-4fd6-b29c-4b623a005c32", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00000004FAIL", + "catenaXId": "urn:uuid:9846f1c6-0dd0-4d5a-9c7a-30af0b7e0247" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY10", + "catenaXId": "urn:uuid:22847bfd-eb8d-41b7-b088-3a548b7541a8" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:5f968e65-97fc-4156-a168-5dfbec8de76c", + "bpnl": "BPNL00ARBITRARY8", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2013-09-21T23:24:07.000Z", + "validTo": "2026-11-22T17:35:54.000Z" + }, + "catenaXId": "urn:uuid:5f968e65-97fc-4156-a168-5dfbec8de76c", + "partTypeInformation": { + "manufacturerPartId": "FJ-87", + "classification": "product", + "nameAtManufacturer": "Vehicle Model D 4" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:5f968e65-97fc-4156-a168-5dfbec8de76c", + "sites": [ + { + "functionValidUntil": "2025-03-23T05:10:13.000Z", + "function": "production", + "functionValidFrom": "2018-12-09T05:11:28.000Z", + "catenaXSiteId": "BPNS00ARBITRARY8" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:5f968e65-97fc-4156-a168-5dfbec8de76c", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00000004FAIL", + "catenaXId": "urn:uuid:9846f1c6-0dd0-4d5a-9c7a-30af0b7e0247" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY10", + "catenaXId": "urn:uuid:22847bfd-eb8d-41b7-b088-3a548b7541a8" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:c8a7b53a-53f1-4c10-9a7f-864188ca1bdd", + "bpnl": "BPNL00ARBITRARY8", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2013-09-21T23:24:07.000Z", + "validTo": "2026-11-22T17:35:54.000Z" + }, + "catenaXId": "urn:uuid:c8a7b53a-53f1-4c10-9a7f-864188ca1bdd", + "partTypeInformation": { + "manufacturerPartId": "FJ-87", + "classification": "product", + "nameAtManufacturer": "Vehicle Model D 5" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:c8a7b53a-53f1-4c10-9a7f-864188ca1bdd", + "sites": [ + { + "functionValidUntil": "2025-03-23T05:10:13.000Z", + "function": "production", + "functionValidFrom": "2018-12-09T05:11:28.000Z", + "catenaXSiteId": "BPNS00ARBITRARY8" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:c8a7b53a-53f1-4c10-9a7f-864188ca1bdd", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00000004FAIL", + "catenaXId": "urn:uuid:9846f1c6-0dd0-4d5a-9c7a-30af0b7e0247" + }, + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY10", + "catenaXId": "urn:uuid:22847bfd-eb8d-41b7-b088-3a548b7541a8" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:4af880f1-cf60-4f30-8338-e9901e1c3050", + "bpnl": "BPNL00ARBITRARY4", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2019-04-04T03:19:03.000Z", + "validTo": "2024-12-29T10:25:12.000Z" + }, + "catenaXId": "urn:uuid:4af880f1-cf60-4f30-8338-e9901e1c3050", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model C 2" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:4af880f1-cf60-4f30-8338-e9901e1c3050", + "sites": [ + { + "functionValidUntil": "2025-02-08T04:30:48.000Z", + "function": "production", + "functionValidFrom": "2019-08-21T02:10:36.000Z", + "catenaXSiteId": "BPNS00ARBITRARY4" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:4af880f1-cf60-4f30-8338-e9901e1c3050", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY5", + "catenaXId": "urn:uuid:2190e4b8-63ee-411d-bf57-6cdc495bc1df" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:c8c3e7af-c348-42ad-bc75-f83024d9c44c", + "bpnl": "BPNL00ARBITRARY4", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2019-04-04T03:19:03.000Z", + "validTo": "2024-12-29T10:25:12.000Z" + }, + "catenaXId": "urn:uuid:c8c3e7af-c348-42ad-bc75-f83024d9c44c", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model C 3" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:c8c3e7af-c348-42ad-bc75-f83024d9c44c", + "sites": [ + { + "functionValidUntil": "2025-02-08T04:30:48.000Z", + "function": "production", + "functionValidFrom": "2019-08-21T02:10:36.000Z", + "catenaXSiteId": "BPNS00ARBITRARY4" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:c8c3e7af-c348-42ad-bc75-f83024d9c44c", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY5", + "catenaXId": "urn:uuid:2190e4b8-63ee-411d-bf57-6cdc495bc1df" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:23565927-339d-48d0-be66-fb031fc21082", + "bpnl": "BPNL00ARBITRARY4", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2019-04-04T03:19:03.000Z", + "validTo": "2024-12-29T10:25:12.000Z" + }, + "catenaXId": "urn:uuid:23565927-339d-48d0-be66-fb031fc21082", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model C 4" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:23565927-339d-48d0-be66-fb031fc21082", + "sites": [ + { + "functionValidUntil": "2025-02-08T04:30:48.000Z", + "function": "production", + "functionValidFrom": "2019-08-21T02:10:36.000Z", + "catenaXSiteId": "BPNS00ARBITRARY4" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:23565927-339d-48d0-be66-fb031fc21082", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY5", + "catenaXId": "urn:uuid:2190e4b8-63ee-411d-bf57-6cdc495bc1df" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:8c325e8d-1340-427a-a622-5eddc017ae2b", + "bpnl": "BPNL00ARBITRARY4", + "urn:bamm:io.catenax.part_as_planned:1.0.1#PartAsPlanned": [ + { + "validityPeriod": { + "validFrom": "2019-04-04T03:19:03.000Z", + "validTo": "2024-12-29T10:25:12.000Z" + }, + "catenaXId": "urn:uuid:8c325e8d-1340-427a-a622-5eddc017ae2b", + "partTypeInformation": { + "manufacturerPartId": "ZX-55", + "classification": "product", + "nameAtManufacturer": "Vehicle Model C 5" + } + } + ], + "urn:bamm:io.catenax.part_site_information_as_planned:1.0.0#PartSiteInformationAsPlanned": [ + { + "catenaXId": "urn:uuid:8c325e8d-1340-427a-a622-5eddc017ae2b", + "sites": [ + { + "functionValidUntil": "2025-02-08T04:30:48.000Z", + "function": "production", + "functionValidFrom": "2019-08-21T02:10:36.000Z", + "catenaXSiteId": "BPNS00ARBITRARY4" + } + ] + } + ], + "urn:bamm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:8c325e8d-1340-427a-a622-5eddc017ae2b", + "childItems": [ + { + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "quantityNumber": 1, + "measurementUnit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "businessPartner": "BPNL00ARBITRARY5", + "catenaXId": "urn:uuid:2190e4b8-63ee-411d-bf57-6cdc495bc1df" + } + ] + } + ] } ] } \ No newline at end of file diff --git a/pom.xml b/pom.xml index d52a2dc84e..94fe3611df 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ 1.5.0-SNAPSHOT - 3.1.5 + 3.1.6 2.2.0 1.11.4 1.9.0 @@ -91,7 +91,7 @@ 2.0 1.7 2.2.16 - 0.1.3 + 0.2.1 3.5.0 1.76 3.2.0