5. Swiyu Verifier Operator Manual#
5.1. Introduction#
5.1.1. About Swiyu Verifier#
The Swiyu Generic Verifier Service is a web server implementing the technical standards specified in the Swiyu Trust Infrastructure Interoperability Profile. It provides the capability to verify Verifiable Credentials held in users’ digital wallets using the OpenID for Verifiable Presentations (OID4VP) protocol.
The verifier service exposes two distinct API interfaces:
Management API: Internal interface for business systems to create verification requests and retrieve results. This API should only be accessible from within your organization’s network.
OID4VP API: Public interface that implements the OpenID for Verifiable Presentations protocol. This interface must be accessible by wallet applications and requires HTTPS with a valid TLS certificate.
When integrated with KyCH OAuth2 Gateway, the Swiyu Verifier enables KYC (Know Your Customer) verification flows for GNU Taler exchanges, allowing users to prove their identity attributes using Swiss Beta ID credentials stored in the Swiyu Wallet.
5.1.2. About this manual#
This manual targets system administrators who want to install, configure, and operate a Swiyu Verifier service. It covers the onboarding process to the Swiyu Trust Infrastructure, service configuration, integration with KyCH OAuth2 Gateway, and API usage.
5.1.3. Architecture overview#
The following diagram illustrates the high-level architecture of credential verification using the Swiyu Verifier:
+------------------+ +------------------+ +------------------+
| | | | | |
| Business |---->| Swiyu |<----| Swiyu |
| Verifier | | Verifier | | Wallet |
| (e.g., KyCH) | | Service | | |
| | | | | |
+------------------+ +------------------+ +------------------+
|
v
+------------------+
| |
| Swiyu |
| Registries |
| |
+------------------+
The verification flow proceeds as follows:
The business verifier (such as KyCH) creates a verification request via the Management API, specifying which credential claims to verify.
The verifier service stores the request and returns a verification URI and optional deeplink for QR code generation.
The user’s wallet retrieves the verification request object via the OID4VP API and displays the requested claims for user consent.
Upon user consent, the wallet sends the authorization response containing the Verifiable Presentation with the requested credential data.
The verifier service validates the credential by checking the issuer’s public key against the Base Registry and verifying the credential status against the Status Registry.
The business verifier retrieves the verification result and disclosed claims either by polling or via webhook notification.
5.2. Prerequisites#
5.2.1. System requirements#
Before deploying the Swiyu Verifier, ensure your system meets these requirements:
Java Runtime Environment (JRE): Version 25 or higher. The verifier moved to Java 25 with its 5.0.0 release; releases up to 4.2.0 need Java 21.
PostgreSQL: Version 12 or higher
Disk space: Approximately 100 MB
Network access: Outbound access to Swiyu registries and inbound access for wallet connections
Operating system: Linux x64/AArch64, macOS AArch64, or Windows x64
5.2.2. HTTPS requirement#
The Swiyu Wallet only accepts HTTPS connections with valid TLS certificates. Your verifier’s OID4VP endpoints must be accessible via HTTPS using a certificate from a trusted Certificate Authority.
For development and testing, you can use a tunneling service like ngrok to expose your local verifier with a valid HTTPS URL:
$ ngrok http 8080
This provides a public HTTPS URL (e.g., https://abc123.ngrok-free.app)
that forwards to your local verifier. Use this URL as the external-url
in your configuration.
For production deployments, obtain a proper TLS certificate and configure your reverse proxy or load balancer accordingly.
5.3. Onboarding to Swiyu Trust Infrastructure#
Before operating a verifier in the Swiyu ecosystem, you must complete the onboarding process to register your service on the Base Registry. This section summarizes the required steps.
The onboarding process involves several administrative and technical steps that establish your identity as a trusted verifier within the Swiyu Trust Infrastructure.
Note
The official Swiyu documentation provides detailed cookbooks that guide you through each step of the onboarding process:
Onboarding the swiyu Base & Trust Registry: Complete guide for registering your organization and managing DIDs
Getting started with the swiyu Generic Verifier: Step-by-step deployment guide for the verifier service
Designing the visualization for Issuer, Verifier and Credential: How to configure the display metadata shown in wallets
How to use Beta-ID for my business: Details about the Swiss Beta ID credential and available claims
The following sections provide a summary. Refer to the official cookbooks for the most up-to-date and detailed instructions.
5.3.1. Step 1: Access the Swiss Confederacy ePortal#
Sign in or create an account at the Swiss Confederacy ePortal using an AGOV or CH-Login account. This account is required for all subsequent registration steps.
The ePortal is available at https://www.eportal.admin.ch/.
5.3.2. Step 2: Register as Business Partner#
Complete the business partner registration process through the ePortal. This establishes your organization’s identity within the trust infrastructure.
Navigate to the Swiyu Public Beta section and follow the business partner registration workflow.
5.3.3. Step 3: Obtain API Keys#
Access the API self-service portal to generate the API keys required for interacting with the Swiyu registries. These keys authenticate your verifier service when making registry requests.
The self-service portal provides:
API credentials for the Base Registry (DID management)
API credentials for the Status Registry (credential revocation checks)
5.3.4. Step 4: Allocate DID Space#
Request allocation of a Decentralized Identifier (DID) space on the Swiyu Base Registry. This provides a unique namespace for your verifier’s cryptographic identity.
The DID follows the did:tdw method (Trust DID Web) with the format:
did:tdw:<hash>:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:<uuid>
5.3.5. Step 5: Generate Cryptographic Keys#
Use the Swiyu DID Toolbox to generate the required cryptographic keys and DID log. The toolbox creates:
An EC P-256 private key for signing verification requests
The corresponding DID Document entries
A DID log file for registration
Download the DID Toolbox from the official Swiyu repository and run:
$ java -jar didtoolbox.jar generate
This creates a .didtoolbox directory containing your keys and DID log.
The key files include:
auth-key-01: The private authentication key (keep this secure)did-log.json: The DID log to upload to the registry
The generated DID log contains the values needed for verifier configuration:
value.id: Your verifier’s DID (used forclient_id)value.assertionMethod: The key reference (used forsigning-key-verification-method)
5.3.6. Step 6: Upload DID Log#
Upload the generated DID log to the Base Registry using the API keys obtained in Step 3. This publishes your verifier’s DID Document, making your public key available for credential verification.
Use the Base Registry API to upload your DID log:
POST https://identifier-reg.trust-infra.swiyu.admin.ch/api/v1/did/<your-uuid>/log
After successful upload, your DID is resolvable and wallets can verify your signed request objects.
5.3.7. Step 7: (Optional) Become a Trusted Participant#
Optionally register on the Trust Registry to become a trusted participant. This enables other parties to verify your verifier’s trustworthiness through the trust infrastructure.
See the Onboarding the swiyu Base & Trust Registry cookbook for details on trust registry registration.
5.4. Installation#
5.4.1. From the Debian package#
On Debian, the verifier is packaged as swiyu-verifier, built from the
KyCH source package (which pins an upstream release in a submodule). It
installs the service, a systemd unit, a configuration under
/etc/swiyu-verifier and the swiyu-verifier-dbconfig tool:
$ sudo apt install ./swiyu-verifier_*.deb
$ sudo swiyu-verifier-dbconfig
The service ships disabled, because it cannot verify anything before it has
a DID and a signing key of its own. See
/usr/share/doc/swiyu-verifier/README.Debian and swiyu-verifier(1) for the
remaining steps, and the Configuration section below for what the settings
mean. The rest of this manual describes the service itself, and applies
either way.
5.4.2. Building from source#
Clone the Swiyu Verifier repository and build using Maven:
$ git clone https://github.com/swiyu-admin-ch/swiyu-verifier.git
$ cd swiyu-verifier
$ ./mvnw clean install -DskipTests
This produces the executable JAR files in the verifier-application/target
directory. A JDK 25 is required; with an older default JDK on the host, point
JAVA_HOME at it explicitly.
5.4.3. Database setup#
The Swiyu Verifier requires a PostgreSQL database to store verification requests and results. Create the database and user with appropriate privileges:
$ psql -U postgres
CREATE USER verifier_user WITH PASSWORD 'your_secure_password';
CREATE DATABASE verifier_db OWNER verifier_user;
GRANT ALL PRIVILEGES ON DATABASE verifier_db TO verifier_user;
The CREATE USER command creates a PostgreSQL role that the verifier
service will use to authenticate with the database. The CREATE DATABASE
command creates the database and assigns ownership to the verifier user.
The GRANT command ensures the user has full access to the database.
The verifier creates and migrates its own schema with Flyway on every start, so an empty database owned by its role is all it needs – including after an upgrade, where there is nothing to do by hand.
Warning
Do not set spring.jpa.hibernate.ddl-auto to create or
create-drop to achieve this. Those drop the schema, and with it every
verification in the database, on each start. The correct value is
validate, which has Hibernate check the schema Flyway produced; it is
the upstream default.
5.5. Configuration#
The Swiyu Verifier uses Spring Boot’s externalized configuration system, which supports YAML configuration files, environment variables, and profile-based overrides. This section explains the configuration profiles and how to use them for different deployment scenarios.
5.5.1. Configuration profiles#
Spring Boot profiles allow you to define environment-specific configurations
that override the base application.yml settings. The verifier ships with
several pre-configured profiles for different deployment scenarios.
Base configuration (application.yml)
The base configuration file defines all available settings with environment variable placeholders. This configuration is designed for production deployments where settings are injected via environment variables or container orchestration:
application:
external-url: "${EXTERNAL_URL:}"
client_id: "${VERIFIER_DID:}"
client_id_prefix: "decentralized_identifier"
signing_key: "${secret.signing_key:${SIGNING_KEY:}}"
signing-key-verification-method: "${DID_VERIFICATION_METHOD:}"
client-metadata-file: "${OPENID_CLIENT_METADATA_FILE:}"
deeplink-schema: ${DEEPLINK_SCHEMA:swiyu-verify}
additional-audit-information:
credential-subject-data-enabled: ${ADDITIONAL_AUDIT_INFORMATION_CREDENTIAL_SUBJECT_DATA_ENABLED:true}
spring:
datasource:
url: "${POSTGRES_JDBC}"
username: "${secret.db.username:${POSTGRES_USER}}"
password: "${secret.db.password:${POSTGRES_PASSWORD}}"
flyway:
enabled: true
jpa:
hibernate:
ddl-auto: validate
The ${VARIABLE:default} syntax means the value is read from the
environment variable VARIABLE, falling back to default if not set.
The nested form ${secret.value:${ENV_VAR:}} first checks for a
mounted secret file, then an environment variable.
Local profile (application-local.yml)
The local profile is for development with Docker Compose managing the
PostgreSQL database. When it is active, Spring Boot starts a PostgreSQL
container from compose.yaml, and the profile supplies a throwaway signing
key and example DID values – which are of course not valid for real
verifications:
application:
signing_key: "-----BEGIN EC PRIVATE KEY-----\n...\n-----END EC PRIVATE KEY-----\n"
signing-key-verification-method: "did:example:12345#key-1"
external-url: "http://${server.host}:${server.port}"
client-metadata-file: "classpath:client_metadata.json"
spring:
docker:
compose:
enabled: true
file: compose.yaml
datasource:
url: "jdbc:postgresql://localhost:5434/verifier_db"
username: "verifier_user"
password: "secret"
jpa:
hibernate:
ddl-auto: validate
Note
Earlier releases also shipped a local-dockerless profile. It is gone;
for development against a PostgreSQL of your own, supply a configuration
file instead of activating a profile, as the next section describes.
A configuration file of your own
Rather than editing the upstream tree or activating a profile, pass an extra configuration file, which Spring Boot reads after the one inside the jar and which therefore overrides it:
$ ./mvnw spring-boot:run -pl verifier-application \
-Dspring-boot.run.jvmArguments=\
"-Dspring.config.additional-location=file:/path/to/my-verifier.yml"
with my-verifier.yml:
application:
external-url: "https://your-ngrok-url.ngrok-free.app"
client_id: "did:tdw:QmHash:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:your-uuid"
signing-key-verification-method: "did:tdw:QmHash:identifier-reg.trust-infra.swiyu-int.admin.ch:api:v1:did:your-uuid#auth-key-01"
signing_key: |
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEI...your_actual_key...
-----END EC PRIVATE KEY-----
client-metadata-file: "file:./client_metadata.json"
spring:
docker:
compose:
enabled: false
datasource:
url: "jdbc:postgresql://localhost:5432/verifier_db"
username: "verifier_user"
password: "secret"
jpa:
hibernate:
ddl-auto: validate
webhook:
callback-uri: "https://kych.example.com/notification"
callback-interval: 5000
This is what swiyu-verifier/run.sh in the KyCH tree does, and what the
Debian package does with /etc/swiyu-verifier/application.yml.
Note that client_id_scheme is no longer a setting: release 4.0.0 replaced
it with client_id_prefix, which defaults to decentralized_identifier
and is prepended to client_id in what the wallet receives.
5.5.2. Environment variables#
Every setting of the base configuration has an environment variable, which is how a container deployment and the Debian package both configure the service:
# Verifier identity
EXTERNAL_URL="https://your-verifier.example.com"
VERIFIER_DID="did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:your-uuid"
DID_VERIFICATION_METHOD="did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:your-uuid#auth-key-01"
OPENID_CLIENT_METADATA_FILE="file:/etc/swiyu-verifier/client_metadata.json"
# Database connection
POSTGRES_USER="swiyu_verifier"
POSTGRES_PASSWORD="..."
POSTGRES_JDBC="jdbc:postgresql://localhost:5432/swiyu_verifier"
The signing key is the exception worth knowing about. It is a multi-line PEM
document, so it cannot be carried in a systemd environment file, and an
escaped \n in such a file reaches the JVM as two characters, which fails
with No PEM key found. Put it in a YAML file – where a block scalar
expresses it directly – and have the service import it; the Debian package
ships /usr/share/swiyu-verifier/signing-key.yml.example for exactly this
and imports /etc/swiyu-verifier/secrets/signing-key.yml with
spring.config.import.
5.6. Deployment Options#
The Swiyu Verifier supports multiple deployment strategies depending on your infrastructure and requirements.
5.6.1. Local development without Docker#
This approach runs the verifier directly on your machine with a locally installed PostgreSQL database.
1. Set up PostgreSQL
Create the database and user:
$ psql -d postgres -c "CREATE USER verifier_user WITH PASSWORD 'secret';"
$ psql -d postgres -c "CREATE DATABASE verifier_db OWNER verifier_user;"
$ psql -d verifier_db -c "GRANT ALL PRIVILEGES ON DATABASE verifier_db TO verifier_user;"
2. Write a configuration file
Put your DID, verification method and signing key from the Swiyu onboarding
into a YAML file of your own, as “A configuration file of your own” above
describes. (There is no local-dockerless profile any more.)
3. Start the verifier
$ ./mvnw spring-boot:run -pl verifier-application \
-Dspring-boot.run.jvmArguments=\
"-Dspring.config.additional-location=file:/path/to/my-verifier.yml"
4. Expose via ngrok (for wallet testing)
Since wallets require HTTPS, use ngrok to expose your local verifier:
$ ngrok http 8080
Update the external-url in your configuration with the ngrok URL.
5.6.2. Local development with Docker Compose#
This approach uses Docker Compose to manage the PostgreSQL database while running the verifier application directly.
1. Start the verifier with Docker Compose support
$ ./mvnw spring-boot:run -pl verifier-application \
-Dspring-boot.run.profiles=local
Spring Boot automatically starts the PostgreSQL container defined in
compose.yaml before the application starts.
2. Verify the database container
$ docker ps
CONTAINER ID IMAGE PORTS NAMES
abc123def456 postgres:15-alpine 0.0.0.0:5434->5432/tcp verifier_postgres
The database is accessible on port 5434 to avoid conflicts with any existing PostgreSQL installation.
5.6.3. Docker Compose full deployment#
For testing the complete stack in containers, use the sample compose file that includes both the verifier service and database:
1. Create a .env file with your credentials
EXTERNAL_URL=https://your-verifier.example.com
VERIFIER_DID=did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:your-uuid
DID_VERIFICATION_METHOD=did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:your-uuid#auth-key-01
SIGNING_KEY="-----BEGIN EC PRIVATE KEY-----
...your key...
-----END EC PRIVATE KEY-----"
OPENID_CLIENT_METADATA_FILE=/verifier_metadata.json
2. Start the stack
$ docker compose -f sample.compose.yml up -d
This starts:
verifier_postgres: PostgreSQL 15 database on internal port 5432verifier-service: The verifier application on port 8083
3. Verify the deployment
$ curl http://localhost:8083/swagger-ui/index.html
The sample compose file:
services:
verifier_postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: "verifier_user"
POSTGRES_PASSWORD: "secret"
POSTGRES_DB: "verifier_db"
ports:
- "5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U verifier_user -d verifier_db"]
interval: 5s
timeout: 5s
retries: 5
verifier-service:
image: ghcr.io/swiyu-admin-ch/swiyu-verifier:latest
configs:
- source: verifier_metadata
target: /verifier_metadata.json
ports:
- "8083:8080"
environment:
EXTERNAL_URL: ${EXTERNAL_URL}
OPENID_CLIENT_METADATA_FILE: ${OPENID_CLIENT_METADATA_FILE}
VERIFIER_DID: ${VERIFIER_DID}
DID_VERIFICATION_METHOD: ${DID_VERIFICATION_METHOD}
SIGNING_KEY: ${SIGNING_KEY}
POSTGRES_USER: "verifier_user"
POSTGRES_PASSWORD: "secret"
POSTGRES_JDBC: "jdbc:postgresql://verifier_postgres:5432/verifier_db"
configs:
verifier_metadata:
content: |
{
"client_id": "${VERIFIER_DID}",
"client_name": "My Verifier",
...
}
5.6.4. Debug mode#
To run the verifier with remote debugging enabled:
$ ./mvnw spring-boot:run -pl verifier-application \
-Dspring-boot.run.fork=true \
-Dspring-boot.run.jvmArguments="-Dspring.config.additional-location=file:/path/to/my-verifier.yml -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
This starts the JVM debug agent on port 5005. Connect your IDE’s remote
debugger to localhost:5005.
5.6.5. Identity configuration#
These settings establish your verifier’s identity within the Swiyu Trust Infrastructure. All values are derived from the DID generation process during onboarding.
application.client_idYour verifier’s DID as registered on the Base Registry. This uniquely identifies your service to wallets and other participants. Example:
did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:uuidapplication.client_id_prefixPrefix put in front of
client_idin what the wallet receives, as indecentralized_identifier:did:tdw:.... Defaults todecentralized_identifierand rarely needs changing. It replaced theclient_id_schemesetting in release 4.0.0.application.signing-key-verification-methodThe full DID with key fragment that identifies the public key in your DID Document. This tells wallets where to find the key for verifying your signed request objects. Example:
did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:uuid#auth-key-01application.signing_keyThe private EC key used to sign OID4VP request objects. This must be the private key corresponding to the public key published in your DID Document. Include the full PEM content including BEGIN and END markers:
application: signing_key: | -----BEGIN EC PRIVATE KEY----- MHcCAQEEI...your_key_content... -----END EC PRIVATE KEY-----
application.external-urlThe publicly accessible URL of your verifier service. Wallets use this URL to retrieve request objects and submit presentations. Must be HTTPS in production. Example:
https://verifier.example.comapplication.client-metadata-filePath to the verifier metadata JSON file. This file contains display information shown to users in their wallet, including localized names and logo. Example:
classpath:/client_metadata.json
5.6.6. Database configuration#
Configure the PostgreSQL connection for storing verification state:
spring.datasource.urlJDBC connection URL for the PostgreSQL database. Example:
jdbc:postgresql://localhost:5432/verifier_dbspring.datasource.usernameDatabase username for authentication.
spring.datasource.passwordDatabase password for authentication.
spring.jpa.hibernate.ddl-autoSchema management strategy. Leave it at
validate, the upstream default: Flyway creates and migrates the schema (spring.flyway.enabled, also on by default), andvalidatehas Hibernate check the result and refuse to start on a mismatch.createandcreate-dropdrop the schema and every verification in it on each start, andupdatelets Hibernate make changes behind Flyway’s back.
5.6.7. Operational parameters#
These settings control verification behavior and resource management:
VERIFICATION_TTL_SECHow long a verification request remains valid, in seconds. After this period, the verification expires and the user must start a new request. Default:
900(15 minutes)DATA_CLEAR_PROCESS_INTERVAL_MSInterval between cleanup runs that remove expired verifications from the database, in milliseconds. Default:
420000(7 minutes)STATUS_LIST_CACHE_TTL_MILLIHow long to cache credential status list results, in milliseconds. Caching reduces load on the Status Registry. Default:
900000(15 minutes)ISSUER_PUBLIC_KEY_CACHE_TTL_MILLIHow long to cache issuer public key lookups, in milliseconds. Caching reduces load on the Base Registry. Default:
3600000(1 hour)
5.6.8. Webhook configuration#
Configure webhook callbacks to receive notifications when verification status changes, instead of polling:
webhook.callback-uriFull URL where webhook notifications should be sent. If not set, webhooks are disabled and clients must poll for status updates. Example:
https://kych.example.com/notificationwebhook.callback-intervalHow often to send queued webhook notifications, in milliseconds. Failed deliveries are retried on subsequent intervals. Default:
5000(5 seconds)WEBHOOK_API_KEY_HEADERHTTP header name for API key authentication on the webhook endpoint. Optional but recommended for production. Example:
X-API-KeyWEBHOOK_API_KEY_VALUEThe API key value to include in webhook requests. Required if
WEBHOOK_API_KEY_HEADERis set.
Webhook payloads contain:
{
"verification_id": "uuid-of-verification",
"timestamp": "2025-01-23T10:30:00Z"
}
5.6.9. Security configuration#
The Management API can be secured using OAuth 2.0 resource server authentication via Spring Security.
For fixed public key authentication:
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_PUBLICKEYLOCATIONURI path to a public key in PEM format for JWT verification. Example:
file:/etc/kych/management-api-public-key.pem
For dynamic key discovery via authorization server:
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURIURI to the OAuth 2.0 authorization server. The verifier fetches the public key from the server’s
/.well-known/openid-configuration.SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWKSETURIDirect URI to the JWK Set endpoint, bypassing OpenID Connect discovery.
SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWSALGORITHMSComma-separated list of accepted JWT signature algorithms. Default:
RS256
5.6.10. Example configuration#
Complete configuration example for production deployment:
application:
external-url: "https://verifier.example.com"
client_id: "did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:abc123"
signing-key-verification-method: "did:tdw:QmHash:identifier-reg.trust-infra.swiyu.admin.ch:api:v1:did:abc123#auth-key-01"
signing_key: |
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu
oAoGCCqGSM49AwEHoUQDQgAE5cice...
-----END EC PRIVATE KEY-----
client-metadata-file: "classpath:/client_metadata.json"
spring:
datasource:
driver-class-name: org.postgresql.Driver
url: "jdbc:postgresql://localhost:5432/verifier_db"
username: "verifier_user"
password: "secure_password_here"
jpa:
hibernate:
ddl-auto: validate
webhook:
callback-uri: "https://kych.example.com/notification"
callback-interval: 5000
5.7. Running the service#
See the Deployment Options section for detailed instructions on running the verifier in different environments. This section covers verification and additional runtime configuration.
5.7.1. Verifying the deployment#
After starting, verify the service is running by accessing the Swagger UI:
https://<your-external-url>/swagger-ui/index.html
The Management API endpoints are available under /management/api/
and the OID4VP endpoints under /oid4vp/api/.
5.7.2. Client metadata configuration#
The client_metadata.json file defines how your verifier appears to
users in their wallet. Create this file with localized display information:
{
"client_id": "${VERIFIER_DID}",
"client_name": "My Verifier Service",
"client_name#en": "My Verifier Service",
"client_name#de": "Mein Verifizierdienst",
"client_name#fr": "Mon service de verification",
"logo_uri": "https://example.com/logo.png",
"vp_formats": {
"jwt_vp": {
"alg": ["ES256"]
}
}
}
The vp_formats field specifies which Verifiable Presentation formats
your verifier accepts. For SD-JWT credentials, ES256 is the standard
algorithm.
5.8. Integration with KyCH OAuth2 Gateway#
The Swiyu Verifier integrates with KyCH OAuth2 Gateway to provide KYC verification for GNU Taler exchanges. This section describes the required configuration on both sides.
5.8.1. KyCH client configuration#
In the KyCH configuration file, configure each client with the Swiyu Verifier URL and webhook endpoint:
[client_exchange]
CLIENT_ID = taler-exchange
CLIENT_SECRET = secure_secret
VERIFIER_URL = https://verifier.example.com
VERIFIER_MANAGEMENT_API_PATH = /management/api/verifications
REDIRECT_URI = https://exchange.example.com/kyc/callback
ACCEPTED_ISSUER_DIDS = {did:tdw:trusted_issuer_did}
5.8.2. Webhook configuration#
Configure the Swiyu Verifier to send status notifications to KyCH’s notification endpoint:
webhook:
callback-uri: "https://kych.example.com/notification"
callback-interval: 5000
This allows KyCH to receive immediate notification when a verification completes, rather than relying on polling.
5.8.3. Verification flow with KyCH#
When integrated with KyCH, the verification flow is:
KyCH receives an OAuth 2.0 authorization request from the exchange.
KyCH calls
POST /management/api/verificationson the Swiyu Verifier with the credential claims specified in the OAuth scope.The verifier returns a verification URI and deeplink.
KyCH displays a QR code to the user or provides the deeplink.
The user’s Swiyu Wallet scans the QR code and presents the credential.
The Swiyu Verifier validates the credential and sends a webhook to KyCH.
KyCH retrieves the verified claims and continues the OAuth flow.
5.9. API Usage#
This section describes how to use the Swiyu Verifier APIs directly, which is useful for understanding the integration or for custom implementations.
5.9.1. Creating a verification request#
Create a verification request using the Management API:
$ curl -X POST \
-H "Content-Type: application/json" \
-d @request.json \
https://verifier.example.com/management/api/verifications
Where request.json contains:
{
"accepted_issuer_dids": ["did:tdw:issuer_did"],
"jwt_secured_authorization_request": true,
"response_mode": "direct_post",
"dcql_query": {
"credentials": [{
"id": "age_check",
"format": "dc+sd-jwt",
"meta": { "vct_values": ["betaid-sdjwt"] },
"claims": [{ "path": ["age_over_18"] }],
"require_cryptographic_holder_binding": true
}]
}
}
5.9.1.1. Request parameters#
accepted_issuer_didsList of trusted issuer DIDs. Only credentials from these issuers are accepted. If omitted, credentials from any issuer are accepted (not recommended for production).
trust_anchorsAlternative to
accepted_issuer_dids. List of trust registry entry DIDs. The verifier accepts credentials from any issuer trusted by these anchors.dcql_queryRequired. What the wallet is asked to present, as a Digital Credentials Query Language query. See the DCQL query format section below.
Release 3.0.0 dropped the DIF Presentation Exchange
presentation_definitionthat older versions took here, so a request built for one of those is rejected.jwt_secured_authorization_requestWhether to sign the request object. Default:
true(recommended).response_modeHow the wallet sends the response. Options:
direct_post: Unencrypted response (current default)direct_post.jwt: JWE-encrypted response (recommended for privacy)
5.9.1.2. Response#
{
"id": "verification-uuid",
"request_nonce": "random-nonce",
"state": "PENDING",
"verification_url": "https://verifier.example.com/oid4vp/api/request-object/request-id",
"verification_deeplink": "swiyu-verify://?client_id=..."
}
Store the id for polling status. Use verification_deeplink to
generate a QR code for the user to scan.
5.9.2. Polling verification status#
Check the status of a verification:
$ curl -X GET \
https://verifier.example.com/management/api/verifications/{verification_id}
The response includes the current state:
PENDING: Waiting for user to present credentialsSUCCESS: Verification completed successfullyFAILED: Verification failed (seeerror_code)REJECTED: User rejected the verification requestEXPIRED: Verification request timed out
5.9.3. DCQL query format#
The dcql_query follows the Digital Credentials Query Language of OpenID4VP
1.0, section 6. Each entry of credentials asks for one credential:
idNames this credential query. The verifier reports the disclosed claims back under this key in
wallet_response.dcql_response, so it is worth choosing something recognisable; it must match^[a-zA-Z0-9_-]+$.formatdc+sd-jwt, the canonical SD-JWT VC media type. The oldervc+sd-jwtis still accepted during the migration window.meta.vct_valuesThe credential types that satisfy this query, matched against the
vctclaim of the presented credential –betaid-sdjwtfor the Swiss Beta ID. This is what lets a wallet holding several credentials tell which one is being asked for.claimsThe claims to disclose, one entry per claim, each a claims path pointer:
{"path": ["age_over_18"]}for a top-level claim, and{"path": ["address", "street_address"]}for a nested one. Every claim of the Beta ID is top-level. Leave the member out entirely rather than sending an empty array, which is rejected.require_cryptographic_holder_bindingWhether the wallet must prove it holds the credential’s key. Defaults to true, and there is no good reason to turn it off.
trusted_authoritiesOptional, and normally not sent: when
accepted_issuer_didsis given on the request, the verifier fills this in from it, so that the wallet can pre-filter the credentials it offers the user. If you do send it, it has to agree withaccepted_issuer_dids.
KyCH builds exactly such a query from the OAuth 2.0 scope, one claims query
per scope token; swiyu-verifier/api_requests/request_over_18.json in the
KyCH tree is a complete example in the same shape.
5.10. Error codes#
When verification fails, the response includes an error code explaining the failure:
credential_invalidGeneric credential validation failure.
credential_expiredThe presented credential has expired.
credential_revokedThe credential has been revoked by the issuer.
credential_suspendedThe credential is temporarily suspended.
credential_missing_dataThe credential does not contain the requested claims.
issuer_not_acceptedThe credential issuer is not in the accepted issuers list.
public_key_of_issuer_unresolvableCould not retrieve the issuer’s public key from the Base Registry.
unresolvable_status_listCould not check credential revocation status.
holder_binding_mismatchThe holder could not prove control of the credential.
client_rejectedThe user rejected the verification request in their wallet.
jwt_expiredA JWT in the verification process has expired.
invalid_formatThe credential or presentation format is invalid.
5.11. Deployment considerations#
5.11.1. Production security#
For production deployments:
Protect the Management API: Use network segmentation or OAuth 2.0 authentication to restrict access to internal systems only.
Use an API Gateway: Place a WAF or API gateway in front of the OID4VP endpoints to filter malicious requests.
Enable HTTPS: The OID4VP endpoints must use HTTPS with a valid certificate from a trusted CA.
Secure credentials: Store the signing key securely. Consider using an HSM for production key management.
Set accepted issuers: Always specify
accepted_issuer_didsortrust_anchorsin verification requests.
5.11.2. HSM support#
For production deployments, the signing key can be stored in a Hardware Security Module (HSM) instead of the configuration file. Configure:
SIGNING_KEY_MANAGEMENT_METHODSet to
pkcs11for Sun PKCS#11 provider or a vendor-specific value.HSM_HOST,HSM_PORT,HSM_USER,HSM_PASSWORDConnection parameters for the HSM.
HSM_KEY_IDKey identifier or alias within the HSM.
See the Swiyu Verifier documentation for vendor-specific HSM configuration.
5.11.3. Monitoring#
The verifier exposes Prometheus metrics at /actuator/prometheus.
Enable authentication for this endpoint in production:
MONITORING_BASIC_AUTH_ENABLED: true
MONITORING_BASIC_AUTH_USERNAME: prometheus
MONITORING_BASIC_AUTH_PASSWORD: secure_password
5.12. See also#
kych.conf(5) - KyCH OAuth2 Gateway configuration
kych-oauth2-gateway(1) - KyCH OAuth2 Gateway server
5.13. Bugs#
Report bugs by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>.