Skip to content

Commit

Permalink
Hotfix 0.1.4 (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt authored Dec 14, 2022
1 parent 194c604 commit 93e915c
Show file tree
Hide file tree
Showing 29 changed files with 535 additions and 177 deletions.
6 changes: 5 additions & 1 deletion edc-controlplane/edc-controlplane-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<artifactId>edc-controlplane</artifactId>
<groupId>org.eclipse.tractusx.edc</groupId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -73,6 +73,10 @@
<groupId>org.eclipse.tractusx.edc.extensions</groupId>
<artifactId>cx-oauth2</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.tractusx.edc.extensions</groupId>
<artifactId>custom-jsonld</artifactId>
</dependency>

<!-- Core -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<artifactId>edc-controlplane</artifactId>
<groupId>org.eclipse.tractusx.edc</groupId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-controlplane/edc-controlplane-memory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>edc-controlplane</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>edc-controlplane</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-controlplane/edc-controlplane-postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>edc-controlplane</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-controlplane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>product-edc-parent</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-dataplane/edc-dataplane-azure-vault/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>edc-dataplane</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-dataplane/edc-dataplane-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<artifactId>edc-dataplane</artifactId>
<groupId>org.eclipse.tractusx.edc</groupId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-dataplane/edc-dataplane-hashicorp-vault/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>edc-dataplane</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-dataplane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc</groupId>
<artifactId>product-edc-parent</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>

<artifactId>edc-dataplane</artifactId>
Expand Down
62 changes: 57 additions & 5 deletions edc-extensions/business-partner-validation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ The `leftExpression` must always contain 'BusinessPartner', so that the policy f
Additionally, the only `operator` that is supported by these policy functions is 'EQ'. Finally, the `rightExpression`
must contain the Business Partner Number.

## Single BusinessPartnerNumber example

The most simple BPN policy would allow the usage of certain data to a single Business Partner. An example `Policy` is
shown below. In this example the `edctype` properties are added, so that this policy may even be sent to the Data
Management API. Theoretically it is also possible to combine multiple BPN constraints by wrapping them into an EDC `OrConstraint` (see EDC Repository).
shown below.
In this example the `edctype` properties are added, so that this policy may even be sent to the Management API.

```json
{
"uid": "<PolicyId>",
"prohibitions": [],
"obligations": [],
"permissions": [
{
"edctype": "dataspaceconnector:permission",
Expand All @@ -61,6 +60,59 @@ Management API. Theoretically it is also possible to combine multiple BPN constr
}
```

## Multiple BusinessPartnerNumber example

To define multiple BPN and allow multiple participants to use the data the `orconstraint` should be used.
It will permit the constraints contained to be evaluated using the `OR` operator.
```json
{
"permissions": [
{
"edctype": "dataspaceconnector:permission",
"action": {
"type": "USE",
},
"constraints": [
{
"edctype": "dataspaceconnector:orconstraint",
"constraints": [
{
"edctype": "AtomicConstraint",
"leftExpression": {
"edctype": "dataspaceconnector:literalexpression",
"value": "BusinessPartnerNumber"
},
"rightExpression": {
"edctype": "dataspaceconnector:literalexpression",
"value": "<BPN1>"
},
"operator": "EQ"
},
{
"edctype": "AtomicConstraint",
"leftExpression": {
"edctype": "dataspaceconnector:literalexpression",
"value": "BusinessPartnerNumber"
},
"rightExpression": {
"edctype": "dataspaceconnector:literalexpression",
"value": "<BPN2>"
},
"operator": "EQ"
},

...

// other constraints can be added
]
}
],
"duties": []
}
]
}
```

# Important: EDC Policies are input sensitive

Please be aware that the EDC ignores all Rules and Constraint it does not understand. This could cause your constrained policies to be public.
Expand Down
2 changes: 1 addition & 1 deletion edc-extensions/business-partner-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc.extensions</groupId>
<artifactId>edc-extensions</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion edc-extensions/control-plane-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.tractusx.edc.extensions</groupId>
<artifactId>edc-extensions</artifactId>
<version>0.1.3</version>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
6 changes: 6 additions & 0 deletions edc-extensions/custom-jsonld/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Custom Json LD

This module was introduced to patch the bug about `LogicalConstraint` serializer:
https://github.com/eclipse-edc/Connector/issues/2334

The module can be removed once the bug will be fixed, merged and integrated in the EDC version used by product-EDC
156 changes: 156 additions & 0 deletions edc-extensions/custom-jsonld/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
Copyright (c) 2021,2022 Contributors to the Eclipse Foundation
See the NOTICE file(s) distributed with this work for additional
information regarding copyright ownership.
This program and the accompanying materials are made available under the
terms of the Apache License, Version 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
SPDX-License-Identifier: Apache-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>edc-extensions</artifactId>
<groupId>org.eclipse.tractusx.edc.extensions</groupId>
<version>0.1.4</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>custom-jsonld</artifactId>
<packaging>jar</packaging>

<properties>
<originalSourceDirectory>${project.basedir}/src/main/java</originalSourceDirectory>
<sourceDirectory>${originalSourceDirectory}</sourceDirectory>
<delombokSourceDirectory>${project.build.directory}/delombok</delombokSourceDirectory>
<sonar.moduleKey>${project.groupId}_${project.artifactId}</sonar.moduleKey>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${org.projectlombok.lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>${org.projectlombok.lombok.maven.plugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>delombok</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectory>${originalSourceDirectory}</sourceDirectory>
<outputDirectory>${delombokSourceDirectory}</outputDirectory>
<addOutputDirectory>false</addOutputDirectory>
<encoding>UTF-8</encoding>
<formatPreferences>
<javaLangAsFQN>skip</javaLangAsFQN>
</formatPreferences>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<!-- SPI -->
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>core-spi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-jsonld-serdes</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-spi</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dataspaceconnector</groupId>
<artifactId>ids-core</artifactId>
</dependency>

<!-- External Dependencies -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- patch versions -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 93e915c

Please sign in to comment.