7.2 Ensure Passwords are Not Stored in the Global Configuration

Information

The [client] section of the MySQL configuration file allows setting a user and password to be used. Verify the password option is not used in the global configuration file ( my.cnf ).

Using the password parameter may negatively impact the confidentiality of the user's password.

Solution

Use the mysql_config_editor to store authentication credentials inmylogin.cnf in encrypted form.

If not possible, use the user-specific options file,my.cnf. and restricting file access permissions to the user identity.

Impact:

The global configuration is by default readable for all users on the system. This is needed for global defaults (prompt, port, socket, etc.). If a password is present in this file then all users on the system may be able to access it.

See Also

https://workbench.cisecurity.org/benchmarks/20223

Item Details

Category: IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|IA-5(1), 800-53|SC-28, 800-53|SC-28(1), CSCv7|16.4

Plugin: Unix

Control ID: 505120eeef8a016821b2c6dbd3cf85724918d20921ae4d8e2e64ab63fc082701