| name | cis-gcp-foundations-6.5 |
| description | Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses |
| category | cis-gcp-foundations |
| version | 4.0.0 |
| author | cyberstrike-official |
| tags | ["cis","gcp","cloud-sql","networking"] |
| cis_id | 6.5 |
| cis_benchmark | CIS Google Cloud Platform Foundation Benchmark v4.0.0 |
| tech_stack | ["gcp"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
6.5 Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses (Automated)
Profile Applicability
Description
Database Server should accept connections only from trusted Network(s)/IP(s) and restrict access from public IP addresses.
Rationale
To minimize attack surface on a Database server instance, only trusted/known and required IP(s) should be white-listed to connect to it.
An authorized network should not have IPs/networks configured to 0.0.0.0/0 which will allow access to the instance from anywhere in the world. Note that authorized networks apply only to instances with public IPs.
Impact
The Cloud SQL database instance would not be available to public IP addresses.
Audit
From Google Cloud Console
- Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances.
- Click the instance name to open its
Instance details page.
- Under the
Configuration section click Edit configurations.
- Under
Configuration options expand the Connectivity section.
- Ensure that no authorized network is configured to allow
0.0.0.0/0.
From Google Cloud CLI
- Get detailed configuration for every Cloud SQL database instance.
gcloud sql instances list --format=json
Ensure that the section settings: ipConfiguration : authorizedNetworks does not have any parameter value containing 0.0.0.0/0.
Remediation
From Google Cloud Console
- Go to the Cloud SQL Instances page in the Google Cloud Console by visiting https://console.cloud.google.com/sql/instances.
- Click the instance name to open its
Instance details page.
- Under the
Configuration section click Edit configurations.
- Under
Configuration options expand the Connectivity section.
- Click the
delete icon for the authorized network 0.0.0.0/0.