26.59. swiyu-verifier(1)#
26.59.1. Name#
swiyu-verifier - SWIYU Generic Verifier service
26.59.2. Synopsis#
swiyu-verifier [–PROPERTY=VALUE …]
26.59.3. Description#
swiyu-verifier runs the SWIYU Generic Verifier, the Spring Boot service that performs OpenID4VP credential verification against the Swiss SWIYU trust infrastructure. kych-oauth2-gateway(1) creates verifications on its management API and is told the result through a webhook; the user’s wallet talks to its OID4VP API.
This program is a thin wrapper around java -jar
/usr/share/swiyu-verifier/swiyu-verifier.jar. It exists because three things
have to be settled before the JVM starts:
Which Java. The jar is built for Java 25, which the verifier moved to in its 5.0.0 release, so the system default
javais not necessarily the right one.$JAVA_HOMEwins if it is set and holds a runtime; otherwise an/usr/lib/jvm/java-25-openjdk-*is preferred over the default.The configuration under /etc.
/etc/swiyu-verifier/application.ymlis added to the configuration compiled into the jar, overriding it.The trust store. If
/var/lib/swiyu-verifier/cacertsexists – the package’spostinstbuilds it from the system Java trust store plus the Swiss Government Root CA VI, which is not publicly trusted – it is used instead of the JVM default.
Any arguments are passed on to the application, so Spring Boot’s
--property=value form works; see Examples.
The service is normally not run from a terminal but through
swiyu-verifier.service, which is where the environment comes from.
26.59.4. Configuration#
The verifier is configured through environment variables, which
swiyu-verifier.service reads from
/etc/swiyu-verifier/swiyu-verifier.envThe package’s defaults, and the reference for what can be set: the identity of the verifier (
EXTERNAL_URL,VERIFIER_DID,DID_VERIFICATION_METHOD), where it listens (SERVER_ADDRESS,SERVER_PORT, or instead a Unix domain socket:SERVER_UNIXSOCKET_PATHand optionallySERVER_UNIXSOCKET_PERMISSIONS, an addition of this package to upstream), its database (POSTGRES_JDBC,POSTGRES_USER), where to report results (WEBHOOK_CALLBACK_URI) and which trust registry to use. It is commented throughout; the full list of properties is upstream’s, at swiyu-admin-ch/swiyu-verifier./etc/swiyu-verifier/local.envWhere the operator’s own settings belong. Read after the file above, and therefore overriding it, and not owned by the package – so an upgrade that changes the shipped defaults has no conffile question to ask. Not shipped; create it.
/etc/swiyu-verifier/secrets/db.envPOSTGRES_PASSWORD, written by swiyu-verifier-dbconfig(1).
The signing key is not among them, because a PEM document has newlines in it
and an environment file cannot express those – an escaped \n reaches the
JVM as two characters, which fails with No PEM key found. It is a YAML
file instead, imported by application.yml through
spring.config.import:
/etc/swiyu-verifier/secrets/signing-key.ymlapplication.signing_key, the private key whose public half is published in the verifier’s DID document, as a block scalar. Mode 0640, root:swiyu-verifier. Copy/usr/share/swiyu-verifier/signing-key.yml.exampleto it. For a key in an HSM, leave it out and setSIGNING_KEY_MANAGEMENT_METHODand theHSM_*variables in the environment file instead – those are single-line values.
Two further files are read by the service itself:
/etc/swiyu-verifier/application.ymlSpring Boot configuration for the few settings that have no environment variable, and for pinning those that must not change with an upstream default –
spring.jpa.hibernate.ddl-autoabove all, which must stayvalidate./etc/swiyu-verifier/client_metadata.jsonThe OpenID4VP client metadata: the name and logo the wallet shows the user when it asks for consent, and the credential formats and algorithms this verifier accepts.
${client-id}in it is replaced withVERIFIER_DIDat runtime.
26.59.5. Database#
The service owns its schema and migrates it with Flyway on every start, so upgrading this package is a restart and nothing more. The database and the role it connects as are created once by swiyu-verifier-dbconfig(1).
The connection goes over TCP to localhost rather than the PostgreSQL socket,
because the JDBC driver cannot use peer authentication; that is why there
is a generated password at all.
26.59.6. Endpoints#
/oid4vp/api/The OpenID4VP interface the wallet talks to. It must be reachable from the internet over HTTPS with a certificate from a publicly trusted CA – the SWIYU wallet accepts nothing else – which is the reverse proxy’s job, as this service speaks plain HTTP.
/management/api/verificationsCreates a verification and retrieves its result. Must not be reachable from outside the host: anybody who can reach it can create verifications in this verifier’s name. KyCH is its only intended user.
/actuator/health,/actuator/prometheusHealth and metrics.
/actuator/envechoes part of the configuration and is therefore not exposed by the shippedapplication.yml./swagger-ui.htmlInteractive API documentation for the above.
26.59.7. Files#
/usr/share/swiyu-verifier/swiyu-verifier.jarThe application.
/usr/share/swiyu-verifier/certs/root_ca_vi.crtSwiss Government Root CA VI, as shipped by upstream.
/var/lib/swiyu-verifier/cacertsThe service’s Java trust store, built by the package’s
postinstand removed on purge.
26.59.8. Examples#
Follow a verification through the logs:
$ sudo journalctl -u swiyu-verifier -f
Check that the service considers itself healthy, which includes resolving its own DID in the identifier registry:
$ curl -s http://127.0.0.1:8080/actuator/health | python3 -m json.tool
Run it by hand on another port, as the service user, to try a configuration change out:
$ sudo -u swiyu-verifier swiyu-verifier --server.port=8081
26.59.9. See Also#
swiyu-verifier-dbconfig(1), kych-oauth2-gateway(1), kych.conf(5).
The operator manual at https://docs.taler.net/taler-swiyu-verifier-manual.html covers onboarding to the SWIYU trust infrastructure, which has to happen before this service can verify anything.
26.59.10. Bugs#
Report bugs in the packaging by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>. Bugs in the verifier itself belong to its upstream at swiyu-admin-ch/swiyu-verifier#issues.