International identity-document detection, parsing and validation
Evidence cut-off: 4 October 2026 (Australia/Sydney) Status: technology survey and integration recommendation only; no runtime change Scope: passports, ICAO 9303 machine-readable zones (MRZ), national identity cards, driving licences and related identity documents. Go-native options are considered first, followed by components that could run behind a subprocess or gRPC boundary, or compile to WebAssembly.
Executive conclusion
There is no single open-source library that safely provides international document detection, image capture, OCR, field parsing, physical authenticity, electronic-chip authentication and issuer-record verification. Those are separate claims and must remain separate Groundskeeper evidence states.
- Use a library; do not write another ICAO checksum parser. For text that is
already an MRZ, the best technical fit found is the Rust
mrzcrate behind WASM or a small memory-limited subprocess. It covers TD1, TD2, TD3, MRV-A and MRV-B, exposes per-field checks, documents checksum blind spots, has no default runtime dependencies or unsafe code, handles ICAO Latin and Cyrillic transliteration, and has unusually strong property and adversarial tests. It is, however, new, pre-1.0 and has effectively no external adoption; it needs an independent conformance review before production. The mature JavaScriptmrzpackage is the lower-risk adoption fallback for TD1/TD2/TD3, but it does not support visas. - Go-native MRZ parsing is not best in class yet.
okieraised/go-mrz-scanneris a small Apache-2.0 TD1/TD2/TD3 parser with check digits and tagged releases, but it has a very small test suite, no corpus or published benchmark, no explicit MRV API and no recent code activity after December 2024. Pilot only; do not make it the trust boundary without differential tests against ICAO specimens and another implementation. - Go is compelling for ePassport chips, not images.
gmrtdis an active MIT Go library for BAC/PACE, secure messaging, LDS data, passive authentication and chip authentication. Its MRZ package principally derives MRZi access keys from TD2/TD3 and deliberately validates only the document number, birth-date and expiry check digits. Use it only for a separately consented NFC/eMRTD capability with governed CSCA trust stores—not as the general text parser or OCR layer. - For North American driving licences, prefer the barcode over visual OCR.
Decode PDF417 locally with Apache-2.0
ZXing-C++(which has Go, Rust, Python and WASM bindings), then parse AAMVA versions 1–12 with the MIT TypeScriptaamva-parserin a sandbox. This covers standard US and Canadian barcode payloads, not every jurisdiction's visible layout and not DMV status. A barcode can be copied; parsing it is not authenticity or authoritative validation. - Buy, rather than build, broad image/template coverage. For local/VPC privacy, shortlist Regula Document Reader (broadest on-prem template, RFID and forensic-check story) and Microblink BlinkID (local SDK or self-hosted Docker extraction). Evaluate Anyline for offline mobile capture and Dynamsoft for a narrower local MRZ pipeline. These are integration options, not endorsements. Coverage, accuracy, telemetry, licence calls, retention, model/database update rights, export restrictions, audit rights and incident terms must be proved in a procurement bake-off.
- Do not call structural success “verified identity”. MRZ/AAMVA checks prove only syntax and checksum consistency. Document-template/security-feature checks estimate physical authenticity. NFC passive authentication proves signed chip data under the configured CSCA trust anchors; anti-cloning also requires active or chip authentication. Only an authorised issuer or government service can confirm issuance/current status. In Australia that means a separately authorised Document Verification Service integration, not a local validator.
What each validation level means
| Level | Evidence produced | What it does not prove | Groundskeeper treatment |
|---|---|---|---|
| Detection | Text/image resembles a passport, licence, ID or MRZ | Correct extraction, validity, authenticity, ownership | candidate; contextual/probabilistic |
| OCR/barcode extraction | Characters or encoded fields were read | Characters are correct; document is genuine | Preserve confidence and source; never silently repair without recording it |
| Structural parse | Layout, alphabet, field widths, dates/codes are plausible | Issuance, current status, authenticity | structural |
| Check-digit consistency | ICAO 7-3-1 digit(s) agree with covered fields | Uncovered names/fields, byte identity, expiry, physical/chip authenticity | validated_structured, explicitly local-only |
| Cross-source consistency | MRZ, visible zone, barcode and/or chip fields agree | All sources are independently genuine; copied barcode/chip data | Strong signal, not authoritative |
| Physical/template checks | Layout and optical/security features fit a reference template | Issuer status; perfect forgery resistance | Vendor result with version/template provenance |
| eMRTD passive authentication | EF.SOD signature and DG hashes chain to a configured CSCA | Live, uncloned chip unless AA/CA also succeeds; holder is presenter | Cryptographic evidence with trust-store version |
| AA/CA/PACE | Chip access and, for AA/CA, anti-cloning evidence | Issuer has not cancelled the document; holder match | Separate protocol outcomes, not one boolean |
| Authoritative lookup | Issuer/government service reports a record match/status | Presenter is the holder without a separate binding check | authoritative, access-controlled and deployment-specific |
ICAO itself distinguishes machine-readable travel documents from ordinary national IDs: a national ID is in Doc 9303 scope only when recognised as a travel document and designed to the applicable parts.1 TD2 is now legacy: ICAO says it will not maintain TD2 beyond Doc 9303's eighth edition.2
Go-native comparison
| Project | Input and coverage | Validation / Unicode | Maturity, tests and performance | Licence / security / verdict |
|---|---|---|---|---|
gmrtd/gmrtd | Go; NFC/eMRTD data. BAC, PACE-GM/CAM, secure messaging, LDS, passive and chip authentication; no OCR. Its MRZ utility accepts TD2/TD3-sized material to derive MRZi, not all five optical layouts. Repository documents successful reads across 19 country/document examples and bundled CSCA lists covering 121 countries. | Cryptographic protocol and chip-data checks. ConvertMrzToMrzi validates only document number, birth and expiry digits; composite and unrelated fields are ignored by design.3 MRZ is ASCII; visual-zone Unicode is outside this API. | v1.3.0 published 28 September 2026; active, 800+ commits, CI/coverage and extensive package tests. Performance depends on NFC transport and cryptography; no public cross-library benchmark. Requires Go 1.26+. | MIT. No project advisory was found, but this is security-critical parser/crypto code and its built-in trust anchors create an update obligation. Shortlist for a future, separate NFC verifier only. Keep trust stores replaceable and never emit the demo's PII-bearing HTML/APDU report in production. |
okieraised/go-mrz-scanner | Text only; TD1, TD2 and TD3. Tests include visa-shaped TD2/TD3 strings, but the public API does not model MRV-A/MRV-B separately. No image OCR, NFC, national visual-zone templates or driving-licence coverage. | Width/field parsing plus ICAO check digits. No documented transliteration; callers should supply strict MRZ alphabet text. | v0.6.0; last repository push 3 December 2024; 12 Go test functions observed, using a handful of specimens. Five stars, no dependants shown by pkg.go.dev, no corpus, fuzz/property suite or benchmark. Pure string work should be cheap, but there is no published number. | Apache-2.0. No advisory found; tiny maintainer/adoption base and under-tested malformed input are the larger risks. Pilot only, with process limits and an independent oracle. |
uchaloop/icao9303, ferhataltundal/goparser, leowilbur/go-mrz | Small/new Go parsers returned by the repository search. The first two appeared in 2026 with zero/one stars; the latter has no declared licence and no activity since 2021. | Claims vary and were not backed by mature release/test evidence. | Insufficient adoption and operating history for a sensitive-data boundary. | Reject for now. No-licence code cannot be redistributed; freshness alone is not maturity. Revisit only after releases, corpus-backed tests and independent use appear. |
There is therefore no Go-native package that simultaneously clears coverage, maintenance, conformance-test and adoption gates for general MRZ parsing. This is a reason to wrap a mature implementation, not a reason to implement new validators.
Wrappable open-source parsers and chip libraries
| Project | Format / document coverage | Checks, OCR and Unicode | Maintenance, evidence and performance | Licence and recommendation |
|---|---|---|---|---|
Rust mrz crate | TD1, TD2, TD3, MRV-A, MRV-B; text/free-form OCR text in, parsed fields out; parser and emitter. | Per-field and composite 7-3-1 checks; date plausibility kept separate; bounded OCR-confusion repair only under check-digit agreement; exact checksum blind-spot API. ICAO Part 3 Latin and language-specific Cyrillic transliteration; strict 37-character MRZ alphabet for parsing. No image OCR/NFC. | v0.9.1, created July 2026, pre-1.0 and effectively no independent adoption. Counterweight: zero dependencies by default, no unsafe, no clock/network, native + wasm32; 40+ focused integration/property/adversarial test files, ICAO vectors and panic properties. No standard throughput benchmark; fixed-width, allocation-light parsing should be measured in Groundskeeper's harness. | MIT. Primary structural-parser pilot via WASM/subprocess, contingent on independent source/conformance review and exact version pinning. Newness is the principal risk. Optional zeroize is best-effort, not a memory-erasure guarantee. |
JavaScript/TypeScript cheminfo/mrz | TD1/TD2/TD3, legacy French national ID and French/Swiss driving-licence layouts. No MRV-A/MRV-B. Text only. | Field/check-digit validation with optional, reported O/0-style autocorrection. Maintains an ICAO/ISO state-code table. MRZ parsing is ASCII; no general visible-zone Unicode/transliteration API. | v5.0.2 (11 March 2026), active since 2016, 30 releases, about 35k weekly npm downloads at review, zero runtime dependencies, CI and 40 observed test cases. No public parser benchmark or broad real corpus. | MIT. Mature fallback if Node subprocess operational cost is acceptable and visas are out of scope; also useful as an independent differential oracle. French-ID source includes Wikipedia, so revalidate that special format against a primary source before relying on it. |
Python Arg0s1080/mrz | Generates and checks TD1/TD2/TD3/MRV-A/MRV-B; text only. | ICAO checks, country codes, expiry warnings and broad Latin/Arabic/Cyrillic plus experimental Greek/Hebrew transliteration. Generation's force option can bypass code/type checks. | v0.6.2 dates from 2020; repository last pushed April 2024; one maintainer explicitly reports little free time. Good format breadth and tests/examples, but no published benchmark/corpus. | GPL-3.0 is a distribution/commercial-integration risk. Hold, unless legal approves process isolation and the resulting distribution model. Never expose generator APIs in the detection service. |
Python PassportEye | Images/PDF first image → ROI detection, Tesseract OCR, then TD1/TD2/TD3/MRV-A/MRV-B parser. | Check digits, line lengths and miscellaneous checks; heuristic OCR cleanup and valid_score. ASCII MRZ output. It reports roughly 80% recognition on the developer's available clear-MRZ samples and 10+ seconds on some documents—not an enterprise accuracy claim.4 | MIT, beta, active compatibility fix in July 2026 but no tagged GitHub release. Only seven observed test functions and six small image fixtures (TD2/TD3 plus OCR/PDF utilities); broad unpinned scientific dependency tree and external Tesseract binary. | Evaluation baseline only, not the production trust boundary. Useful in an isolated Python worker to establish a floor. Do not treat heuristic repair or valid_score as validation. |
Rust asmarques/mrtd | Text parser for passports and ID cards (examples show TD3 and TD1); no stated visas, OCR or NFC. | MRZ parse/checks; limited documented Unicode behavior. | Active push August 2026, but only 18 stars and a much narrower contract than mrz. | MIT/Apache-2.0 source files although GitHub reports Apache. Secondary oracle, not first choice. |
Java JMRTD | eMRTD/ePassport host API and Java Card applet; BAC/PACE/EAC, LDS 1.7 and biometric data groups. No image OCR. | Chip protocols and low-level decoding. The project says higher-level trust management and offline passive-authentication result verification are deprecated, so integrators must supply those pieces correctly.5 | Began in 2006; Maven 0.8.9 published 3 October 2026. Long operating history, Android/Java support and conformance/security origins. JVM/subprocess and cryptographic integration are heavier than Go gmrtd. | LGPL. Mature NFC reference/fallback, subject to LGPL packaging review. Prefer gmrtd for a Go deployment only after comparative protocol/conformance testing. |
Rust worldfnd/icao-9303 | Work-in-progress eMRTD APDU/ASN.1/crypto library. | Explicitly lacks MRZ parsing, PACE, document-signature verification and certificate-chain validation. | Last push February 2025; README calls it work in progress. | MIT. Unsafe for verification; reject. Its missing signature/chain checks are exactly the authoritative cryptographic boundary. |
alsenet-labs/mrz-scanner | Browser/Node image detection, OCR and MRZ parse; entirely local. | OCR plus structural parse; inspect exact v2 model provenance and quality in a bake-off. | Active 2026 update, but modest adoption and no independent production benchmark found. | AGPL-3.0 network copyleft is a product-distribution risk. Hold unless legal explicitly approves. |
simochee/passport-mrz | TD3 builder and OCR-B renderer, not a parser or validator. | Generates synthetic MRZ strings/images. | New, three stars, very low package use. | MIT, but not a runtime candidate. Potential fixture generator only after independently checking generated expectations; never use a generator as the oracle for its own tests. |
Parser security notes
No project-specific published CVE was found for the shortlisted small parsers in the sources reviewed. That is weak evidence: most have no dedicated security policy, small user bases and little fuzzing. Treat malformed OCR and images as hostile, cap input bytes/lines/time/memory, disable network and filesystem access, avoid shell interpolation, return bounded error detail, pin artefact digests and scan the complete transitive dependency graph on every update.
Parser generators and repair modes deserve extra controls. A successful check
digit is not cryptographic: substitutions with the same residue modulo 10 and
multi-character cancellation can pass. Names and some fields are not covered in
some formats. Preserve raw spans, corrected spans, each check result and the
library/version; never collapse them to valid: true.
OCR, barcode and text-detection ecosystem
| Component | Appropriate role | Coverage, provenance and Unicode | Operations / licence | Decision |
|---|---|---|---|---|
Tesseract + OpenCV/Leptonica | Local OCR after document/MRZ localisation; PassportEye's recogniser. | 100+ language/script models; OCR-B/MRZ quality depends on model, crop, glare, skew and capture. It emits text/confidence, not identity-document semantics or authenticity. Trained-data licences and provenance must be checked separately from engine code. | Mature C++ engine, CLI/C API, active, CodeQL/Coverity/OSS-Fuzz. Apache-2.0 engine; Leptonica BSD-2-Clause. CPU-heavy relative to parsing. | Accept as a replaceable baseline OCR worker, not a validator. Benchmark against actual consented capture conditions. |
PaddleOCR / docTR | Modern local OCR/layout alternatives; Python service or exported ONNX where supported. | Both are broad document OCR, not ID parsers. PaddleOCR claims 100+ languages and local deployment; docTR supports detection/recognition architectures. Model-card licences, training provenance and per-model script support matter more than repository licence alone. | Active, large communities; Apache-2.0 code. Larger ML supply chain, RAM/startup/GPU requirements; pin models separately. | Bake-off candidates if image input becomes product scope. Do not import a general VLM merely to parse fixed MRZ text. |
ZXing-C++ | Decode PDF417 on AAMVA DL/ID cards and other barcodes before semantic parsing. | Reads PDF417/Compact/MicroPDF417 and many other formats; bytes/text out only. Barcode encoding is local and language-agnostic at this layer. | Mature, actively maintained C++20 core; no core third-party dependencies; fuzz/test assets and Go/Rust/Python/WASM wrappers. Apache-2.0. | Shortlist. Prefer WASM/subprocess or maintained binding over bespoke image/barcode code. Barcode content is attacker-controlled. |
joptimus/aamva-parser | Parse already-decoded US/Canadian AAMVA PDF417 payloads. | Claims AAMVA CDS versions 1–12 (2000–2025), 30+ fields, age/expiry helpers; this is version coverage, not proof that every state/province layout or extension is covered. Text is predominantly the AAMVA repertoire; names/addresses must remain lossless strings. | MIT, zero dependencies, TypeScript, 56 commits, active September 2026, 18 stars and tests; still a small project. | Pilot behind Node/WASM-compatible boundary, differential-test all supported versions and jurisdiction extensions. Never use isAcceptable as an authenticity/status decision. |
benhovinga/aamva_barcode_library | Python parser for a decoded North American PDF417 payload. | Based on AAMVA 2020 Annex D; optional compact encoding is explicitly unimplemented. | MIT, beta, tests; last push May 2025, 18 stars. | Useful independent test oracle, not primary runtime. |
| Microsoft Presidio | Find bare passport/licence/ID numbers in ordinary text and redact them. | Country recognizers include US/UK/India/Spain/Italy/Korea and others; most passport/licence recognizers are regex + context, while selected national IDs use checksums/custom logic. It neither recognises document images nor parses a full MRZ. NER language/model coverage varies. | Mature MIT Python service, active, large community. Changelog shows past recognizer correctness fixes and dependency security upgrades—evidence that rules require continuous regression review.6 | Integrate for contextual text detection only. Keep entity-specific evidence/score; never upgrade a regex hit to document validation. |
libpostal | Parse/normalise an address already extracted from the visual zone. | Not an identity-document or MRZ library. Models are trained from >1B synthetic/derived addresses using OSM (ODbL), OpenAddresses (source-specific licences) and OpenCage templates; supports 50+ languages and Unicode addresses.7 | Mature local C library, MIT code; models are roughly 1.8–2.2 GB and have separate data obligations. | Optional downstream enrichment only. Do not use an address parse as identity or document validation; record model/data version and ODbL implications. |
Public datasets and test evidence
Identity-document corpora are unusually constrained because real documents contain high-risk PII and security features. Public sets are useful for detection/OCR regression but are not representative evidence of fraud/authenticity performance.
| Dataset / evidence | Contents and provenance | Licence / limitation | Appropriate use |
|---|---|---|---|
| ICAO Doc 9303 specimens | Normative fixed-layout examples for TD1/TD2/TD3 and visas in the applicable Parts 3–7. | ICAO publication copyright; cite facts and use the published specimens conservatively rather than copying the standard wholesale. | Independent conformance vectors for widths, fields and check digits. |
| MIDV-500 | 500 videos, 50 document types: 17 IDs, 14 passports, 13 driving licences and six other documents. Source images were public-domain or publicly licensed; video adds glare, blur, occlusion and perspective. | Attribution/source licences must be traced per document; old FTP hosting and public-template realism need review. The documents are not live issuer records and do not prove authenticity detection. | Document localisation, capture quality, OCR and field extraction regression. |
| MIDV-2020 | 1,000 videos, 1,000 scans and 1,000 photos of unique mock IDs across 10 document types, with artificial faces/text and rich annotation. | Confirm distribution terms at download; synthetic/mock domain shift is material. | Reproducible detection/OCR benchmark and privacy-safe engineering tests. |
| DLC-2021 | 1,424 video clips of synthetic IDs with generated portraits/data and print/screen presentation attacks. | Research corpus terms must be reviewed; synthetic “real” side is not genuine issuer stock/security features. | Capture/liveness research only, never a production fraud-acceptance claim. |
| Library fixtures | Most parser repositories rely on ICAO UTO examples and a few hand-written variants. PassportEye has only six small image fixtures; the Go parser has about a dozen tests. | Often no per-fixture provenance statement. Fixtures may be accidentally real if copied from the web. | Unit regression after provenance review; not a coverage corpus. |
| Commercial vendor template/model databases | Proprietary document references gathered by vendors; Regula advertises 16,500+ templates/254 countries and Microblink 2,500+ documents/140+ countries.89 | Opaque provenance, licence-limited redistribution, updates and benchmarking. Require contractual provenance, lawful sourcing, bias/coverage and deletion answers. | Procurement bake-off using customer-controlled, consented test sets and exact document editions. |
Do not pull random scans from search engines, GitHub, Kaggle or leaked “KYC” collections. A repository containing licence images without a clear dataset licence, subject consent and source chain is unsafe, even if the code around it is open source. Do not put real or plausibly issued document numbers in repository fixtures.
Commercial integration options (not endorsements)
Vendor claims below are self-reported and must be tested. “Offline” can still include licence activation, telemetry or update traffic; “on-prem” can still include support bundles and vendor-access paths.
| Option | Coverage and validation | Privacy/deployment fit | Commercial restrictions / verdict |
|---|---|---|---|
| Regula Document Reader SDK | Advertises 16,500+ templates across 254 countries/territories, 138+ languages/scripts, MRZ/OCR/barcode/RFID and optional visible/IR/UV/security-feature and face checks. Document database is versioned; release 9.2 reported 16,237 documents and PKD master-list 337.10 | Web Service API supports local on-prem installation; offline software licensing is Windows-only in the published licence matrix, while hardware/mobile modes differ. Linux packages are advertised for hardware-reader deployments. Clarify the exact server SKU/platform and all update paths. | Proprietary modular/subscription licence, country/scenario filters and template/PKD updates. First procurement shortlist for VPC/on-prem breadth and chip/forensic features. Demand Linux/container architecture, no-egress proof, data deletion, SBOM, CVE process, trust-anchor governance and benchmark rights. |
| Microblink BlinkID | Structured extraction from 2,500+ identity documents in 140+ countries; front/back comparison, MRZ and ID barcodes depending on product. Extraction is not equivalent to issuer verification or forensic authenticity. | SDK extraction runs locally; current docs say the API is a self-hosted Docker image. Older C SDK docs say trial/licence-management can require public network access and production can disable it—confirm current contract and fail-closed behaviour.11 | Proprietary key, platform/document entitlements and model updates. First procurement shortlist for local/VPC extraction and simpler integration; separately assess Verify cloud features because capture SDK and remote verification have different privacy boundaries. |
| Anyline ID/MRZ | TD1/TD2/TD3/MRV-A/MRV-B, all MRZ documents, PDF417, and selected European/US/Australian visual licence/ID layouts. Mobile supports Latin/Cyrillic/Arabic; current Web SDK says Latin only and a narrower set of European licences/IDs.12 | Vendor says mobile scanning is fully offline and does not store data on its servers. Web/mobile capabilities differ; verify licence activation and diagnostics. | Annual proprietary quote and layout entitlements. Shortlist for offline mobile capture, not the general server/VPC default and not authoritative validation. |
| Dynamsoft MRZ Scanner | Local image preprocessing/OCR/parser for ICAO passports, machine-readable IDs and visas (vendor notes visa availability varies by platform). No broad visual ID-template or issuer service comparable to Regula. | Advertises offline/on-device/on-prem processing across web/mobile and C++/Python/.NET server APIs. | Proprietary SDK/usage licence. Shortlist only for the narrower MRZ-image problem where predictable local deployment matters more than world-wide visual-zone templates. Validate its “near 100%” marketing claim independently. |
| IDScan.net parsing SDK | Local MRZ plus PDF417/magnetic-stripe parsing for global passports, US/Canadian licences/IDs, CAC and some health cards. Separate cloud DIVE compares OCR/front/barcode and offers third-party checks. | Parsing SDK explicitly works locally without Internet on Windows/iOS/Android/Linux; DIVE/database screening changes the processing boundary. | Proprietary trial/master licence. Possible North-American specialist, behind Regula/Microblink for global visual coverage. Keep local parsing and remote authoritative checks as separate connectors/consents. |
| Entrust Identity Verification (formerly Onfido), Veriff, Jumio, Persona and peers | Managed capture, OCR, document/fraud signals, face/liveness and, in selected jurisdictions/products, third-party or government database checks. Entrust advertises 2,500+ document/passport types across 195 countries and documents upload/applicant APIs and optional expert review.13 | Primarily hosted verification workflows: raw images/video, metadata and biometrics leave the customer's VPC. Regional endpoints are not the same as local execution. | Per-check/volume contract, retention/subprocessor/biometric terms, sanctions and service availability. Integration option only when the customer explicitly chooses hosted KYC and legal/privacy review approves it. Not on the default Groundskeeper local/VPC shortlist. Return vendor evidence, not a Groundskeeper “truth” boolean. |
Commercial evaluation must distinguish: capture SDK, OCR/extraction SDK, document authenticity service, biometric holder binding, watchlist/KYC checks and government/issuer lookup. Buying one does not buy all six.
Abandoned, unsafe or misleading options
| Option/pattern | Decision | Reason |
|---|---|---|
newtondev-mrz-parser, old mrz-parser npm packages and one-commit passport OCR wrappers | Reject | Years-old or 0.0.1 packages, no dependants, tiny/no tests and unclear maintenance. Package name similarity is not provenance. |
passport-mrz-extractor and similar thin Tesseract + GPL mrz wrappers | Reject for production | Single-maintainer beta, little evidence, inherits deep OCR dependencies and often obscures the GPL parser obligation. Use the underlying reviewed components explicitly if evaluating. |
worldfnd/icao-9303 for chip verification | Reject | Its own README says signature and certificate-chain verification are missing. |
Arg0s1080/mrz or alsenet-labs/mrz-scanner embedded without legal review | Hold | GPL-3.0/AGPL-3.0 obligations may conflict with distributed/proprietary or network-service delivery. A subprocess is not an automatic cure; obtain counsel. |
| No-licence GitHub format lists / state regex gists | Reject | Copyright permission and provenance are absent; rules become stale and often cite secondary commercial sites. They create false confidence about state coverage. |
| General OCR/VLM result labelled “valid passport/licence” | Reject | OCR is extraction. A generative model can normalise or invent plausible fields and hides character-level evidence. |
| Public cloud demo endpoints with real documents | Prohibit | Vendor demos and sandboxes are not approved production processors; Entrust explicitly says never upload confidential/personal data to its sandbox.14 |
| MRZ/PDF417 generator as validator oracle | Reject | Shared implementation errors make tests circular; generators can also facilitate realistic fake artefacts. Use normative independent vectors. |
| Scraped real-ID image datasets | Prohibit | Unclear consent/licence, identity-theft risk, biometric/sensitive data, and likely contractual/legal violations. |
Build vs wrap vs buy
| Capability | Recommendation | Why |
|---|---|---|
| Detect an MRZ in already supplied text | Wrap Rust mrz (pilot) or JS mrz fallback | Fixed standard, existing tested parsers; no value in new validator code |
| Parse/check TD1/TD2/TD3/MRVA/MRVB | Wrap Rust mrz; differential oracle from Python mrz in CI only | Best complete permissive interface found; GPL oracle does not ship |
| MRZ from image | Buy if production scope/accuracy matters; otherwise wrap Tesseract/PaddleOCR baseline in a sandbox | Capture/OCR robustness and corpus maintenance dominate parser work |
| North-American DL/ID barcode | Wrap ZXing-C++ + AAMVA parser | Standardised local path; still structural/copyable data |
| International visible-zone ID/DL fields | Buy Regula/Microblink; Anyline for mobile | Thousands of changing templates and scripts are a data-maintenance business |
| Free-text passport/licence-number PII | Wrap Presidio recognizers or equivalent plugin | Contextual detection only; keep separate from document parsing |
| Address on a document | Wrap optionally libpostal after OCR | International address normalisation is separate from identity evidence |
| ePassport/eID chip | Wrap gmrtd; keep JMRTD as reference/fallback | Security protocols and PKI already exist; requires specialist review/trust-store operations |
| Document physical authenticity / fraud | Buy and benchmark | Public data cannot reproduce current security templates and attack corpus |
| Issuance/current status | Integrate authorised issuer service | Only authoritative source can make this claim; never infer it from structure |
| Holder-to-document binding | Buy/integrate separately, with biometric governance | Face/liveness is a distinct high-risk biometric capability, not MRZ validation |
Groundskeeper shortlist and integration shape
Shortlist
- Rust
mrz0.9.x, pinned, WASM or subprocess — best five-format structural parser, after independent review. Disable emit APIs in the wrapper; expose parse/check evidence only. cheminfo/mrz5.x, pinned Node subprocess — mature fallback and differential oracle for TD1/TD2/TD3; not visas.gmrtd1.x — future optional Go-native eMRTD/NFC verifier, deployed as a separate sensitive capability with explicit consent and trust-store lifecycle.- ZXing-C++ +
aamva-parser— optional local North-American DL/ID barcode plugin, both isolated from the core service. - Tesseract or PaddleOCR worker — evaluation-only local OCR baseline if Groundskeeper accepts images. OCR output must feed the same independent parser.
- Regula and Microblink procurement bake-off — preferred commercial candidates for customer-controlled VPC/on-prem visual document processing; Anyline for mobile and Dynamsoft for MRZ-only are narrower alternates.
- Presidio — contextual bare-number detection only, not document validation.
Privacy-preserving boundary
┌──────────────────────┐ text MRZ ┌─────────────────────┐
│ Groundskeeper core │──────────────────▶│ sandboxed MRZ parser│
│ no raw persistence │◀──────────────────│ no network/fs/clock │
└──────────┬───────────┘ bounded evidence └─────────────────────┘
│
│ image/barcode/chip only when enabled and consented
▼
┌────────────────────────────────────────────────────────────────┐
│ Separate local/VPC workers │
│ OCR ─▶ MRZ parser │ PDF417 ─▶ AAMVA │ NFC ─▶ PKI │ vendor SDK │
└────────────────────────────────────────────────────────────────┘
│
│ opaque, typed evidence; raw media deleted by policy
▼
┌──────────────────────┐ only authorised deployments
│ Groundskeeper policy │──────▶ issuer/government verification
└──────────────────────┘ (separate connector + consent)Every plugin response should include the capability (ocr, structural,
checksum, template, chip_passive_auth, chip_anti_clone, authoritative),
document/format guess, raw-versus-corrected character spans, individual check
results, library/model/template/trust-store versions, country/jurisdiction
coverage assertion, timing, warnings and provenance. It should not include a
generic verified: true.
Operational defaults:
- local/VPC only; deny egress, filesystem writes and child process creation;
- strict byte/pixel/page/time/RAM/CPU limits and decompression-bomb protection;
- do not log document images, MRZ text, barcodes, chip data or face crops;
- zero temporary files where practicable; acknowledge that managed-language and OCR buffers cannot be reliably wiped;
- signed, digest-pinned parser/model/template/trust-store artefacts;
- synthetic/provenanced fixtures only in source; customer real-document test sets stay in their controlled evaluation environment;
- country/document edition allowlists and explicit
unsupported, never a best-effort parse reported as success; - shadow/observe first, with false-positive/false-negative slices by format, issuing country, document edition, capture device, script, damage and attack;
- no automatic repair that discards original OCR evidence; and
- independent legal review for GPL/AGPL/LGPL, proprietary SDK terms, model/data licences, biometrics, DVS access and cross-border processing.
Next actions
- Build a non-production bake-off harness, not a validator: invoke pinned
mrzWASM/subprocess,cheminfo/mrzand the existing chosen oracle over ICAO specimens plus independently generated malformed/asymmetric cases; compare per-field evidence, invalid Unicode, long numbers, dates, OCR confusions and all five layouts. - Commission a focused security/conformance review of Rust
mrzand Gogmrtd, including checksum blind spots, parser resource bounds, PACE/BAC/PA/ AA/CA protocol handling and trust-anchor updates. - If image input is approved, benchmark Tesseract, PaddleOCR and two vendors on MIDV-2020 plus a customer-controlled, consented corpus. Measure character and field accuracy, false acceptance, abstention, p50/p95 latency, memory and performance by document edition/script/capture condition—not vendor aggregate accuracy.
- Run a Regula/Microblink RFP with no-egress evidence, Linux/VPC deployment, SBOM/CVE SLA, licence-server failure mode, telemetry, support-bundle content, template/model provenance and update/rollback, deletion, audit, benchmark and exit rights. Include Anyline/Dynamsoft only where their narrower placement fits.
- Treat AAMVA, Australian state licence formats and every other national visual format as governed versioned data. Do not import community regex lists as an authoritative catalogue.
- Define evidence-state mappings before any integration and prohibit
structural/checksum/vendor-template results from satisfying anauthoritativepolicy requirement.
Sources
Primary specifications and project/vendor documentation were preferred. Repository activity/star/download figures are volatile observations at the evidence cut-off, not quality scores.
Footnotes
-
ICAO, Doc 9303 Part 1 — Introduction, definition and scope of MRTDs/eMRTDs and national IDs. ↩
-
ICAO, Doc 9303 Part 6 — TD2, eighth edition and maintenance note. ↩
-
gmrtd,mrzpackage documentation,ConvertMrzToMrzivalidation boundary. ↩ -
PassportEye, README accuracy, latency and failure caveats. ↩
-
JMRTD, project scope and deprecated higher-level functions and LGPL licence. ↩
-
Presidio, changelog, including recognizer correctness and dependency security fixes. ↩
-
libpostal, README and training-data provenance. ↩
-
Regula, Document Reader SDK for hardware and document coverage. ↩
-
Microblink, BlinkID introduction and deployment. ↩
-
Regula, Document Reader SDK 9.2 release notes. ↩
-
Microblink, BlinkID C SDK offline processing and licence management. ↩
-
Anyline, Web SDK identity-document coverage. ↩
-
Entrust, supported documents, API and product privacy notice. ↩
-
Entrust, API v3.1 sandbox warning. ↩