[M-15] cert_management_controller.ex is a 711-line god module — revocation/status business logic lives in the web layer #27
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#27
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
The controller contains the revocation state machine, direct persistence (
StrapDataStore.save), CRL publication orchestration, SOAP orchestration, response shaping, URL building and date formatting. Enrollment and renewal were extracted into contexts; revocation and status were not.Evidence
lib/mdid_ws_web/controllers/cert_management_controller.ex(711 lines) — e.g.process_revocation/1at :391-436, direct store calls at :220, :352, :596Impact
Business rules untestable without the web layer, duplicated patterns, and CA logic mixed with HTTP concerns.
Fix
MdidWs.CertManagement.RevocationandStatuscontextsLine numbers refer to the initial import commit
282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).Verified fixed on main (
1b6216b): revocation and status logic moved to Revocation/Status modules; controller is 319 lines (B4).