Skip to content

Consumer Role

Note

This guide covers the deployment of an organization acting exclusively as a consumer. If your organization also needs to act as a provider (offering data or services to other participants), refer to the Consumer & Provider guide instead.

Overview

A Consumer is an organization that retrieves data or services from other participants in the data space. The consumer does not host data services itself — it only needs the ability to authenticate its users and issue Verifiable Credentials that can be presented to providers.

Before you start

Before deploying, contact the Data Space Operator to initiate the onboarding process for your organization. The Operator will guide you through:

  • The documentation and requirements needed to join the data space
  • Registration of your organization's DID at the Trust Anchor
  • The credential types your organization is allowed to issue and their required configuration (claims, attribute mappings, etc.)
  • The Trust Anchor's TIR endpoint URL

This information is needed to configure Keycloak, the DID, and the Verifiable Credentials correctly.

Check also that the cluster meets the Cluster Prerequisites: its databases, the network requirements and the resources the consumer needs.

Required components

Verifiable Credential Issuer

A consumer organization requires a Verifiable Credential (VC) Issuer, a component capable of issuing Verifiable Credentials to its users so they can authenticate and access services offered by providers in the data space.

The FIWARE Data Space Connector uses Keycloak as the VC issuer. For detailed configuration instructions, see the Keycloak Configuration guide.

Database

Keycloak stores its data in PostgreSQL: an existing one, or one the chart deploys with decentralizedIam.vcAuthentication.managedPostgres. See Databases in the provider guide for both options.

DID

Every participant in the data space needs a Decentralized Identifier (DID), a globally unique identifier that the organization controls and that is not dependent on a centralized registry. DIDs can be of different types (methods), such as did:key, did:web, did:ebsi, among others.

  • did:web — Recommended for production environments. It relies on a domain name controlled by the organization and serves the DID document over HTTPS, providing discoverability and a natural trust anchor tied to DNS.
  • did:key — Suitable only for test or development environments. It encodes the public key directly in the identifier itself, which makes it simple to generate but offers no discoverability or key rotation capabilities.

The DID Helper is a lightweight service that creates did:key or serves the consumer's DID document.

Note

If the data space uses the Decentralized Claims Protocol (DCP) (typically together with the Dataspace Protocol via FDSC-EDC), the DID Helper is replaced by the Identity Hub, which serves the DID document (and the consumer's credentials) as required by DCP. See the Dataspace Protocol Integration Guide for details.

The DID document contains the consumer's public key, which providers use to verify that credentials were issued by this organization. The DID must be registered at the data space's Trust Anchor following the Data Space onboarding process.

Optional components

Dataspace Protocol(FDSC-EDC and IdentityHub)

If the data space requires compliance with the Dataspace Protocol (DSP), the consumer can enable the Eclipse Dataspace Components connector. This adds support for standardized contract negotiation and data transfer protocols.

Enable this when: - The data space mandates DSP compliance - You need to interact with non-FIWARE DSP-compliant connectors - Contract negotiation must follow the IDSA protocol

See DSP Integration for configuration details.

Deployment

The consumer role does not require deploying a FIWARE DSC, since it only needs a DID and a VC issuer (Keycloak), and that is not a FIWARE Data Space Connector.

However, for easier deployment of these components, you can use the same fiware/data-space-connector Helm chart as the provider, but with most components disabled. You only need to enable Keycloak and the DID Helper as mandatory components. If you prefer not to use the FIWARE DSC Helm chart, you can always deploy these components separately using their own Helm charts or deployment methods.

Using the FIWARE DSC Helm chart and values

Start from the reference profile

examples/consumer.yaml is a complete values file for a consumer, to adapt to your installation. Its README lists the prerequisites, the placeholders, the Secrets to create and the installation steps. The settings below explain each part.

Build a values.yaml for the consumer by adapting examples/consumer.yaml. It uses the same fiware/data-space-connector chart as the provider, but with most components disabled: a consumer only issues credentials to its users. The sections below show that file piece by piece; replace every <placeholder>.

The ingresses use cert-manager through annotations and the ingress class you set (the local deployment uses Traefik). A ClusterIssuer is a prerequisite: use your own, or let the chart create one with certManagerResources (the examples README covers the prerequisites, Secrets and placeholders).

Identity: did:web

did-helper serves the organization's did:web. Its key is the TLS certificate cert-manager issues for the ingress, and it must never rotate: a new key changes the DID, and every credential issued with the old one stops verifying (hence private-key-rotation-policy: Never; see Identity key lifecycle in the provider guide, which applies to consumers too).

did:
  enabled: true
  config:
    server:
      # did-helper also publishes <hostUrl>/.well-known/tls.crt, the certificate of the key
      hostUrl: https://<did-domain>
      certPath: /certs/tls.crt
  volumes:
    - name: certs
      secret:
        # the DID's key: the certificate cert-manager issues for the ingress below
        secretName: did-tls
        items:
          - key: tls.crt
            path: tls.crt
  volumeMounts:
    - name: certs
      mountPath: /certs
  # with certPath did-helper writes nothing, so it runs on a read-only root filesystem
  securityContext:
    readOnlyRootFilesystem: true
    allowPrivilegeEscalation: false
    capabilities:
      drop: ["ALL"]
  ingress:
    enabled: true
    className: <ingress-class>
    annotations:
      cert-manager.io/cluster-issuer: <cluster-issuer>
      cert-manager.io/private-key-algorithm: ECDSA
      # the Secret also holds the DID's key: a renewal must keep it, or the DID changes and every
      # credential issued with the old key stops verifying
      cert-manager.io/private-key-rotation-policy: Never
    hosts:
      - host: <did-domain>
        paths:
          - path: /
            pathType: ImplementationSpecific
    tls:
      - secretName: did-tls
        hosts:
          - <did-domain>

Credential issuer: Keycloak

Keycloak issues the consumer's users their credentials and signs them with the DID's key: the prepare-keystore init container turns the DID Secret into the PKCS12 keystore the realm reads. The ingress publishes only /realms/<realm> and /resources; the admin console and the master realm stay inside the cluster. See Keycloak configuration.

keycloak:
  enabled: true
  keycloak:
    # the public URL, so that Keycloak does not derive it from each request
    hostname: https://<keycloak-domain>
    hostnameStrict: true
  # its own database user, created by the Postgres operator (see managedPostgres below)
  database:
    username: keycloak
    existingSecret: keycloak.postgres.credentials.postgresql.acid.zalan.do
  ingress:
    enabled: true
    className: <ingress-class>
    annotations:
      cert-manager.io/cluster-issuer: <cluster-issuer>
      cert-manager.io/private-key-algorithm: ECDSA
    hosts:
      - host: <keycloak-domain>
        paths:
          # only what wallets need: the realm's endpoints and the static resources. The admin
          # console and the master realm stay inside the cluster (kubectl port-forward).
          - path: /realms/<realm>
            pathType: Prefix
          - path: /resources
            pathType: Prefix
    tls:
      - secretName: keycloak-tls
        hosts:
          - <keycloak-domain>
  # Keycloak signs the credentials with the DID's key: this init container turns the key and
  # certificate of the DID's Secret into the PKCS12 keystore the realm reads
  extraInitContainers:
    - name: prepare-keystore
      image: alpine/openssl:3.5.5
      command: ["/bin/sh", "-c"]
      args:
        - |
          # the CA of the certificate goes into the keystore too, when the Secret has it (a
          # private CA); a public one, such as Let's Encrypt, leaves ca.crt out or empty
          ca=""
          if [ -s /certs-did/ca.crt ]; then ca="-certfile /certs-did/ca.crt"; fi
          openssl pkcs12 -export \
            -in /certs-did/tls.crt \
            -inkey /certs-did/tls.key \
            $ca \
            -out /did-material/cert.pfx \
            -name "didPrivateKey" \
            -passout env:STORE_PASS
          chmod 644 /did-material/cert.pfx
      env:
        - name: STORE_PASS
          valueFrom:
            secretKeyRef:
              name: keystore-password
              key: password
      volumeMounts:
        - name: did-material
          mountPath: /did-material
        - name: did-key
          mountPath: /certs-did
          readOnly: true
  extraVolumeMounts:
    # Keycloak only reads realm keystores from /opt/keycloak/data/<realm name>
    - name: did-material
      mountPath: /opt/keycloak/data/<realm>
    - name: realms
      mountPath: /opt/keycloak/data/import
  extraVolumes:
    - name: did-material
      emptyDir: {}
    # the realm the chart renders, in the ConfigMap <realm name>-realm
    - name: realms
      configMap:
        name: <realm>-realm
    - name: did-key
      secret:
        secretName: did-tls
  # replaces the chart's list: keep KC_HEAP_SIZE
  extraEnvVars:
    - name: KC_HEAP_SIZE
      value: "1024m"
    - name: STORE_PASS
      valueFrom:
        secretKeyRef:
          name: keystore-password
          key: password
  issuerDid: <did>
  signingKey:
    storePath: /opt/keycloak/data/<realm>/cert.pfx
    storePassword: "${STORE_PASS}"
    keyAlias: didPrivateKey
    keyPassword: "${STORE_PASS}"
    did: <did>
    keyAlgorithm: ES256
  realm:
    name: <realm>
    frontendUrl: https://<keycloak-domain>
    import: true
    # One credential type: UserCredential, carrying the user's name, e-mail and the roles the
    # user holds at the provider below. Add one entry per credential type your data space uses.
    verifiableCredentials:
      user-credential:
        attributes:
          format: jwt_vc_json
          verifiable_credential_type: UserCredential
          credential_signing_alg: ES256
          credential_build_config.token_jws_type: JWT
        protocolMappers:
          - name: context-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-context-mapper
            config:
              context: https://www.w3.org/2018/credentials/v1
          - name: email-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-user-attribute-mapper
            config:
              claim.name: email
              userAttribute: email
          - name: firstName-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-user-attribute-mapper
            config:
              claim.name: firstName
              userAttribute: firstName
          - name: lastName-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-user-attribute-mapper
            config:
              claim.name: lastName
              userAttribute: lastName
          # the roles of the user at the provider, read from the client named after its DID
          - name: provider-roles-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-target-role-mapper
            config:
              claim.name: roles
              clientId: <provider-did>
          - name: subject-id-mapper
            protocol: oid4vc
            protocolMapper: oid4vc-subject-id-mapper
            config:
              userAttribute: email
              claim.name: id
    # Roles a user can hold at the provider. Their names have to match the provider's access
    # policies. Users are not part of the values: create them in the realm, or federate it.
    clientRoles: |
      "<provider-did>": [
        {
          "name": "READER",
          "description": "Is allowed to read the provider's data",
          "clientRole": true
        }
      ]
    # the client the roles above belong to, named after the DID. It only holds roles: no login
    # flow is enabled on it.
    clients: |
      {
        "clientId": "<provider-did>",
        "description": "Roles of the users at the provider",
        "enabled": true,
        "protocol": "openid-connect",
        "publicClient": false,
        "standardFlowEnabled": false,
        "implicitFlowEnabled": false,
        "directAccessGrantsEnabled": false,
        "serviceAccountsEnabled": false
      }

Database

A consumer only runs Keycloak's database. The chart's managed PostgreSQL creates its user, with the Postgres operator installed once per cluster; the verifier, trusted issuers list and policy components stay off.

decentralizedIam:
  enabled: true
  vcAuthentication:
    # the Postgres operator is installed once per cluster, not by each release
    postgres-operator:
      enabled: false
    # Keycloak's database. The operator creates its user and the Secret with the password. (The
    # chart also creates the databases of the components a consumer does not run; they stay empty.)
    managedPostgres:
      enabled: true
      config:
        volume:
          size: 5Gi
          # storageClass: <storage-class>
    vcverifier:
      enabled: false
    credentials-config-service:
      enabled: false
    trusted-issuers-list:
      enabled: false
  odrlAuthorization:
    odrl-pap:
      enabled: false
    apisix:
      enabled: false

Disabled components

The data and contract components a consumer does not run are set to false.

scorpio:
  enabled: false
tm-forum-api:
  enabled: false
contract-management:
  enabled: false

Install the chart

Install the chart with your values, pinning its version (see the release notes for what changes between versions):

helm install consumer oci://quay.io/fiware/helm-charts/data-space-connector \
  --version <version> \
  -n consumer \
  --create-namespace \
  -f consumer-values.yaml

The chart is also available from the Helm repository https://fiware.github.io/data-space-connector:

helm repo add fiware-dsc https://fiware.github.io/data-space-connector
helm install consumer fiware-dsc/data-space-connector --version <version> -n consumer --create-namespace -f consumer-values.yaml

Other deployment options

A base example for a consumer deployment can be found at k3s/consumer.yaml.

Note

These values are intended for local development and testing environments. For a real production deployment, they must be customized to meet your infrastructure, security, and availability requirements. See Production considerations below.

For other deployment scenarios, the base consumer.yaml can be extended with additional overlay values files (which take precedence over the base). The following overlays are available:

Overlay File Description
eIDAS / ELSI k3s/consumer-eidas.yaml Configuration for deployments compliant with the ELSI trust framework, including eIDAS certificate issuance via Keycloak. See eIDAS 2.0 Compliance for details
Gaia-X k3s/consumer-gaia-x.yaml Configuration for Gaia-X compliant deployments
TM Forum APIs k3s/consumer-tmf.yaml Enables TM Forum APIs on the consumer (required for central marketplace and EDC-related features)
Auth components k3s/consumer-auth.yaml Configures authentication components for the consumer (required for central marketplace and EDC-related features)
DSP k3s/dsp-consumer.yaml Enables the Dataspace Protocol (DSP) connector on the consumer side

For example, to deploy a consumer with DSP support and TM Forum APIs:

helm install consumer oci://quay.io/fiware/helm-charts/data-space-connector --version <version> \
  -n consumer \
  -f k3s/consumer.yaml \
  -f k3s/consumer-auth.yaml \
  -f k3s/consumer-tmf.yaml \
  -f k3s/dsp-consumer.yaml

Production considerations

TLS certificates

  • All publicly reachable endpoints must use HTTPS with valid TLS certificates issued by a trusted CA
  • You can enable cert-manager directly in the FIWARE DSC Helm chart to automate certificate issuance and renewal

DID and key management

  • Use a registered domain name that your organization controls for the did:web identifier
  • Ensure the DID document is served over HTTPS with a valid certificate
  • Protect the private key associated with your DID: it is the foundation of your organization's identity in the data space. If compromised, an attacker could issue credentials on your behalf
  • Give the DID a dedicated key that renewals do not regenerate, not the TLS Secret of an Ingress: see Identity key lifecycle in the provider guide, which applies to consumers as well

Trust Anchor registration

  • Register your organization's DID at the data space's Trust Anchor before deploying
  • Coordinate with the Data Space Operator regarding:
  • The Trust Anchor's TIR endpoint URL (needed for provider credential verification)

Credential configuration

  • Configure only the credential types that your organization actually needs to issue
  • Define appropriate claims and attribute mappings for each credential type
  • Set reasonable credential expiry times
  • Review credential scopes to ensure they follow the principle of least privilege

Keycloak

  • Do not hardcode passwords in values files; use Kubernetes Secrets
  • Rotate Keycloak admin credentials and the keystore password regularly
  • For high availability, deploy at least 2 replicas with Infinispan cache replication enabled

Upgrade strategy

  • Review the FIWARE Data Space Connector release notes before each upgrade for breaking changes
  • Keep the connector version aligned across all participants in the data space when possible to avoid protocol incompatibilities