Description
Check min_tls_version and the cipher suites together. A Google Cloud SSL policy governs client TLS on the target HTTPS or SSL proxy that uses it.
Potential impact
A client can use an older protocol only if a compatible cipher is available. Tightening the policy can also exclude clients you still need to support.
Remediation
To require at least TLS 1.2, set min_tls_version to TLS_1_2 and choose a compatible profile and cipher suites. Attach the policy to the proxy and test that required clients connect and older versions are rejected. Configure backend encryption separately.
Examples
The tasks only define policies. Use your policy names and project ID, and replace the sample service_account_file value, /tmp/auth.pem, with the path to the service account JSON file.
Before
- name: Configure test-ssl-policy
google.cloud.gcp_compute_ssl_policy:
name: test-ssl-policy
profile: CUSTOM
custom_features:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
- name: Configure test-ssl-policy2
google.cloud.gcp_compute_ssl_policy:
name: test-ssl-policy2
profile: CUSTOM
min_tls_version: TLS_1_1
custom_features:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
The first task omits the minimum and the second sets TLS_1_1. Both list two TLS 1.2 GCM suites, so the minimum alone does not establish that a TLS 1.1 connection is possible.
After
- name: Configure test-ssl-policy
google.cloud.gcp_compute_ssl_policy:
name: test-ssl-policy
profile: CUSTOM
min_tls_version: TLS_1_2
custom_features:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
project: test_project
auth_kind: serviceaccount
service_account_file: /tmp/auth.pem
state: present
The revised task specifies TLS_1_2 only for test-ssl-policy and keeps its ciphers. With google.cloud 1.14.0, use gcloud compute ssl-policies update for an existing policy. The module omits the current fingerprint required for updates.