Ensure that all incoming connections to your Cloud SQL database instances are encrypted with SSL/TLS in order to protect against eavesdropping and unauthorized access. To enable requiring SSL/TLS, ensure that the SSL enforcement mode is set to "ENCRYPTED_ONLY" for all your SQL database instances.
When Cloud SQL database connections are subjected to Man-in-the-Middle (MITM) attacks (also known as hijack attacks), the compromised database can reveal sensitive data such as user credentials, database queries, and query outputs. To ensure your data is encrypted in transit, it is strongly recommended to require SSL/TLS for all incoming connections to your Cloud SQL database instances, especially if your instances are using public IPs.
Audit
To determine if your Cloud SQL database instances requires all incoming connections to use SSL/TLS, perform the following operations:
Remediation / Resolution
To configure your Cloud SQL database instances to enforce SSL/TLS for all incoming connections, you must set the SSL enforcement mode to "ENCRYPTED_ONLY". To update the SSL enforcement configuration for your existing SQL database instances, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- About Cloud SQL connections
- Authorize with SSL/TLS certificates
- Configure SSL/TLS certificates
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud sql instances list
- gcloud sql instances describe
- gcloud sql instances patch