docs: current architecture, Trustgate integration and emCA integration plan #63

Merged
amiryahaya merged 5 commits from docs/architecture-and-emca-plan into main 2026-11-15 19:31:17 +01:00
Owner

Docs only, no code change.

  • docs/architecture-current.md: how the middleware works today and how it integrates with Trustgate, with 7 Mermaid diagrams. Key point: certificates are signed by a local Root/Sub CA; Trustgate is used for status checks and revocation only (NationalIDClient.enroll is not called by the app). CRL and OCSP are served by this service from local records.
  • docs/emca-integration-plan.md: plan to replace Trustgate with emCA (REST) and nothing else. Local signing, CRL, OCSP and every API contract stay. The seam is NationalIDClient: three operations, nine call sites, all consuming %ClcData{}. Plan: an EmCaClient returning the same struct behind a thin RemoteCa, batches E0–E4, open questions for eMudhra and for the product owner.

Biggest open points (plan section 7): emCA has no lookup by IC number, and it is unclear whether emCA holds the people Trustgate holds today.

Not verified: nothing was run against emCA; its facts come from the 5-page Swagger (request models only), and anything it does not show is listed as an assumption or open question.

Verification: coverage 83.86% on this branch (no code changed). All diagrams render with mmdc. Two-pass review applied to the first version of the docs; the narrowed plan (rewritten after the review, to the new scope) was not re-reviewed by a second pass, only checked: call-site line numbers re-verified with grep and the diagram re-rendered.

🤖 Generated with Claude Code

Docs only, no code change. - `docs/architecture-current.md`: how the middleware works today and how it integrates with Trustgate, with 7 Mermaid diagrams. Key point: certificates are signed by a local Root/Sub CA; Trustgate is used for status checks and revocation only (`NationalIDClient.enroll` is not called by the app). CRL and OCSP are served by this service from local records. - `docs/emca-integration-plan.md`: plan to replace Trustgate with emCA (REST) and nothing else. Local signing, CRL, OCSP and every API contract stay. The seam is `NationalIDClient`: three operations, nine call sites, all consuming `%ClcData{}`. Plan: an `EmCaClient` returning the same struct behind a thin `RemoteCa`, batches E0–E4, open questions for eMudhra and for the product owner. Biggest open points (plan section 7): emCA has no lookup by IC number, and it is unclear whether emCA holds the people Trustgate holds today. Not verified: nothing was run against emCA; its facts come from the 5-page Swagger (request models only), and anything it does not show is listed as an assumption or open question. Verification: coverage 83.86% on this branch (no code changed). All diagrams render with `mmdc`. Two-pass review applied to the first version of the docs; the narrowed plan (rewritten after the review, to the new scope) was not re-reviewed by a second pass, only checked: call-site line numbers re-verified with grep and the diagram re-rendered. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs: apply review — per-certificate routing, retire-mode details, validity gap, assumptions flagged
All checks were successful
Lint / lint (pull_request) Successful in 1m44s
Security / Dependency advisories (mix hex.audit) (pull_request) Successful in 30s
Security / Secret scan (gitleaks) (pull_request) Successful in 12s
Unit tests / test (pull_request) Successful in 2m35s
4403eb3008
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs: narrow the emCA plan to replacing Trustgate only
All checks were successful
Lint / lint (pull_request) Successful in 1m41s
Security / Dependency advisories (mix hex.audit) (pull_request) Successful in 26s
Security / Secret scan (gitleaks) (pull_request) Successful in 12s
Unit tests / test (pull_request) Successful in 2m28s
5b2a1ae257
Local signing, CRL, OCSP and every API contract stay as they are.
The plan now centres on a RemoteCa seam over the nine NationalIDClient call sites.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs: add audit carry-over checklist to the emCA plan, record the CA-team migration decision
All checks were successful
Lint / lint (pull_request) Successful in 1m38s
Security / Dependency advisories (mix hex.audit) (pull_request) Successful in 22s
Security / Secret scan (gitleaks) (pull_request) Successful in 10s
Unit tests / test (pull_request) Successful in 2m38s
b0132b0ba0
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.