Rule ID
SV-289329r1319252_rule
Version
V1R1
CCIs
To ensure sufficient storage capacity for the audit logs, the database management system (DBMS) must be able to allocate audit record storage capacity. Although another requirement (SRG-APP-000515-DB-000318) mandates that audit data be off-loaded to a centralized log management system, it remains necessary to provide space on the database server to serve as a buffer against outages and capacity limits of the off-loading mechanism. The task of allocating audit record storage capacity is usually performed during initial installation of the DBMS and is closely associated with the database administrator (DBA) and system administrator roles. The DBA or system administrator will usually coordinate the allocation of physical drive space with the application owner/installer and the application will prompt the installer to provide the capacity information, the physical location of the disk, or both. In determining the capacity requirements, consider such factors as: total number of users; expected number of concurrent users during busy periods; number and type of events being monitored; types and amounts of data being captured; the frequency/speed with which audit records are off-loaded to the central log management system; and any limitations that exist on the DBMS's ability to reuse the space formerly occupied by off-loaded records.
Check the system documentation for the organization-defined audit record storage requirements.
Verify that the MySQL Enterprise Audit component is installed:
SELECT *
FROM mysql.component
WHERE component_urn = 'file://component_audit_log';
If no row is returned, this is a finding.
Review the Audit Log component file location, rotation, and pruning settings:
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM performance_schema.global_variables
WHERE VARIABLE_NAME IN (
'audit_log.file',
'audit_log.rotate_on_size',
'audit_log.max_size',
'audit_log.prune_seconds',
'datadir'
);
If "audit_log.file" contains an absolute path, use that file system location when assessing storage capacity. If "audit_log.file" contains only a file name, the audit log is located under "datadir".
Determine whether the configured filesystem has sufficient capacity for the organization-defined audit retention and off-loading requirements.
If size-based pruning is used, review "audit_log.rotate_on_size" and "audit_log.max_size". If age-based pruning is used, review "audit_log.prune_seconds" together with the rotation configuration.
If the configured storage capacity and Audit Log component rotation/pruning settings cannot support the organization-defined retention and off-loading requirements, this is a finding.
Refer to https://dev.mysql.com/doc/refman/9.7/en/audit-log-component-logging-configuration.html.Allocate sufficient storage for MySQL Enterprise Audit component log files in accordance with organization-defined audit record storage requirements. Configure the Audit Log component file location at server startup as appropriate. For example: [mysqld] audit-log.file=/var/log/mysql/audit.log audit-log.compression=GZIP The Audit Log component writes audit files in JSON format. Configure automatic rotation and pruning when required. For example, set organization-approved values for: - audit_log.rotate_on_size - audit_log.max_size - audit_log.prune_seconds Ensure the selected filesystem has sufficient capacity to buffer audit records during centralized logging outages and to satisfy the required local retention period. Refer to https://dev.mysql.com/doc/refman/9.7/en/audit-log-component-logging-configuration.html.