[CRIT-4] Silent CA regeneration on empty/partial Mnesia volume orphans every previously issued certificate #4
Labels
No labels
architecture
code-quality
correctness
critical
docs
high
low
medium
ops
performance
privacy
security
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
antrapol/CA-MDID-eMudhra#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
ensure_issuers/0regenerates a brand-new Root→Sub→OCSP hierarchy whenever the issuer table is missing — lost volume, partial restore, or corruption all trigger it, and the service silently continues issuing under the new CA. Related: DNSCluster is wired for prod while Mnesia is single-nodedisc_copies— a second node would bootstrap its own Root (split-brain CAs).Evidence
lib/mdid_ws/application.ex:107-139—ensure_issuers/0regenerate-if-missinglib/mdid_ws/application.ex:18+config/runtime.exs:63— DNSCluster vs single-node MnesiaImpact
All existing leaf certs stop chaining; OCSP/CRL/AIA URLs dangle; no alarm. Worst integrity failure mode available to a CA.
Fix
certificate_requestis non-empty (log at :error and halt)MDID_BOOTSTRAP_CA=true) for fresh CA generationLine numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).