File tree 3 files changed +39
-17
lines changed
applications/openshift/api-server
3 files changed +39
-17
lines changed Original file line number Diff line number Diff line change
1
+ documentation_complete : true
2
+
3
+ prodtype : ocp4
4
+
5
+ title : Ensure that the bindAddress is set to a relevant secure port
6
+
7
+ description : " The bindAddress is set by default to <tt>0.0.0.0:6443</tt>, and listening with TLS enabled."
8
+
9
+ rationale : |-
10
+ The OpenShift API server is served over HTTPS with authentication and authorization;
11
+ the secure API endpoint is bound to <tt>0.0.0.0:6443</tt> by default. In OpenShift, the only
12
+ supported way to access the API server pod is through the load balancer and then through
13
+ the internal service. The value is set by the bindAddress argument under the servingInfo
14
+ parameter.
15
+
16
+ identifiers : {}
17
+
18
+ severity : low
19
+
20
+ references :
21
+ cis : 1.2.20
22
+
23
+ warnings :
24
+ - general : |-
25
+ {{{ openshift_cluster_setting("/api/v1/namespaces/openshift-kube-apiserver/configmaps/config") | indent(4) }}}
26
+
27
+ template :
28
+ name : yamlfile_value
29
+ vars :
30
+ ocp_data : " true"
31
+ entity_check : " all"
32
+ filepath : /api/v1/namespaces/openshift-kube-apiserver/configmaps/config
33
+ yamlpath : ' .data["config.yaml"]'
34
+ values :
35
+ - value : ' "servingInfo":{.*"bindAddress":"0.0.0.0:6443"'
36
+ operation : " pattern match"
37
+ type : " string"
Original file line number Diff line number Diff line change 1
1
documentation_complete : true
2
2
3
- prodtype : ocp3,ocp4
3
+ prodtype : ocp3
4
4
5
5
title : ' Enable the Secure Port for the API Server'
6
6
@@ -9,16 +9,6 @@ description: |-
9
9
edit the <tt>openshift-kube-apiserver</tt> configmap on the master node(s)
10
10
and either remove the <tt>secure-port</tt> or set it to a different
11
11
(non-zero) desired port.
12
- {{%- if product == "ocp4" %}}
13
- <pre>
14
- " apiServerArguments" :{
15
- ...
16
- " secure-port" :[
17
- " 8443"
18
- ],
19
- ...
20
- </pre>
21
- {{% else %}}
22
12
edit the API Server pod specification
23
13
file <tt>/etc/origin/master/master-config.yaml</tt> on the master node(s)
24
14
and either remove the <tt>secure-port</tt> or set it to a different
@@ -27,7 +17,6 @@ description: |-
27
17
apiServerArguments:
28
18
secure-port:
29
19
- 8443</pre>
30
- {{%- endif %}}
31
20
32
21
rationale : |-
33
22
The secure port is used to serve HTTPS with authentication and authorization.
@@ -43,9 +32,5 @@ ocil_clause: '<tt>secure-port</tt> is set with a value greater than <tt>0</tt>'
43
32
44
33
ocil : |-
45
34
Run the following command on the master node(s):
46
- {{%- if product == "ocp4" %}}
47
- <pre>$ oc get configmap config -n openshift-kube-apiserver -ojson | jq -r '.data["config.yaml"]' | jq '.apiServerArguments["secure-port"]'</pre>
48
- {{% else %}}
49
35
<pre>$ sudo grep -A2 secure-port /etc/origin/master/master-config.yaml</pre>
50
- {{%- endif %}}
51
36
The output should not return <pre>0</pre>.
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ selections:
56
56
# 1.2.19 Ensure that the --insecure-port argument is set to 0
57
57
- api_server_insecure_port
58
58
# 1.2.20 Ensure that the --secure-port argument is not set to 0
59
- - api_server_secure_port
59
+ - api_server_bind_address
60
60
# 1.2.21 Ensure that the --profiling argument is set to false
61
61
- api_server_profiling
62
62
# 1.2.22 Ensure that the --audit-log-path argument is set
You can’t perform that action at this time.
0 commit comments