Code Monkey home page Code Monkey logo

amos2024ss02-international-dataspace-station's Introduction

IDS

International Dataspace Station

in collaboration with DATEV

๐Ÿ“– About

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

โšก๏ธ Requirements

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

๐Ÿณ Docker usage

To run the code using docker containers, use the following commands in separate terminals for both provider and consumer connectors:

1. Build a docker image

mkdir docker-images
sudo docker build -t <provider|consumer> . -f <provider|consumer>.Dockerfile
sudo docker save -o ./docker-images/<provider|consumer>.tar <provider|consumer>

2. Load and run

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:

  1. Go to ~/.docker/config.json
  2. Change the credsStore value from desktop to osxkeychain.

๐Ÿ–ฅ๏ธ Running the connectors locally

If you don't want to use docker, you can run the connectors locally. Use the following commands in separate terminals:

Provider connector

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

Consumer connector

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

๐Ÿ”— Establishing connection for data exchange

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:

1. Register data plane

curl -H 'Content-Type: application/json' \
     -d @resources/dataplane/register-data-plane-provider.json \
     -X POST "http://localhost:19193/management/v2/dataplanes" -s | jq

2. Create an asset

curl -d @resources/create-asset.json \
  -H 'content-type: application/json' http://localhost:19193/management/v3/assets \
  -s | jq

3. Create a policy

curl -d @resources/create-policy.json \
  -H 'content-type: application/json' http://localhost:19193/management/v2/policydefinitions \
  -s | jq

4. Create a contract definition

curl -d @resources/create-contract-definition.json \
  -H 'content-type: application/json' http://localhost:19193/management/v2/contractdefinitions \
  -s | jq

5. Fetch catalog

curl -X POST "http://localhost:29193/management/v2/catalog/request" \
    -H 'Content-Type: application/json' \
    -d @resources/fetch-catalog.json -s | jq

6. Negotiate contract

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

7. Get contract agreement id

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.

amos2024ss02-international-dataspace-station's People

Contributors

daku-de avatar dirkriehle avatar ekaterinaivanishcheva avatar esracosgun avatar jinzhangfau avatar msanyoto avatar timokroecker avatar xenia1w avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.