With the increase of data exchange among different sectors like finance, legal, healthcare, government and others, ensuring easy interoperability while still following data usage rules, policies, and local regulations is becoming increasingly important. Dataspace is the envisioned solution to tackle these challenges.
Dataspace operates with the help of data connectors, which enable secure and effective communication and exchange of data. They are a tool to connect many data endpoints to increase the pool of available data and to accelerate the data economy. By linking data connectors, dataspaces become protected environments where participants can freely share data. Data sovereignty, transparency and fairness are ensured by adherence to a set of rules.
Our goal is to explore the feasibiltiy of dataspace usage with regards to data sovereignty. This includes testing the maturity of dataspace, importance of the components and ease of deployment.
Learn in more detail about how our software works here: IDS - Software Architecture
If you want to run the connectors on your local machine, make sure that you have the following packages installed:
Package | Version |
---|---|
JDK | 17 |
Gradle | 8.7 |
jq | 1.7.1 |
Docker (optional) | 26 |
To run the code using docker containers, use the following commands in separate terminals for both provider and consumer connectors:
mkdir docker-images
sudo docker build -t <provider|consumer> . -f <provider|consumer>.Dockerfile
sudo docker save -o ./docker-images/<provider|consumer>.tar <provider|consumer>
sudo docker load -i ./docker-images/<provider|consumer>.tar
sudo docker run -it -p <19193:19193|29193:29193> <provider|consumer>
Note: If you are using macOS, you might have to modify the config.json
file:
- Go to
~/.docker/config.json
- Change the
credsStore
value fromdesktop
toosxkeychain
.
If you don't want to use docker, you can run the connectors locally. Use the following commands in separate terminals:
In the first terminal, use the following command to run a provider:
java -Dedc.keystore=resources/certs/cert.pfx -Dedc.keystore.password=123456 -Dedc.vault=resources/configuration/provider-vault.properties -Dedc.fs.config=resources/configuration/provider-configuration.properties -jar connector/build/libs/connector.jar
In the second terminal, use the following command to run a consumer:
java -Dedc.keystore=resources/certs/cert.pfx -Dedc.keystore.password=123456 -Dedc.vault=resources/configuration/consumer-vault.properties -Dedc.fs.config=resources/configuration/consumer-configuration.properties -jar connector/build/libs/connector.jar
In the third (main) terminal, use the following HTTP requests to establish a connection between the provider and the consumer to be able to exchange data:
curl -H 'Content-Type: application/json' \
-d @resources/dataplane/register-data-plane-provider.json \
-X POST "http://localhost:19193/management/v2/dataplanes" -s | jq
curl -d @resources/create-asset.json \
-H 'content-type: application/json' http://localhost:19193/management/v3/assets \
-s | jq
curl -d @resources/create-policy.json \
-H 'content-type: application/json' http://localhost:19193/management/v2/policydefinitions \
-s | jq
curl -d @resources/create-contract-definition.json \
-H 'content-type: application/json' http://localhost:19193/management/v2/contractdefinitions \
-s | jq
curl -X POST "http://localhost:29193/management/v2/catalog/request" \
-H 'Content-Type: application/json' \
-d @resources/fetch-catalog.json -s | jq
Replace the {{contract-offer-id}}
placeholder in negotiate-contract.json
with the contract offer id you found in the catalog at the path dcat:dataset.odrl:hasPolicy.@id
:
curl -d @resources/negotiate-contract.json \
-X POST -H 'content-type: application/json' http://localhost:29193/management/v2/contractnegotiations \
-s | jq
Replace {{contract-negotiation-id}}
with the id from the consumer terminal:
curl -X GET "http://localhost:29193/management/v2/contractnegotiations/{{contract-negotiation-id}}" \
--header 'Content-Type: application/json' \
-s | jq
The connectors have now been configured successfully and are ready to be used.