๐ก๏ธ 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 servers should accept connections only from trusted networks or IPs and restrict access from public IP addresses.
Rationaleโ
To minimize the attack surface on a database server instance, only trusted and required IPs should be allowlisted to connect to it.
An authorized network should not have IPs/networks configured to
0.0.0.0/0which 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 detailspage.- Under the
Configurationsection clickEdit configurations.- Under
Configuration optionsexpand theConnectivitysection.- 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 detailspage.- Under the
Configurationsection clickEdit configurations.- Under
Configuration optionsexpand theConnectivitysection.- Click the
deleteicon for the authorized network0.0.0.0/0.- Click
Saveto update the instance.From Google Cloud CLIโ
Update the authorized network list by removing any public addresses.
gcloud sql instances patch {{instance-name}} \
--authorized-networks={{ip-addr1}},{{ip-addr2}}