Skip to content

Commit d5e0bac

Browse files
committed
ocp4/CIS 2.6: Fix description and add check
The description didn't match what we're actually checking and the OVAL was missing.
1 parent 183d614 commit d5e0bac

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

applications/openshift/etcd/etcd_peer_auto_tls/rule.yml

+22-6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ title: 'Disable etcd Peer Self-Signed Certificates'
66

77
description: |-
88
To ensure the <tt>etcd</tt> service is not using self-signed
9-
certificates, edit the <tt>etcd</tt> configuration file
10-
<tt>/etc/etcd/etcd.conf</tt> from the master node and set
11-
<tt>ETCD_PEER_AUTO_TLS</tt> to <tt>false</tt>:
12-
<pre>ETCD_PEER_AUTO_TLS=false</pre>
9+
certificates, run the following command:
10+
<pre>$ oc get cm/etcd-pod -n openshift-etcd -o yaml</pre>
11+
The etcd pod configuration contained in the configmap should not
12+
contain the <tt>--peer-auto-tls=true</tt> flag.
1313
1414
rationale: |-
1515
Without cryptographic integrity protections, information can be
@@ -30,5 +30,21 @@ ocil_clause: 'the etcd is using peer self-signed certificates'
3030

3131
ocil: |-
3232
Run the following command on the master node(s):
33-
<pre>$ grep ETCD_PEER_AUTO_TLS /etc/etcd/etcd.conf</pre>
34-
The output should return <tt>false</tt>.
33+
<pre>$ oc get cm/etcd-pod -n openshift-etcd -o yaml</pre>
34+
The etcd pod configuration contained in the configmap should not
35+
contain the <tt>--peer-auto-tls=true</tt> flag.
36+
37+
warnings:
38+
- general: |-
39+
{{{ openshift_cluster_setting("/api/v1/namespaces/openshift-etcd/configmaps/etcd-pod") | indent(8) }}}
40+
41+
template:
42+
name: yamlfile_value
43+
vars:
44+
ocp_data: "true"
45+
filepath: /api/v1/namespaces/openshift-etcd/configmaps/etcd-pod
46+
entity_check: "none satisfy"
47+
yamlpath: '.data["pod.yaml"]'
48+
values:
49+
- value: '.*peer-auto-tls[= ]true.*'
50+
operation: "pattern match"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
default_result: PASS

0 commit comments

Comments
 (0)