Bug 1883477

Summary: [RFE] Automatic expired certificate purging
Product: Red Hat Enterprise Linux 9 Reporter: Arya Rajendran <arajendr>
Component: pki-coreAssignee: Endi Sukma Dewata <edewata>
Status: CLOSED ERRATA QA Contact: idm-cs-qe-bugs
Severity: unspecified Docs Contact: Jana Heves <jsvarova>
Priority: medium    
Version: 9.2CC: aakkiang, ckelley, edewata, fcami, jonmoore, jsvarova, mescanfe, mharmsen, msauton, pasik, pcech, prisingh, rcritten, skhandel, tscherf, vmishra
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pki-core-11.3.0-0.2.beta1.el9 Doc Type: Enhancement
Doc Text:
.Automatic purging of expired certificates This update adds an automatic mechanism to purge expired certificates and request records from the database. You can enable this feature based on certain policies, such as search size limit, search time limit, and retention time. To remove records safely, the CA needs to use the Random Certificate Serial Numbers v1 (RSNv3) to generate the certificate serial numbers and enrollment or renewal request IDs. The CA provides a pruning job that removes the following: * Certificates that have expired for some time. * Completed requests corresponding to the expired certificates. * Incomplete requests that have been idle for some time. You need to schedule this job to run regularly to remove a certain number of records each time it runs. The remaining records will be removed in the subsequent runs. For large deployments, you can distribute the job among the servers in the cluster.
Story Points: ---
Clone Of:
: 2184523 (view as bug list) Environment:
Last Closed: 2023-05-09 07:43:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2184523    

Description Arya Rajendran 2020-09-29 11:00:37 UTC
This bug is created as a clone of upstream ticket:

https://pagure.io/dogtagpki/issue/1750

Currently there is no automatic mechanism to purge expired certificates and the corresponding request objects from the database, so over time the database can grow very large.

There should be an automatic mechanism to purge expired certificates which can be optionally enabled based on certain policies, for example:

database size limit
number of expired certificates
time elapsed since expiration date

Comment 6 François Cami 2020-10-06 13:54:49 UTC
Upstream PKI issue is now: https://github.com/dogtagpki/pki/issues/2307

Comment 7 François Cami 2020-10-06 13:56:36 UTC
Moving to Dogtag. As noted in the IPA upstream ticket:

I do not think we should prune these directly from Dogtag's DB.
Dogtag should have an interface to let IPA do it (if necessary).
There could even be rules configured on Dogtag side that keep some certificates, for instance those that expired within the past year as asked by the reporter.

Comment 14 Endi Sukma Dewata 2022-11-15 18:46:20 UTC
Fedora COPR build: https://copr.fedorainfracloud.org/coprs/g/pki/master/builds/

Comment 28 errata-xmlrpc 2023-05-09 07:43:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: pki-core security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2293

Comment 30 Red Hat Bugzilla 2023-09-18 00:22:38 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days