Use audit log retention and scheduled deletion to meet data privacy and storage retention policies, and to control the size of the audit log in the database. The audit log retention and scheduled deletion service periodically deletes audit log entries that are older than a retention period you set.
Configuration
The archival mode and configuration fields determine whether audit log retention and scheduled deletion is enabled and when audit log entries are deleted.
To configure audit log retention and scheduled deletion in EJBCA, select Supervision Functions > Audit Log Archival. Then select an archival mode and set the fields for that mode. You can also export and import the configuration with the EJBCA ConfigDump Tool.
Only Super Administrators can configure audit log retention and scheduled deletion. Each deletion is recorded in the audit log.
Delete Only permanently removes audit log entries from the database. Before you enable it, confirm that the retention period meets the audit log retention requirements that apply to your organization.
Archival Mode
The archival mode determines what happens to audit log entries that are older than the retention period:
-
Disabled: Audit log retention and scheduled deletion is turned off. No entries are deleted.
-
Delete Only: Each time the service runs, it deletes audit log entries older than the retention period from the database.
Configuration Fields
Common Fields
|
Property |
Description |
Default value |
|---|---|---|
|
Retention Period (days) |
Number of days that audit log entries are kept in the database before the service deletes them, or exports and then deletes them. |
180 days |
|
Archival Service Period |
How often the service runs. |
1d (once a day) |
Export and Delete Fields
|
Property |
Description |
Default value |
|---|---|---|
|
Maximum archived Log Entries |
Maximum number of audit log entries that the service deletes in a single run. |
10000 |
|
Maximum archived File Size |
Maximum size of audit log data that the service processes in a single run. |
100 MB |
Performance Considerations
The audit log can contain several million entries, especially in high-volume environments. The first run on an established system can therefore take a long time and put load on the database. Make sure the following is in place before you enable the service.
Database Indexing
Before you enable the audit log retention and scheduled deletion service, create an index on the timeStamp column of the AuditRecordData table. For more information, see Create Database Indexes in Create the Database.
Do not add indexes beyond those listed in Create Database Indexes. Unneeded indexes can slow down the database.
Batch Execution
The service deletes entries in batches of up to 1,000. This minimizes database locking and the impact on other EJBCA operations.
Related Content
For more information about related topics, see the following pages:
-
Audit Log Overview: Learn what the EJBCA audit log records and how it is structured.
-
Create the Database: Create the database index required by the audit log retention and scheduled deletion service.