# 6.4 Ensure All Incoming Connections to Cloud SQL Database Instances Require SSL (Automated)

- Source: https://support.icompaas.com/support/solutions/articles/62000233047-6-4-ensure-all-incoming-connections-to-cloud-sql-database-instances-require-ssl-automated-
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [GCP Benchmarks](https://support.icompaas.com/support/solutions/62000112667) › [GCP Knowledge Bases](https://support.icompaas.com/support/solutions/folders/62000169178)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability:

-   Level 1

Description:

It is recommended to enforce SSL encryption for all incoming connections to Cloud SQL database instances to enhance security.

Rationale:

Unencrypted SQL database connections are vulnerable to interception (e.g., MITM attacks), potentially exposing sensitive information like credentials, queries, and data. Enforcing SSL ensures that all data transmitted between clients and the database instance is encrypted. This recommendation applies to PostgreSQL, MySQL (Generations 1 and 2), and SQL Server 2017 instances.

Impact:

Enforcing SSL encryption will prevent existing clients from connecting to the database unless they use SSL for communication. This ensures secure connections but may require configuration updates for existing clients.

#### Default Value:

By default, the settings.ipConfiguration.sslMode parameter is not set, which allows both encrypted and unencrypted connections (ALLOW\_UNENCRYPTED\_AND\_ENCRYPTED).

Audit Steps:

##### Using Google Cloud Console:

1.  Navigate to the [Cloud SQL Instances](https://console.cloud.google.com/sql/instances) page.
    

                    ![](https://support.icompaas.com/assets/kb/31bf4dd0b7fcf846.png)

2.  Click on the name of the SQL instance to view its configuration.
    

        ![](https://support.icompaas.com/assets/kb/9cc2cc166fc26e3e.png)

3.  In the left-hand menu, select Connections.
    

                         ![](https://support.icompaas.com/assets/kb/771812d46d105d72.png)

1.  Verify that the Allow only SSL connections option is enabled in the Security section.

               ![](https://support.icompaas.com/assets/kb/6bbcc7c8b03c932b.png)

##### Using Google Cloud CLI:

Execute the following command to retrieve the configuration of all SQL database instances:

gcloud sql instances list --format=json

1.  Ensure the settings .ip Configuration. ssl Mode parameter is set to ENCRYPTED\_ONLY.
    

Remediation Steps:

##### Using Google Cloud Console:

1.  Navigate to the [Cloud SQL Instances](https://console.cloud.google.com/sql/instances) page.
    

                         ![](https://support.icompaas.com/assets/kb/34cb456e72fa9266.png)

2.  Select the desired instance to view its configuration.
    

              ![](https://support.icompaas.com/assets/kb/a850bbdb38c81a7b.png)

3.  In the left-hand menu, click on Connections.
    

                         ![](https://support.icompaas.com/assets/kb/3bbb80a2833fda61.png)

4.  In the Security section, enable the Allow only SSL connections option.
    

         ![](https://support.icompaas.com/assets/kb/82703b394fb6db7a.png)

5.  Under Configure SSL server certificates, click Create new certificate and save the changes.
    

                ![](https://support.icompaas.com/assets/kb/1b98e776eb9ff62d.png)

                  ![](https://support.icompaas.com/assets/kb/970721c2a9134290.png)

##### Using Google Cloud CLI:

Enforce SSL encryption for a specific instance by running the following command:

gcloud sql instances patch INSTANCE --ssl-mode=ENCRYPTED\_ONLY

1.  For MySQL Generation 1 instances (backend Type: FIRST\_GEN), a restart is required to apply this configuration.
    

## Backout Plan:

Step 1: Revert Configuration

If enforcing SSL causes application failures, revert the sett

gcloud sql instances patch <INSTANCE\_NAME> --ssl-mode=ALLOW\_UNENCRYPTED\_AND\_ENCRYPTED

Alternatively, use Cloud SQL Console to disable the "Allow only SSL connections" option.

Step 2: Notify Stakeholders

-   If rollback is necessary, inform application teams about the temporary removal of SSL enforcement.
    
-   Schedule a future reassessment to enable SSL with proper client updates.
    

Step 3: Restore from Backup (If Necessary)

-   If configuration issues persist, restore the SQL instance from a previously taken snapshot or backup.  
    

Step 4: Validate Rollback Success

-   Run the audit steps again to confirm that unencrypted connections are now allowed.
    
-   Ensure that applications function normally without SSL enforcement

References:

1.  [Google Cloud: Configure SSL for PostgreSQL Instances](https://cloud.google.com/sql/docs/postgres/configure-ssl-instance/)
    

Additional Information:

-   By default, if no authorized networks are configured under settings.ipConfiguration, the instance cannot be accessed from outside the network. However, enabling SSL (ENCRYPTED\_ONLY) ensures that all connections—including those added later—use encrypted communication.
    

CIS Controls:

<table style="border:none;border-collapse:collapse"><colgroup style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"><col style="font-family:&quot;Helvetica Neue&quot;"></colgroup><tbody><tr style="height:40pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Control</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">Description</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 1</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 2</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;text-align:justify;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:700;font-family:&quot;Helvetica Neue&quot;">IG 3</span></span></span></span></p></td></tr><tr style="height:40pt;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">3.10 Encrypt Sensitive Data in Transit</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Encrypt sensitive data during transmission using protocols like TLS or OpenSSH.</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:justify;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><div style="text-align:justify;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><br style="font-family:&quot;Helvetica Neue&quot;"></span></span></strong></span></div></td></tr><tr style="height:54.25pt;font-family:&quot;Helvetica Neue&quot;"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">14.4 Encrypt All Sensitive Information in Transit</span></span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left"><strong><span style="font-family:Helvetica Neue"><span style="font-size:13px;font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;;font-size:14px">Ensure all sensitive information is encrypted when transmitted</span><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">&nbsp;</span><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;;font-size:14px">across networks.</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left"><strong><span style="font-family:Helvetica Neue"><span style="font-size:13px;font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:justify"><strong><span style="font-family:Helvetica Neue"><span style="font-size:13px;font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><div style="text-align:justify"><strong><span style="font-family:Helvetica Neue"><span style="font-size:13px;font-family:&quot;Helvetica Neue&quot;"><br style="font-family:&quot;Helvetica Neue&quot;"></span></span></strong></div></td></tr><tr style="height:40pt"><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left"><span style="font-family:Helvetica Neue"><span style="font-size:14px;font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-family:&quot;Helvetica Neue&quot;">16.5 Encrypt Transmittal of Usernames and Credentials</span></span></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">Ensure all authentication credentials are transmitted using encrypted channels.</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:left;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-family:&quot;Helvetica Neue&quot;;font-size:14px"><p dir="ltr" style="line-height:1.38;margin-bottom:0pt;font-family:&quot;Helvetica Neue&quot;;text-align:justify;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><span style="font-family:&quot;Helvetica Neue&quot;"><span style="color:rgb(0, 0, 0);font-weight:400;font-family:&quot;Helvetica Neue&quot;">✅</span></span></span></strong></span></p></td><td style="padding:5pt;overflow:hidden;overflow-wrap:break-word;font-size:14px"><div style="text-align:justify;font-size:14px"><span style="font-size:14px"><strong><span style="font-family:Helvetica Neue"><br></span></strong></span></div></td></tr></tbody></table>

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
