26.46. kych-trust(1)#
26.46.1. Name#
kych-trust - lists of trusted entities and the EUDI Trust Validator protocol for KyCH
26.46.2. Synopsis#
kych-trust [-c CONFIG] [-L LEVEL] [-v] [–refresh-once]
26.46.3. Description#
kych-trust decides which issuers KyCH’s helpers for EU Digital Identity Wallets trust. A credential carries its issuer’s certificate chain, and a valid signature only proves that someone signed it: the chain must also end at a provider that the European Commission lists for the credential’s class – a PID provider for a PID, an access-certificate provider for a relying party’s access certificate. The Commission publishes these as signed lists of trusted entities (ETSI TS 119 602), one per class.
kych-trust fetches every list its configuration names, at start and then
every REFRESH_INTERVAL. It accepts a list only when
its signer is the scheme operator’s certificate (
LOTE_SIGNER), or chains to it, and its signature verifies;its
NextUpdatehas not passed;it is of the type its
CLASSsays (LoTEType);its sequence number is higher than that of the list in use: a list is never rolled back.
Every accepted list becomes a snapshot in kych-trust’s own PostgreSQL
database, stored verbatim and never changed. A list that fails to load or is
refused keeps the last good snapshot in use; the failure is logged and shown
by GET /status. Once a snapshot’s NextUpdate has passed without a
newer list, nothing is trusted by it any more.
It serves, on a Unix domain socket or on loopback TCP:
POST /trustThe Trust Validator protocol of the EUDI reference verifier (eudi-srv-verifier-endpoint,
VERIFIER_TRUSTVALIDATOR_SERVICEURL). The request is{"chain": [...], "verificationContext": "PID", "useCase": "..."}, the chain as base64 DER certificates, end entity first; the answer is{"trusted": true|false, "trustAnchor": "...", "error": ...}with the listed certificate the chain ends at, plussnapshot, the snapshot the decision was taken on, andentityandservice, the listed provider.useCasebelongs to the contextsEAA,EAAStatusandCustomonly. A malformed request is answered 400, a context no list serves 500, both with{"description": ...}.GET /anchors/CONTEXT[?useCase=USE_CASE]The trust anchors of a verification context in the current snapshot, with the snapshot: what KyCH’s walt.id adapter puts into an
x509-trustpolicy. 404 for a context no list serves, 503 when there is no usable snapshot.GET /statusEvery list: its class, location and contexts, its snapshot, whether it is usable, and how its refreshes went.
GET /snapshots/SERIALA stored snapshot and the signed list it holds, current or not, so that the list an earlier decision was taken on can be shown.
A chain is trusted for a context when it leads, as an RFC 5280 path, to a
certificate the snapshot lists under the context’s service type, or, where
the class allows it, when its end-entity certificate is itself listed. For
the contexts PID, WalletProviderAttestation and
WalletRelyingPartyAccessCertificate the end-entity certificate must also
not be a CA certificate, and must allow digitalSignature if it has a key
usage. Revocation of the providers’ certificates (CRL, OCSP) is not checked:
a provider that is no longer trusted is removed from the list.
The interface has no authentication. Bind it to a Unix domain socket or to
loopback only. The EUDI verifier cannot reach a Unix domain socket – its
HTTP client has no such transport – so a host running it needs SERVE =
tcp on 127.0.0.1.
26.46.4. Options#
- -c CONFIG | –config=CONFIG
Use the configuration file CONFIG. Without it the search path ends at
/etc/kych-trust/kych-trust.conf; see kych-trust.conf(5).- -L LEVEL | –log=LEVEL
Set the logging verbosity:
ERROR,WARN,INFO,DEBUGorTRACE. Defaults toINFO, which logs every accepted list and every failed refresh.- -v | –verbose
Also log what the libraries have to say.
- –refresh-once
Fetch every list once, print what happened to each, and exit instead of serving: 0 if every list was accepted or unchanged, 1 otherwise. It stores what it accepts, as the daemon would.
- -h | –help
Print short help.
- –version
Print version information.
26.46.5. Files#
/etc/kych-trust/kych-trust.confThe configuration, root:kych-trust 0640.
/usr/share/kych-trust/config.d/The package’s defaults, read first.
/run/kych-trust/kych-trust.sockThe socket, with the shipped defaults.
26.46.6. Examples#
Ask over the socket whether a PEM certificate is a listed PID provider’s:
$ chain=$(openssl x509 -in issuer.pem -outform DER | base64 -w0)
$ curl --unix-socket /run/kych-trust/kych-trust.sock \
-H 'Content-Type: application/json' \
-d "{\"chain\": [\"$chain\"], \"verificationContext\": \"PID\"}" \
http://localhost/trust
26.46.7. See Also#
kych-trust.conf(5), kych-trust-dbinit(1), kych-trust-dbconfig(1), kych-oauth2-gateway(1), kych.conf(5).
26.46.8. Bugs#
Report bugs by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>.