nyilvantarto_scraper (Hungarian Government Registry)

Role

Interfaces with the Hungarian KKSZB (Kozponti Kormanyzati Szolgaltato Busz — Central Government Service Bus) to query official document registry data for identity verification. Active service (v2.0.4) with CI/CD.

PropertyValue
Version2.0.4
RuntimeNode.js >= 20.15.0
AuthorMihaly Pinter
CITravis CI
Queuekkszb-rpc (RabbitMQ RPC)

Architecture

graph LR
    vuer_oss[["[[vuer_oss]]"]] -->|RabbitMQ RPC<br/>kkszb-rpc| scraper[nyilvantarto_scraper]
    scraper -->|HTTPS<br/>Client Cert Auth| KKSZB[KKSZB<br/>Hungarian Gov API]
    scraper -->|OCSP| OCSP[Certificate<br/>Verification]

Supported Document Types

CodeDocument (Hungarian)English
szigSzemelyazonossagi igazolvanyPersonal ID card
rszigRegisztracios szemelyazonossagi igazolvanyRegistration ID card
utlUtlevelPassport
venVezetoi engedelyDriver’s license

For each document type, the service supports:

Query TypeMethod
By 4T data4 personal attributes: name, birth date, mother’s name, birth place
By document IDDirect document number lookup
Image retrievalFace photo and signature image

Key Files

FileRole
server.jsEntry point: connects to RabbitMQ nyilvantarto queue
server/service/KkszbService.jsMain service: creates API config, processes queries
server/kkszb/KkszbApi.jsHTTP/HTTPS client for KKSZB API calls
server/kkszb/*QueryProcessor.jsPer-document-type request processors (8 total)
server/kkszb/ImageJsonRequestProcessor.jsJSON-based image retrieval (szig, rszig)
server/kkszb/ImageSoapRequestProcessor.jsSOAP-based image retrieval (utl, ven)
server/kkszb/Context.jsEvidence collection context (zipped audit trail)
server/util/certificate.jsOCSP verification for KKSZB TLS certificates
server/util/request.jsHTTP/HTTPS request utilities
bin/kkszbqueryCLI tool for manual KKSZB queries
bin/qtspintegrityCLI tool for QTSP integrity checks

Query Processing

sequenceDiagram
    participant OSS as vuer_oss
    participant Scraper as nyilvantarto_scraper
    participant KKSZB as KKSZB (Gov API)

    OSS->>Scraper: RPC request (kkszb-rpc)
    Scraper->>Scraper: Select QueryProcessor by doc type
    Scraper->>Scraper: Create evidence Context
    Scraper->>KKSZB: HTTPS request (client cert auth)
    KKSZB-->>Scraper: Document data
    Scraper->>Scraper: OCSP verify server certificate
    Scraper->>Scraper: Log evidence (headers, payload, response)
    Scraper->>Scraper: Create evidence ZIP
    Scraper-->>OSS: Document data + images + evidence ZIP

Image Retrieval

Two different protocols depending on document type:

ProtocolDocument TypesProcessor
JSONszig, rszigImageJsonRequestProcessor
SOAPutl, venImageSoapRequestProcessor

Critical for Legal Compliance

Every query creates an evidence package (ZIP file) that is essential for legal compliance in government document verification.

Each evidence ZIP contains:

  • Request headers (with sensitive data removed)
  • Request payload
  • Response headers
  • Response data
  • OCSP verification response

Security Features

FeatureDetails
TLSCA certificate verification (configurable)
Client cert authCustom HTTPS agent with client certificates
OCSPCertificate verification for KKSZB server certs
Evidence sanitizationSensitive headers removed from evidence logs
Per-doc-type tokensSeparate API tokens per document type
Request tracingcrypto.randomUUID() for each request ID

Container

PropertyValue
Compose fileservices.yml
Base imageCustom with Node.js
NetworkHost mode
Registryharbor.techteamer.com