Ensure that your Google Cloud SQL database instances are configured to accept connections from trusted networks and IP addresses only.
This rule resolution is part of the Conformity Security & Compliance tool for GCP.
When an SQL database instance authorized network is configured to allow public access (i.e. 0.0.0.0/0), any IPv4 client can bypass the network firewall and perform login attempts to that instance (clients still need valid credentials to successfully log in to your database). To minimize the attack surface on SQL databases and their applications, only trusted and required IPs and networks should be whitelisted for login access.
Audit
To determine if your Cloud SQL database instances are configured to allow access to anyone on the Internet, perform the following actions:
Remediation / Resolution
To restrict public access to your Google Cloud SQL database instances by updating their authorized network configuration, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Configuring public IP connectivity
- Configuring connection organization policies
- Organization policy constraints
- CIS Security Documentation
- Securing Google Cloud Computing Platform
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud sql instances list
- gcloud sql instances describe
- gcloud sql instances patch