π Google Cloud SQL Instance External Authorized Networks do not whitelist all public IP addresses π’
- Contextual name: π SQL Instance External Authorized Networks do not whitelist all public IP addresses π’
- ID:
/ce/ca/google/sql/sql-instance-public-ip-whitelist
- Located in: π Google Cloud SQL
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
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 clickEdit configurations
.- Under
Configuration options
expand theConnectivity
section.- Ensure that no authorized network is configured to allow
0.0.0.0/0
.From Google Cloud CLIβ
... see more
Remediationβ
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 clickEdit configurations
- Under
Configuration options
expand theConnectivity
section.- Click the
delete
icon for the authorized network0.0.0.0/0
.- Click
Save
to update the instance.From Google Cloud CLIβ
Update the authorized network list by dropping off any addresses.
gcloud sql instances patch <INSTANCE_NAME> --authorized-networks=IP_ADDR1,IP_ADDR2...
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS GCP v3.0.0 β πΌ 6.5 Ensure That Cloud SQL Database Instances Do Not Implicitly Whitelist All Public IP Addresses - Level 1 (Automated) | 1 | |||
πΌ Cloudaware Framework β πΌ Public and Anonymous Access | 24 |