Guide to the Secure Configuration of Red Hat OpenShift Container Platform 4

with profile CIS Red Hat OpenShift Container Platform 4 Benchmark
This profile defines a baseline that aligns to the Center for Internet Security® Red Hat OpenShift Container Platform 4 Benchmark™, V0.3, currently unreleased. This profile includes Center for Internet Security® Red Hat OpenShift Container Platform 4 CIS Benchmarks™ content. Note that this part of the profile is meant to run on the Operating System that Red Hat OpenShift Container Platform 4 runs on top of. This profile is applicable to OpenShift versions 4.6 and greater.
This guide presents a catalog of security-relevant configuration settings for Red Hat OpenShift Container Platform 4. It is a rendering of content structured in the eXtensible Configuration Checklist Description Format (XCCDF) in order to support security automation. The SCAP content is is available in the scap-security-guide package which is developed at https://www.open-scap.org/security-policies/scap-security-guide.

Providing system administrators with such guidance informs them how to securely configure systems under their control in a variety of network roles. Policy makers and baseline creators can use this catalog of settings, with its associated references to higher-level security control catalogs, in order to assist them in security baseline creation. This guide is a catalog, not a checklist, and satisfaction of every item is not likely to be possible or sensible in many operational scenarios. However, the XCCDF format enables granular selection and adjustment of settings, and their association with OVAL and OCIL content provides an automated checking capability. Transformations of this document, and its associated automated checking content, are capable of providing baselines that meet a diverse set of policy objectives. Some example XCCDF Profiles, which are selections of items that form checklists and can be used as baselines, are available with this guide. They can be processed, in an automated fashion, with tools that support the Security Content Automation Protocol (SCAP). The NIST National Checklist Program (NCP), which provides required settings for the United States Government, is one example of a baseline created from this guidance.
Do not attempt to implement any of the settings in this guide without first testing them in a non-operational environment. The creators of this guidance assume no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.

Profile Information

Profile TitleCIS Red Hat OpenShift Container Platform 4 Benchmark
Profile IDxccdf_org.ssgproject.content_profile_cis-node

CPE Platforms

  • cpe:/a:redhat:openshift_container_platform:4.1
  • cpe:/o:redhat:openshift_container_platform_node:4

Revision History

Current version: 0.1.53

  • draft (as of 2020-12-01)

Table of Contents

  1. OpenShift Settings
    1. Kubernetes Kubelet Settings
    2. OpenShift - Master Node Settings
    3. OpenShift - Master Node Settings

Checklist

Group   Guide to the Secure Configuration of Red Hat OpenShift Container Platform 4   Group contains 4 groups and 24 rules
Group   OpenShift Settings   Group contains 3 groups and 24 rules
[ref]   Each section of this configuration guide includes information about the default configuration of an OpenShift cluster and a set of recommendations for hardening the configuration. For each hardening recommendation, information on how to implement the control and/or how to verify or audit the control is provided. In some cases, remediation information is also provided. Many of the settings in the hardening guide are in place by default. The audit information for these settings is provided in order to verify that the cluster admininstrator has not made changes that would be less secure than the OpenShift defaults. A small number of items require configuration. Finally, there are some recommendations that require decisions by the system operator, such as audit log size, retention, and related settings.
Group   Kubernetes Kubelet Settings   Group contains 7 rules
[ref]   The Kubernetes Kubelet is an agent that runs on each node in the cluster. It makes sure that containers are running in a pod. The kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy. The kubelet doesn’t manage containers which were not created by Kubernetes.

Rule   kubelet - Allow Automatic Firewall Configuration   [ref]

The kubelet has the ability to automatically configure the firewall to allow the containers required ports and connections to networking resources and destinations parameters potentially creating a security incident. To allow the kubelet to modify the firewall, edit the kubelet configuration file /etc/kubernetes/kubelet.conf on the kubelet node(s) and set the below parameter:
makeIPTablesUtilChains: true
Rationale:
The kubelet should automatically configure the firewall settings to allow access and networking traffic through. This ensures that when a pod or container is running that the correct ports are configured as well as removing the ports when a pod or container is no longer in existence.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_enable_iptables_util_chains
Identifiers and References

References:  4.2.7

Rule   kubelet - Do Not Disable Streaming Timeouts   [ref]

Timouts for streaming connections should not be disabled as they help to prevent denial-of-service attacks. To configure streaming connection timeouts, edit the kubelet configuration file /etc/kubernetes/kubelet.conf on the kubelet node(s) and set the below parameter:
streamingConnectionIdleTimeout: 5m
Rationale:
Ensuring connections have timeouts helps to protect against denial-of-service attacks as well as disconnect inactive connections. In addition, setting connections timeouts helps to prevent from running out of ephemeral ports.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_enable_streaming_connections
Identifiers and References

References:  4.2.5

Rule   kubelet - Enable Certificate Rotation   [ref]

To enable the kubelet to rotate client certificates, edit the kubelet configuration file /etc/kubernetes/kubernetes.conf on the kubelet node(s) and set the below parameter:
...
rotateCertificates: true
...
Rationale:
Allowing the kubelet to auto-update the certificates ensure that there is no downtime in certificate renewal as well as ensures confidentiality and integrity.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_enable_cert_rotation
Identifiers and References

Identifiers:  CCE-83838-3

References:  4.2.11

Rule   kubelet - Configure the Client CA Certificate   [ref]

By default, the kubelet is not configured with a CA certificate which can subject the kubelet to man-in-the-middle attacks. To configure a client CA certificate, edit the kubelet configuration file /etc/kubernetes/kubernetes.conf on the kubelet node(s) and set the below parameter:
authentication:
...
  x509:
    clientCAFile: /etc/kubernetes/kubelet-ca.crt
...
Rationale:
Not having a CA certificate for the kubelet will subject the kubelet to possible man-in-the-middle attacks especially on unsafe or untrusted networks. Certificate validation for the kubelet allows the API server to validate the kubelet's identity.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_configure_client_ca
Identifiers and References

References:  4.2.3

Rule   kubelet - Enable Client Certificate Rotation   [ref]

To enable the kubelet to rotate client certificates, edit the kubelet configuration file /etc/kubernetes/kubernetes.conf on the kubelet node(s) and set the below parameter:
featureGates:
...
  RotateKubeletClientCertificate: true
...
Rationale:
Allowing the kubelet to auto-update the certificates ensure that there is no downtime in certificate renewal as well as ensures confidentiality and integrity.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_enable_client_cert_rotation
Identifiers and References

Identifiers:  CCE-83352-5

References:  4.2.11

Rule   Disable Anonymous Authentication to the Kubelet   [ref]

By default, anonymous access to the Kubelet server is enabled. This configuration check ensures that anonymous requests to the Kubelet server are disabled. Edit the Kubelet server configuration file /etc/kubernetes/kubelet.conf on the worker node(s) and set the below parameter:
authentication:
  ...
  anonymous:
    enabled: false
  ...
Rationale:
When enabled, requests that are not rejected by other configured authentication methods are treated as anonymous requests. These requests are then served by the Kubelet server. OpenShift Operators should rely on authentication to authorize access and disallow anonymous requests.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_anonymous_auth
Identifiers and References

Identifiers:  CCE-83815-1

References:  4.2.1

Rule   kubelet - Enable Server Certificate Rotation   [ref]

To enable the kubelet to rotate server certificates, edit the kubelet configuration file /etc/kubernetes/kubernetes.conf on the kubelet node(s) and set the below parameter:
featureGates:
...
  RotateKubeletServerCertificate: true
...
Rationale:
Allowing the kubelet to auto-update the certificates ensure that there is no downtime in certificate renewal as well as ensures confidentiality and integrity.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_kubelet_enable_server_cert_rotation
Identifiers and References

Identifiers:  CCE-83356-6

References:  4.2.12

Group   OpenShift - Master Node Settings   Group contains 7 rules
[ref]   Contains evaluations for the master node configuration settings.

Rule   Verify Permissions on the Kube Scheduler Pod Specification File   [ref]

To properly set the permissions of /etc/kubernetes/static-pod-resources/kube-scheduler-pod-*/kube-scheduler-pod.yaml, run the command:
$ sudo chmod 0644 /etc/kubernetes/static-pod-resources/kube-scheduler-pod-*/kube-scheduler-pod.yaml
Rationale:
If the Kube specification file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the configuration of an OpenShift Scheduler service that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_permissions_scheduler
Identifiers and References

References:  1.1.5

Rule   Verify Permissions on the Kube Controller Manager Pod Specificiation File   [ref]

To properly set the permissions of /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-.*/kube-controller-manager-pod.yaml, run the command:
$ sudo chmod 0644 /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-.*/kube-controller-manager-pod.yaml
Rationale:
If the Kube specification file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the configuration of an OpenShift Controller Manager server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_permissions_kube_controller_manager
Identifiers and References

References:  1.1.3

Rule   Verify User Who Owns The Kube Controller Manager Pod Specificiation File   [ref]

To properly set the owner of /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-*/kube-controller-manager-pod.yaml, run the command:
$ sudo chown root /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-*/kube-controller-manager-pod.yaml 
Rationale:
The Kube specification file contains information about the configuration of the OpenShift Controller Manager Server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_kube_controller_manager
Identifiers and References

References:  1.1.4

Rule   Verify Permissions on the Kube API Server Pod Specification File   [ref]

To properly set the permissions of /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml, run the command:
$ sudo chmod 0644 /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml
Rationale:
If the Kube specification file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the configuration of an OpenShift API server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_permissions_kube_apiserver
Identifiers and References

References:  1.1.1

Rule   Verify Group Who Owns The Kube API Server Pod Specification File   [ref]

To properly set the group owner of /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml, run the command:
$ sudo chgrp root /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml
Rationale:
The Kube specification file contains information about the configuration of the OpenShift API Server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_kube_apiserver
Identifiers and References

References:  1.1.2

Rule   Verify Group Who Owns The Kube Controller Manager Pod Specification File   [ref]

To properly set the group owner of /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-*/kube-controller-manager-pod.yaml, run the command:
$ sudo chgrp root /etc/kubernetes/static-pod-resources/kube-controller-manager-pod-*/kube-controller-manager-pod.yaml
Rationale:
The Kube specification file contains information about the configuration of the OpenShift Controller Manager Server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_kube_controller_manager
Identifiers and References

References:  1.1.4

Rule   Verify User Who Owns The Kube API Server Pod Specification File   [ref]

To properly set the owner of /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml, run the command:
$ sudo chown root /etc/kubernetes/static-pod-resources/kube-apiserver-pod-*/kube-apiserver-pod.yaml 
Rationale:
The Kube specification file contains information about the configuration of the OpenShift API Server that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_kube_apiserver
Identifiers and References

References:  1.1.2

Group   OpenShift - Master Node Settings   Group contains 10 rules
[ref]   Contains evaluations for the master node configuration settings.

Rule   Verify Permissions on the Worker Kubeconfig File   [ref]

To properly set the permissions of /var/lib/kubelet/kubeconfig, run the command:
$ sudo chmod 0600 /var/lib/kubelet/kubeconfig
Rationale:
If the worker kubeconfig file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the administration configuration of the OpenShift cluster that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_permissions_worker_kubeconfig
Identifiers and References

Identifiers:  CCE-83509-0

References:  4.1.9

Rule   Verify Group Who Owns The Worker Kubeconfig File   [ref]

To properly set the group owner of /var/lib/kubelet/kubeconfig, run the command:
$ sudo chgrp root /var/lib/kubelet/kubeconfig
Rationale:
The worker kubeconfig file contains information about the administrative configuration of the OpenShift cluster that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_worker_kubeconfig
Identifiers and References

Identifiers:  CCE-83409-3

References:  4.1.10

Rule   Verify Group Who Owns The Kubelet Configuration File   [ref]

To properly set the group owner of /etc/kubernetes/kubelet.conf, run the command:
$ sudo chgrp root /etc/kubernetes/kubelet.conf
Rationale:
The kubelet configuration file contains information about the configuration of the OpenShift node that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_kubelet_conf
Identifiers and References

References:  4.1.6

Rule   Verify User Who Owns The OpenShift Node Service File   [ref]

' To properly set the owner of /etc/systemd/system/kubelet.service, run the command:
$ sudo chown root /etc/systemd/system/kubelet.service 
'
Rationale:
The /etc/systemd/system/kubelet.service file contains information about the configuration of the OpenShift node service that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_worker_service
Identifiers and References

References:  4.1.2

Rule   Verify Group Who Owns the Worker Certificate Authority File   [ref]

To properly set the group owner of /etc/kubernetes/kubelet-ca.crt, run the command:
$ sudo chgrp root /etc/kubernetes/kubelet-ca.crt
Rationale:
The worker certificate authority file contains the certificate authority certificate for an OpenShift node that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_worker_ca
Identifiers and References

Identifiers:  CCE-83440-8

References:  4.1.8

Rule   Verify User Who Owns The Worker Kubeconfig File   [ref]

To properly set the owner of /var/lib/kubelet/kubeconfig, run the command:
$ sudo chown root /var/lib/kubelet/kubeconfig 
Rationale:
The worker kubeconfig file contains information about the administrative configuration of the OpenShift cluster that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_worker_kubeconfig
Identifiers and References

Identifiers:  CCE-83408-5

References:  4.1.10

Rule   Verify Permissions on the OpenShift Node Service File   [ref]

To properly set the permissions of /etc/systemd/system/kubelet.service, run the command:
$ sudo chmod 0644 /etc/systemd/system/kubelet.service
Rationale:
If the /etc/systemd/system/kubelet.service file is writable by a group-owner or the world the risk of its compromise is increased. The file contains the service configuration of the OpenShift node service that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_permissions_worker_service
Identifiers and References

Identifiers:  CCE-83455-6

References:  4.1.1

Rule   Verify Group Who Owns The OpenShift Node Service File   [ref]

' To properly set the group owner of /etc/systemd/system/kubelet.service, run the command:
$ sudo chgrp root /etc/systemd/system/kubelet.service
'
Rationale:
The /etc/systemd/system/kubelet.service file contains information about the configuration of the OpenShift node service that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_groupowner_worker_service
Identifiers and References

Identifiers:  CCE-83975-3

References:  4.1.2

Rule   Verify User Who Owns the Worker Certificate Authority File   [ref]

To properly set the owner of /etc/kubernetes/kubelet-ca.crt, run the command:
$ sudo chown root /etc/kubernetes/kubelet-ca.crt 
Rationale:
The worker certificate authority file contains the certificate authority certificate for an OpenShift node that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_worker_ca
Identifiers and References

Identifiers:  CCE-83495-2

References:  4.1.8

Rule   Verify User Who Owns The Kubelet Configuration File   [ref]

To properly set the owner of /etc/kubernetes/kubelet.conf, run the command:
$ sudo chown root /etc/kubernetes/kubelet.conf 
Rationale:
The kubelet configuration file contains information about the configuration of the OpenShift node that is configured on the system. Protection of this file is critical for OpenShift security.
Severity: 
medium
Rule ID:xccdf_org.ssgproject.content_rule_file_owner_kubelet_conf
Identifiers and References

References:  4.1.6

Red Hat and Red Hat Enterprise Linux are either registered trademarks or trademarks of Red Hat, Inc. in the United States and other countries. All other names are registered trademarks or trademarks of their respective companies.