### Start Docker Compose for Cloud Transfer Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-05-file-transfer-cloud/README.md Starts the necessary Docker containers for MinIO, Azurite, and HashiCorp Vault. Ensure these services are running correctly by checking their logs. ```bash docker compose -f transfer/transfer-05-file-transfer-cloud/resources/docker-compose.yaml up -d ``` -------------------------------- ### Run Provider Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Starts the Eclipse Dataspace Connector as a provider using a specific configuration file. ```shell export EDC_FS_CONFIG=transfer/transfer-06-kafka-broker/kafka-runtime/provider.properties java -jar transfer/transfer-06-kafka-broker/kafka-runtime/build/libs/connector.jar ``` -------------------------------- ### Expected Connector Runtime Output Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-01-basic-connector/README.md This is an example of the console output you should expect when the connector successfully boots up. Note the warnings regarding production configurations. ```bash INFO 2025-09-22T09:28:34.533664939 Booting EDC runtime WARNING 2025-09-22T09:28:34.557375883 The runtime is configured as an anonymous participant. DO NOT DO THIS IN PRODUCTION. INFO 2025-09-22T09:28:34.6675347 HTTPS enforcement it not enabled, please enable it in a production environment WARNING 2025-09-22T09:28:34.774747827 Config value: no setting found for 'edc.hostname', falling back to default value 'localhost' WARNING 2025-09-22T09:28:34.88495366 Using the InMemoryVault is not suitable for production scenarios and should be replaced with an actual Vault! INFO 2025-09-22T09:28:35.031852619 9 service extensions started INFO 2025-09-22T09:28:35.032885401 Runtime e1fb90ce-63a0-4d6b-bcdf-8c998b67f41b ready ``` -------------------------------- ### Run Consumer Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Starts the Eclipse Dataspace Connector as a consumer using a specific configuration file. ```shell #consumer export EDC_FS_CONFIG=transfer/transfer-06-kafka-broker/kafka-runtime/consumer.properties java -jar transfer/transfer-06-kafka-broker/kafka-runtime/build/libs/connector.jar ``` -------------------------------- ### Transfer Process Status Example Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Example JSON output showing the state of a Transfer Process. In the consumer pull scenario, a 'STARTED' state signifies successful data transfer. ```json { "...", "@id": "591bb609-1edb-4a6b-babe-50f1eca3e1e9", "state": "STARTED", "..." } ``` -------------------------------- ### Negotiation State Example Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Example JSON response showing the state of a contract negotiation, including state and error details if applicable. ```json { ... "edc:state": "TERMINATED", "edc:errorDetail": "Contract offer is not valid: Policy in scope contract.negotiation not fulfilled: [Permission constraints: [Constraint 'https://w3id.org/edc/v0.0.1/ns/location' EQ 'eu']]", ... } ``` -------------------------------- ### Run the fc-connector Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-01-embedded/README.md Start the fc-connector by specifying the configuration file and JAR path. The Management API will be accessible on port 29193 upon successful execution. ```shell java -Dedc.fs.config=federated-catalog/fc-01-embedded/fc-connector/config.properties -jar federated-catalog/fc-01-embedded/fc-connector/build/libs/fc-connector.jar ``` -------------------------------- ### Start Docker Compose Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Starts the Docker Compose environment for the OpenTelemetry sample, including the consumer, provider, and Jaeger backend. The --abort-on-container-exit flag ensures that the containers stop if one exits unexpectedly. ```bash docker compose -f advanced/advanced-01-open-telemetry/docker-compose.yaml up --abort-on-container-exit ``` -------------------------------- ### Provider Log Example Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Example log entries from the provider indicating constraint evaluation during contract negotiation. ```log INFO 2024-02-12T11:07:32.954014912 Evaluating constraint: location EQ eu DEBUG 2024-02-12T11:07:32.9562391 [Provider] Contract offer rejected as invalid: Policy eu-policy not fulfilled ``` -------------------------------- ### Start Contract Negotiation Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Initiate a contract negotiation with a provider using the consumer's management API. Provide details about the target connector, protocol, and the desired offer. ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/contract-request.json \ "http://localhost:29193/management/v3/contractnegotiations" | jq ``` -------------------------------- ### Run Participant Connector Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-00-basic/README.md Execute the connector JAR with the specified configuration properties to start the participant connector. This connector will function as a provider. ```shell java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties -jar transfer/transfer-00-prerequisites/connector/build/libs/connector.jar ``` -------------------------------- ### Catalog Response Example Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md This is an example of a catalog response, detailing datasets, policies, and service endpoints. Note that access policy constraints may not apply during the cataloging phase. ```json { "@id": "4462b621-fb77-4e8c-91a5-8cbd85b967c2", "@type": "dcat:Catalog", "dcat:dataset": { "@id": "test-document", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "MQ==:dGVzdC1kb2N1bWVudA==:NjUzNTA5M2QtYTFjMi00YTRmLWE5NjYtYTM0ZjE2NjFjOTYy", "@type": "odrl:Set", "odrl:permission": { "odrl:target": "test-document", "odrl:action": { "odrl:type": "use" }, "odrl:constraint": { "odrl:leftOperand": "location", "odrl:operator": { "@id": "odrl:eq" }, "odrl:rightOperand": "eu" } }, "odrl:prohibition": [], "odrl:obligation": [], "odrl:target": { "@id": "test-document" } }, "dcat:distribution": [], "id": "test-document" }, "dcat:service": { "@id": "fe9581ee-b4ec-473c-b0b7-96f30d957e87", "@type": "dcat:DataService", "dct:terms": "connector", "dct:endpointUrl": "http://localhost:8282/protocol/2025-1" }, "participantId": "provider", "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "edc": "https://w3id.org/edc/v0.0.1/ns/", "dcat": "https://www.w3.org/ns/dcat/", "dct": "https://purl.org/dc/terms/", "odrl": "http://www.w3.org/ns/odrl/2/", "dspace": "https://w3id.org/dspace/2025/1/" } } ``` -------------------------------- ### Endpoint Data Reference Example Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md An example of a DataAddress object, which includes the endpoint URL, authentication type, and authorization token required to access the data. ```json { "@type": "DataAddress", "type": "https://w3id.org/idsa/v4.1/HTTP", "endpoint": "http://localhost:19291/public", "authType": "bearer", "endpointType": "https://w3id.org/idsa/v4.1/HTTP", "authorization": "eyJraWQiOiJwdWJsaWMta2V5IiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJwcm92aWRlciIsImF1ZCI6ImNvbnN1bWVyIiwic3ViIjoicHJvdmlkZXIiLCJpYXQiOjE3MTc3NjkyMzEyOTYsImp0aSI6IjM2M2RhMGU4LWZmOGItNDY1My05YjQwLWY4MjdlMWMzOGMzYyJ9.WOVPz6m7XzIrbiMTfLqOXacGYz8Xk_-iQu7gmxoIgDFYsgo0da2Iv51EsugIpqbodPsmB0kK7zkyrmsFOfAASAq7fjsy4gQF-u5egYwoGpcxjYaJJdQa5lkwjC0fRxdVFVwZwrOaT5Mg-vGA9HssTEnlA64q-O0ae_aTH5ToflmPDM3FhAgL55I3odM5ysM2POEJY6pgOxIV9XjuhZFl_i_iTiUCZy__oQUZiYk58wKoqfK758Sy1WzpH-eyZCDUi_Z3n6cJB80_0ZThoPhtiFH7Tl9DfStnjsCoaeqMLFnTXp0s8h4ZGFmjfBc-72aAdRQqqLDT8WXNg3Csv5B56Q", "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "edc": "https://w3id.org/edc/v0.0.1/ns/", "odrl": "http://www.w3.org/ns/odrl/2/" } } ``` -------------------------------- ### Start HTTP Request Logger Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Build and run the HTTP request logger utility. This server will receive the EndpointDataReference. Ensure the port is accessible. ```shell ./gradlew util:http-request-logger:build HTTP_SERVER_PORT=4000 java -jar util/http-request-logger/build/libs/http-request-logger.jar ``` -------------------------------- ### Start Data Transfer Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Initiate the data transfer process. Ensure `{{contract-agreement-id}}` is replaced with the actual contract agreement ID and the destination address is correct. ```shell curl -H 'Content-Type: application/json' -d @transfer/transfer-06-kafka-broker/6-transfer.json -X POST "http://localhost:28181/management/v3/transferprocesses" -s | jq ``` -------------------------------- ### Sample Catalog Response Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-01-negotiation/README.md This is an example of the JSON response received after requesting a catalog. It details available datasets and their policies. ```json { "@id": "31f6d748-d35b-4dec-9e34-d141fd17b458", "@type": "dcat:Catalog", "dcat:dataset": { "@id": "assetId", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "MQ==:YXNzZXRJZA==:YTc4OGEwYjMtODRlZi00NWYwLTgwOWQtMGZjZTMwMGM3Y2Ey", "@type": "odrl:Set", "odrl:permission": [], "odrl:prohibition": [], "odrl:obligation": [], "odrl:target": "assetId" }, "dcat:distribution": [ { "@type": "dcat:Distribution", "dct:format": { "@id": "HttpProxy" }, "dcat:accessService": "2a5178c3-c937-4ac2-85be-c46dbc6c5642" }, { "@type": "dcat:Distribution", "dct:format": { "@id": "HttpData" }, "dcat:accessService": "2a5178c3-c937-4ac2-85be-c46dbc6c5642" } ], "name": "product description", "id": "assetId", "contenttype": "application/json" }, "dcat:service": { "@id": "2a5178c3-c937-4ac2-85be-c46dbc6c5642", "@type": "dcat:DataService", "dct:terms": "connector", "dct:endpointUrl": "http://localhost:19194/protocol/2025-1" }, "participantId": "anonymous", "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "dct": "https://purl.org/dc/terms/", "dcat": "https://www.w3.org/ns/dcat/", "odrl": "http://www.w3.org/ns/odrl/2/", "dspace": "https://w3id.org/dspace/2025/1/" } } ``` -------------------------------- ### Run the Consumer Connector Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-00-prerequisites/README.md Start the consumer connector in a separate terminal, using its specific configuration properties file. The consumer will listen on different management and DSP API ports than the provider. ```bash java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties -jar transfer/transfer-00-prerequisites/connector/build/libs/connector.jar ``` -------------------------------- ### Build and Boot EDC Connectors Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-05-file-transfer-cloud/README.md Builds the Eclipse Dataspace Connector provider and consumer JAR files using Gradle and then starts them with specific configuration properties. This requires two separate terminal windows. ```bash ./gradlew clean build java -Dedc.fs.config=transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/config.properties -jar transfer/transfer-05-file-transfer-cloud/cloud-transfer-provider/build/libs/provider.jar # in another terminal window: java -Dedc.fs.config=transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/config.properties -jar transfer/transfer-05-file-transfer-cloud/cloud-transfer-consumer/build/libs/consumer.jar ``` -------------------------------- ### Start HTTP Request Logger Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-04-event-consumer/README.md Builds and runs a Docker container that logs incoming HTTP requests on port 4000. This server acts as a data sink for the transfer. ```bash docker build -t http-request-logger util/http-request-logger docker run -p 4000:4000 http-request-logger ``` -------------------------------- ### Sample Dataset JSON Output Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Example JSON output representing a dataset, including its ID, policy, and distribution information. This is the typical response when querying for dataset details. ```json { "@id": "assetId", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "MQ==:YXNzZXRJZA==:NjdlNDFhM2EtYThjMS00YTBmLWFkNmYtMjk5NzkzNTE2OTE3", "@type": "odrl:Offer", "odrl:permission": [], "odrl:prohibition": [], "odrl:obligation": [] }, "dcat:distribution": [ { "@type": "dcat:Distribution", "dct:format": { "@id": "HttpData-PULL" }, "dcat:accessService": { "@id": "cb701b36-48ee-4132-8436-dba7b83c606c", "@type": "dcat:DataService", "dcat:endpointDescription": "dspace:connector", "dcat:endpointUrl": "http://provider:19194/protocol/2025-1", "dct:terms": "dspace:connector", "dct:endpointUrl": "http://provider:19194/protocol/2025-1" } }, { "@type": "dcat:Distribution", "dct:format": { "@id": "HttpData-PUSH" }, "dcat:accessService": { "@id": "cb701b36-48ee-4132-8436-dba7b83c606c", "@type": "dcat:DataService", "dcat:endpointDescription": "dspace:connector", "dcat:endpointUrl": "http://provider:19194/protocol/2025-1", "dct:terms": "dspace:connector", "dct:endpointUrl": "http://provider:19194/protocol/2025-1" } } ], "name": "product description", "id": "assetId", "contenttype": "application/json", "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "edc": "https://w3id.org/edc/v0.0.1/ns/", "dcat": "http://www.w3.org/ns/dcat#", "dct": "http://purl.org/dc/terms/", "odrl": "http://www.w3.org/ns/odrl/2/", "dspace": "https://w3id.org/dspace/2025/1/" } } ``` -------------------------------- ### Sample Transfer Process Response Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Example JSON output received after initiating a data transfer, containing the unique identifier and creation timestamp of the Transfer Process. ```json { "...", "@id": "591bb609-1edb-4a6b-babe-50f1eca3e1e9", "createdAt": 1674078357807, "..." } ``` -------------------------------- ### Dataset Catalog Response Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md This is an example of the dataset catalog response. The `odrl:hasPolicy/@id` is crucial for the next step. ```json { "@id": "kafka-stream-asset", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "Y29udHJhY3QtZGVmaW5pdGlvbg==:c3RyZWFtLWFzc2V0:NDlhYTUzZWEtMDUzMS00ZDkyLTg4Y2YtMGRjMTc4MmQ1NjY4", "@type": "odrl:Set", "odrl:permission": [], "odrl:prohibition": [], "odrl:obligation": [], "odrl:target": "kafka-stream-asset" }, "dcat:distribution": [], "edc:id": "kafka-stream-asset", "@context": { "dct": "https://purl.org/dc/terms/", "edc": "https://w3id.org/edc/v0.0.1/ns/", "dcat": "https://www.w3.org/ns/dcat/", "odrl": "http://www.w3.org/ns/odrl/2/", "dspace": "https://w3id.org/dspace/2025/1/" } } ``` -------------------------------- ### Start File Transfer with curl Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Execute a file transfer using curl, specifying API key, content type, and the JSON payload. This command initiates a transfer process. ```bash curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/start-transfer.json \ -X POST "http://localhost:29193/management/v3/transferprocesses" \ -s | jq ``` -------------------------------- ### Sample Transfer Process Output Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-02-provider-push/README.md An example of the JSON output when checking the status of a transfer process. It includes details like the transfer process ID and creation timestamp. ```json { ... "@id": "591bb609-1edb-4a6b-babe-50f1eca3e1e9", "createdAt": 1674078357807, ... } ``` -------------------------------- ### Sample Contract Negotiation JSON Output Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-01-negotiation/README.md This is an example of the JSON response received when querying the contract negotiation status. The 'contractAgreementId' field is highlighted as it's needed for the next steps. ```json { "@type": "ContractNegotiation", "@id": "5ca21b82-075b-4682-add8-c26c9a2ced67", "type": "CONSUMER", "protocol": "dataspace-protocol-http:2025-1", "state": "FINALIZED", "counterPartyAddress": "http://localhost:19194/protocol/2025-1", "callbackAddresses": [], "contractAgreementId": "0b3150be-feaf-43bc-91e1-90f050de28bd", <--------- "@context": { "@vocab": "https://w3id.org/edc/v0.0.1/ns/", "dct": "https://purl.org/dc/terms/", "dcat": "https://www.w3.org/ns/dcat/", "odrl": "http://www.w3.org/ns/odrl/2/", "dspace": "https://w3id.org/dspace/2025/1/" } } ``` -------------------------------- ### Start Data Transfer Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Initiates a data transfer process by sending a POST request to the management endpoint. Requires a JSON payload specifying asset details, contract agreement, provider address, and destination. The response contains the Transfer Process ID. ```bash curl -X POST "http://localhost:29193/management/v3/transferprocesses" \ -H "Content-Type: application/json" \ -d @transfer/transfer-03-consumer-pull/resources/start-transfer.json \ -s | jq ``` -------------------------------- ### Initiate Data Transfer Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-05-file-transfer-cloud/README.md Starts a data transfer process between EDC connectors by sending a POST request to the transfer processes endpoint. This request includes the contract agreement ID and other transfer details specified in a JSON file. ```bash curl -X POST "http://localhost:29193/management/v3/transferprocesses" \ -H 'X-Api-Key: password' -H "Content-Type: application/json" \ -d @transfer/transfer-05-file-transfer-cloud/resources/start-transfer.json \ -s | jq ``` -------------------------------- ### Create and Configure Properties File Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-03-configuration/README.md Create a properties file for configuration and set the web server port by adding `web.http.port=9191`. ```bash mkdir -p /etc/eclipse/dataspaceconnector touch /etc/eclipse/dataspaceconnector/config.properties ``` ```properties web.http.port=9191 ``` -------------------------------- ### Build and Run the Connector Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-01-basic-connector/README.md Execute these commands from the root directory to build the connector artifact and then run the connector application. Assumes the shadow plugin is used and the Gradle Wrapper is available. ```bash ./gradlew clean basic:basic-01-basic-connector:build ``` ```bash java -jar basic/basic-01-basic-connector/build/libs/basic-connector.jar ``` -------------------------------- ### Check Transfer Status Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Retrieves the current status of a data transfer process using its unique ID. The response indicates the state of the transfer, such as 'STARTED'. For consumer pull, the process remains in 'STARTED' after data transfer. ```bash curl http://localhost:29193/management/v3/transferprocesses/ | jq ``` -------------------------------- ### Run Consumer Connector Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Builds and runs the consumer connector. Ensure the configuration file path is correct. ```bash ./gradlew policy:policy-01-policy-enforcement:policy-enforcement-consumer:build java -Dedc.fs.config=policy/policy-01-policy-enforcement/policy-enforcement-consumer/config.properties -jar policy/policy-01-policy-enforcement/policy-enforcement-consumer/build/libs/consumer.jar ``` -------------------------------- ### Get Contract Agreement ID Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-05-file-transfer-cloud/README.md Retrieves the status of a contract negotiation using its ID via a GET request to the EDC management API. The response contains details including the contract agreement ID, which is needed for subsequent transfer requests. ```bash curl -X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \ -H 'X-Api-Key: password' --header 'Content-Type: application/json' \ -s | jq ``` -------------------------------- ### Get Dataset Information Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Retrieves dataset information from the provider connector. This is used to get details about an asset, including its policies and access endpoints, using a POST request to the catalog endpoint. Requires an API key and a JSON file specifying the dataset request. ```shell curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/get-dataset.json \ -X POST "http://localhost:29193/management/v3/catalog/dataset/request" \ -s | jq ``` -------------------------------- ### Build and Launch Consumer with Listener Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-04-event-consumer/README.md Builds the consumer connector JAR and launches it. Ensure previous connectors are terminated to avoid port conflicts. Requires Gradle and Java. ```bash ./gradlew transfer:transfer-04-event-consumer:consumer-with-listener:build java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties -jar \ transfer/transfer-04-event-consumer/consumer-with-subscriber/build/libs/connector.jar ``` -------------------------------- ### Run Provider Connector Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Executes the provider connector using a specified configuration file and JAR. ```bash java -Dedc.fs.config=transfer/transfer-03-consumer-pull/resources/configuration/provider.properties \ -jar transfer/transfer-03-consumer-pull/provider-proxy-data-plane/build/libs/connector.jar ``` -------------------------------- ### Run Provider Connector Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Builds and runs the provider connector. Ensure the configuration file path is correct. ```bash ./gradlew policy:policy-01-policy-enforcement:policy-enforcement-provider:build java -Dedc.fs.config=policy/policy-01-policy-enforcement/policy-enforcement-provider/config.properties -jar policy/policy-01-policy-enforcement/policy-enforcement-provider/build/libs/provider.jar ``` -------------------------------- ### Run Consumer Connector Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Executes the consumer connector using its configuration file and JAR. This is typically the same connector built in prerequisite samples. ```bash java -Dedc.fs.config=transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties \ -jar transfer/transfer-00-prerequisites/connector/build/libs/connector.jar ``` -------------------------------- ### Build and Run EDC with Default Configuration Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-03-configuration/README.md Compile and run the application. Initially, a log message will indicate that the default configuration file is not found. ```bash ./gradlew clean basic:basic-03-configuration:build java -jar basic/basic-03-configuration/build/libs/filesystem-config-connector.jar ``` ```log INFO 2021-09-07T08:26:08.282159 Configuration file does not exist: dataspaceconnector-configuration.properties. Ignoring. ``` -------------------------------- ### Monitor Transfer Process Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Check the status of the data transfer. Replace `{{transfer-process-id}}` with the ID returned by the start transfer call. ```shell curl "http://localhost:28181/management/v3/transferprocesses/{{transfer-process-id}}" -s | jq ``` -------------------------------- ### Make Catalog Request Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Initiate a catalog request from the consumer to the provider to view available offers. This requires specifying the provider's address in the request body. ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/catalog-request.json \ "http://localhost:29193/management/v3/catalog/request" | jq ``` -------------------------------- ### Get Contract Agreement ID Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-04-event-consumer/README.md Retrieves details of a contract negotiation, including the agreement ID. Requires the contract negotiation ID from the previous step. ```bash curl -X GET "http://localhost:29193/management/v3/contractnegotiations/{{contract-negotiation-id}}" \ --header 'Content-Type: application/json' \ -s | jq ``` -------------------------------- ### Get Contract Negotiation State Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Use this endpoint to retrieve the current state of a contract negotiation using its ID. Requires an API key for authentication. ```bash curl -X GET -H "X-Api-Key: password" "http://localhost:29193/management/v3/contractnegotiations/" | jq ``` -------------------------------- ### Request Data using EDR Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Accesses the transferred data by making a GET request to the provided endpoint URL, including the authorization token obtained from the EndpointDataReference. ```bash curl --location --request GET 'http://localhost:19291/public/' --header 'Authorization: ' ``` -------------------------------- ### Fetch Catalog on Consumer Side Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-01-negotiation/README.md Use this cURL command to request the catalog from the provider. Ensure the JSON payload file 'fetch-catalog.json' is correctly configured. ```bash curl -X POST "http://localhost:29193/management/v3/catalog/request" \ -H 'Content-Type: application/json' \ -d @transfer/transfer-01-negotiation/resources/fetch-catalog.json -s | jq ``` -------------------------------- ### Create Kafka Topic Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Creates the 'kafka-stream-topic' with one partition and a replication factor of one using Kafka's command-line tools within a running container. ```shell docker exec -it kafka-kraft /bin/kafka-topics \ --topic kafka-stream-topic --create --partitions 1 --replication-factor 1 \ --command-config=/config/admin.properties \ --bootstrap-server localhost:9092 ``` -------------------------------- ### Create Contract Definition Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Use this command to create a contract definition, referencing a policy and asset. Ensure the policy is correctly set as both access and contract policy. ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/create-contract-definition.json \ "http://localhost:19193/management/v3/contractdefinitions" | jq ``` -------------------------------- ### Build the fc-connector JAR Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-01-embedded/README.md Execute this Gradle command in the project root to build the fc-connector JAR file. ```bash ./gradlew federated-catalog:fc-01-embedded:fc-connector:build ``` -------------------------------- ### Add Filesystem Configuration Dependency Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-03-configuration/README.md Include the `configuration-filesystem` module in your project's dependencies to enable filesystem-based configuration. ```kotlin dependencies { // ... implementation(libs.edc.configuration.filesystem) // ... } ``` -------------------------------- ### Run EDC with Custom Configuration Path Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-03-configuration/README.md Run the connector, specifying the path to your custom configuration file using the `edc.fs.config` system property. ```bash java -Dedc.fs.config=/etc/eclipse/dataspaceconnector/config.properties -jar basic/basic-03-configuration/build/libs/filesystem-config-connector.jar ``` ```log INFO 2022-04-27T14:09:10.547662345 HTTP context 'default' listening on port 9191 <-- this is the relevant line DEBUG 2022-04-27T14:09:10.589738491 Port mappings: {alias='default', port=9191, path='/api'} INFO 2022-04-27T14:09:10.589846121 Started Jetty Service ``` -------------------------------- ### Create Health Check REST API Controller Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-02-health-endpoint/README.md This class uses Jakarta REST annotations to define a simple HTTP GET endpoint for health checks. It consumes and produces JSON and logs incoming requests. ```java @Consumes({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON}) @Path("/") public class HealthApiController { private final Monitor monitor; public HealthApiController(Monitor monitor) { this.monitor = monitor; } @GET @Path("health") public String checkHealth() { monitor.info("Received a health request"); return "{\"response\":\"I'm alive!\"}"; } } ``` -------------------------------- ### Build Participant Connector JAR Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-00-basic/README.md Use this Gradle command to build the connector JAR file for the participant connector, which will be used as a provider in future samples. ```shell ./gradlew transfer:transfer-00-prerequisites:connector:build ``` -------------------------------- ### Sample Contract Definition Output Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-01-negotiation/README.md This is a sample output from creating a contract definition, showing the identifier and creation timestamp. ```json { "...": "...", "@id": "1", "createdAt": 1674578184023, "...": "..." } ``` -------------------------------- ### Build Standalone FC JAR Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-02-standalone/README.md Execute this Gradle command in the project root to build the standalone-fc JAR file. ```bash ./gradlew federated-catalog:fc-02-standalone:standalone-fc:build ``` -------------------------------- ### Negotiate Contract Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-04-event-consumer/README.md Initiates a contract negotiation by sending a POST request with negotiation data. Requires a running provider connector. ```bash curl -d @transfer/transfer-01-negotiation/resources/negotiate-contract.json \ -X POST -H 'content-type: application/json' http://localhost:29193/management/v3/contractnegotiations \ -s | jq ``` -------------------------------- ### Negotiate Contract Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Initiates a contract negotiation with the provider connector. Requires an API key and a JSON file containing the contract offer details, including the policy ID obtained from the dataset information. The output is piped to jq for pretty-printing. ```bash curl -H "X-Api-Key: password" \ -H "Content-Type: application/json" \ -d @advanced/advanced-01-open-telemetry/resources/negotiate-contract.json \ -X POST "http://localhost:29193/management/v3/contractnegotiations" \ -s | jq ``` -------------------------------- ### Sample Contract Negotiation Response Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-01-negotiation/README.md This is a sample output from initiating a contract negotiation. It includes the unique identifier for the negotiation and creation timestamp. ```json { ... "@id": "254015f3-5f1e-4a59-9ad9-bf0e42d4819e", "createdAt": 1685525281848, ... } ``` -------------------------------- ### Build Connector Runtime Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Builds the Eclipse Dataspace Connector runtime, used for both provider and consumer roles in the Kafka streaming sample. ```shell ./gradlew :transfer:transfer-06-kafka-broker:kafka-runtime:build ``` -------------------------------- ### Build and Run the EDC Connector with Health Endpoint Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-02-health-endpoint/README.md These commands are used to build the connector with the new health endpoint extension and then run the resulting JAR file. The health endpoint can be accessed at `http://localhost:8181/api/health`. ```bash ./gradlew clean basic:basic-02-health-endpoint:build java -jar basic/basic-02-health-endpoint/build/libs/connector-health.jar ``` -------------------------------- ### Sample Catalog Query Output Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-01-embedded/README.md This is a sample JSON output when querying the catalog API. It includes details about the catalog, dataset, and participant ID. ```json [ { "@id": "a8a8cd64-269d-485c-8857-74d08b13ae3c", "@type": "dcat:Catalog", "dcat:dataset": { "@id": "assetId", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "MQ==:YXNzZXRJZA==:MjJmNDlhYTAtM2I3YS00ODkzLTkwZDctNTU5MTZhNmViOWJk" }, "dcat:distribution": [ ], "name": "product description", "id": "assetId", "contenttype": "application/json" }, "dcat:distribution": [], "dcat:service": { }, "dspace:participantId": "provider", "originator": "http://localhost:19194/protocol/2025-1", "@context": { } } ] ``` -------------------------------- ### Build Provider Proxy Data Plane Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-03-consumer-pull/README.md Command to build the provider connector's proxy data plane module using Gradle. ```bash ./gradlew transfer:transfer-03-consumer-pull:provider-proxy-data-plane:build ``` -------------------------------- ### Sample Catalog Query API Output Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-02-standalone/README.md This is a sample JSON output representing a single catalog entry retrieved from the catalog query API. ```json [ { "@id": "a8a8cd64-269d-485c-8857-74d08b13ae3c", "@type": "dcat:Catalog", "dcat:dataset": { "@id": "assetId", "@type": "dcat:Dataset", "odrl:hasPolicy": { "@id": "MQ==:YXNzZXRJZA==:MjJmNDlhYTAtM2I3YS00ODkzLTkwZDctNTU5MTZhNmViOWJk" }, "dcat:distribution": [ ], "name": "product description", "id": "assetId", "contenttype": "application/json" }, "dcat:distribution": [], "dcat:service": { }, "dspace:participantId": "provider", "originator": "http://localhost:19194/protocol/2025-1", "@context": { } } ] ``` -------------------------------- ### Create Policy Definition via API Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Uses curl to send a POST request to create a policy definition on the provider. The policy includes a permission with a location constraint. ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/create-policy.json \ "http://localhost:19193/management/v3/policydefinitions" | jq ``` -------------------------------- ### Build and Run HTTP Request Logger Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-02-provider-push/README.md Builds a Docker image for an HTTP request logger and runs it on port 4000. This server will receive the data pushed by the provider. ```bash docker build -t http-request-logger util/http-request-logger docker run -p 4000:4000 http-request-logger ``` -------------------------------- ### Run Standalone FC Connector Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-02-standalone/README.md Run the standalone federated catalog JAR file, specifying the configuration properties file using the -Dedc.fs.config system property. ```shell java -Dedc.fs.config=federated-catalog/fc-02-standalone/standalone-fc/config.properties -jar federated-catalog/fc-02-standalone/standalone-fc/build/libs/standalone-fc.jar ``` -------------------------------- ### Run FC-Connector Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-03-static-node-directory/README.md Run the embedded federated catalog connector using the built JAR file. The management API will be available on port 29193 upon successful execution. ```shell java -Dedc.fs.config=federated-catalog/fc-01-embedded/fc-connector/config.properties -jar federated-catalog/fc-03-static-node-directory/embedded-fc-with-node-resolver/build/libs/fc-connector-with-node-resolver.jar ``` -------------------------------- ### Run Standalone Federated Catalog Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-03-static-node-directory/README.md Command to execute the standalone federated catalog JAR. It requires specifying the configuration properties file for the federated catalog. ```shell java -Dedc.fs.config=federated-catalog/fc-02-standalone/standalone-fc/config.properties -jar federated-catalog/fc-03-static-node-directory/standalone-fc-with-node-resolver/build/libs/standalone-fc-with-node-resolver.jar ``` -------------------------------- ### Build the Connector Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Builds the Eclipse EDC connector using Gradle. Ensure you are in the project root folder. ```bash ./gradlew :advanced:advanced-01-open-telemetry:open-telemetry-runtime:build ``` -------------------------------- ### Create Asset via API Source: https://github.com/eclipse-edc/samples/blob/main/policy/policy-01-policy-enforcement/README.md Uses curl to send a POST request to create an asset on the provider. Requires a JSON payload specifying the asset details. ```bash curl -X POST -H "Content-Type: application/json" -H "X-Api-Key: password" \ -d @policy/policy-01-policy-enforcement/resources/create-asset.json \ "http://localhost:19193/management/v3/assets" | jq ``` -------------------------------- ### Build Standalone Federated Catalog JAR Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-03-static-node-directory/README.md Command to build the JAR file for the standalone federated catalog with the node resolver integrated. ```bash ./gradlew federated-catalog:fc-03-static-node-directory:standalone-fc-with-node-resolver:build ``` -------------------------------- ### Negotiate Contract Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Initiate contract negotiation by sending a POST request with the contract definition. Replace the policy ID from the dataset catalog response. ```shell curl -H 'Content-Type: application/json' -d @transfer/transfer-06-kafka-broker/5-negotiate-contract.json -X POST "http://localhost:28181/management/v3/contractnegotiations" -s | jq ``` -------------------------------- ### Run Kafka Container Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-06-kafka-broker/README.md Launches a Kafka container in KRaft mode with SASL_PLAINTEXT security protocol, configured for a single broker. ```shell docker run --rm --name=kafka-kraft -h kafka-kraft -p 9093:9093 \ -v "$PWD/transfer/transfer-06-kafka-broker/kafka-config":/config \ --env-file transfer/transfer-06-kafka-broker/kafka.env \ -e KAFKA_NODE_ID=1 \ -e KAFKA_LISTENERS='PLAINTEXT://0.0.0.0:9093,BROKER://0.0.0.0:9092,CONTROLLER://0.0.0.0:9094' \ -e KAFKA_ADVERTISED_LISTENERS='PLAINTEXT://localhost:9093,BROKER://localhost:9092' \ -e KAFKA_PROCESS_ROLES='broker,controller' \ -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 \ -e KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 \ -e KAFKA_CONTROLLER_QUORUM_VOTERS='1@localhost:9094' \ -e KAFKA_INTER_BROKER_LISTENER_NAME='BROKER' \ -e KAFKA_CONTROLLER_LISTENER_NAMES='CONTROLLER' \ -e KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS=1 \ -e CLUSTER_ID='4L6g3nShT-eMCtK--X86sw' \ confluentinc/cp-kafka:7.5.2 ``` -------------------------------- ### Add Dependencies for Standalone Federated Catalog Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-02-standalone/README.md Include these dependencies in your build.gradle.kts file to enable the federated catalog base and static node resolver functionalities. ```kotlin dependencies { runtimeOnly(project(":federated-catalog:fc-00-basic:federated-catalog-base")) runtimeOnly(project(":federated-catalog:fc-00-basic:static-node-resolver")) } ``` -------------------------------- ### Add EDC Dependencies to build.gradle.kts Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-01-basic-connector/README.md Include these essential dependencies in your build.gradle.kts file to set up the connector runtime. ```kotlin dependencies { implementation(libs.edc.boot) implementation(libs.edc.runtime.core) implementation(libs.edc.connector.core) } ``` ```kotlin dependencies { implementation(libs.edc.http) } ``` -------------------------------- ### Create Policy Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Creates a new policy definition in the Eclipse EDC management API. Requires an API key and a JSON file with policy details. The output is piped to jq for pretty-printing. ```bash curl -H "X-Api-Key: password" \ -d @transfer/transfer-01-negotiation/resources/create-policy.json \ -H 'content-type: application/json' http://localhost:19193/management/v3/policydefinitions \ -s | jq ``` -------------------------------- ### List Blobs in Azurite Container Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-05-file-transfer-cloud/README.md Lists all blobs within a specified container in Azurite blob storage and formats the output as a table showing only the blob names. Requires the container name and connection string. ```bash az storage blob list --container-name src-container --connection-string "DefaultEndpointsProtocol=http;AccountName=provider;AccountKey=password;BlobEndpoint=http://127.0.0.1:10000/provider;" --query "[].{name:name}" --output table ``` -------------------------------- ### Implement TransferProcessStartedSubscriber Source: https://github.com/eclipse-edc/samples/blob/main/transfer/transfer-04-event-consumer/README.md Implements the EventSubscriber interface to handle TransferProcessStarted events. The 'on' method is triggered when the event is published. Requires a Monitor instance for logging. ```java class TransferProcessStartedSubscriber implements EventSubscriber { private final Monitor monitor; public TransferProcessStartedSubscriber(Monitor monitor) { this.monitor = monitor; } @Override public void on(EventEnvelope event) { monitor.info("TransferProcessStarted event has been emitted."); // do something after transfer has been started } } ``` -------------------------------- ### CatalogNodeDirectory Implementation Source: https://github.com/eclipse-edc/samples/blob/main/federated-catalog/fc-03-static-node-directory/README.md Java implementation of TargetNodeDirectory that reads participant data from a static JSON file. It maps the file content to a list of TargetNode objects. ```java public class CatalogNodeDirectory implements TargetNodeDirectory { //... @Override public List getAll() { try { return objectMapper.readValue(participantFileContent, new TypeReference<>() {}); } catch (IOException e) { throw new RuntimeException(e); } } //... ``` -------------------------------- ### Add Custom Configuration Value Source: https://github.com/eclipse-edc/samples/blob/main/basic/basic-03-configuration/README.md Add a custom configuration value to your properties file, such as `edc.samples.basic.03.logprefix=MyLogPrefix`, to be accessed from code. ```properties edc.samples.basic.03.logprefix=MyLogPrefix ``` -------------------------------- ### Create Asset Source: https://github.com/eclipse-edc/samples/blob/main/advanced/advanced-01-open-telemetry/README.md Creates a new asset in the Eclipse EDC management API. Requires an API key and a JSON file containing asset details. The output is piped to jq for pretty-printing. ```bash curl -H "X-Api-Key: password" \ -d @transfer/transfer-01-negotiation/resources/create-asset.json \ -H 'content-type: application/json' http://localhost:19193/management/v3/assets \ -s | jq ```