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-289308

CAT I (High)

The MySQL Database Server 9.x must protect the confidentiality and integrity of all information at rest.

Rule ID

SV-289308r1319296_rule

STIG

Oracle MySQL 9.x Security Technical Implementation Guide

Version

V1R1

CCIs

CCI-001199

Discussion

This control is intended to address the confidentiality and integrity of information at rest in nonmobile devices and covers user information and system information. Information at rest refers to the state of information when it is located on a secondary storage device (e.g., disk drive, tape drive) within an organizational information system. Applications and application users generate information throughout the course of their application use. User data generated, as well as application-specific configuration data, needs to be protected. Organizations may choose to employ different mechanisms to achieve confidentiality and integrity protections, as appropriate. If the confidentiality and integrity of application data is not protected, the data will be open to compromise and unauthorized modification.

Check Content

Apply appropriate controls to protect the confidentiality and integrity of data at rest in the database.

Review the system documentation and verify the encryption settings applicable to the MySQL installation.

Run:
SELECT VARIABLE_NAME, VARIABLE_VALUE
FROM performance_schema.global_variables
WHERE VARIABLE_NAME IN (
    'audit_log.encryption',
    'binlog_encryption',
    'innodb_redo_log_encrypt',
    'innodb_undo_log_encrypt',
    'general_log',
    'table_encryption_privilege_check'
);

Verify the following:
- audit_log.encryption is set to "AES".
- binlog_encryption is set to "ON".
- innodb_redo_log_encrypt is set to "ON".
- innodb_undo_log_encrypt is set to "ON".
- general_log is set to "OFF", unless use of the general query log and protection of the resulting log data are specifically documented and approved.
- table_encryption_privilege_check is set to "ON".

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

Review the encryption status of InnoDB tablespaces:
SELECT NAME, ENCRYPTION
FROM information_schema.INNODB_TABLESPACES;

For each tablespace identified by the organization as requiring encryption, verify that "ENCRYPTION" is "Y".

If any required data-at-rest encryption setting is not configured as required, or a tablespace requiring encryption is not encrypted, this is a finding.

Fix Text

Reorder or reinstall the components so the keyring loads first.

When audit log encryption is enabled, the audit log component requires an active MySQL keyring during component initialization. Configure the organization-approved keyring component for early startup before the audit log component initializes.

For "component_keyring_file", create a JSON manifest named "mysqld.my" in the same directory where mysqld is installed:
{
  "components": "file://component_keyring_file"
}

Create "component_keyring_file.cnf" in the MySQL plugin directory and configure the approved keyring data file location. The keyring data file must not be located in the MySQL data directory. Example:
{
  "path": "/usr/local/mysql/keyring/component_keyring_file.keys",
  "read_only": false
}

Set the manifest and configuration file permissions so they are readable only as required by the MySQL service account. Restart MySQL and verify that the keyring initialized successfully before continuing:
SELECT STATUS_KEY, STATUS_VALUE
FROM performance_schema.keyring_component_status;

The "Component_status" value must be "Active". If it is not "Active", correct the JSON manifest, keyring configuration, file permissions, or error log condition before enabling audit encryption.

If MySQL Enterprise Audit was installed before the keyring was configured for early loading, reorder the startup configuration or reinstall MySQL Enterprise Audit after the keyring is "Active". Use the supported component uninstall and installation scripts from the MySQL share directory so the audit component and its related objects are installed together:
mysql -u root -p -D mysql < audit_log_component_filter_uninstall.sql
mysql -u root -p -D mysql < audit_log_component_filter_install.sql

Configure the audit component to initialize at server startup with encryption enabled:
[mysqld]
audit-log=FORCE_PLUS_PERMANENT
audit-log.encryption=AES

Restart MySQL. Verify that the keyring is "Active", "file://component_audit_log" is present in "mysql.component", "audit_log.encryption" is "AES", and the server error log contains no keyring service or audit component initialization errors.

Enable binary log encryption only after the keyring is "Active":
SET PERSIST binlog_encryption = ON;

Enable redo- and undo-log encryption:
SET PERSIST innodb_redo_log_encrypt = ON;
SET PERSIST innodb_undo_log_encrypt = ON;

Enable encryption for a new file-per-table tablespace:
CREATE TABLE t1 (c1 INT) ENCRYPTION='Y';

Enable encryption for an existing file-per-table tablespace:
ALTER TABLE t1 ENCRYPTION='Y';

Set table-encryption privilege enforcement when required:
SET PERSIST table_encryption_privilege_check = ON;

Disable the general query log unless its use and protection are explicitly approved:
SET PERSIST general_log = OFF;

If MySQL fails to start, restore the previous configuration and review the server error log before retrying.

References:
https://dev.mysql.com/doc/refman/9.7/en/audit-log-component-logging-configuration.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