Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,6 @@ link above to learn about the basic samples in more detail.

All basic samples are located in the `basic` directory.

### [Transfer](./transfer/README.md)

This scope revolves around the topic of data transfer. In these samples you will learn how a data transfer works in the
EDC and run different transfer scenarios. Click the link above to learn about the transfer samples in more detail.

All transfer samples are located in the `transfer` directory.

### [Advanced](./advanced/README.md)

Collection of advanced topics regarding the EDC framework.
Click the link above to learn about the transfer samples in more detail.

All transfer samples are located in the `advanced` directory.

### [Policy](./policy/README.md)

These samples deal with the topic of policies and their evaluation and enforcement. They will teach you what
Expand All @@ -69,6 +55,15 @@ a set of all offered catalogs.

All federated catalog samples are located in the [`federated-catalog`](./federated-catalog/README.md) directory.

### [Advanced](./advanced/README.md)

Collection of advanced topics regarding the EDC framework.
Click the link above to learn about the transfer samples in more detail.

All transfer samples are located in the `advanced` directory.



## Contributing

See [how to contribute](https://github.com/eclipse-edc/docs/blob/main/CONTRIBUTING.md).
Expand Down
2 changes: 1 addition & 1 deletion advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The samples in this scope teach advanced topics about the EDC framework.

> Before starting with these samples, be sure to check out the [basic](../basic/README.md) and [transfer](../transfer/README.md) samples!
> Before starting with these samples, be sure to check out the [basic](../basic/README.md) samples!

## Samples

Expand Down
6 changes: 3 additions & 3 deletions advanced/advanced-01-open-telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Create an asset:

```bash
curl -H "X-Api-Key: password" \
-d @transfer/transfer-01-negotiation/resources/create-asset.json \
-d @advanced/advanced-01-open-telemetry/resources/create-asset.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/assets \
-s | jq
```
Expand All @@ -50,7 +50,7 @@ Create a Policy on the provider connector:

```bash
curl -H "X-Api-Key: password" \
-d @transfer/transfer-01-negotiation/resources/create-policy.json \
-d @advanced/advanced-01-open-telemetry/resources/create-policy.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \
-s | jq
```
Expand All @@ -59,7 +59,7 @@ Follow up with the creation of a contract definition:

```bash
curl -H "X-Api-Key: password" \
-d @transfer/transfer-01-negotiation/resources/create-contract-definition.json \
-d @advanced/advanced-01-open-telemetry/resources/create-contract-definition.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \
-s | jq
```
Expand Down
10 changes: 2 additions & 8 deletions advanced/advanced-01-open-telemetry/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
context: open-telemetry-runtime
volumes:
- ./:/open-telemetry
- ../../transfer/transfer-00-prerequisites/:/prerequisites
ports:
- "29193:29193"
- "29194:29194"
Expand All @@ -34,9 +33,7 @@ services:
EDC_CONTROL_ENDPOINT: http://consumer:29192/control
EDC_DSP_CALLBACK_ADDRESS: http://consumer:29194/protocol
EDC_PARTICIPANT_ID: consumer
EDC_KEYSTORE: /prerequisites/resources/certs/cert.pfx
EDC_KEYSTORE_PASSWORD: 123456
EDC_FS_CONFIG: /prerequisites/resources/configuration/provider-configuration.properties
EDC_FS_CONFIG: /open-telemetry/resources/configuration/provider-configuration.properties
EDC_DPF_SELECTOR_URL: http://localhost:29192/control
entrypoint: java
-javaagent:/app/opentelemetry-javaagent.jar
Expand All @@ -48,7 +45,6 @@ services:
context: open-telemetry-runtime
volumes:
- ./:/open-telemetry
- ../../transfer/transfer-00-prerequisites/:/prerequisites
ports:
- "19193:19193"
- "19192:19192"
Expand All @@ -74,9 +70,7 @@ services:
EDC_CONTROL_ENDPOINT: http://provider:19192/control
EDC_DSP_CALLBACK_ADDRESS: http://provider:19194/protocol
EDC_PARTICIPANT_ID: provider
EDC_KEYSTORE: /prerequisites/resources/certs/cert.pfx
EDC_KEYSTORE_PASSWORD: 123456
EDC_FS_CONFIG: /prerequisites/resources/configuration/consumer-configuration.properties
EDC_FS_CONFIG: /open-telemetry/resources/configuration/consumer-configuration.properties
EDC_SAMPLES_TRANSFER_01_ASSET_PATH: /open-telemetry/README.md
EDC_DPF_SELECTOR_URL: http://localhost:29192/control
entrypoint: java
Expand Down
2 changes: 1 addition & 1 deletion basic/basic-04-event-consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public <E extends Event> void on(EventEnvelope<E> envelope) {

```bash
./gradlew basic:basic-04-event-consumer:connector-with-event-subscriber:build
java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties \
java -Dedc.fs.config=basic/basic-04-event-consumer/resources/configuration/consumer-configuration.properties \
-jar basic/basic-04-event-consumer/connector-with-event-subscriber/build/libs/connector.jar
```

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
edc.participant.id=consumer
edc.dsp.callback.address=http://localhost:29194/protocol
web.http.port=29191
web.http.path=/api
web.http.management.port=29193
web.http.management.path=/management
web.http.protocol.port=29194
web.http.protocol.path=/protocol
web.http.public.port=29291
web.http.public.path=/public
web.http.control.port=29192
web.http.control.path=/control\
web.http.signaling.port=29196
web.http.signaling.path=/signaling
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
15 changes: 7 additions & 8 deletions federated-catalog/fc-00-basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,46 +51,45 @@ can successfully request and retrieve these catalogs, we need at least one conne
Therefore, in this section, we will start a connector and then create a contract
for this connector. In the future samples, we will refer to it as `participant-connector`.
This `participant-connector` will function as a provider.
We will use the resources from the [transfer](../../transfer) sample to set up this connector. In the rest of this section we will,
The `participant-connector` is a minimal control-plane connector that lives in the
[participant-connector](./participant-connector) module. In the rest of this section we will,
* run the `participant-connector`
* create an asset for this `participant-connector`
* create a policy
* create a contract offer

Although these topics were covered in the [transfer](../../transfer) section, we’ll document all the necessary commands here for easier execution.


#### Build connector jar
Use the following command to build a connector jar.
```shell
./gradlew transfer:transfer-00-prerequisites:connector:build
./gradlew federated-catalog:fc-00-basic:participant-connector:build
```
#### Run the connector
Execute the following to run the connector jar.
```shell
java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties -jar transfer/transfer-00-prerequisites/connector/build/libs/connector.jar
java -Dedc.fs.config=federated-catalog/fc-00-basic/participant-connector/config.properties -jar federated-catalog/fc-00-basic/participant-connector/build/libs/participant-connector.jar
```

---

Once the connector is running, carry out the commands below in sequence.
#### Create an asset
```shell
curl -d @transfer/transfer-01-negotiation/resources/create-asset.json \
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-asset.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/assets \
-s | jq
```

#### Create a policy
```bash
curl -d @transfer/transfer-01-negotiation/resources/create-policy.json \
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-policy.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \
-s | jq
```

#### Create a contract definition
```bash
curl -d @transfer/transfer-01-negotiation/resources/create-contract-definition.json \
curl -d @federated-catalog/fc-00-basic/participant-connector/resources/create-contract-definition.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/contractdefinitions \
-s | jq
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,27 @@
*
*/


plugins {
`java-library`
id("application")
alias(libs.plugins.shadow)
}

dependencies {
implementation(libs.edc.data.plane.spi)
implementation(libs.edc.web.spi)

runtimeOnly(project(":transfer:transfer-00-prerequisites:connector"))
runtimeOnly(libs.edc.bom.controlplane.base)
runtimeOnly(libs.edc.iam.mock)
}

application {
mainClass.set("$group.boot.system.runtime.BaseRuntime")
mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime")
}

var distTar = tasks.getByName("distTar")
var distZip = tasks.getByName("distZip")

tasks.withType<CreateStartScripts> {
dependsOn(":transfer:transfer-00-prerequisites:connector:shadowJar")
}

tasks.shadowJar {
mergeServiceFiles()
archiveFileName.set("connector.jar")
archiveFileName.set("participant-connector.jar")
dependsOn(distTar, distZip)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,5 @@ web.http.management.port=19193
web.http.management.path=/management
web.http.protocol.port=19194
web.http.protocol.path=/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
web.http.public.port=19291
web.http.public.path=/public
web.http.control.port=19192
web.http.control.path=/control
web.http.signaling.port=19195
web.http.signaling.path=/signaling
edc.dataplane.proxy.public.endpoint=http://localhost:19291/public
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "assetId",
"properties": {
"name": "product description",
"contenttype": "application/json"
},
"dataAddress": {
"type": "HttpData",
"name": "Test asset",
"baseUrl": "https://jsonplaceholder.typicode.com/users",
"proxyPath": "true"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "1",
"accessPolicyId": "aPolicy",
"contractPolicyId": "aPolicy",
"assetsSelector": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"odrl": "http://www.w3.org/ns/odrl/2/"
},
"@id": "aPolicy",
"policy": {
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Set",
"permission": [],
"prohibition": [],
"obligation": []
}
}
13 changes: 0 additions & 13 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,13 @@ testcontainers = "1.21.4"
edc-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" }
edc-asset-spi = { module = "org.eclipse.edc:asset-spi", version.ref = "edc" }
edc-bom-controlplane-base = { module = "org.eclipse.edc:controlplane-base-bom", version.ref = "edc" }
edc-bom-dataplane-base = { module = "org.eclipse.edc:dataplane-base-bom", version.ref = "edc" }
edc-configuration-filesystem = { module = "org.eclipse.edc:configuration-filesystem", version.ref = "edc" }
edc-connector-core = { module = "org.eclipse.edc:connector-core", version.ref = "edc" }
edc-control-plane-api-client = { module = "org.eclipse.edc:control-plane-api-client", version.ref = "edc" }
edc-control-plane-core = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" }
edc-control-plane-spi = { module = "org.eclipse.edc:control-plane-spi", version.ref = "edc" }
edc-data-plane-signaling-api = { module = "org.eclipse.edc:data-plane-signaling-api", version.ref = "edc" }
edc-data-plane-signaling-client = { module = "org.eclipse.edc:data-plane-signaling-client", version.ref = "edc" }
edc-data-plane-core = { module = "org.eclipse.edc:data-plane-core", version.ref = "edc" }
edc-data-plane-http = { module = "org.eclipse.edc:data-plane-http", version.ref = "edc" }
edc-data-plane-iam = { module = "org.eclipse.edc:data-plane-iam", version.ref = "edc" }
edc-data-plane-self-registration = { module = "org.eclipse.edc:data-plane-self-registration", version.ref = "edc" }
edc-data-plane-spi = { module = "org.eclipse.edc:data-plane-spi", version.ref = "edc" }
edc-dsp = { module = "org.eclipse.edc:dsp", version.ref = "edc" }
edc-edr-cache-api = { module = "org.eclipse.edc:edr-cache-api", version.ref = "edc" }
edc-edr-store-core = { module = "org.eclipse.edc:edr-store-core", version.ref = "edc" }
edc-edr-store-receiver = { module = "org.eclipse.edc:edr-store-receiver", version.ref = "edc" }
edc-federatedcatalog-base-bom = { module = "org.eclipse.edc:federatedcatalog-base-bom", version.ref = "edc" }
edc-fc-spi-crawler = { module = "org.eclipse.edc:crawler-spi", version.ref = "edc" }
edc-http = { module = "org.eclipse.edc:http", version.ref = "edc" }
Expand All @@ -43,9 +33,6 @@ edc-participant-context-config-spi = { module = "org.eclipse.edc:participant-con
edc-runtime-core = { module = "org.eclipse.edc:runtime-core", version.ref = "edc" }
edc-token-core = { module = "org.eclipse.edc:token-core", version.ref = "edc" }
edc-transfer-spi = { module = "org.eclipse.edc:transfer-spi", version.ref = "edc" }
edc-transfer-data-plane-signaling = { module = "org.eclipse.edc:transfer-data-plane-signaling", version.ref = "edc" }
edc-validator-data-address-http-data = { module = "org.eclipse.edc:validator-data-address-http-data", version.ref = "edc" }
edc-web-spi = { module = "org.eclipse.edc:web-spi", version.ref = "edc" }

awaitility = { module = "org.awaitility:awaitility", version.ref = "awaitility" }
jakarta-rsApi = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version.ref = "rsApi" }
Expand Down
3 changes: 1 addition & 2 deletions policy/policy-01-policy-enforcement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ In the build file, we define the following dependencies for both connectors:

**Note**: we do not include any `data-plane` modules, as we are not going to transfer any data in this sample. To
be able to actually transfer data, additional dependencies are required. More information can be found in the
[documentation](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/build-your-own-connector.md) and in
the [transfer samples](../../transfer/README.md).
[documentation](https://github.com/eclipse-edc/Connector/blob/main/docs/developer/build-your-own-connector.md).

#### Provider

Expand Down
6 changes: 1 addition & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ include(":basic:basic-02-health-endpoint")
include(":basic:basic-03-configuration")
include(":basic:basic-04-event-consumer:connector-with-event-subscriber")

include(":transfer:transfer-00-prerequisites:connector")
include(":transfer:transfer-03-consumer-pull:provider-proxy-data-plane")

include(":advanced:advanced-01-open-telemetry:open-telemetry-runtime")

//policy
Expand All @@ -46,6 +43,7 @@ include(":policy:policy-01-policy-enforcement:policy-functions")
// federated catalog
include(":federated-catalog:fc-00-basic:federated-catalog-base")
include(":federated-catalog:fc-00-basic:fixed-node-resolver")
include(":federated-catalog:fc-00-basic:participant-connector")
include(":federated-catalog:fc-01-embedded:fc-connector")
include(":federated-catalog:fc-02-standalone:standalone-fc")
include(":federated-catalog:fc-03-static-node-directory:target-node-resolver")
Expand All @@ -56,6 +54,4 @@ include(":federated-catalog:fc-03-static-node-directory:embedded-fc-with-node-re
// modules for code samples ------------------------------------------------------------------------
include(":advanced:advanced-02-custom-runtime")

include(":util:http-request-logger")

include(":system-tests")
3 changes: 1 addition & 2 deletions system-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ dependencies {
testCompileOnly(project(":basic:basic-02-health-endpoint"))
testCompileOnly(project(":basic:basic-03-configuration"))

testCompileOnly(project(":transfer:transfer-00-prerequisites:connector"))
testCompileOnly(project(":transfer:transfer-03-consumer-pull:provider-proxy-data-plane"))
testCompileOnly(project(":basic:basic-04-event-consumer:connector-with-event-subscriber"))

testCompileOnly(project(":advanced:advanced-01-open-telemetry:open-telemetry-runtime"))
Expand All @@ -47,6 +45,7 @@ dependencies {
testCompileOnly(project(":policy:policy-01-policy-enforcement:policy-functions"))

testCompileOnly(project(":federated-catalog:fc-00-basic:fixed-node-resolver"))
testCompileOnly(project(":federated-catalog:fc-00-basic:participant-connector"))
testCompileOnly(project(":federated-catalog:fc-01-embedded:fc-connector"))
testCompileOnly(project(":federated-catalog:fc-02-standalone:standalone-fc"))
testCompileOnly(project(":federated-catalog:fc-03-static-node-directory:target-node-resolver"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public class Advanced01openTelemetryTest {

private static final String SAMPLE_FOLDER = "advanced/advanced-01-open-telemetry";
private static final String DOCKER_COMPOSE_YAML = SAMPLE_FOLDER + "/docker-compose.yaml";
private static final String CREATE_ASSET_FILE_PATH = SAMPLE_FOLDER + "/resources/create-asset.json";
private static final String CREATE_POLICY_FILE_PATH = SAMPLE_FOLDER + "/resources/create-policy.json";
private static final String CREATE_CONTRACT_DEFINITION_FILE_PATH = SAMPLE_FOLDER + "/resources/create-contract-definition.json";
private static final String FETCH_DATASET_FROM_CATALOG_FILE_PATH = SAMPLE_FOLDER + "/resources/get-dataset.json";
private static final String NEGOTIATE_CONTRACT_FILE_PATH = SAMPLE_FOLDER + "/resources/negotiate-contract.json";
private static final String START_TRANSFER_FILE_PATH = SAMPLE_FOLDER + "/resources/start-transfer.json";
Expand All @@ -54,9 +57,9 @@ public class Advanced01openTelemetryTest {

@Test
void runSampleSteps() {
createAsset();
createPolicy();
createContractDefinition();
createAsset(CREATE_ASSET_FILE_PATH);
createPolicy(CREATE_POLICY_FILE_PATH);
createContractDefinition(CREATE_CONTRACT_DEFINITION_FILE_PATH);
var catalogDatasetId = fetchDatasetFromCatalog(FETCH_DATASET_FROM_CATALOG_FILE_PATH);
var contractNegotiationId = negotiateContract(NEGOTIATE_CONTRACT_FILE_PATH, catalogDatasetId);
var contractAgreementId = getContractAgreementId(contractNegotiationId);
Expand Down
Loading
Loading