|
1 |
| -# POSSIBLE Extension |
| 1 | +# POSSIBLE-X Extension |
2 | 2 |
|
3 |
| -This document explains how to run an EDC with the `POSSIBLE-X` and the `IONOS S3` extensions. |
| 3 | +This repository contains the POSSIBLE-X Extension that works with |
| 4 | +the [Eclipse Dataspace Components](https://github.com/eclipse-edc) [Connector](https://github.com/eclipse-edc/Connector) |
| 5 | +in the version `v0.4.1` to technically enforce the so-called _POSSIBLE-X enforced policies_. |
4 | 6 |
|
5 |
| -## Requirements |
| 7 | +POSSIBLE-X Dataspace participants can define a POSSIBLE-X enforced policy when they provide Service Offerings / Data |
| 8 | +Service Offerings. The policy consists of constraints that the provider participants choose. The POSSIBLE-X Extension |
| 9 | +implements the enforcement of following constraints which take effect during contract negotiation / data transfer |
| 10 | +attempts: |
6 | 11 |
|
7 |
| -- java 17 |
8 |
| -- gradle |
| 12 | +- The consumer of an offering must be on the list of allowed consumer participants. Only then is it possible to |
| 13 | + negotiate a contract and trigger a data transfer in the case of Data Service Offerings. The provider participant |
| 14 | + defines the participant list. |
| 15 | +- The consumer of an offering can only negotiate a contract after a certain start date. Data transfers are also only |
| 16 | + possible after the specified start date. This date is defined by the provider participant. |
| 17 | +- The consumer of an offering can only negotiate a contract before a certain end date. Data transfers are also only |
| 18 | + possible before the specified end date. This date is defined by the provider participant. |
| 19 | + |
| 20 | +The POSSIBLE-X Extension implementation can be found in the `policy-extension` folder. |
| 21 | + |
| 22 | +Through activation of the EDC connector's `contract-core` extension as seen [here](https://github.com/POSSIBLE-X/possible-x-edc-extension/blob/main/connector/build.gradle.kts#L83), |
| 23 | +it is possible to enforce another constraint during data transfer attempts: |
| 24 | + |
| 25 | +- The consumer of an offering can only transfer data within a certain time frame which starts after the contract agreement |
| 26 | + is formed. This time frame is defined by the provider participant. |
| 27 | + |
| 28 | +## How to run an EDC connector with the POSSIBLE-X and the IONOS S3 extensions |
| 29 | + |
| 30 | +Below is an explanation on how to run an EDC with the POSSIBLE-X and |
| 31 | +the [IONOS S3](https://github.com/Digital-Ecosystems/edc-ionos-s3) extensions. |
| 32 | + |
| 33 | +### Requirements |
| 34 | + |
| 35 | +- Java 17 |
| 36 | +- Gradle |
9 | 37 | - Postman/Insomnia (_optional_)
|
10 | 38 |
|
11 |
| -## Steps |
12 |
| -### Checkout the repo |
| 39 | +### Steps |
| 40 | + |
| 41 | +#### Checkout the repository |
13 | 42 |
|
14 | 43 | - Checkout this repository
|
| 44 | + |
15 | 45 | ```
|
16 | 46 | git clone https://github.com/POSSIBLE-X/possible-x-edc-extension.git
|
17 | 47 | ```
|
18 | 48 |
|
19 |
| -### Create git token |
20 |
| -- open the github settings for your personal access tokens: https://github.com/settings/tokens |
21 |
| -- generate a new token. select only the scope `read:packages` for it. |
| 49 | +#### Create git token |
| 50 | + |
| 51 | +- Open the GitHub settings for your personal access tokens: https://github.com/settings/tokens |
| 52 | +- Generate a new token. Select only the scope `read:packages` for it. |
| 53 | + |
| 54 | +#### Compiling |
22 | 55 |
|
23 |
| -### Compiling |
| 56 | +- Export your `GitHub` authentication data. Use the token created in the previous step. |
24 | 57 |
|
25 |
| -- export your `GitHub` authentication data. use the token created in the previous step. |
26 | 58 | ```
|
27 | 59 | export USERNAME_GITHUB=<YOUR USERNAME> or <YOUR TOKEN NAME>
|
28 | 60 | export TOKEN_GITHUB=<YOUR TOKEN>
|
29 | 61 | ```
|
30 |
| -- go to the main folder and execute the following: |
| 62 | + |
| 63 | +- Go to the main folder and execute the following: |
| 64 | + |
31 | 65 | ```
|
32 | 66 | ./gradlew build
|
33 | 67 | ```
|
34 | 68 |
|
35 |
| -### Edit config files |
| 69 | +#### Edit config files |
36 | 70 |
|
37 |
| -- Open the `connector/resources/config.properties` file and edit the following fields. Take the values from the keepass DB in the `possible-x-infra` repo and insert them. |
| 71 | +- Open the `connector/resources/config.properties` file and edit the following fields. Take the values from the KeePass |
| 72 | + DB in the `possible-x-infra` repository and insert them. |
38 | 73 |
|
39 |
| -| Field name | Description | |
40 |
| -|---------------------------------|------------------------------------------------------------| |
41 |
| -| `possible.connector.edcVersion` | Version of the Connector | |
42 |
| -| `edc.ionos.access.key` | IONOS Access Key Id to access S3 | |
43 |
| -| `edc.ionos.secret.key` | IONOS Secret Access Key to access S3 | |
44 |
| -| `edc.ionos.endpoint` | IONOS S3 Endpoint | |
45 |
| -| `edc.ionos.token` | IONOS token to allow S3 provisioning | |
| 74 | +| Field name | Description | |
| 75 | +|---------------------------------|--------------------------------------| |
| 76 | +| `possible.connector.edcVersion` | Version of the Connector | |
| 77 | +| `edc.ionos.access.key` | IONOS Access Key Id to access S3 | |
| 78 | +| `edc.ionos.secret.key` | IONOS Secret Access Key to access S3 | |
| 79 | +| `edc.ionos.endpoint.region` | IONOS S3 Endpoint Region | |
| 80 | +| `edc.ionos.token` | IONOS token to allow S3 provisioning | |
46 | 81 |
|
47 |
| -- Add these fields to the `provider-configuration.properties` and `consumer-configuration.properties` as well, before starting one dedicated consumer and one dedicated provider instance. |
| 82 | +- Add these fields to the `provider-configuration.properties` and `consumer-configuration.properties` as well, before |
| 83 | + starting one dedicated consumer and one dedicated provider instance. |
48 | 84 |
|
49 | 85 | To know more about the `IONOS S3 Extension` please check this [site](https://github.com/ionos-cloud/edc-ionos-s3).
|
50 | 86 |
|
51 |
| -### Running |
| 87 | +#### Running |
52 | 88 |
|
53 | 89 | Either execute the following command, for starting one instance:
|
| 90 | + |
54 | 91 | ```
|
55 | 92 | java -Dedc.fs.config=connector/resources/config.properties -jar connector/build/libs/connector.jar
|
56 | 93 | ```
|
| 94 | + |
57 | 95 | Or execute the following commands, for starting one dedicated consumer and one dedicated provider instance:
|
| 96 | + |
58 | 97 | ```
|
59 | 98 | java -Dedc.fs.config=connector/resources/provider-configuration.properties -jar connector/build/libs/connector.jar
|
60 | 99 | ```
|
| 100 | + |
61 | 101 | ```
|
62 | 102 | java -Dedc.fs.config=connector/resources/consumer-configuration.properties -jar connector/build/libs/connector.jar
|
63 |
| -``` |
64 |
| - |
65 |
| -### Interacting |
| 103 | +``` |
66 | 104 |
|
67 |
| -- Please follow the documentation of the `documentation` repository (LINK TBD). |
| 105 | +### Examples |
68 | 106 |
|
69 |
| -## Examples |
70 |
| -For experimenting with the running EDC, some Postman/Insomnia collections were added to this repo at `postman/`: |
| 107 | +For experimenting with the running EDC, some Postman/Insomnia collections were added to this repository at `postman/`: |
71 | 108 |
|
72 |
| -- `POSSIBLE-X-IONOS-S3.postman_collection.json` is a Postman collection with examples for performing a transfer from and to an IONOS S3 Bucket |
73 |
| -- `POSSIBLE-X.Insomnia_IONOS-S3.json` is an Insomnia collection with examples for performing a transfer from and to an IONOS S3 Bucket |
74 |
| -- `POSSIBLE-X.postman_collection.json` is a Postman collection with examples for performing a transfer from and to an HTTP API |
75 |
| -- `Test.postman_environment.json` is a Postman environment file which sets up the collections to interact with the POSSIBLE EDCs running in the IONOS cloud |
| 109 | +- `POSSIBLE-X-IONOS-S3.postman_collection.json` is a Postman collection with examples for performing a transfer from and |
| 110 | + to an IONOS S3 Bucket. |
| 111 | +- `POSSIBLE-X.Insomnia_IONOS-S3.json` is an Insomnia collection with examples for performing a transfer from and to an |
| 112 | + IONOS S3 Bucket. |
| 113 | +- `POSSIBLE-X.postman_collection.json` is a Postman collection with examples for performing a transfer from and to an |
| 114 | + HTTP API. |
| 115 | +- `Test.postman_environment.json` is a Postman environment file which sets up the collections to interact with the |
| 116 | + POSSIBLE-X EDCs running in the IONOS cloud. |
76 | 117 |
|
77 |
| -Import the collection into Postman/Insomnia. In the collection's settings, fill the Environment Variables with the path and port of your running EDC. |
| 118 | +Import the collection into Postman/Insomnia. In the collection's settings, fill the Environment Variables with the path |
| 119 | +and port of your running EDC. |
78 | 120 | Check the corresponding `[...]-configuration.properties` for the correct values.
|
79 | 121 |
|
80 |
| -## Continuous Integration |
81 |
| -A Github Action Pipeline (Build and Deploy EDC) was implemented to build and deploy the Artifcats to the DEV environment |
| 122 | +### Continuous Integration |
| 123 | + |
| 124 | +A GitHub Action Pipeline (Build and Deploy EDC) was implemented to build and deploy the Artifacts to the DEV environment |
82 | 125 |
|
83 |
| -The Pipeline Builds a docker container and deploys it to the IONOS Cloud PossibleX Kubernetes Cluster |
| 126 | +The Pipeline Builds a docker container and deploys it to the IONOS Cloud Possible-X Kubernetes Cluster: |
84 | 127 |
|
85 |
| -| Component | Namespace | URL | |
86 |
| -|-----------|------------------------|--------------------------------------| |
87 |
| -| Consumer | dev-github-consumer | https://consumer.dev.possible-x.de | |
88 |
| -| Provider | dev-github-provider | https://provider.dev.possible-x.de | |
| 128 | +| Component | Namespace | URL | |
| 129 | +|-----------|-----------|----------------------------------------| |
| 130 | +| Consumer | edc-dev | https://consumer.edc.dev.possible-x.de | |
| 131 | +| Provider | edc-dev | https://provider.edc.dev.possible-x.de | |
0 commit comments