Skip to content

Commit dc7c6ba

Browse files
committed
Update TLS ciphers for ingress controller rule
The following ciphers are all supported with TLS v1.3, but we weren't checking for them in the OpenShift ingress controller configuration: - TLS_AES_128_GCM_SHA256 - TLS_AES_256_GCM_SHA384 - TLS_CHACHA20_POLY1305_SHA256 This commit updates the regular expression in the rule to check for those ciphers so the check doesn't fail if OpenShift is using them. It also add some formatting to the rule so it's consistent with other TLS-related rules, like for the API server. The following ciphers were listed in the "old" profile, or insecure, which should only be used as a last resort for server TLS configuration: - AES128-GCM-SHA256 - AES256-GCM-SHA384 - DHE-RSA-AES128-GCM-SHA256 - DHE-RSA-AES256-GCM-SHA384 This commit removes them from the ingress controller rule so that it fails if a cluster is using these ciphers. References: - https://wiki.mozilla.org/Security/Server_Side_TLS - https://docs.openssl.org/1.1.1/man1/ciphers/
1 parent d9086f6 commit dc7c6ba

File tree

1 file changed

+16
-4
lines changed
  • applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller

1 file changed

+16
-4
lines changed

applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/rule.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,36 @@ severity: medium
1818
# cce@ocp4:
1919

2020
references:
21-
cis@ocp4: 4.2.13
21+
cis@ocp4: 4.2.12
2222

23-
ocil_clause: "TLS cipher suite configuration is not configured"
23+
ocil_clause: "Ingress controller TLS cipher suite configuration is incomplete or possibly insecure"
2424

2525
ocil: |-
2626
Run the following command on the kubelet nodes(s):
27-
{{% raw %}}<pre>oc -n openshift-ingress-operator patch ingresscontroller/default --type merge -p '{"spec":{"tlsSecurityProfile":{"type":"Custom","custom":{"ciphers":["ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-RSA-AES256-GCM-SHA384"],"minTLSVersion":"VersionTLS12"} } } }'</pre>{{% endraw %}}
27+
<pre>oc -n openshift-ingress-operator patch ingresscontroller/default --type merge -p '{"spec":{"tlsSecurityProfile":{"type":"Custom","custom":{"ciphers":["ECDHE-ECDSA-AES128-GCM-SHA256","ECDHE-ECDSA-CHACHA20-POLY1305","ECDHE-ECDSA-AES256-GCM-SHA384","TLS_CHACHA20_POLY1305_SHA256","TLS_AES_128_GCM_SHA256","TLS_AES_256_GCM_SHA384","ECDHE-RSA-AES128-GCM-SHA256","ECDHE-RSA-AES256-GCM-SHA384","ECDHE-RSA-CHACHA20-POLY1305"],"minTLSVersion":"VersionTLS12"} } } }'</pre>
2828
2929
warnings:
3030
- general: |-
3131
{{{ openshift_cluster_setting("/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default") | indent(4) }}}
3232
33+
# Recommended ciphers
34+
# ECDHE-ECDSA-AES128-GCM-SHA256
35+
# ECDHE-ECDSA-CHACHA20-POLY1305
36+
# ECDHE-ECDSA-AES256-GCM-SHA384
37+
# TLS_CHACHA20_POLY1305_SHA256
38+
# TLS_AES_128_GCM_SHA256
39+
# TLS_AES_256_GCM_SHA384
40+
#
41+
# Secure ciphers
42+
# ECDHE-RSA-AES128-GCM-SHA256
43+
# ECDHE-RSA-AES256-GCM-SHA384
44+
# ECDHE-RSA-CHACHA20-POLY1305
3345
template:
3446
name: yamlfile_value
3547
vars:
3648
ocp_data: "true"
3749
filepath: '/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default'
3850
yamlpath: ".status.tlsProfile.ciphers[:]"
3951
values:
40-
- value: '^(ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-RSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305|ECDHE-RSA-AES256-GCM-SHA384|ECDHE-RSA-CHACHA20-POLY1305|ECDHE-ECDSA-AES256-GCM-SHA384|AES256-GCM-SHA384|AES128-GCM-SHA256)$'
52+
- value: '^(ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-RSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305|ECDHE-RSA-AES256-GCM-SHA384|ECDHE-RSA-CHACHA20-POLY1305|ECDHE-ECDSA-AES256-GCM-SHA384|TLS_AES_128_GCM_SHA256|TLS_AES_256_GCM_SHA384|TLS_CHACHA20_POLY1305_SHA256)$'
4153
operation: 'pattern match'

0 commit comments

Comments
 (0)