Rule ID
SV-289327r1319300_rule
Version
V1R1
CCIs
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system. When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can have significant effects on the overall security of the system. Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purpose of initiating changes, including upgrades and modifications.
Review the security configuration of the MySQL Database Server 9.x and database(s). If it does not enforce access restrictions associated with changes to the configuration of the MySQL Database Server 9.x or database(s), this is a finding. MySQL configuration can be set two ways: 1. Via the mysql configuration file. This file must be owned and permissions to read or write to it limited to the mysql operating system user only. 2. Via a "SET" command within the server itself. These commands may be limited by limiting "server administration" privileges. User privileges can be shown using the "SHOW GRANTS [FOR user]". This data is written to "mysqld-auto.cnf" file. Refer to the mysql secure configuration guide for more information. Run the following command to check the mysql permissions on "my.cnf": ls -l /etc/my.cnf The permissions must be: File or Resource Location Owner Directory Permissions File Permissions MySQL configuration file /etc/my.cnf root drwxr-xr-x -rw-r--r-- If the permissions are more permissive than the above, this is a finding. As of MySQL 9.x, configuration variables can also be set and changed using persist system variable settings that save to a file named "mysqld-auto.cnf". This file is in the mysql data directory. Refer to the example below. sudo ls -l /var/lib/mysql/mysqld-auto.cnf -rw-r-----. 1 mysql mysql 933 Aug 3 12:51 /var/lib/mysql/mysqld-auto.cnf If the permissions of the "mysqld-auto.cnf" are more permissive, this is a finding.
Configure the MySQL Database Server 9.x to enforce access restrictions associated with changes to the configuration of the MySQL Database Server 9.x or database(s). Check and change file permissions on the MySQL configuration file so the mysql operating system user owns the file and is the only user with read-write permissions. Use the "SHOW GRANTS" statements to audit who has "SUPER" permissions and remove any users with excess privileges. For "my.cnf", change ownership and permissions to: File or Resource Location Owner Directory Permissions File Permissions MySQL configuration file /etc/my.cnf root drwxr-xr-x -rw-r--r-- The "mysqld-auto.cnf" is created and managed by the mysql instance, as such permissions should be correct. If not correct, change "owner" to "mysql" and "rw r" to "640".