26.43. kych-oid4vp.conf(5)#

26.43.1. Name#

kych-oid4vp.conf - configuration file of kych-oid4vp

26.43.2. Description#

kych-oid4vp(1) reads its configuration in the GNU Taler format: sections in brackets, OPTION = value lines, @inline@ and @inline-secret@ includes and $VARIABLE expansion in paths, as kych.conf(5) describes. A comment must stand on a line of its own: a # after a value is part of the value.

The file is looked for at $XDG_CONFIG_HOME/kych-oid4vp.conf, ~/.config/kych-oid4vp.conf, /etc/kych-oid4vp.conf and /etc/kych-oid4vp/kych-oid4vp.conf, unless -c names one. The files in $DATADIR/config.d/ (/usr/share/kych-oid4vp/config.d/ for the Debian package) are read before it, so it needs to hold only what differs.

26.43.3. THE KYCH-OID4VP SECTION#

The management interface, which only KyCH may reach, and everything about the requests.

SERVE

unix (the default), tcp or systemd: where the management interface listens – a Unix domain socket the daemon binds itself, a TCP port, or a socket systemd passes in. With tcp, BIND_TO must be a loopback address: the daemon refuses to start otherwise.

UNIXPATH, UNIXPATH_MODE

With SERVE = unix: the socket’s path and permissions (octal). Defaults /run/kych-oid4vp/api.sock and 660; the socket takes the daemon’s group, kych-oid4vp, which the package adds KyCH’s user to.

BIND_TO, PORT

With SERVE = tcp: a loopback address and the port.

API_SECRET

The bearer secret every management request but GET /config must carry, at least 32 characters: the same value as API_SECRET of KyCH’s [helper-*] section. Required. The package generates one on its first install in /etc/kych-oid4vp/secrets/api.secret.conf, which the shipped configuration pulls in with @inline-secret@ kych-oid4vp /etc/kych-oid4vp/secrets/api.secret.conf.

DATABASE

The PostgreSQL database, as a URI; see kych.conf(5) for a socket on a non-default port. Default postgres:///kych-oid4vp?host=/var/run/postgresql.

SQL_DIR

Where kych-oid4vp-dbinit(1) finds the schema. Default $DATADIR/sql.

BASE_URL

Where the reverse proxy publishes the wallet interface, with a trailing slash, e.g. https://kych.example.com/kych-oid4vp/: the request URI is BASE_URL plus request/TOKEN, the response URI BASE_URL plus response/TOKEN. Required. Wallets accept https only.

CLIENT_ID_PREFIX

x509_hash (the default): the client identifier is the hash of the access certificate, as HAIP requires; or x509_san_dns: one of the certificate’s DNS names, which must be BASE_URL’s host (the EUDI wallets insist that the response URI is on that host).

SIGNING_KEY

The access certificate’s private key, a PEM file (PKCS#8, P-256), which the request objects are signed with. Required. Readable by the daemon only.

SIGNING_CERTIFICATE

The access certificate and its chain, a PEM file, leaf first; sent as x5c. Its leaf must hold the key of SIGNING_KEY. Required.

RESPONSE_MODE

direct_post.jwt (the default: the wallet encrypts its response to a key of the session) or direct_post. x509_hash takes direct_post.jwt only.

REQUEST_URI_METHOD

What the authorization request URI says, post (the default) or get (OpenID4VP 1.0, section 5.10). Both are served either way.

ENCRYPTION_METHODS

The content encryptions offered for direct_post.jwt, in order of preference. Default {A128GCM, A256GCM}.

AUTHORIZATION_REQUEST_URI

What the URI for the QR code and the deep link starts with: a wallet’s scheme, e.g. openid4vp:// (the code’s default) or haip-vp:// (the shipped default), or a wallet’s https URL; client_id, request_uri and request_uri_method are appended as its query. It must be one of the vocabulary’s WALLET_SCHEMES in kych.conf(5).

MAX_AGE

The longest a session may last, a duration; a session KyCH asks to last longer ends earlier. Default 15 min.

MAX_RESPONSE_BYTES

The largest response read, in bytes. A larger one is refused with 413 and fails its session. Default 1048576. The reverse proxy must let a larger body through for the session to fail rather than wait (the example site allows 32 MiB).

KB_JWT_MAX_AGE

How old a key-binding JWT’s iat may be. Default 5 min.

CLOCK_SKEW

The tolerance for an SD-JWT VC’s exp, nbf and the key-binding JWT’s iat. Default 1 min.

STATUS_TIMEOUT

How long fetching a status list may take. Default 10 s.

REQUIRE_STATUS

YES: a credential without a status reference fails. Default NO.

PURGE_GRACE

How long the disclosed claims and the evidence are kept after KyCH first fetched a final outcome (or after the session’s expiry, if it never did), so that KyCH can ask again. Default 10 min.

RETENTION

How long a session’s row is kept after the session ended, for the logs’ sake; no personal data is left in it by then. Default 24 h (a duration takes hours, minutes and seconds; not days).

SWEEP_INTERVAL

How often the sweeper purges, deletes and tells KyCH of sessions that expired unanswered. Default 1 min.

KYCH_TRUST_URL, KYCH_TRUST_UNIXPATH

Where kych-trust(1) answers, POST /trust: a loopback URL, e.g. http://127.0.0.1:18090, or its Unix domain socket. kych-oid4vp asks it about every issuer and every status list’s signer.

KYCH_TRUST_DATABASE

Instead: kych-trust’s own database, read-only, for kych-trust’s library to take the same decisions in-process on the snapshots kych-trust keeps there. The [trust-*] sections must then be in this configuration too (@inline@ the file kych-trust and KyCH read them from), and the role needs SELECT on schema kych_trust, which kych-trust-dbconfig -g kych-oid4vp grants (kych-trust-dbconfig(1)).

Exactly one of the three is required: without trust decisions every issuer would be accepted, so kych-oid4vp refuses to start.

KYCH_TRUST_RELOAD

With KYCH_TRUST_DATABASE: how often the snapshots are loaded again. Default 1 min.

26.43.4. THE KYCH-OID4VP-WALLET SECTION#

The wallet interface, which the reverse proxy publishes.

SERVE

unix, tcp or systemd. The package’s default is systemd: the socket unit kych-oid4vp.socket creates /run/kych-oid4vp-wallet.sock, group www-data, mode 0660, for nginx.

UNIXPATH, UNIXPATH_MODE, BIND_TO, PORT

As above.

26.43.5. TRUST SECTIONS#

With KYCH_TRUST_DATABASE only: the [trust-*] sections of kych-trust.conf(5), read by kych-trust’s own parser.

26.43.6. EXAMPLE#

[kych-oid4vp]
BASE_URL = https://kych.example.com/kych-oid4vp/
CLIENT_ID_PREFIX = x509_hash
SIGNING_KEY = /etc/kych-oid4vp/secrets/access-certificate.key.pem
SIGNING_CERTIFICATE = /etc/kych-oid4vp/access-certificate.pem
KYCH_TRUST_URL = http://127.0.0.1:18090

@inline-secret@ kych-oid4vp /etc/kych-oid4vp/secrets/api.secret.conf

26.43.7. SEE ALSO#

kych-oid4vp(1), kych-oid4vp-dbinit(1), kych-oid4vp-dbconfig(1), kych-trust.conf(5), kych.conf(5).

26.43.8. BUGS#

Report bugs by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>.