You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OCPBUGS-17216: Update rotate certificates check for OCP 4.14
By default, the rotate certificates rules for CIS 1.4.0 (section 4.2)
fail on OpenShift 4.14.
This commit updates the rule to check for the proper configuration so
that it passes by default, since certificate rotation is enabled by
default. This patch also updates the instructions to use a valid command
for users looking to verify the configuration manually. The old command
didn't return anything because it was looking in the wrong configuration
section.
This is documented upstream in the following doc:
https://kubernetes.io/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/#certificate-rotation
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation/rule.yml
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,7 @@ description: |-
17
17
file <tt>{{{ kubeletconf_path }}}</tt>
18
18
on the kubelet node(s) and set the below parameter:
19
19
<pre>
20
-
featureGates:
21
-
...
22
-
RotateKubeletServerCertificate: true
23
-
...
20
+
serverTLSBootstrap: true
24
21
</pre>
25
22
26
23
rationale: |-
@@ -33,7 +30,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
30
34
31
ocil: |-
35
32
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
33
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.serverTLSBootstrap'; done</pre>
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation_master/rule.yml
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,7 @@ description: |-
17
17
file <tt>{{{ kubeletconf_path }}}</tt>
18
18
on the kubelet node(s) and set the below parameter:
19
19
<pre>
20
-
featureGates:
21
-
...
22
-
RotateKubeletServerCertificate: true
23
-
...
20
+
serverTLSBootstrap: true
24
21
</pre>
25
22
26
23
rationale: |-
@@ -33,7 +30,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
30
34
31
ocil: |-
35
32
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
33
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.serverTLSBootstrap' done</pre>
Copy file name to clipboardExpand all lines: applications/openshift/kubelet/kubelet_enable_server_cert_rotation_worker/rule.yml
+3-6Lines changed: 3 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,7 @@ description: |-
17
17
file <tt>{{{ kubeletconf_path }}}</tt>
18
18
on the kubelet node(s) and set the below parameter:
19
19
<pre>
20
-
featureGates:
21
-
...
22
-
RotateKubeletServerCertificate: true
23
-
...
20
+
serverTLSBootstrap: true
24
21
</pre>
25
22
26
23
rationale: |-
@@ -33,7 +30,7 @@ ocil_clause: 'the kubelet cannot rotate server certificate'
33
30
34
31
ocil: |-
35
32
Run the following command on the kubelet node(s):
36
-
<pre>$ for NODE_NAME in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$NODE_NAME/proxy/configz | jq '.kubeletconfig|.kind="KubeletConfiguration"|.apiVersion="kubelet.config.k8s.io/v1beta1"' | grep RotateKubeletServerCertificate; done</pre>
33
+
<pre>$ for node in $(oc get nodes -ojsonpath='{.items[*].metadata.name}'); do oc get --raw /api/v1/nodes/$node/proxy/configz | jq '.kubeletconfig.serverTLSBootstrap'; done</pre>
0 commit comments