Cybermatic.aiAll guides →

The Cybermatic Signal · Fix-it Guides · Cloud · Google Cloud

How to enforce SSL and remove public access on Cloud SQL

← All guides · Time to fix: 20 minutes once applications are on the Auth Proxy · Google Cloud

Cloud SQL instances can be configured to accept connections from any IP address over unencrypted connections, which exposes your database credentials and data to anyone on the same network path. This affects any team running Cloud SQL with a 0.0.0.0/0 authorized network entry and SSL not enforced — a combination that is more common than it should be, often left over from a quick development setup. The fix takes about 20 minutes once you have confirmed your applications are ready.

The fix, verified

Cloud SQL instance public without SSL enforced

Severityhigh · Google Cloud
Where to clickGoogle Cloud console → SQL → the instance → Connections → Networking: remove 0.0.0.0/0 from Authorized networks; Security: tick Require SSL/TLS. Use the Cloud SQL Auth Proxy from applications.
Or run
gcloud sql instances patch INSTANCE-NAME --require-ssl
Before you doApplications connecting without certificates break when SSL is required; switch them to the Auth Proxy first.
Maps toCIS GCP 6.4-6.5HIPAA 164.312(e)

What this setting does and what goes wrong without it

Cloud SQL's authorized networks list controls which IP ranges can reach the instance's public IP. The SSL enforcement setting controls whether the database engine will accept a TCP connection that has not completed a TLS handshake. When 0.0.0.0/0 is in the authorized networks list, every IP on the internet can attempt a connection. When SSL is not required, the database will happily accept a login over plain text. A realistic scenario: a developer's laptop is on a coffee shop network, connects to the database with a stored password, and someone running a passive capture on that network collects the credentials in cleartext. Those credentials then work from anywhere because the authorized networks list allows any source.

Check whether you are affected

Open the Google Cloud console, go to SQL, and click your instance. Under Connections, look at the Authorized networks table. If you see 0.0.0.0/0 listed, your instance is reachable from the public internet. On the same page, under Security, check whether Require SSL/TLS is enabled. If either condition is true — open network or SSL not required — this guide applies to you. You can also check SSL enforcement from the command line:

gcloud sql instances patch INSTANCE-NAME --require-ssl

Running that command both checks and corrects the SSL setting in one step. To inspect the current state without changing it, run gcloud sql instances describe INSTANCE-NAME and look for the requireSsl field under ipConfiguration.

How to fix it

Work through these steps in order. Do not enable SSL enforcement before your applications are ready, or they will lose their database connections.

What might break and how to avoid it

The most common breakage is an application that connects using a hard-coded IP address and no client certificate. The moment SSL is required, that connection is rejected at the TLS handshake and the application logs a connection refused or SSL error. The safe sequence is to migrate every application to the Auth Proxy first, confirm they are working, and only then flip the SSL requirement. Also check scheduled jobs, ETL pipelines, BI tools like Looker or Data Studio, and any scripts in Cloud Functions or Cloud Run — all of them need to go through the proxy or present a valid client certificate. If you have a legacy tool that cannot use the proxy, you can issue a client certificate from the Cloud SQL console under Connections → Security → Manage SSL certificates, but the Auth Proxy is simpler to maintain.

Keeping it fixed

Manual settings can drift. Use an Organization Policy or a Terraform module that sets requireSsl and ipConfiguration.authorizedNetworks to an empty list for all Cloud SQL instances, so new instances cannot be created in an open state. If you use Security Command Center, the finding "Cloud SQL database instance does not require all incoming connections to use SSL" will surface any regression. Schedule a quarterly review of the authorized networks list for every Cloud SQL instance in your project. For teams using infrastructure-as-code, add a CI check that fails if a Cloud SQL resource block contains 0.0.0.0/0 in its authorized networks.

Questions people ask

Will requiring SSL break my existing database connections?

Yes, any application connecting without a client certificate or the Cloud SQL Auth Proxy will be rejected immediately. Migrate all applications to the Auth Proxy and confirm they are working before you enable the SSL requirement.

Do I need SSL if I already removed 0.0.0.0/0 from authorized networks?

Yes. Removing the open network entry reduces exposure, but SSL enforcement ensures that any connection — including from authorized IPs — cannot be intercepted in transit. Both controls together satisfy CIS GCP 6.4 and 6.5.

What is the Cloud SQL Auth Proxy and do I have to use it?

The Auth Proxy is a small binary that runs alongside your application and creates an encrypted, IAM-authenticated tunnel to Cloud SQL without requiring a public IP or client certificates. It is the recommended approach; the alternative is to manage client certificates manually, which is more error-prone.

Is this open in your environment?

Cybermatic checks for "Cloud SQL instance public without SSL enforced" automatically — on every connected account, every day — and shows you the exact fix above next to each one it finds. The free scan takes about ten minutes and needs no credit card.

Run the free scan All guides →

Part of The Cybermatic Signal. Written by the Cybermatic editorial agent from the configuration check Cybermatic runs for this setting (ID gcp-cloudsql-public) and reviewed before publication. The click path, command and caution in the fix card are the vendor's documented procedure as of 2026-11-27. Found an error? Write to info@cybermatic.ai.

BriefingIssuesFlashGuidesInsurance checkDomain checkSubscribe

Cybermatic.ai by Ironhawk Group · 9330 Lyndon B Johnson Fwy, Suite 900 · Dallas, TX 75243 · Privacy · cybermatic.ai