6.1.1 Ensure That a MySQL Instance Does Not Allow Anyone To Connect With Administrative Privileges

Information

It is recommended to set a password for the administrative user ( root by default) to prevent unauthorized access to the SQL database instances.

This recommendation is applicable only for MySQL Instances. PostgreSQL does not offer any setting for No Password from the cloud console.

At the time of MySQL Instance creation, not providing an administrative password allows anyone to connect to the SQL database instance with administrative privileges. The root password should be set to ensure only authorized users have these privileges.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

From Google Cloud Console

-

Go to the Cloud SQL Instances page in the Google Cloud Platform Console using https://console.cloud.google.com/sql/

-

Select the instance to open its Overview page.

-

Select Access Control > Users

-

Click the More actions icon for the user to be updated.

-

Select Change password specify a New password and click OK

From Google Cloud CLI

- Set a password to a MySql instance:

gcloud sql users set-password root --host=<host> --instance=<instance_name> --prompt-for-password <xhtml:ol start="2"> - A prompt will appear, requiring the user to enter a password:

Instance Password: <xhtml:ol start="3"> - With a successful password configured, the following message should be seen:

Updating Cloud SQL user...done.

Impact:

Connection strings for administrative clients need to be reconfigured to use a password.

See Also

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

Item Details

Category: IDENTIFICATION AND AUTHENTICATION

References: 800-53|IA-5, CSCv7|4.2

Plugin: GCP

Control ID: d85dd60b4caf198c81a7f0853764412de7c002272d72346402c55b96c229c669