To access the Mobility Data Space in a convenient way you have to install and configure the Dataspace Connector and the MDS Dataspace Connector UI.
Generally, two ways exist, to get the connector and its UI up and running: Either you download the source code and run it locally or you use docker-images and start everything via docker-compose. We recommend using docker-compose!
Expected audience of this tutorial: We assume, the reader of this tutorial to be familiar with software development and software deployment in corporate infrastructures. Thus, no introduction is given to setup the basics like Java, Docker, etc.
-
Copy all files from deployment example repository folder Mobility-Data-Space/dsc-deployment-example/docker-test-environment:
- docker-compose.yml
- conf/bootstrap.properties
- conf/brokerCatalog.jsonld
- conf/config.json
- conf/keystore.p12
- conf/truststore.p12
-
Adjust
docker-compose.yml
to your needs:- Rename the downloaded certificate p12-file to
keystore.p12
if it is not already named correctly and copy it to the conf folder overriding the existingkeystore.p12
.
Hint: If you need to use another file name, you can adjust the file name of keystore inconfig.json
atids:keyStore
entry. - If run in an infrastructure with a reverse proxy, you might want to disable
SERVER_SSL_ENABLED
at docker-compose.yml as your reverse proxy most probably will terminate TLS. - Replace default passwords (
SPRING_SECURITY_USER_NAME
andCONNECTOR_USER
as well asSPRING_SECURITY_USER_PASSWORD
andCONNECTOR_PASSWORD
) must match. Further information about how to configure Dataspace Connector can be found here and here Be aware that application.properties variable names must be camel cased for docker (see Spring Boot Docs) - Protect access to the UI via your infrastructure (e.g. IP restriction or add Basic Auth)!
- Rename the downloaded certificate p12-file to
-
Adjust
config.json
- Set
@id
of JSON root to the URL where your connector's root will be available (e.g.,"@id" : "https://ids.ivi-test-connector.mobilitydataspace.io"
or"@id" : "https://localhost:8080"
) - Set
@id
ofids:accessURL
to the URL where your connector's root will be available and append/api/ids/data
(e.g.,"@id" : "https://ids.ivi-test-connector.mobilitydataspace.io/api/ids/data"
or"@id" : "https://localhost:8080/api/ids/data"
) - Set
@id
ofids:title
to your desired connector name (e.g.,"@id" : "DRM Datenraum Mobilität GmbH Dataspace Connector"
- Set connector description(e.g.,
An MDS Datasapce Connector of DRM Datenraum Mobilität GmbH for demonstration purposes
) - Set
@id
ofids:curator
to the URL of the connector curator (e.g.,https://mobility-dataspace.eu
) - Set
@id
ofids:maintainer
to the URL of the connector maintainer (e.g.,https://sovity.de
)
Please note, that there is no logical link between the Dataspace connector's deploy modeTEST_DEPLOYMENT
/PRODUCTIVE_DEPLOYMENT
(see here and here) and the Mobility Data Space's test environment and productive environment. In both environments, you need to set the Dataspace Connector's deploy mode toPRODUCTIVE_DEPLOYMENT
to register your connector at the Catalog.
- Set
-
Start containers via console
- Be aware to be logged-in into ghcr.io to be able to pull the images. See GitHub Documentation
- Run
docker-compose up -d
- Use credentials set as
SPRING_SECURITY_USER_NAME
andSPRING_SECURITY_USER_PASSWORD
to log-in into Swagger UI: https://localhost:8080/api/docs - MDS Dataspace Connector UI: http://localhost:8083
-
Stop via console
docker-compose down
-
Install Java, Maven and Node.js v.14
-
Download source code of the latest release of Dataspace Connector.
-
Adjust Dataspace Connector's settings
- Adjust
src/main/resources/conf/config.json
- Set
@id
of JSON root to the URL where your connector's root will be available (e.g.,"@id" : "https://localhost:8080"
) - Set
@id
ofids:accessURL
to the URL where your connector's root will be available and append/api/ids/data
(e.g.,"@id" : "https://localhost:8080/api/ids/data"
) - Set
@id
ofids:title
to your desired connector name (e.g.,"@id" : "DRM Datenraum Mobilität GmbH Dataspace Connector"
- Set connector description (e.g.,
An MDS Datasapce Connector of DRM Datenraum Mobilität GmbH for demonstration purposes
) - Set
@id
ofids:curator
to the URL of the connector curator (e.g.,https://mobility-dataspace.eu
) - Set
@id
ofids:maintainer
to the URL of the connector maintainer (e.g.,https://sovity.de
) - Set the
ids:keyStore
to the path of your received p12-file - Set
@id
ofids:connectorDeployMode
toidsc:PRODUCTIVE_DEPLOYMENT
Please note, that there is no logical link between the Dataspace connector's deploy modeTEST_DEPLOYMENT
/PRODUCTIVE_DEPLOYMENT
(see here and here) and the Mobility Data Space's test environment and productive environment. In both environments, you need to set the Dataspace Connector's deploy mode toPRODUCTIVE_DEPLOYMENT
to register your connector at the Catalog.
- Set
- Adjust
src/main/resources/application.properties
- Set Clearing House and DAPS properties:
Info: To ensure traceability and auditability of transactions in the MDS, we require our participants to use the Clearing House on the productive stage. Clearing House only logs metadata (transaction ID, timestamp).
clearing.house.url=https://clearing.test.mobility-dataspace.eu/logs/messages/ daps.url=https://daps.test.mobility-dataspace.eu daps.token.url=https://daps.test.mobility-dataspace.eu/token daps.key.url=https://daps.test.mobility-dataspace.eu/jwks.json daps.incoming.dat.default.wellknown=/jwks.json daps.whitelisted.url=https://daps.test.mobility-dataspace.eu
- Set Clearing House and DAPS properties:
- You most probably run your code on a local machine without a public URL pointing to your machine (e.g. https://ids.ivi-test-connector.mobilitydataspace.io). In that case, you need to set
referred.check=false
in application.properties. - Replace
src/main/resources/conf/keystore.p12
with your received keystore - Add
bootstrap.properties
andbrokerCatalog.jsonld
tosrc/main/resources/bootstrap
and adjustbootstrap.path=./src/main/resources/bootstrap
accordingly as well as enabling bootstrapping viabootstrap.enabled=true
property.
- Adjust
-
Start Dataspace Connector
- Open a console and cd into source folder
mvn clean compile
mvn spring-boot:run
-
Access the connector
- Use credentials set as
spring.security.user.name
andspring.security.user.password
of application.properties to log-in into Swagger UI: https://localhost:8080/api/docs
- Use credentials set as
-
Download source code of the latest release of MDS Dataspace Connector UI.
-
Install the backend (src/backend folder):
npm install
-
Start the backend (src/backend folder):
npm start
-
Install the UI (root folder):
npm install --no-audit
-
Start the UI (root folder)
npm start serve
. -
Access MDS Dataspace Connector UI: http://localhost:8082
Using Advanced View >> Settings >> General of the UI, you can verify your configuration changes. Please ensure that this information is accurate and complete as these fields represent the connector in the MDS catalog.
In addition, you can access connectors actuator page at https://localhost:8080/actuator/info to verify if a valid DAT could be acquired.
Please note, that there is no logical link between the Test mode of the Dataspace Connector and the Mobility Data Space Test environment. You need to use the Productive mode of the Dataspace Connector to work in the MDS Test environment.
Please follow steps for MDS Test environment above, but make use of example files for productive environment at Mobility-Data-Space/dsc-deployment-example/docker-productive-environment. Major difference of these files are, that MDS URLs of Broker, DAPS and Clearing House point to the productive environment.
As stated above, the productive environment is pretty the same setup as the test environment, but with differences regarding targeted infrastructure URLs.
- Clearing House and DAPS environment variables are pointing to productive environment:
CLEARING_HOUSE_URL=https://clearing.mobility-dataspace.eu/logs/messages/ DAPS_URL=https://daps.mobility-dataspace.eu DAPS_TOKEN_URL=https://daps.mobility-dataspace.eu/token DAPS_KEY_URL=https://daps.mobility-dataspace.eu/jwks.json DAPS_INCOMING_DAT_DEFAULT_WELLKNOWN=/jwks.json DAPS_WHITELISTED_URL=https://daps.mobility-dataspace.eu
- Be aware to use p12 generated for productive environment.
Stop, don't do that! Make use of Docker, Kubernetes, etc.