Skip to content

Commit

Permalink
Merge pull request #485 from catenax-ng/main
Browse files Browse the repository at this point in the history
feature: improve request to EDC; improve IRS jobs; release irs-registry-client
  • Loading branch information
ds-jhartmann authored Mar 15, 2024
2 parents 65a4233 + f5f38b0 commit 3199806
Show file tree
Hide file tree
Showing 43 changed files with 722 additions and 834 deletions.
4 changes: 3 additions & 1 deletion .config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ page at http://checkstyle.sourceforge.net/config.html -->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>

<module name="MagicNumber"/>
<module name="MagicNumber">
<property name="ignoreNumbers" value="-1, 0, 1, 2, 3"/>
</module>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ _**For better traceability add the corresponding GitHub issue number in each cha

- EdcPolicyDefinitionService, EdcContractDefinitionService and EdcAssetService return throw AlreadyExist exceptions when Conflict is returned from EDC
- Added AssetAdministrationShellDescriptor specificAssetIds support for externalSubjectId required for data provisioning

- Registering a job - aspects array is now accepting full urn of aspect model instead of name only, eg. 'urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt' instead 'SingleLevelBomAsBuilt'. #439
- Changed the version of irs-registry-client from 1.6.0-SNAPSHOT to 1.6.0

## [4.7.0] - 2024-03-04
### Added
Expand Down Expand Up @@ -257,7 +258,9 @@ _**For better traceability add the corresponding GitHub issue number in each cha
- Introduced new IRS role `admin_irs` which has unrestricted access to every API endpoint

### Changed
- Adjusted API access control. Users with role `view_irs` can only access jobs they created themselves. PolicyStore API access is restricted to role `admin_irs`.

- Adjusted API access control. Users with role `view_irs` can only access jobs they created themselves. Policy Store API
access is restricted to role `admin_irs`.

### Fixed
- Fixed bug where BPN's were delivered without 'manufacturerName' property filled
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ If you need ideas for contributions, you can check the following links:
- [open documentation stories](https://github.com/orgs/eclipse-tractusx/projects/8/views/4?filterQuery=label%3Adocumentation++status%3Ainbox%2Cbacklog)
- [discussion page concerning documentation improvements](https://github.com/eclipse-tractusx/item-relationship-service/discussions/407)

### Maintaining [CHANGELOG.md](CHANGELOG.md)
All notable changes to this project will be documented in this file.

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).

_**For better traceability add the corresponding GitHub issue number in each changelog entry, please.**_

## Contributing as a Consultant

Expand Down
23 changes: 11 additions & 12 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ maven/mavencentral/com.typesafe.akka/akka-slf4j_2.13/2.6.20, Apache-2.0, approve
maven/mavencentral/com.typesafe.scala-logging/scala-logging_2.13/3.9.5, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.typesafe/config/1.4.2, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.vaadin.external.google/android-json/0.0.20131108.vaadin1, Apache-2.0, approved, CQ21310
maven/mavencentral/com.vdurmont/semver4j/3.1.0, MIT, approved, clearlydefined
maven/mavencentral/commons-beanutils/commons-beanutils/1.9.4, Apache-2.0, approved, CQ12654
maven/mavencentral/commons-codec/commons-codec/1.15, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ22641
maven/mavencentral/commons-collections/commons-collections/3.2.2, Apache-2.0, approved, CQ10385
Expand Down Expand Up @@ -175,11 +176,11 @@ maven/mavencentral/io.swagger.core.v3/swagger-core-jakarta/2.2.15, Apache-2.0, a
maven/mavencentral/io.swagger.core.v3/swagger-models-jakarta/2.2.15, Apache-2.0, approved, #5919
maven/mavencentral/jakarta.activation/jakarta.activation-api/2.1.2, EPL-2.0 OR BSD-3-Clause OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jaf
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.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.inject/jakarta.inject-api/2.0.1, Apache-2.0, approved, ee4j.cdi
maven/mavencentral/jakarta.json/jakarta.json-api/2.1.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp
maven/mavencentral/jakarta.json/jakarta.json-api/2.1.3, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jsonp
maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jta
maven/mavencentral/jakarta.transaction/jakarta.transaction-api/2.0.1, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.jta
maven/mavencentral/jakarta.validation/jakarta.validation-api/3.0.2, Apache-2.0, approved, ee4j.validation
maven/mavencentral/jakarta.ws.rs/jakarta.ws.rs-api/3.1.0, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.rest
maven/mavencentral/jakarta.xml.bind/jakarta.xml.bind-api/4.0.1, BSD-3-Clause, approved, ee4j.jaxb
Expand Down Expand Up @@ -323,12 +324,12 @@ maven/mavencentral/org.eclipse.jetty/jetty-webapp/11.0.20, EPL-2.0 OR Apache-2.0
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.20, 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/1.6.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-edc-client/1.6.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-models/1.6.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-common/1.6.0, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-edc-client/1.6.0, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-models/1.6.0, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-policy-store/0.0.2-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.6.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-testing/1.6.0-SNAPSHOT, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-registry-client/1.6.0, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.eclipse.tractusx.irs/irs-testing/1.6.0, Apache-2.0, approved, automotive.tractusx
maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
maven/mavencentral/org.glassfish.hk2.external/aopalliance-repackaged/3.0.5, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
maven/mavencentral/org.glassfish.hk2/hk2-api/3.0.4, EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0, approved, ee4j.glassfish
Expand Down Expand Up @@ -436,7 +437,6 @@ maven/mavencentral/org.springframework.boot/spring-boot-starter-json/3.1.9, Apac
maven/mavencentral/org.springframework.boot/spring-boot-starter-log4j2/3.1.9, Apache-2.0, approved, #8800
maven/mavencentral/org.springframework.boot/spring-boot-starter-logging/3.1.9, Apache-2.0, approved, #9343
maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-client/3.1.9, Apache-2.0, approved, #8806
maven/mavencentral/org.springframework.boot/spring-boot-starter-oauth2-resource-server/3.1.9, Apache-2.0, approved, #8804
maven/mavencentral/org.springframework.boot/spring-boot-starter-security/3.1.9, Apache-2.0, approved, #9337
maven/mavencentral/org.springframework.boot/spring-boot-starter-test/3.1.9, Apache-2.0, approved, #9353
maven/mavencentral/org.springframework.boot/spring-boot-starter-tomcat/3.1.9, Apache-2.0, approved, #9351
Expand All @@ -453,7 +453,6 @@ maven/mavencentral/org.springframework.security/spring-security-crypto/6.1.7, Ap
maven/mavencentral/org.springframework.security/spring-security-oauth2-client/6.1.7, Apache-2.0, approved, #9740
maven/mavencentral/org.springframework.security/spring-security-oauth2-core/6.1.7, Apache-2.0, approved, #9741
maven/mavencentral/org.springframework.security/spring-security-oauth2-jose/6.1.7, Apache-2.0, approved, #9345
maven/mavencentral/org.springframework.security/spring-security-oauth2-resource-server/6.1.7, Apache-2.0, approved, #8798
maven/mavencentral/org.springframework.security/spring-security-test/6.1.7, Apache-2.0, approved, #10674
maven/mavencentral/org.springframework.security/spring-security-web/6.1.7, Apache-2.0, approved, #9800
maven/mavencentral/org.springframework/spring-aop/6.0.17, Apache-2.0, approved, #5940
Expand Down
60 changes: 37 additions & 23 deletions docs/src/api/irs-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ info:
description: The API of the Item Relationship Service (IRS) for retrieving item
graphs along the value chain of CATENA-X partners.
title: IRS API
version: "4.7.0"
version: 4.7.0
servers:
- url: http://localhost:8080
security:
Expand Down Expand Up @@ -994,8 +994,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1045,8 +1045,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1127,7 +1127,7 @@ components:
semanticId:
keys:
- type: Submodel
value: urn:bamm:com.catenax.vehicle:0.1.1#PartDetails
value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails
type: ModelReference
submodels:
- aspectType: supply_chain_impacted
Expand Down Expand Up @@ -1171,8 +1171,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1250,10 +1250,10 @@ components:
semanticId:
keys:
- type: Submodel
value: urn:bamm:com.catenax.vehicle:0.1.1#PartDetails
value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails
type: ModelReference
submodels:
- aspectType: urn:bamm:io.catenax.single_level_bom_as_built:1.0.0
- aspectType: urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462
identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff
payload:
Expand Down Expand Up @@ -1325,8 +1325,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1363,8 +1363,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand Down Expand Up @@ -1441,9 +1441,9 @@ components:
type: ModelReference
keys:
- type: Submodel
value: urn:bamm:com.catenax.vehicle:0.1.1#PartDetails
value: urn:bamm:io.catenax.vehicle:0.1.1#PartDetails
submodels:
- aspectType: urn:bamm:io.catenax.single_level_bom_as_built:1.0.0
- aspectType: urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
contractAgreementId: f253718e-a270-4367-901b-9d50d9bd8462
identification: urn:uuid:fc784d2a-5506-4e61-8e34-21600f8cdeff
payload:
Expand Down Expand Up @@ -1481,8 +1481,8 @@ components:
lastModifiedOn: 2022-02-03T14:48:54.709Z
parameter:
aspects:
- SerialPart
- AddressAspect
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
- urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
auditContractNegotiation: false
bomLifecycle: asBuilt
collectAspects: false
Expand All @@ -1503,16 +1503,16 @@ components:
value:
lastUpdated: 2023-02-13T08:18:11.990659500Z
models:
- urn: urn:bamm:io.catenax.single_level_bom_as_built:1.0.0#SingleLevelBomAsBuilt
- urn: urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
name: SingleLevelBomAsBuilt
status: RELEASED
type: BAMM
version: 1.0.0
- urn: urn:bamm:io.catenax.serial_part:1.0.0#SerialPart
version: 2.0.0
- urn: urn:bamm:io.catenax.serial_part:1.0.1#SerialPart
name: SerialPart
status: RELEASED
type: BAMM
version: 1.0.0
version: 1.0.1
schemas:
AdministrativeInformation:
type: object
Expand Down Expand Up @@ -2367,9 +2367,15 @@ components:
properties:
aspects:
type: array
description: List of aspect names that will be collected if \<collectAspects\>
flag is set to true.
example:
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
items:
type: string
pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$
maxItems: 2147483647
pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$
batchSize:
type: integer
format: int32
Expand Down Expand Up @@ -2511,14 +2517,14 @@ components:
description: The requested job definition.
properties:
bomLifecycle:
example: asPlanned
type: string
description: The lifecycle context in which the child part was assembled
into the parent part.
enum:
- asBuilt
- asPlanned
- asSpecified
example: asPlanned
callbackUrl:
type: string
description: "Callback url to notify requestor when job processing is finished.\
Expand All @@ -2529,10 +2535,14 @@ components:
$ref: '#/components/schemas/PartChainIdentificationKey'
incidentBPNSs:
type: array
description: Array of BPNS numbers.
example:
- BPNS000000000DDD
items:
type: string
pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"
maxItems: 2147483647
pattern: "(BPN)[LSA][\\w\\d]{10}[\\w\\d]{2}"
required:
- incidentBPNSs
- key
Expand All @@ -2545,9 +2555,13 @@ components:
type: array
description: List of aspect names that will be collected if \<collectAspects\>
flag is set to true.
example:
- urn:bamm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt
items:
type: string
pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$
maxItems: 2147483647
pattern: ^(urn:[bs]amm:.*\d\.\d\.\d)?(#)?(\w+)?$
auditContractNegotiation:
type: boolean
description: Flag enables and disables auditing, including provisioning
Expand Down
2 changes: 1 addition & 1 deletion docs/src/docs/arc42/building-block-view/level-1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ A job is processed in this order:
|The *EssController* provides a REST Interface to perform BPN investigations of supply chain.

|*PolicyStoreController*
|The *PolicyStoreController* provides a REST Interface for getting, adding and deleting accepted IRS EDC policies. These policies will be used to validate EDC contract offers.
|The *PolicyStoreController* provides a REST Interface for getting, adding and deleting accepted IRS EDC policies. These policies will be used to validate usage policies of EDC contract offers.

|===
4 changes: 4 additions & 0 deletions docs/src/docs/arc42/building-block-view/level-2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ include::../../../uml-diagrams/building-block-view/level-2-int.puml[]

|BlobstorePersistence
|Interface for storing data blobs.

|Policy Store
|The *Policy Store* provides a REST Interface for getting, adding and deleting accepted IRS EDC policies. These policies will be used to validate usage policies of EDC contract offers.

|===


Expand Down
18 changes: 13 additions & 5 deletions docs/src/docs/arc42/building-block-view/whitebox-overall.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The interfaces show how the components interact with each other and which interf

== Component diagram

[plantuml, target=whitebox-overview, format=svg]
[plantuml, target=whitebox_overall_decentral, format=svg]
....
include::../../../uml-diagrams/building-block-view/whitebox_overall_decentral.puml[]
....
Expand All @@ -18,10 +18,13 @@ include::../../../uml-diagrams/building-block-view/whitebox_overall_decentral.pu
|Proxy for any consumer of the IRS api.

|IRS
|The IRS consumes relationship information across the CX-Network and builds the graph view. Within this Documentation, the focus lies on the IRS
|The IRS consumes relationship information across the CX-network and builds the graph view. Within this documentation, the focus lies on the IRS

|Policy Store
|The Policy Store component stores usage policies used to validate the consumption of data asset.

|EDC Consumer
|The EDC Consumer Component is there to fulfill the GAIA-X and IDSA-data sovereignty principles. The EDC Consumer consists out of a control plane and a data plane.
|The EDC Consumer component is there to fulfill the GAIA-X and IDSA-data sovereignty principles. The EDC Consumer consists of a control plane and a data plane.

|EDC Provider
|The EDC Provider Component connects with EDC Consumer component and forms the end point for the actual exchange of data. It handles automatic contract negotiation and the subsequent exchange of data assets for connected applications.
Expand Down Expand Up @@ -50,7 +53,7 @@ include::../../../uml-diagrams/building-block-view/whitebox_overall_decentral.pu
|Number |Description

| 01
| IrsApiConsumer calls the *IRS* public *API*
| IrsApiConsumer calls the *IRS* public /irs *API*

| 02
| IrsApiConsumer must authorize using *technical C-X User*
Expand Down Expand Up @@ -99,7 +102,12 @@ include::../../../uml-diagrams/building-block-view/whitebox_overall_decentral.pu

| 17
| In case of the use-case Environmental and Social Standards, *IRS* sends notifications to the *IRS-ESS* instance running at the data provider using the *EDC*.
|===

| 18
| *IRS* uses the Policy Store to load the usage policies stored for BPNLs in order to check the usage policies during the consumption of the data assets.

| 19
| IrsApiConsumer calls the IRS public /policy *API*
|===


Loading

0 comments on commit 3199806

Please sign in to comment.