โญ Repository โ ๐ Compliance Engine โ ๐ CloudAware โ ๐ Google โ ๐ Cloud SQL
๐ก๏ธ Google Cloud SQL Instance External Authorized Networks whitelists all public IP addresses๐ข
- Contextual name: ๐ก๏ธ Instance External Authorized Networks whitelists all public IP addresses๐ข
- ID:
/ce/ca/google/sql/instance-public-ip-whitelist
- Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY
- Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- Cloud Conformity: Check for Publicly Accessible Cloud SQL Database Instances
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...