Group
Guide to the Secure Configuration of Red Hat OpenShift Container Platform 4
Group contains 4 groups and 19 rules |
Group
Kubernetes Settings
Group contains 3 groups and 19 rules |
[ref]
Each section of this configuration guide includes information about the
configuration of a Kubernetes 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.
Some 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 administrator has not made changes that would be less secure.
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
System and Software Integrity
Group contains 1 rule |
[ref]
System and software integrity can be gained by installing antivirus, increasing
system encryption strength with FIPS, verifying installed software, enabling SELinux,
installing an Intrusion Prevention System, etc. However, installing or enabling integrity
checking tools cannot prevent intrusions, but they can detect that an intrusion
may have occurred. Requirements for integrity checking may be highly dependent on
the environment in which the system will be used. |
Rule
Ensure the Container Runtime rejects unsigned images by default
[ref] | | Rationale: | By ensuring that the container runtime verifies the integrity of container images
before pulling them one is able to prevent a malicious actor from introducing
unauthorized images into the deployment. | Severity: | medium | Rule ID: | xccdf_org.ssgproject.content_rule_reject_unsigned_images_by_default | Identifiers: | CCE-90254-4 | References: | nist | CM-5(3), CM-7(2), CM-7(5), CM-11, SA-10(1) | app-srg-ctr | SRG-APP-000131-CTR-000285, CNTR-OS-000360 | bsi | SYS.1.6.A6, SYS.1.6.A12 | stigref | SV-257537r921554_rule |
| |
|
Group
Kubernetes Kubelet Settings
Group contains 4 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
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 kubelet 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: | CCE-83815-1 | References: | | |
|
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/kubelet.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: | CCE-83724-5 | References: | | |
|
Rule
Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers
[ref] | Ensure that the Kubelet is configured to only use strong cryptographic ciphers.
To set the cipher suites for the kubelet, create new or modify existing
KubeletConfig object along these lines, one for every
MachineConfigPool :
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: kubelet-config-$pool
spec:
machineConfigPoolSelector:
matchLabels:
pools.operator.machineconfiguration.openshift.io/$pool_name: ""
kubeletConfig:
tlsCipherSuites:
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
- TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
In order to configure this rule to check for an alternative cipher, both var_kubelet_tls_cipher_suites_regex
and var_kubelet_tls_cipher_suites have to be set | Rationale: | TLS ciphers have had a number of known vulnerabilities and weaknesses,
which can reduce the protection provided by them. By default Kubernetes
supports a number of TLS ciphersuites including some that have security
concerns, weakening the protection provided. | Severity: | medium | Rule ID: | xccdf_org.ssgproject.content_rule_kubelet_configure_tls_cipher_suites | Identifiers: | CCE-86030-4 | References: | | |
|
Rule
Ensure Kubelet is configured with allowed TLS versions
[ref] |
The configuration tlsSecurityProfile specifies TLS configurations
to be used while establishing connections with the externally exposed
servers. Though secure transport mode is used for establishing connections,
the protocols used may not always be strong enough to avoid interception and
manipulation of the data in transport. TLS Security profile configured should
not make use of any protocols, ciphers, and algorithms with known security
vulnerabilities.
tlsSecurityProfile can be configured to use one of custom, intermediate,
modern, or old profile. Profile Old should be avoided at all times and when using
custom profile one should be extremely careful as invalid configurations can be
catastrophic. It is always advised to configure minimum TLS version to TLSv1.2 or
latest when using Custom profile or to use predefined profiles Intermediate or
modern. If a TLS security profile is not configured, the default TLS security
profile is Intermediate.
To configure Custom tlsSecurityProfile for the Kubelet with TLSv1.2 as minimum
TLS version, create a new or modify existing KubeletConfig object along
these lines, one for every MachineConfigPool :
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: kubelet-tls-config-$pool
spec:
tlsSecurityProfile:
type: Custom
custom:
ciphers:
- ECDHE-ECDSA-CHACHA20-POLY1305
- ECDHE-RSA-CHACHA20-POLY1305
- ECDHE-RSA-AES128-GCM-SHA256
- ECDHE-ECDSA-AES128-GCM-SHA256
minTLSVersion: VersionTLS12
machineConfigPoolSelector:
matchLabels:
pools.operator.machineconfiguration.openshift.io/$pool_name: ""
In order to configure this rule to check for an alternate TLS version, both var_kubelet_tls_min_version_regex
and var_kubelet_tls_min_version should be updated.
For more information, follow
OpenShift documentation:
the relevant documentation.
| Rationale: | The authenticity and integrity of the container platform and communication
between nodes and components must be secure. If an insecure protocol,
cipher, or algorithms is used, during transmission of data, the data can be
intercepted and manipulated. To thwart the manipulation of the data during
transmission secure protocol, cipher and algorithms must be used. | Severity: | medium | Rule ID: | xccdf_org.ssgproject.content_rule_kubelet_configure_tls_min_version | Identifiers: | CCE-86623-6 | References: | | |
|
Group
Kubernetes - Worker Node Settings
Group contains 14 rules |
[ref]
Contains evaluations for the worker node configuration settings. |
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: | CCE-84233-6 | References: | | |
|
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: | CCE-83440-8 | References: | | |
|
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: | CCE-83409-3 | References: | | |
|
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: | CCE-83975-3 | References: | | |
|
Rule
Verify User Who Owns The Kubelet Configuration File
[ref] | To properly set the owner of /var/lib/kubelet/config.json , run the command: $ sudo chown root /var/lib/kubelet/config.json
| 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 | Identifiers: | CCE-85900-9 | References: | | |
|
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: | CCE-83976-1 | References: | | |
|
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: | CCE-83495-2 | References: | | |
|
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: | CCE-83408-5 | References: | | |
|
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: | CCE-84193-2 | References: | | |
|
Rule
Verify Permissions on The Kubelet Configuration File
[ref] |
To properly set the permissions of /var/lib/kubelet/config.json , run the command:
$ sudo chmod 0600 /var/lib/kubelet/config.json
| Rationale: | If the kubelet configuration 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 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_permissions_kubelet | Identifiers: | CCE-85896-9 | References: | | |
|
Rule
Verify Permissions on The Kubelet Configuration File
[ref] |
To properly set the permissions of /etc/kubernetes/kubelet.conf , run the command:
$ sudo chmod 0644 /etc/kubernetes/kubelet.conf
| Rationale: | If the kubelet configuration 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 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_permissions_kubelet_conf | Identifiers: | CCE-83470-5 | References: | | |
|
Rule
Verify Permissions on the Worker Certificate Authority File
[ref] |
To properly set the permissions of /etc/kubernetes/kubelet-ca.crt , run the command:
$ sudo chmod 0644 /etc/kubernetes/kubelet-ca.crt
| Rationale: | If the worker certificate authority file is writable by a group-owner or the
world the risk of its compromise is increased. The 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_permissions_worker_ca | Identifiers: | CCE-83493-7 | References: | | |
|
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: | CCE-83509-0 | References: | | |
|
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: | CCE-83455-6 | References: | | |
|