diff --git a/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/kubernetes/shared.yml b/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/kubernetes/shared.yml index dc86ab30060..40a7037fb45 100644 --- a/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/kubernetes/shared.yml +++ b/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/kubernetes/shared.yml @@ -11,6 +11,12 @@ spec: ciphers: - 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 minTLSVersion: VersionTLS12 type: Custom diff --git a/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/rule.yml b/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/rule.yml index 05986eff309..28ea576297e 100644 --- a/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/rule.yml +++ b/applications/openshift/kubelet/kubelet_configure_tls_cipher_suites_ingresscontroller/rule.yml @@ -18,18 +18,30 @@ severity: medium # cce@ocp4: references: - cis@ocp4: 4.2.13 + cis@ocp4: 4.2.12 -ocil_clause: "TLS cipher suite configuration is not configured" +ocil_clause: "Ingress controller TLS cipher suite configuration is incomplete or possibly insecure" ocil: |- Run the following command on the kubelet nodes(s): - {{% raw %}}
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"} } } }'{{% endraw %}} +
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"} } } }'warnings: - general: |- {{{ openshift_cluster_setting("/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default") | indent(4) }}} +# Recommended 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 +# +# Secure ciphers +# ECDHE-RSA-AES128-GCM-SHA256 +# ECDHE-RSA-AES256-GCM-SHA384 +# ECDHE-RSA-CHACHA20-POLY1305 template: name: yamlfile_value vars: @@ -37,5 +49,5 @@ template: filepath: '/apis/operator.openshift.io/v1/namespaces/openshift-ingress-operator/ingresscontrollers/default' yamlpath: ".status.tlsProfile.ciphers[:]" values: - - 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)$' + - 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)$' operation: 'pattern match' diff --git a/controls/cis_ocp_1_4_0/section-4.yml b/controls/cis_ocp_1_4_0/section-4.yml index 0c53db629c5..9fa0e8f27a7 100644 --- a/controls/cis_ocp_1_4_0/section-4.yml +++ b/controls/cis_ocp_1_4_0/section-4.yml @@ -158,5 +158,6 @@ controls: status: automated rules: - kubelet_configure_tls_cipher_suites + - kubelet_configure_tls_cipher_suites_ingresscontroller levels: [ level_1, ] diff --git a/tests/assertions/ocp4/ocp4-cis-4.12.yml b/tests/assertions/ocp4/ocp4-cis-4.12.yml index 61db2908f74..9edf04303b9 100644 --- a/tests/assertions/ocp4/ocp4-cis-4.12.yml +++ b/tests/assertions/ocp4/ocp4-cis-4.12.yml @@ -89,6 +89,9 @@ rule_results: e2e-cis-api-server-kubelet-client-key-pre-4-9: default_result: NOT-APPLICABLE result_after_remediation: NOT-APPLICABLE + e2e-cis-kubelet-configure-tls-cipher-suites-ingresscontroller: + default_result: FAIL + result_after_remediation: PASS e2e-cis-api-server-oauth-https-serving-cert: default_result: PASS result_after_remediation: PASS diff --git a/tests/assertions/ocp4/ocp4-cis-4.13.yml b/tests/assertions/ocp4/ocp4-cis-4.13.yml index 47295d4304e..171217591a7 100644 --- a/tests/assertions/ocp4/ocp4-cis-4.13.yml +++ b/tests/assertions/ocp4/ocp4-cis-4.13.yml @@ -87,6 +87,9 @@ rule_results: e2e-cis-api-server-kubelet-client-key-pre-4-9: default_result: NOT-APPLICABLE result_after_remediation: NOT-APPLICABLE + e2e-cis-kubelet-configure-tls-cipher-suites-ingresscontroller: + default_result: FAIL + result_after_remediation: PASS e2e-cis-api-server-oauth-https-serving-cert: default_result: PASS result_after_remediation: PASS diff --git a/tests/assertions/ocp4/ocp4-cis-4.14.yml b/tests/assertions/ocp4/ocp4-cis-4.14.yml index 47295d4304e..171217591a7 100644 --- a/tests/assertions/ocp4/ocp4-cis-4.14.yml +++ b/tests/assertions/ocp4/ocp4-cis-4.14.yml @@ -87,6 +87,9 @@ rule_results: e2e-cis-api-server-kubelet-client-key-pre-4-9: default_result: NOT-APPLICABLE result_after_remediation: NOT-APPLICABLE + e2e-cis-kubelet-configure-tls-cipher-suites-ingresscontroller: + default_result: FAIL + result_after_remediation: PASS e2e-cis-api-server-oauth-https-serving-cert: default_result: PASS result_after_remediation: PASS diff --git a/tests/assertions/ocp4/ocp4-cis-4.15.yml b/tests/assertions/ocp4/ocp4-cis-4.15.yml index bbc3eb065a6..d2500292e6c 100644 --- a/tests/assertions/ocp4/ocp4-cis-4.15.yml +++ b/tests/assertions/ocp4/ocp4-cis-4.15.yml @@ -89,6 +89,9 @@ rule_results: e2e-cis-api-server-kubelet-client-key-pre-4-9: default_result: NOT-APPLICABLE result_after_remediation: NOT-APPLICABLE + e2e-cis-kubelet-configure-tls-cipher-suites-ingresscontroller: + default_result: FAIL + result_after_remediation: PASS e2e-cis-api-server-oauth-https-serving-cert: default_result: PASS result_after_remediation: PASS diff --git a/tests/assertions/ocp4/ocp4-cis-4.16.yml b/tests/assertions/ocp4/ocp4-cis-4.16.yml index 47295d4304e..f36faaf60f9 100644 --- a/tests/assertions/ocp4/ocp4-cis-4.16.yml +++ b/tests/assertions/ocp4/ocp4-cis-4.16.yml @@ -207,6 +207,9 @@ rule_results: e2e-cis-kubelet-disable-readonly-port: default_result: PASS result_after_remediation: PASS + e2e-cis-kubelet-configure-tls-cipher-suites-ingresscontroller: + default_result: FAIL + result_after_remediation: PASS e2e-cis-ocp-allowed-registries: default_result: FAIL e2e-cis-ocp-allowed-registries-for-import: