Skip to content

Commit

Permalink
Merge pull request ComplianceAsCode#12008 from rutvik23/CMP-2548
Browse files Browse the repository at this point in the history
To fix CMP-2548
  • Loading branch information
yuumasato authored Jun 25, 2024
2 parents 644de12 + 3beb2f6 commit 9758517
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rationale: |-
severity: medium

platform: not ocp4-on-hypershift-hosted
platform: not ocp4-on-hypershift-hosted and (ocp4.12 or ocp4.13)

ocil_clause: |-
<tt>RotateKubeletServerCertificate</tt> argument is set to <tt>false</tt> in the
Expand All @@ -49,7 +49,7 @@ ocil: |-
To verify that <tt>RotateKubeletServerCertificate</tt> is configured correctly,
run the following command:
<pre>$ oc get configmaps config -n openshift-kube-controller-manager -ojson | jq -r '.data["config.yaml"]' | jq -r '.extendedArguments["feature-gates"]'</pre>
The output should return <tt>RotateKubeletServerCertificate=true</tt>.
The output should return <tt>RotateKubeletServerCertificate=true</tt>
identifiers:
cce@ocp4: CCE-83730-2
Expand All @@ -58,11 +58,12 @@ warnings:
- general: |-
{{{ openshift_filtered_cluster_setting({custom_api_path: dump_path}) | indent(4) }}}
- functionality: |-
This recommendation only applies if you let kubelets get their
certificates from the API Server. In case your certificates come from an
outside Certificate Authority/tool (e.g. Vault) then you need to take care
of rotation yourself
In OpenShift 4, the kubelet certification rotation is enabled by default.
Openshift v4 automatically generates a new kube-apiserver-to-kubelet-signer CA certificates at 292
days, removes old CA certificate after 365 days, and the kubelet-client, kubelet-server
certs are auto-rotated once every month. Hence, this rule is deprecated and not-applicable.
ref: https://docs.redhat.com/en/documentation/openshift_container_platform/4.15/html/security_and_compliance/certificate-types-and-descriptions#purpose-5
references:
nerc-cip: CIP-003-8 R4.2,CIP-003-8 R6,CIP-004-6 R3,CIP-007-3 R5.1,CIP-007-3 R6.1
nist: CM-6,CM-6(1),SC-8,SC-8(1)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
default_result: PASS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
default_result: PASS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
default_result: PASS
default_result: NOT-APPLICABLE
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-high-4.14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-high-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-high-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-high-4.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-high-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-high-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-high-4.16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-high-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-high-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-moderate-4.14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-moderate-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-moderate-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-moderate-4.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-moderate-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-moderate-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-moderate-4.16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-moderate-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-moderate-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-stig-4.14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-stig-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-stig-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-stig-4.15.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-stig-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-stig-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down
4 changes: 2 additions & 2 deletions tests/assertions/ocp4/ocp4-stig-4.16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ rule_results:
default_result: PASS
result_after_remediation: PASS
e2e-stig-controller-rotate-kubelet-server-certs:
default_result: PASS
result_after_remediation: PASS
default_result: NOT-APPLICABLE
result_after_remediation: NOT-APPLICABLE
e2e-stig-controller-secure-port:
default_result: PASS
result_after_remediation: PASS
Expand Down

0 comments on commit 9758517

Please sign in to comment.