π Google Cloud SQL Instance SSL Connections are not enforced π’
- Contextual name: π SQL Instance SSL Connections are not enforced π’
- ID:
/ce/ca/google/sql/sql-instance-ssl
- Located in: π Google Cloud SQL
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
Logicβ
- π§ prod.logic.yaml π’
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β
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
Security
section, ensure thatAllow only SSL connections
option is selected.From Google Cloud CLIβ
- Get the detailed configuration for every SQL database instance using the following command:
... 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
security
section, select SSL mode asAllow only SSL connections
.- Under
Configure SSL server certificates
clickCreate new certificate
and save the settingFrom Google Cloud CLIβ
To enforce SSL encryption for an instance run the command:
gcloud sql instances patch INSTANCE_NAME --ssl-mode= ENCRYPTED_ONLY
Note:
RESTART
is required for type MySQL Generation 1 Instances (backendType: FIRST_GEN
) to get this configuration in effect.
policy.yamlβ
Linked Framework Sectionsβ
Section | Sub Sections | Internal Rules | Policies | Flags |
---|---|---|---|---|
πΌ CIS GCP v3.0.0 β πΌ 6.4 Ensure That the Cloud SQL Database Instance Requires All Incoming Connections To Use SSL - Level 1 (Automated) | 1 | |||
πΌ Cloudaware Framework β πΌ Secure Access | 43 |