Ensure that your Google Cloud Platform (GCP) AlloyDB instances are configured with SSL enforcement mode set to ENCRYPTED_ONLY to ensure that all database connections use SSL/TLS encryption. By default, AlloyDB instances are configured to accept only SSL-encrypted connections, providing secure, authenticated, and encrypted communications between database clients and the database server. However, instances can be configured to allow unencrypted connections through the ALLOW_UNENCRYPTED_AND_ENCRYPTED mode, which introduces significant security risks by permitting plaintext database traffic.
By enforcing SSL/TLS encryption for AlloyDB database connections, organizations protect sensitive data in transit from interception and unauthorized access, ensuring compliance with data protection regulations and security best practices. Without SSL enforcement, database connections transmit data in plaintext across the network, exposing sensitive information including authentication credentials, query contents, application data, and query results to anyone with network access. This creates severe security vulnerabilities including credential theft (usernames and passwords transmitted in clear text), data breaches (confidential business data visible to network attackers), compliance violations (failure to meet encryption requirements of PCI DSS, HIPAA, SOC 2, and GDPR), and man-in-the-middle attacks (attackers can intercept and modify database traffic). AlloyDB instances configured with ALLOW_UNENCRYPTED_AND_ENCRYPTED mode permit clients to connect without SSL, creating a pathway for insecure connections even if secure connections are available. Enforcing ENCRYPTED_ONLY mode ensures that all database clients must use SSL/TLS, preventing configuration errors, legacy application vulnerabilities, and malicious actors from establishing unencrypted connections.
Important: Enforcing ENCRYPTED_ONLY mode requires that all database clients are configured to connect using SSL/TLS. Applications and tools that do not support SSL connections or are not properly configured with SSL certificates will be unable to connect to the database. Before enabling SSL enforcement on production instances, verify that all client applications, database tools, monitoring systems, and backup solutions are configured to use SSL connections.
Audit
To determine if your AlloyDB instances are configured to enforce SSL/TLS encryption for database connections, perform the following operations:
Remediation / Resolution
To enforce SSL/TLS encryption for your AlloyDB instance database connections, you must configure the SSL mode to ENCRYPTED_ONLY to prevent unencrypted connections. Perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Configure SSL enforcement mode on AlloyDB instances
- Encryption in transit for Google Cloud
- GCP Command Line Interface (CLI) Documentation
- gcloud alloydb instances update
- gcloud alloydb instances describe
- gcloud alloydb instances list
- gcloud alloydb clusters list
- gcloud projects list