26.36. kych-eid(1)#
26.36.1. Name#
kych-eid - eID server for the German identity card’s online function, a KyCH-native helper
26.36.2. Synopsis#
kych-eid [-c CONFIG] [-L LEVEL] [-v]
26.36.3. Description#
kych-eid is KyCH’s own eID server for the online function of the German
identity card (Personalausweis), the eID card for EU citizens and the
electronic residence permit: it serves KyCH’s npa vocabulary through the
KyCH-native helper API (kind eid-server), as kych-eumw-bridge(1) does in
front of the Governikus eIDAS Middleware. The person’s eID client
(AusweisApp) talks to it, and through it to the card; KyCH talks to it only
on its management interface.
It does no cryptography of its own: every primitive – brainpool ECDSA and ECDH, AES, CMAC, the hashes, CMS and X.509 – is OpenSSL’s. What it does is the eID server’s part of BSI TR-03130 with the eID client’s interface of TR-03124-1 and TR-03112-7:
the tcToken of an attached eID server: no TLS-PSK, the eID client uses TLS with the server certificate whose hash the certificate description of the authorisation certificate lists;
the PAOS dialogue: StartPAOS, InitializeFramework, DIDAuthenticate with EAC1InputType and EAC2InputType (and EACAdditionalInputType for a client that sends the card’s challenge late), Transmit, StartPAOSResponse;
Terminal Authentication v2 with the authorisation certificate’s key, the CHATs of the attributes asked for (the person may deselect optional ones), the document validity date as authenticated auxiliary data;
Chip Authentication v2 with the chip’s static key from EF.CardSecurity – the chip proves it holds the key a document signer signed – and secure messaging (AES-CBC, AES-CMAC) from there on;
Passive Authentication of EF.CardSecurity: its document signer under a CSCA of the master list, not on the defect list (nor revoked by a CRL in
CRL_FILES), and EF.CardAccess confirmed by it;Restricted Identification: the card’s identifier in the sector of the authorisation certificate with its block-list key, checked against the block list, and with its pseudonym key the
RestrictedID;document validity by the card itself (VERIFY of the date), and the data groups the effective CHAT allows, read into the shapes of the eID server interface (TR-03130):
DateOfBirthandDateOfExpiryas{DateString, DateValue}, places as{StructuredPlace},{FreetextPlace}or{NoPlaceInfo},RestrictedIDas{ID}, the rest as text – every attribute of TR-03130 but the age and place verifications, which need parameters the KyCH-native API does not carry.
Its trust material – the terminal’s key and certificate chain, the
certificate description, the sector key, the master, defect and block lists
– is what kych-eid-berca(1) fetches from the service provider’s BerCA into
STATE_DIR. kych-eid checks all of it when it loads it (the chain, the
key against the certificate, the description’s and the sector key’s
hashes, the subject URL against BASE_URL, every list’s signature), and
loads it again every RELOAD_INTERVAL when a file changed. New sessions
are refused (503 unavailable) while the terminal certificate is out of
its validity period or the block list is older than
MAX_BLOCK_LIST_AGE.
The daemon has two interfaces, on two listeners:
the management interface of
[kych-eid], for KyCH alone: the KyCH-native helper API (GET /config,POST /sessions,GET /sessions/$ID[?wait=],DELETE /sessions/$ID), with a bearer secret, on a Unix domain socket or loopback only;the public interface of
[kych-eid-public], which the reverse proxy publishes atBASE_URL– on the origin the certificate description names, with the TLS certificate it lists:GET start/$TOKENthe browser’s page with the link that starts the eID client (
http://127.0.0.1:24727/eID-Client?tcTokenURL=...) and a cancel link;GET tctoken/$TOKENthe tcToken, once;
POST paos/$TOKENthe PAOS messages;
GET refresh/$TOKENthe refresh address the eID client sends the browser to at the end: a redirect to KyCH’s
return_url.
AusweisApp requires the PAOS connection to resume the TLS session of the tcToken’s: both must reach the same TLS endpoint.
26.36.3.1. A session#
KyCH asks for the attributes (
POST /sessions,request.attributes, eachrequiredor not). A required attribute the authorisation certificate does not allow is refused at once; an optional one is left out. The answer’sbrowser_urlis the start page.The eID client fetches the tcToken and runs the dialogue; its state – the ephemeral key, the secure messaging keys – lives in memory only, for at most
DIALOGUE_TIMEOUT. A restart ends the dialogues in flight.The outcome is stored, KyCH is notified (
{"session_id"}to itsnotify_url) and fetches it: the attributes under the vocabulary’s name, and the evidence. The person’s browser goes from the refresh address to KyCH’sreturn_url.The attributes and the evidence are deleted
PURGE_GRACEafter KyCH first fetched them, or when the session expires; the rowRETENTIONafter the session ended.
Failure codes: access_denied (the person cancelled – kind
cancelled – or deselected a required right), card_invalid with
kind expired, revoked (block list), not_authentic (Passive
or Chip Authentication failed), defect (defect list), untrusted_cvca
or unsupported; attribute_missing, invalid_response (the eID
client or the card broke the protocol, or the secure messaging), eid_error
(the eID client reports an error; the hint has it), presentation_expired
and cancelled.
26.36.3.2. The evidence#
The evidence has KyCH’s shape (helper.type kych-native,
helper.name kych-eid, credential_type de-eid,
level_of_assurance high), with what was checked: the document
signer and CSCA, the authorisation certificate, the effective rights, the
block list. Its presentation is {"format": "kych-eid-signed-result",
"signed_result", "signer_certificate"}: a CMS SignedData, signed with
RESULT_SIGNING_KEY, of a JSON document with the attributes read and
every check made.
What it proves, and what not: the card proves itself to the eID server alone, over a channel only the two share, and signs nothing that could be checked later. The signed result is kych-eid’s own statement – proof that this eID server said so and that the record was not changed since, not that a card did.
26.36.4. Options#
- -c CONFIG | –config=CONFIG
Use the configuration file CONFIG; see kych-eid.conf(5).
- -L LEVEL | –log=LEVEL
Set the logging verbosity. Defaults to
INFO. Every line inside a request carries the request’s id.- -v | –verbose
Also log what the libraries have to say.
- -h | –help
Print a short help text and exit.
- -V | –version
Print the version and exit.
26.36.5. Files#
/etc/kych-eid/kych-eid.confThe configuration (Debian package).
/usr/share/kych-eid/config.d/00-kych-eid-defaults.confThe defaults, read before it.
/var/lib/kych-eid/The trust material kych-eid-berca(1) keeps:
terminal.key.pem,terminal.cvcert,dv.cvcert,cvca.cvcert(andlink-*.cvcert),description.der,sector.pk,masterlist.der,defectlist.der,blocklist.der./run/kych-eid/api.sock,/run/kych-eid-public.sockThe management and the public interface (Debian package).
/usr/share/kych-eid/nginx/kych-eid.confAn example nginx site.
26.36.6. See Also#
kych-eid.conf(5), kych-eid-berca(1), kych-eid-dbinit(1), kych-eid-dbconfig(1), kych-eumw-bridge(1), kych.conf(5), kych-oauth2-gateway(1).
BSI TR-03110, TR-03112-7, TR-03124-1, TR-03127, TR-03129, TR-03130.
26.36.7. Bugs#
Report bugs by using https://bugs.taler.net/ or by sending electronic mail to <taler@gnu.org>.