FIWARE / data-space-connector

FIWARE Data Space Connector following DSBA TC recommendations
MIT License
10 stars 2 forks source link

FIWARE Data Space Connector

The FIWARE Data Space Connector is an integrated suite of components implementing DSBA Technical Convergence recommendations, every organization participating in a data space should deploy to “connect” to a data space. The implementation of these recommendations is developed as soon as they become enough mature.

This repository provides a description of the FIWARE Data Space Connector, its technical implementation and deployment recipes.

Table of Contents - [Overview](#overview) - [Components](#components) - [Description of flows in a data space](#description-of-flows-in-a-data-space) - [Onboarding of an organization in the data space](#onboarding-of-an-organization-in-the-data-space) - [Consumer registration](#consumer-registration) - [Contract management](#contract-management) - [Service interaction](#service-interaction) - [Service interaction (H2M)](#service-interaction-h2m) - [Service interaction (M2M)](#service-interaction-m2m) - [Deployment](#deployment) - [Local Deployment](#local-deployment) - [Deployment with Helm](#deployment-with-helm) - [Testing](#testing) - [Additional documentation and resources](#additional-documentation-and-resources) - [Additional documentation](#additional-documentation) - [Additional Resources](#additional-resources)

Overview

The FIWARE Data Space Connector is an integrated suite of components every organization participating in a data space should deploy to “connect” to a data space. Following the DSBA recommendations, it allows to:

Note: Although the FIWARE Data Space Connector provides compatibility with NGSI-LD as data exchange API, it could be also used for any other RESTful API by replacing or extending the PDP component of the connector.

Above listed functionalities can be used by an organization to connect to the data space in its role as data (processing) service provider, consumer of data (processing) services, or both.

Technically, the FIWARE Data Space Connector is a Helm Umbrella-Chart, containing all the sub-charts and their dependencies for deployment via Helm.
Thus, being provided as Helm chart, the FIWARE Data Space Connector can be deployed on Kubernetes environments.

Components

The following diagram shows a logical overview of the different components of the FIWARE Data Space Connector.

connector-components

Precisely, the connector bundles the following components:

Component Role Link
VCVerifier Verifier https://github.com/FIWARE/VCVerifier
credentials-config-service Credentials Config provider for the verifier https://github.com/FIWARE/credentials-config-service
Keycloak Issuer of VCs https://www.keycloak.org
Scorpio Context Broker https://github.com/ScorpioBroker/ScorpioBroker
trusted-issuers-list Acts as Trusted Issuers List by providing an EBSI Trusted Issuers Registry API https://github.com/FIWARE/trusted-issuers-list
APISIX APISIX as API-Gateway with a sidecar OPA as PEP https://apisix.apache.org/ / https://www.openpolicyagent.org/
odrl-pap PAP allowing to configure ODRL policies to be used by the OPA https://github.com/wistefan/odrl-pap
tmforum-api TMForum APIs for contract management https://github.com/FIWARE/tmforum-api
contract-management Notification listener for contract management events out of TMForum https://github.com/FIWARE/contract-management
MySQL Database https://www.mysql.com
PostgreSQL Database https://www.postgresql.org
PostGIS PostgreSQL Database with PostGIS extensions https://postgis.net/

Note, that some of the components shown in the diagram above are not implemented yet.

Description of flows in a data space

This section provides a description of various flows and interactions in a data space involving the FIWARE Data Space Connector.

Onboarding of an organization in the data space

Before participating in a data space, an organization needs to be onboarded at the data space's Participant List Service by registering it as trusted participant. The user invoking the onboarding process needs to present a VC issued by the organization to the user itself, a VC containing the self description of the organization and a VC issued by a trusted Compliancy Service for the organization self description.

The following displays the different steps during the onboarding.

flows-onboarding

Steps

Consumer registration

Before being able to procure access to the provider's data service, a consumer organization needs to be registered at the provider's Trusted Issuers List as trusted issuer of VCs including claims representing a buyer of products in the provider's connector.

The following displays the different steps for the consumer registration.

flows-consumer-registration

Steps

Contract management

After the registration, the consumer organization can perform contract negotiation, e.g., in order to procure access to a specific service linked to a product of the provider.

The following displays the different steps for the contract negotiation.

flows-contract-management

Steps

Service interaction

Once the procurement has been completed, a user or an application of the consumer organization can interact with the actual service offered by the provider, e.g., an NGSI-LD based data (processing) service.

In the case of a user interacting with the service, this is a Human-To-Machine (H2M) interaction.

In the other case of an application interacting with the service, this is a Machine-To-Machine (M2M) interaction.

The following displays the different steps for the two different types of interactions

Service interaction (H2M)

flows-interaction-h2m

Steps

Service interaction (M2M)

flows-interaction-h2m

Steps

A detailed description of the steps to be performed by client applications and service providers can be found in the Service Interaction (M2M) documentation.

Deployment

Local Deployment

The FIWARE Data Space Connector provides a local deployment of a Minimal Viable Dataspace.

This deployment allows to easily spin up such minimal data space on a local machine, by just using Maven and Docker (with k3s), and can be used to try-out the connector, to get familiar with the different components and flows within the data space or to perform tests with the different APIs provided.

Deployment with Helm

The Data-Space-Connector is a Helm Umbrella-Chart, containing all the sub-charts of the different components and their dependencies. Its sources can be found here.

The chart is available at the repository https://fiware.github.io/data-space-connector/. You can install it via:

    # add the repo
    helm repo add dsc https://fiware.github.io/data-space-connector/
    # install the chart
    helm install <DeploymentName> dsc/data-space-connector -n <Namespace> -f values.yaml

Note, that due to the app-of-apps structure of the connector and the different dependencies between the components, a deployment without providing any configuration values will not work. Make sure to provide a values.yaml file for the deployment, specifying all necessary parameters. This includes setting parameters of the connected data space (e.g., trust anchor endpoints), DNS information (providing Ingress or OpenShift Route parameters), structure and type of the required VCs, internal hostnames of the different connector components and providing the configuration of the DID and keys/certs.
Also have a look at the examples.

Configurations for all sub-charts (and sub-dependencies) can be managed through the top-level values.yaml of the chart. It contains the default values of each component and additional parameter shared between the components. The configuration of the applications can be changed under the key <APPLICATION_NAME>, please see the individual applications and there sub-charts for the available options.
Example: In order to change the image-tag of Keycloak, the values.yaml looks as following:

keycloak:
    # configuration for the keycloak-sub-chart. Its used as a dependency to the application, thus all config is accessible under the dependency name
    keycloak:
        image:
            tag: LATEST_GREATEST

The chart is published and released on each merge to master.

Testing

In order to test the helm-charts provided for the FIWARE Data Space Connector, an integration-test framework based on Cucumber and Junit5 is provided: it.

The tests can be executed via:

    mvn clean integration-test -Ptest

They will spin up the Local Data Space and run the test-scenarios against it.

Additional documentation and resources

Additional documentation

Additional and more detailed documentation about the FIWARE Data Space Connector, specific flows and its deployment and integration with other frameworks, can be found here:

Additional Resources

Following is a list with additional resources about the FIWARE Data Space Connector and Data Spaces in general: