No reviewers
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!49
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/a2-credentials-and-subjects"
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?
Two authentication/issuance hardening fixes.
196 tests green locally (11 new).
Fixes #13
Fixes #19
Review findings (two-axis + ponytail), fixed: - BMPString/UniversalString values previously skipped ALL validation (empirically reproducible bypass) — now converted and validated; unknown ASN.1 string types and unrecognized subject shapes fail closed instead of passing silently - invalid UTF-8 / T.61 teletexString bytes crashed to 500 — now rejected as {:invalid_subject_encoding, _} 400s - token.ex still wrote unsalted SHA-256 via its duplicated hash_secret (auto-created clients) — removed, now delegates to ClientCredentials.hash_secret/1 - stored iteration counts honored without an upper bound — capped at 1M (crafted stored hash = CPU hang per auth attempt) - omitting serialNumber bypassed the MyKad rule entirely — the attribute is now REQUIRED - legacy-format clients never upgraded — successful verification of a legacy hash now re-saves with salted pbkdf2 (measured +7ms only) - dashed MyKad form (README-documented) now normalized and accepted; README error strings aligned - six copy-pasted controller clauses collapsed into one shared render_subject_validation_error/2; empty commonName rejected; byte/character message mismatch fixed - new failing-when-broken tests: encoding bypass, invalid UTF-8, iteration cap, hash upgrade, missing serial, dashed form, empty CN MyKad checksum from the issue text: documented deviation — the format has no checksum digit (trailing digits encode gender/place-of-birth). Fixes #13, Fixes #19