๐ก๏ธ Google Cloud SQL Instance SSL Connections are not enforced๐ข
- Contextual name: ๐ก๏ธ Instance SSL Connections are not enforced๐ข
- ID:
/ce/ca/google/sql/instance-ssl - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- Cloud Conformity: Enable SSL/TLS for Cloud SQL Incoming Connections
Descriptionโ
Descriptionโ
It is recommended to enforce all incoming connections to SQL database instance to use SSL.
Rationaleโ
SQL database connections if successfully trapped (MITM); can reveal sensitive data like credentials, database queries, query outputs etc. For security, it is recommended to always use SSL encryption when connecting to your instance. This recommendation is applicable for Postgresql, MySql generation 1, MySql generation 2 and SQL Server 2017 instances.
Impactโ
After enforcing SSL requirement for connections, existing client will not be able to communicate with Cloud SQL database instance unless they use SSL encrypted connections to communicate to Cloud SQL database instance.
Auditโ
This policy flags a Google SQL Instance as
INCOMPLIANTif itsSSL Modeis not set either to ENCRYPTED_ONLY or TRUSTED_CLIENT_CERTIFICATE_REQUIRED.Default Valueโ
By default parameter
settings: ipConfiguration: sslModeis not set which is equivalent tosslMode:ALLOW_UNENCRYPTED_AND_ENCRYPTED.Referencesโ
... see more
Remediationโ
Remediationโ
From Google Cloud Consoleโ
- Go to https://console.cloud.google.com/sql/instances.
- Click on an instance name to see its configuration overview.
- In the left-side panel, select
Connections.- In the
securitysection, select SSL mode asAllow only SSL connections.- Under
Configure SSL server certificatesclickCreate new certificateand save the settingFrom Google Cloud CLIโ
To enforce SSL encryption for an instance run the command:
```sh
gcloud sql instances patch INSTANCE_NAME --ssl-mode= ENCRYPTED_ONLY
```Note:
RESTARTis required for type MySQL Generation 1 Instances (backendType: FIRST_GEN) to get this configuration in effect.