Skip to content

Commit

Permalink
CIS Node 4.2.3 - add template to kubelet_configure_client_ca/rule.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
  • Loading branch information
lsm5 committed Oct 13, 2020
1 parent 54ecc80 commit 138fee7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,22 @@ identifiers:
references:
cis@ocp3: 2.1.4
cis@ocp4: 4.2.3

template:
{{%- if product == "ocp4" %}}
name: yamlfile_value
vars:
filepath: /etc/kubernetes/kubelet.conf
yamlpath: ".authentication.x509.clientCAFile"
values:
- value: "/etc/kubernetes/kubelet-ca.crt"
operation: "equals"
{{% else %}}
name: yamlfile_value
vars:
filepath: /etc/origin/node/node-config.yaml
yamlpath: ".servingInfo.clientCA"
values:
- value: "client-ca.crt"
operation: "equals"
{{%- endif %}}
2 changes: 1 addition & 1 deletion ocp4/profiles/cis-node.profile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ selections:
# 4.2.2 Ensure that the --authorization-mode argument is not set to AlwaysAllow
# - this seems to be the default in the code, so the rule should verify that authorization mode is NOT set to AlwaysAllow
# 4.2.3 Ensure that the --client-ca-file argument is set as appropriate
# - like kubelet_anonymous_auth_disabled but check for authentication.x509.clientCAFile=/etc/kubernetes/kubelet-ca.crt
- kubelet_configure_client_ca
# 4.2.4 Ensure that the --read-only-port argument is set to 0
# - this is a platform rule (reads from a CM)
# 4.2.5 Ensure that the --streaming-connection-idle-timeout argument is not set to 0
Expand Down

0 comments on commit 138fee7

Please sign in to comment.