[M-10] Renewal leaves the superseded local certificate good; revokes the remote cert before the replacement exists #22

Closed
opened 2026-11-14 18:28:50 +01:00 by amiryahaya · 1 comment
Owner

Finding

Renewal creates a new record but never revokes the prior local record (only remote ClcData is revoked) — old and new certs both answer OCSP good and the old serial is absent from the CRL. Worse, the still-valid remote cert is revoked before the new one is generated; a mid-flight failure leaves the subscriber with nothing.

Evidence

  • lib/mdid_ws/cert_management/renewal.ex:153-181 — new record, old untouched
  • renewal.ex:369, 384-415 — revoke-then-issue ordering

Impact

Two simultaneously-valid certs per identity (revocation semantics broken); availability hit for subscribers on failed renewals.

Fix

  • Revoke the old local record + republish CRL when the replacement is issued
  • Issue first, revoke after (or compensate with a documented rollback)

Line numbers refer to the initial import commit 282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).

## Finding Renewal creates a new record but never revokes the prior local record (only remote ClcData is revoked) — old and new certs both answer OCSP `good` and the old serial is absent from the CRL. Worse, the still-valid remote cert is revoked **before** the new one is generated; a mid-flight failure leaves the subscriber with nothing. ## Evidence - `lib/mdid_ws/cert_management/renewal.ex:153-181` — new record, old untouched - `renewal.ex:369, 384-415` — revoke-then-issue ordering ## Impact Two simultaneously-valid certs per identity (revocation semantics broken); availability hit for subscribers on failed renewals. ## Fix - [ ] Revoke the old local record + republish CRL when the replacement is issued - [ ] Issue first, revoke after (or compensate with a documented rollback) _Line numbers refer to the initial import commit `282cb11`. Source: comprehensive audit, 2026-11-12 (first review of this codebase)._
Author
Owner

Verified fixed on main (1b6216b): renewal issues the replacement first, then revokes the superseded local cert and republishes the CRL (A5).

Verified fixed on main (1b6216b): renewal issues the replacement first, then revokes the superseded local cert and republishes the CRL (A5).
Sign in to join this conversation.
No description provided.