Skip to content

Custodial Wallet

Introduction

A verifiable-credential wallet on a mobile phone is the standard way to log in to the data space, but many potential users (public employees, citizens) will not have one. The custodial wallet lets a person enter with the digital certificate they already have (FNMT, DNIe, ACCV) instead. The wallet holds the credential on the person's behalf and presents it to the verifier of the service.

The Marketplace and the portals of services such as TETIS, Water4Cast, Hidris and Nowcast offer both modes: wallet (QR code) and digital certificate.

Your wallet

The custodial wallet is at wallet.pgtec-vrain-dataspace.eu. After identifying yourself with your certificate, you see your credentials, renew them and request new ones to an organisation. The interface in the screenshot is in Spanish, and personal data are blurred:

Custodial wallet with the credentials of a user

How it works

  1. The user opens the login of the service and chooses digital certificate.
  2. The browser performs mutual TLS with the wallet's ingress and the user selects their certificate. The ingress validates the certificate against the trusted CAs (FNMT, ACCV) and passes the result to the wallet.
  3. The wallet identifies the person (by tax identifier, nif) and derives a did:key for them.
  4. The wallet logs in to the Keycloak of the issuing participant with the certificate (X.509 flow) and requests the credential through OID4VCI.
  5. The wallet reads what the verifier of the service asks for (DCQL query: LegalPersonCredential, ServiceCredential or MachineCredential), and presents it through OID4VP.
  6. The verifier validates it as with any other credential, and the user is logged in.
 Browser (certificate) ──mTLS──► Custodial wallet ──X.509 login──► Issuer's Keycloak (OID4VCI)
                                        │
                                        └── OID4VP ──► Verifier of the service ──► token ──► Service

Which participant issues

The issuing participant is the one where the person is registered with their nif: for example AVAMET or IIAMA, whose Keycloak accepts the X.509 login. The wallet discovers the issuers dynamically: it reads the Trust Anchor, takes the registered participants, and uses those whose Keycloak publishes a wallet client. When several issuers are possible, it tries each one and uses the one where the person exists. The issued credential is trusted because its issuer is registered in the TIR (Access control).

Enabling it in a participant

The X.509 login is part of the connector module (test_dsc_v10, variable enable_x509_login). When enabled, the participant's Keycloak receives:

  • the nginx X.509 certificate provider and the trust store with the FNMT/ACCV CAs,
  • the X.509 login flow, the client for the wallet, and the nif attribute on users,
  • a Kubernetes secret with the client credentials that the wallet reads.

On an already existing realm the import does not change anything (the realm is only imported on the first installation), so for live changes a script configures the running realm and assigns the credentials to the users. The people allowed to enter this way are defined per participant (list of users with their nif).

Current status and limits

  • The flow has been verified end to end with a test certificate and with real certificates against the Marketplace login.
  • Issuing ServiceCredential and MachineCredential as well as LegalPersonCredential is supported.
  • The wallet currently reaches the issuer's Keycloak using in-cluster addresses and reads its client secret through the Kubernetes API, which works because all participants share one cluster. Participants in other clusters would require resolving the issuer through its published metadata (did:web → /.well-known/openid-credential-issuer) and exchanging the client secret out of band.