Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f36a515
Update requests of EDC connector client to v3 for registering asset/p…
DaviddeBest-TNO Oct 30, 2025
0f9c302
Rename log to capitalized
DaviddeBest-TNO Nov 17, 2025
d9e5a28
Reformat EDC files
DaviddeBest-TNO Nov 17, 2025
0e81c57
Change EDC service to only hold one client
DaviddeBest-TNO Nov 17, 2025
e530b7a
Update requests for catalog request, contract agreement and transfer …
DaviddeBest-TNO Nov 18, 2025
b91988a
Add participant id to runtime connection details
DaviddeBest-TNO Nov 18, 2025
8dd52af
Add polling for transfer process status and request for endpoind data…
DaviddeBest-TNO Nov 19, 2025
6fd8009
Proxy datatransfer of runtimes via EDC dataplanes
DaviddeBest-TNO Nov 28, 2025
e595050
Remove token posting and checking
DaviddeBest-TNO Nov 28, 2025
739be91
Move loading of config to EDC service
DaviddeBest-TNO Nov 28, 2025
397ad44
Remove EDC properties object
DaviddeBest-TNO Nov 29, 2025
8b231c4
Clean up EDC service
DaviddeBest-TNO Nov 29, 2025
e2d2f1b
Merge EDC service and client into one class
DaviddeBest-TNO Nov 29, 2025
34d5597
Remove unused functions
DaviddeBest-TNO Nov 29, 2025
df0bd51
Move creation of transfer process to edc service and reuse Transfer p…
DaviddeBest-TNO Nov 29, 2025
981c408
Clean up unused variables
DaviddeBest-TNO Nov 29, 2025
3229396
Remove unused tokenmanager class
DaviddeBest-TNO Nov 29, 2025
5660d9b
Remove unused Token record class
DaviddeBest-TNO Nov 29, 2025
7f09290
Refactor configuring connector
DaviddeBest-TNO Nov 29, 2025
0a3c141
Remove unnecessary config values
DaviddeBest-TNO Nov 29, 2025
ccb29f4
Combine EDC properties in participant properties object
DaviddeBest-TNO Dec 5, 2025
60a603a
Rework EDC service class
DaviddeBest-TNO Dec 5, 2025
569d531
Remove unused exposed URI
DaviddeBest-TNO Dec 5, 2025
b794414
Move temporary EDC example to this repository
DaviddeBest-TNO Dec 17, 2025
ad17901
Fix null bug
DaviddeBest-TNO Jan 7, 2026
9281d06
Update README for EDC example
DaviddeBest-TNO Jan 7, 2026
4ec680f
Update README and add log statement
DaviddeBest-TNO Jan 12, 2026
c40afe6
Apply stash
DaviddeBest-TNO Jan 14, 2026
c0556ac
Remove obsolete instructions in docs
DaviddeBest-TNO Jan 14, 2026
01f676f
Remove irrelevant file
DaviddeBest-TNO Jan 14, 2026
766e56a
Remove unused env vars in docker compose
DaviddeBest-TNO Jan 14, 2026
f2d6163
Change EDC images
DaviddeBest-TNO Jan 14, 2026
61b79cc
Remove old logging
DaviddeBest-TNO Jan 15, 2026
a43f133
Update README EDC example
DaviddeBest-TNO Jan 15, 2026
7c1ae27
Update note
DaviddeBest-TNO Jan 15, 2026
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
92 changes: 45 additions & 47 deletions examples/edc-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# TKE-EDC Example
This example uses EDC-IDS Connectors for communication between two Knowledge Engine Runtimes (KERs).
All messages that are sent contain an authentication code.
If a message is received, the authentication code is validated unless it is a meta Knowledge Interaction.
This example focuses on the Eclipse Dataspace Components (EDC) integration of the Knowledge Engine.
If you just want to learn about the functioning of the Knowledge Engine and do not know about EDC, this example is not the right place to start. \
In this text we assume basic knowledge about EDC (The [adopters manual](https://eclipse-edc.github.io/documentation/for-adopters/) is a good place to start) and International Data Spaces (IDS, see [here](https://internationaldataspaces.org/)). If any terms below are not familiar then please refer to these sources. \
If you are already familiar with the Knowledge Engine you can skip the next part.

## Introduction to the Knowledge Engine
The Knowledge Engine is a system for seamlessly connecting data sources.
Expand All @@ -27,64 +28,61 @@ After they have been registered, they can be executed.

For more information on the Knowledge Engine, check out the [documentation](https://docs.knowledge-engine.eu/).

## About the Integration with EDC-IDS
## About the Integration with EDC
The current integration between the Knowledge Engine and EDC-IDS focuses on the authentication of messages.
All messages that are sent contain an authentication code.
This authentication code is validated whenever the message is received.
This way we can be sure that the message was sent by the correct party, thus it establishes trust within the network.

We currently use the standard EDC-IDS Connector without any modifications.
We use the Connector to establish and check the identity of all parties in the network.
The communication between KERs is still direct, meaning that messages that are sent do not go through the Connector.
The TKE-EDC integration is aimed at providing and validating these authentication codes.
The used components of EDC implement the Data Space Protocol (DSP) and the Decentralized Claims Protocol (DCP), an overlay of DSP.
These protocols are used to establish security and trust within the network based on the decentralized identity model (see [here](https://eclipse-edc.github.io/documentation/for-adopters/identity-hub/)).

The authentication tokens are valid for a limited amount of time.
You can set the duration of validity of authentication tokens in the EDC Connector properties file (`edc.transfer.proxy.token.validity.seconds`).
While tokens can expire in the current implementation, there is not yet a mechanism to renew them.
That's why we currently advise you to set it to a high number.
! IMPORTANT ! The EDC integration is currently still under development. Expect bugs, frequent changes and updates. This implementation is certainly not suitable for production environments.

We currently use the Control Plane, Data Plane and Identity Hub components of EDC, which are all heavily customizable.
The TKE-EDC integration is made specifically for the extended EDC components developed within TNO, that are also publicly available, see the Docker Compose file in this folder.
We assume pregenerated Verifiable Credentials that are loaded into Identity Hub at start-up.
Currently we cannot give a definitive easiest way to generate these yourself, but will be future work.


## Running the TKE-EDC example
This example uses 3 knowledge bases as depicted below.

![Picture with 3 knowledge bases. Each knowledge base uses a Smart Connector to communicate with the other knowledge bases.](./illustration-example-situation.png)

One knowledge base asks for information and the other two provide an answer to the question.
One knowledge base (Alice) asks for information and the other two (Bob , Carol) provide an answer to the question. \
The network also contains an authority and registration service, where each participant registers at start up.
The authority is the issuer of all membership credentials, and exists in the network for its DID document to be searchable.
Explore the Docker Compose file in this folder to learn more about the setup. \
Extra care has been taken to simulate locally a setup that reflects a distributed setup across multiple machines. See the notes on networking in the Compose file.

### Executing the example
Execute the following steps to run the example:
1. In this project, execute a `mvn clean install`.
2. In the `knowledge-directory` directory in this project, execute `docker build . -t testkd:1.4.0`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried this example, I still needed to build this testkd image.

3. In the `smart-connector-rest-dist` directory in this project, execute `docker build . -t testsc:1.4.0`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I tried this example, I still needed to build this testsc image.

4. In the `examples/edc-example` directory in this project, execute `docker compose build`.
5. In the `examples/edc-example` directory in this project, execute `docker compose up -d tke-edc-one tke-edc-two tke-edc-three`. This starts three EDC-IDS Connectors.
6. Wait around 10 seconds to give the EDC Connectors time to finish setting up. Then, execute `docker compose up -d` to start three KERs, three linked Knowledge Bases and a Knowledge Directory.

You can inspect the logs with `docker compose logs -f`.
Example can be executed using Docker, follow these steps:
1. In the `examples/edc-example` directory in this project, execute `docker compose build`.
2. Several containers are dependent on the initialization of others, but there is currently no method implemented to start these in the correct order. In the `examples/edc-example` directory in this project, execute

```
docker compose up -d bob-identity-hub bob-control-plane alice-identity-hub alice-control-plane authority-identity-hub registration-service nginx-proxy alice-http-data-plane bob-http-data-plane carol-identity-hub carol-control-plane carol-http-data-plane
```

This starts three EDC-IDS Connectors.
3. Wait around 20 seconds to give the EDC Connectors time to finish setting up. Then, execute

```
docker compose up alice-ker bob-ker alice-kb bob-kb carol-ker carol-kb knowledge-directory -d
```

to start three KERs, three linked Knowledge Bases and a Knowledge Directory.

You can inspect the logs of the containers using `docker compose logs -f {component-name}`.
After a moment (+-30 seconds), the logs will stabilise when the connectors have finished initiating the various data flows.
You can then see that one KER (`runtime-1`) asks for information, a second KER (`runtime-2`) answers with `http://example.org/Math, http://example.org/Science` and the third (`runtime-3`) answers with `http://example.org/Magazines, http://example.org/Books`.

To stop the example, execute `docker compose down`.

## Adding another participant to the network
For each additional KER with an EDC-IDS Connector, we need the following files in the `examples/edc-example` directory:
- `connector/configuration/ker-configuration.properties` contains settings for the EDC-IDS Connector
- `connector/configuration/ker-vault.properties` contains a public key

The `docker-compose.yml` in `examples/edc-example/` should also be modified to include:
- An additional KER (currently named `runtime-1`, `runtime-2`, ...)
- The `image` setting refers to the image build in the execution steps of this document.
- The `depends_on` setting refers to the Docker component for the EDC-IDS Connector
- The `KE_RUNTIME_EXPOSED_URL` is a unique URL for the new KER.
- The EDC related environment variables are:
- `KE_RUNTIME_USE_EDC` -> Turn EDC functionality on or off.
- `KE_EDC_PROTOCOL_URL` -> URL of the protocal API of the associated EDC-IDS connector.
- `KE_EDC_MANAGEMENT_URL` -> URL of the management API of the associated EDC-IDS connector.
- `KE_EDC_DATAPLANE_CONTROL_URL` -> URL of the dataplane control API of the associated EDC-IDS connector.
- `KE_EDC_DATAPLANE_PUBLIC_URL` -> URL of the dataplane public API of the associated EDC-IDS connector.
- `KE_EDC_TOKEN_VALIDATION_ENDPOINT` -> URL of the token validation endpoint of the associated EDC-IDS connector.
- An additional EDC-IDS Connector (currently named `tke-edc-one`, `tke-edc-two`, ...)
- Requires 4 ports to be forwarded
- The `command` used to start this connector refers to the previously mentioned configuration files and thus the names of those files should be modified if you copy the command from another EDC-IDS Connector.
- The `hostname` is used in the properties files to refer to this entity
- An additional knowledge base (`kb1`, `kb2`, ...)
- The `KE_URL` refers to the `KE_RUNTIME_EXPOSED_URL` of the KER Docker component (`runtime-1`, `runtime-2`, ...)
### Configuration
The following configuration settings are required to use the EDC integration, for example by setting as environment variables in the KER container:
- `KE_RUNTIME_USE_EDC`: Boolean value for use of EDC integration.
- `KE_EDC_PARTICIPANT_ID`: Participant ID of the corresponding control plane and identity hub of this KER.
- `KE_EDC_PROTOCOL_URL`: DPS protocol API of the corresponding control plane of this KER, as defined in the control plane configuration.
- `KE_EDC_MANAGEMENT_URL`: Management API of the corresponding control plane of this KER, as defined in the control plane configuration.
- `KE_EDC_DATAPLANE_PUBLIC_URL`: Public API of the corresponding data plane of the KER, as defined in the data plane configuration.
Many more configuration is possible for each EDC service, but we advise to follow the configuration as per this example. See the configuration files for more notes.
21 changes: 0 additions & 21 deletions examples/edc-example/connector/certs/cert.pem

This file was deleted.

Binary file removed examples/edc-example/connector/certs/cert.pfx
Binary file not shown.
28 changes: 0 additions & 28 deletions examples/edc-example/connector/certs/key.pem

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file removed examples/edc-example/connector/libs/connector.jar
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that this is no longer necessary!👍

This binary is now distributed via the public docker image, I assume?

Binary file not shown.
Loading