STIGhubSTIGhub
STIGhub— A free STIG search and compliance tool·STIGs updated 1 hour ago
Powered by Pylon·Privacy·Terms·Feedback·© 2026 Beacon Cloud Solutions, Inc.
← Back to Oracle MySQL 9.x Security Technical Implementation Guide

V-289317

CAT II (Medium)

The MySQL Database Server 9.x must protect its audit configuration from unauthorized modification.

Rule ID

SV-289317r1319230_rule

STIG

Oracle MySQL 9.x Security Technical Implementation Guide

Version

V1R1

CCIs

CCI-001494

Discussion

Protecting audit data also includes identifying and protecting the tools used to view and manipulate log data. Therefore, protecting audit tools is necessary to prevent unauthorized operation on audit data. Applications providing tools to interface with audit data will leverage user permissions and roles identifying the user accessing the tools and the corresponding rights the user enjoys to make access decisions regarding the modification of audit tools. Audit tools include, but are not limited to, vendor-provided and open source audit tools needed to successfully view and manipulate audit information system activity and records. Audit tools include custom queries and report generators.

Check Content

Check users with permissions to administer MySQL auditing:
SELECT *
FROM information_schema.user_privileges
WHERE privilege_type = 'AUDIT_ADMIN';

If unauthorized accounts have the "AUDIT_ADMIN" privilege, this is a finding.

Verify an approved keyring component is installed and active:
SELECT STATUS_KEY, STATUS_VALUE
FROM performance_schema.keyring_component_status;

Verify the results include:
Component_status    Active

If the table is empty or the keyring component status is not "Active", this is a finding.

MySQL 9.x keyring components are preferred over the deprecated keyring plugins. The "keyring_component_status" table reports status information for the keyring component currently in use.

Check whether MySQL Enterprise Audit log files are encrypted:
SHOW GLOBAL VARIABLES LIKE 'audit_log.encryption';

The value must be "AES".

If "audit_log.encryption" is not set to "AES", this is a finding.

For this MySQL 9.x STIG, use the MySQL Enterprise Audit component variable "audit_log.encryption".

Fix Text

Remove audit-related permissions from individuals and roles not authorized to administer MySQL auditing:
REVOKE AUDIT_ADMIN ON *.* FROM <user>;

Protect the audit and keyring startup configuration from unauthorized modification.

1. Configure the organization-approved keyring component for early loading with the active global or local mysqld.my JSON manifest. The manifest loads the keyring component; do not add "component_audit_log" to the keyring manifest.

Example for functional testing with "component_keyring_file":
{
  "components": "file://component_keyring_file"
}

2. Create and protect the selected keyring component configuration file. Example "component_keyring_file.cnf":
{
  "path": "/usr/local/mysql/keyring/component_keyring_file.keys",
  "read_only": false
}

3. Set ownership and permissions so only authorized operating system administrators can modify "mysqld.my", the keyring component configuration, the keyring data, MySQL option files, and the audit component installation files. Grant the MySQL service account only the access required to read the configuration and use the keyring.

4. Restart MySQL and verify the keyring service is active before configuring encrypted audit logging:
SELECT STATUS_KEY, STATUS_VALUE
FROM performance_schema.keyring_component_status;

The "Component_status" value must be "Active".

5. Install or reinstall the MySQL Enterprise Audit component through the supported audit component installation procedure after the keyring service is available. Verify "file://component_audit_log" is registered in "mysql.component" and that the audit variables and functions are available.

6. When audit log encryption is required, configure the component setting only after the keyring is active:
[mysqld]
audit-log.encryption=AES

Restart MySQL and verify the encryption setting and audit operation. If startup fails, remove the new encryption setting, restore service, correct the manifest or keyring configuration, and retry.

Production deployments must use an organization-approved key-management solution. File-based keyring components may be used for functional testing only when permitted.

References:
https://dev.mysql.com/doc/refman/9.7/en/keyring-component-installation.html
https://dev.mysql.com/doc/refman/9.7/en/keyring-file-component.html
https://dev.mysql.com/doc/refman/9.7/en/audit-log-component-installation.html
https://dev.mysql.com/doc/refman/9.7/en/audit-log-component-logging-configuration.html