Skip to content

Commit

Permalink
Merge branch 'main' into feature/#630-extended-part-detail-view
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mmaul committed Mar 21, 2024
2 parents 67da67a + 37751e8 commit b13ce29
Show file tree
Hide file tree
Showing 54 changed files with 1,856 additions and 1,612 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ _**For better traceability add the corresponding GitHub issue number in each cha
## [UNRELEASED - DD.MM.YYYY]
### Added
- #695 OAuth2.0 Client scope configuration

### Added
- #606 Added error message into notifications on failure
- #596 Added Policy management documentation

### Changed

- #709 Bumped spring-core from 6.0.17 to 6.1.5
- #606 cucumber tests retry on error
- #606 refactored response model to only be used by common model package tx-models
- #709 Fixed CVE-2024-22257 overriding spring-security-core from 6.1.7 to 6.2.3
- #596 Policy management has been moved to different module

### Removed
- Shedlock, resilence4j, templateResolver as not used anymore

### Added
- #630 Added Parts extended detailed view
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The same can be done with as planned assets.
include::../../../../uml-diagrams/arc42/runtime-view/assets/return-all-assets.puml[]
....

==== Overview
== Overview

When a user requests stored assets, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER').
If yes, then the endpoint returns a pageable result of assets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The same can be done with as planned assets.
include::../../../../uml-diagrams/arc42/runtime-view/assets/return-specific-assets.puml[]
....

==== Overview
== Overview

When a user requests a specific asset, TraceX-FOSS checks if the user has an adequate role ('ROLE_ADMIN', 'ROLE_SUPERVISOR', 'ROLE_USER'). If yes, then the endpoint returns a precise Asset for the given assetId, if it is found.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

This section describes functionality and the behavior in case a user requests contract agreements from Trace-X via the Trace-X contracts API (/contracts).

[plantuml,target=return-all-assets,format=svg]
[plantuml,target=return-all-contracts,format=svg]
....
include::../../../../uml-diagrams/arc42/runtime-view/data-sovereignty/get-all-contracts-sequenceflow.puml[]
....

==== Overview
== Overview

In case a user requests contract agreements, Trace-X checks if the user has required roles ('ROLE_ADMIN', 'ROLE_SUPERVISOR').
If yes, then the requested assets will be mapped to the related contract agreement id.
Expand Down
1 change: 1 addition & 0 deletions docs/src/docs/arc42/runtime-view/full.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ include::notifications.adoc[leveloffset=+1]
include::data-consumption.adoc[leveloffset=+1]
include::data-provisioning.adoc[leveloffset=+1]
include::data-sovereignty.adoc[leveloffset=+1]
include::policies.adoc[leveloffset=+1]
45 changes: 45 additions & 0 deletions docs/src/docs/arc42/runtime-view/policies.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
= Policies

== Overview
=== Scenario 1: Start Up interaction with IRS Policy Store
Trace-X instance define a constraint which is required for data consumption and provisioning.
Trace-X retrieves all policies by IRS and validates if one of the policies contains the required constraint given by Trace-X.
If a policy with the constraint exists and is valid process ends. If the policy is not valid it will create one with the given constraint.

This sequence diagram describes the process of retrieving or creating policies within the IRS Policy Store based on Trace-X given constraint.

[plantuml, target=policy-startup-configuration, format=svg]
....
include::../../../uml-diagrams/arc42/runtime-view/policies/policy-startup-configuration.puml[]
....

=== Scenario 2: Start Up interaction with EDC
Trace-X instance uses the policy which includes the defined constraint and transforms it into a valid EDC Policy Request.
The EDC Policy Request will be used for creating a policy for the required notification contracts.

This sequence diagram describes the process of retrieving the correct policy by IRS Policy Store based on Trace-X given constraint and reuses it for creating an EDC Policy.

[plantuml, target=policy-startup-notification-contract, format=svg]
....
include::../../../uml-diagrams/arc42/runtime-view/policies/policy-startup-notification-contract.puml[]
....

=== Scenario 3: Provisioning of notifications
Trace-X instance uses the policy which includes the defined constraint and reuses it for validation of catalog offers by the receiver edc.

This sequence diagram describes the process of how the policy with the defined constraint will be used for validation of catalog offers by the receiver edc, to validate if sending is valid.

[plantuml, target=policy-notifications, format=svg]
....
include::../../../uml-diagrams/arc42/runtime-view/policies/policy-notifications.puml[]
....

=== Scenario 4: Provisioning of assets
Trace-X instance uses the policy which includes the defined constraint and reuses it for creating edc assets .

This sequence diagram describes the process of how the policy with the defined constraint will be reused for registering edc data assets.

[plantuml, target=policy-assets, format=svg]
....
include::../../../uml-diagrams/arc42/runtime-view/policies/policy-assets.puml[]
....
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"

title Sequence Diagram: Policy Handling on asset provisioning flow
participant "TraceX" as TraceX
participant "EDC Consumer" as EdcConsumer
participant "EDC Provider (other) " as EdcProvider

TraceX -> TraceX: Publish Asset to Core Services
TraceX -> EdcConsumer: Register policy
EdcConsumer -> EdcProvider: Register policy
EdcProvider -> EdcConsumer: Return ok
EdcConsumer -> TraceX: Return ok
TraceX -> TraceX: Reuse policy for contract definition creation

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"

title Sequence Diagram: Policy Handling on notification flow
participant "TraceX" as TraceX
participant "IRS " as IRS
participant "EDC Consumer" as EdcConsumer
participant "EDC Provider (other) " as EdcProvider

TraceX -> TraceX: Approve, Acknowledge, Accept, Decline or Close Notification
TraceX -> EdcConsumer: Get catalog of receiver
EdcConsumer -> EdcProvider: Get catalog of receiver
EdcProvider -> EdcConsumer: Return catalog
EdcConsumer -> TraceX: Return catalog
TraceX -> TraceX: Validate Contract Type, Method and Policy

alt Notification Type: Alert
TraceX -> TraceX: Filter for method (update, receive)
TraceX -> TraceX: Validate if catalog policy matches the configured policies in IRS Lib (3 Default Policies)
alt Method: Update
TraceX -> EdcConsumer: Send out alert notification (update method)
EdcConsumer -> EdcProvider: Send out alert notification (update method)
EdcProvider -> EdcConsumer: ok
EdcConsumer -> TraceX: ..
else Method: Receive
TraceX -> EdcConsumer: Send out alert notification (receive method)
EdcConsumer -> EdcProvider: Send out alert notification (receive method)
EdcProvider -> EdcConsumer: ok
EdcConsumer -> TraceX: ..
end
else Notification Type: Investigation
TraceX -> TraceX: Filter for method (update, receive)
TraceX -> TraceX: Validate if catalog policy matches the configured policies in IRS Lib (3 Default Policies)
alt Method: Update
TraceX -> EdcConsumer: Send out Investigation notification (update method)
EdcConsumer -> EdcProvider: Send out Investigation notification (update method)
EdcProvider -> EdcConsumer: ok
EdcConsumer -> TraceX: ..
else Method: Receive
TraceX -> EdcConsumer: Send out Investigation notification (receive method)
EdcConsumer -> EdcProvider: Send out Investigation notification (receive method)
EdcProvider -> EdcConsumer: ok
EdcConsumer -> TraceX: ..
end
end

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ participant "TraceXConfig" as Config
participant "TraceX" as TraceX
participant "IRS " as IRS

Config -> TraceX : ID 3.0 Trace
Config -> TraceX : Constraint
TraceX -> IRS : Get Policies
IRS -> TraceX: Return policies (Default Policies from IRS (C1: Membership, C2: Framework, C3: ID3.0)
IRS -> TraceX: Return policies
TraceX -> TraceX: Check if a policy matches own constraint

TraceX -> IRS : Create(not exists) or update(exists)

@enduml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
@startuml
skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"

title Sequence Diagram: TraceX Interaction with EDC on startup
participant "TraceX" as TraceX
participant "IRS" as IRS
participant "EDC " as EDC

TraceX -> IRS: Get Policies
IRS -> TraceX : return Policies
TraceX -> TraceX: Find any policy which matches own constraint

alt Policy found
TraceX -> TraceX: Use found policy for EdcPolicy creation.
TraceX -> EDC : Create notification asset, policy, definition
else Policy not found
TraceX -> TraceX: Corrupt state of application
end

@enduml

@startuml
skinparam monochrome true
skinparam shadowing false
skinparam defaultFontName "Architects daughter"

title Sequence Diagram: Sending notifications
participant "TraceX" as TraceX
participant "TraceXIRSLib" as TraceXIRSLib
participant "IRS " as IRS
participant "EDC " as EDC

TraceX -> TraceX: ...
TraceX -> EDC: Get catalog
EDC -> TraceX: -> Return catalog
TraceX -> TraceX: Filter for notification type (alert / investigation) / method(update, receive)
TraceX -> TraceXIRSLib: Validate if catalog policy matches the configured policies in IRS Lib (3 Default Policies)
TraceXIRSLib -> TraceX: Valid
TraceX -> EDC: Send out notification
@enduml


9 changes: 0 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ SPDX-License-Identifier: Apache-2.0
<tomcat-embed-websocket.version>10.1.18</tomcat-embed-websocket.version>
<jakarta-ws-rs.version>3.1.0</jakarta-ws-rs.version>
<jruby.version>9.4.3.0</jruby.version>
<resilience4j.version>2.0.2</resilience4j.version>
<schedlock.version>5.12.0</schedlock.version>
<spring-cloud.version>2022.0.3</spring-cloud.version>
<jetbrains-annotation.version>24.1.0</jetbrains-annotation.version>
<feign-form.version>3.8.0</feign-form.version>
Expand Down Expand Up @@ -121,13 +119,6 @@ SPDX-License-Identifier: Apache-2.0

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-bom</artifactId>
<version>${resilience4j.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- Update snakeyaml manually to avoid vulnerability CVE-2020-13936; can be removed after Spring updates their dependency -->
<dependency>
<groupId>org.yaml</groupId>
Expand Down
Loading

0 comments on commit b13ce29

Please sign in to comment.