ECA-15056: REST API: DELETE /v1/certificate/{issuer_dn}/{certificate_serial_number}#1055
Open
John-D-B wants to merge 1 commit into
Open
ECA-15056: REST API: DELETE /v1/certificate/{issuer_dn}/{certificate_serial_number}#1055John-D-B wants to merge 1 commit into
John-D-B wants to merge 1 commit into
Conversation
Adds an on-demand REST endpoint to permanently delete the database row of a certificate already in REVOKED status — the targeted equivalent of the Database Maintenance Worker's bulk "Delete Revoked Certificates" sweep. Authorization requires CA access for the issuing CA; the CA-Id is derived via DnComponents.stringToBCDNString(issuerDN).hashCode() to match X509CAInfo. Returns 204 on success, 400 / 403 / 404 / 409 for bad serial / unauthorized / not found / not revoked. Ref: ECA-15056 (Keyfactor support #172467)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Fix 26: REST endpoint: DELETE revoked certificates
Target title:
ECA-15056: REST API:
DELETE /v1/certificate/{issuer_dn}/{certificate_serial_number}Author: JohnB, with AI pair-programming support by Anthropic Claude Code (Opus, 1M-context)
Target branch:
mainSource branch:
fix-26-rest-delete-certificateDepends on:
Fix 27 PR — #1054.
This branch carries only the REST-layer change; the EJB primitive it calls,
deleteRevokedCertificate(...), is added by Fix 27.Apply #1054 first — this endpoint will not compile against a tree without it.
Summary
Adds a new endpoint to the REST API:
DELETE /v1/certificate/{issuer_dn}/{certificate_serial_number}Permanently deletes the database row for a certificate that is already in REVOKED status.
The endpoint is the on-demand equivalent of the scheduled bulk-delete
provided by the Database Maintenance Worker's Delete Revoked Certificates option
(added in the companion Fix 27 PR).
It exists for operator-driven cleanup and customer-tooling integration,
for cases that the worker's schedule-based model doesn't cover.
This is part (b) of ticket #172467 / engineering reference ECA-15056
(Keyfactor engineering accepted 25 May 2026).
FYI: ELT status codes
External references
The "Fix-26" and "Fix-27" terms come from earlier work with JohnB's EJBCA Lifecycle Tool (ELT):
A user-visible demonstration of PKI workflow for this pull request is in JohnB's repository:
A PowerPoint overview is here: