[H-3] Unbounded client-controlled certificate validity in :preview; :released ignores config and defaults enrollment to 2 days #7
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#7
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
In
:previewlicense mode a caller-suppliedcert_validity(e.g.[100, "year"]) is honored with no upper bound.runtime.exsdefaultsMDID_LICENSEto preview for bare release starts (compose saves itself withreleased). In:releasedmode the:cert_validityconfig is ignored entirely and enrollment defaults to{2, :day}while renewal defaults to{1, :year}— contradicting the documented 1-year leaf policy.Evidence
lib/mdid_ws/cert_management/certificate_validity.ex:20-34, 79-99config/runtime.exs:13-25— default:previewlib/mdid_ws/cert_management/enrollment.ex:224—{2, :day}defaultImpact
Policy bypass (certs that outlive the 25-year Root) or, in released mode, mass 2-day credential expiry + inconsistent enroll-vs-renew lifetimes.
Fix
:cert_validityeffective in :released mode with a bounded overrideLine numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).