4.21 CIS Kubernetes benchmark

The Center for Internet Security (CIS) publishes the CIS Kubernetes Benchmark as a framework of specific steps to configure Kubernetes more securely and with standards that are commensurate to various industry regulations. This document contains the results of the version 1.5 CIS Kubernetes benchmark for clusters that run Red Hat OpenShift on IBM Cloud version 4.21. For more information or help understanding the benchmark, see Using the benchmark.

1 Master node security configuration

1.1 Master node configuration files

Section 1.1 Master node configuration files benchmark results

Recommendation. Scored? Level Result Responsibility
1.1.1 Ensure that the API server pod specification file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.2 Ensure that the API server pod specification file ownership is set to root:root. Scored 1 Pass IBM
1.1.3 Ensure that the controller manager pod specification file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.4 Ensure that the controller manager pod specification file ownership is set to root:root. Scored 1 Pass IBM
1.1.5 Ensure that the scheduler pod specification file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.6 Ensure that the scheduler pod specification file ownership is set to root:root. Scored 1 Pass IBM
1.1.7 Ensure that the etcd pod specification file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.8 Ensure that the etcd pod specification file ownership is set to root:root. Scored 1 Pass IBM
1.1.9 Ensure that the Container Network Interface file permissions are set to 600 or more restrictive. Not Scored 1 Pass IBM
1.1.10 Ensure that the Container Network Interface file ownership is set to root:root. Not Scored 1 Pass IBM
1.1.11 Ensure that the etcd data directory permissions are set to 700 or more restrictive. Scored 1 Pass IBM
1.1.12 Ensure that the etcd data directory ownership is set to etcd:etcd. Scored 1 Pass IBM
1.1.13 Ensure that the default administrative credential file permissions are set to 600. Scored 1 Pass IBM
1.1.14 Ensure that the default administrative credential file ownership is set to root:root. Scored 1 Pass IBM
1.1.15 Ensure that the scheduler.conf file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.16 Ensure that the scheduler.conf file ownership is set to root:root. Scored 1 Pass IBM
1.1.17 Ensure that the controller-manager.conf file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
1.1.18 Ensure that the controller-manager.conf file ownership is set to root:root. Scored 1 Pass IBM
1.1.19 Ensure that the Kubernetes PKI directory and file ownership is set to root:root. Scored 1 Pass IBM
1.1.20 Ensure that the Kubernetes PKI certificate file permissions are set to 644 or more restrictive. Not Scored 1 Pass IBM
1.1.21 Ensure that the Kubernetes PKI key file permissions are set to 600. Not Scored 1 Pass IBM

1.2 API server

Section 1.2 API server benchmark results

Recommendation. Scored? Level Result Responsibility
1.2.1 Ensure that the --anonymous-auth argument is set to false. Not Scored 1 Fail IBM
1.2.2 Ensure that the --token-auth-file parameter is not set. Scored 1 Pass IBM
1.2.3 Ensure that the DenyServiceExternalIPs is set. Not Scored 1 Fail IBM
1.2.4 Ensure that the --kubelet-client-certificate and --kubelet-client-key arguments are set as appropriate. Scored 1 Pass IBM
1.2.5 Ensure that the --kubelet-certificate-authority argument is set as appropriate. Scored 1 Pass IBM
1.2.6 Ensure that the --authorization-mode argument is not set to AlwaysAllow. Scored 1 Pass IBM
1.2.7 Ensure that the --authorization-mode argument includes Node. Scored 1 Pass IBM
1.2.8 Ensure that the --authorization-mode argument includes RBAC. Scored 1 Pass IBM
1.2.9 Ensure that the admission control plug-in EventRateLimit is set. Not Scored 1 Fail IBM
1.2.10 Ensure that the admission control plug-in AlwaysAdmit is not set. Scored 1 Pass IBM
1.2.11 Ensure that the admission control plug-in AlwaysPullImages is set. Not Scored 1 Fail IBM
1.2.12 Ensure that the admission control plug-in ServiceAccount is set. Scored 2 Pass IBM
1.2.13 Ensure that the admission control plug-in NamespaceLifecycle is set. Scored 2 Pass IBM
1.2.14 Ensure that the admission control plug-in NodeRestriction is set. Scored 2 Pass IBM
1.2.15 Ensure that the --profiling argument is set to false. Scored 1 Pass IBM
1.2.16 Ensure that the --audit-log-path argument is set. Scored 1 Pass Shared
1.2.17 Ensure that the --audit-log-maxage argument is set to 30 or as appropriate. Scored 1 Fail Shared
1.2.18 Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate. Scored 1 Pass Shared
1.2.19 Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate. Scored 1 Pass Shared
1.2.20 Ensure that the --request-timeout argument is set as appropriate. Not Scored 1 Pass IBM
1.2.21 Ensure that the --service-account-lookup argument is set to true. Scored 1 Pass IBM
1.2.22 Ensure that the --service-account-key-file argument is set as appropriate. Scored 1 Pass IBM
1.2.23 Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate. Scored 1 Pass IBM
1.2.24 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate. Scored 1 Pass IBM
1.2.25 Ensure that the --client-ca-file argument is set as appropriate. Scored 1 Pass IBM
1.2.26 Ensure that the --etcd-cafile argument is set as appropriate. Scored 1 Pass IBM
1.2.27 Ensure that the --encryption-provider-config argument is set as appropriate. Not Scored 1 Fail Shared
1.2.28 Ensure that encryption providers are appropriately configured. Not Scored 1 Fail Shared
1.2.29 Ensure that the API Server only makes use of Strong Cryptographic Ciphers. Not Scored 1 Pass IBM
1.2.30 Ensure that the --service-account-extend-token-expiration parameter is set to false. Scored 1 Fail IBM

1.3 Controller manager

Section 1.3 Controller manager benchmark results

Recommendation. Scored? Level Result Responsibility
1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate. Not Scored 1 Pass IBM
1.3.2 Ensure that the --profiling argument is set to false. Scored 1 Pass IBM
1.3.3 Ensure that the --use-service-account-credentials argument is set to true. Scored 1 Pass IBM
1.3.4 Ensure that the --service-account-private-key-file argument is set as appropriate. Scored 1 Pass IBM
1.3.5 Ensure that the --root-ca-file argument is set as appropriate. Scored 1 Pass IBM
1.3.6 Ensure that the RotateKubeletServerCertificate argument is set to true. Scored 1 Pass IBM
1.3.7 Ensure that the --bind-address argument is set to 127.0.0.1. Scored 1 Pass IBM

1.4 Scheduler

Section 1.4 Scheduler benchmark results

Recommendation. Scored? Level Result Responsibility
1.4.1 Ensure that the --profiling argument is set to false. Scored 1 Pass IBM
1.4.2 Ensure that the --bind-address argument is set to 127.0.0.1. Scored 1 Pass IBM

2 Etcd node configuration

Section 2 Etcd node configuration benchmark results

Recommendation. Scored? Level Result Responsibility
2.1 Ensure that the --cert-file and --key-file arguments are set as appropriate. Scored 1 Pass IBM
2.2 Ensure that the --client-cert-auth argument is set to true. Scored 1 Pass IBM
2.3 Ensure that the --auto-tls argument is not set to true. Scored 1 Pass IBM
2.4 Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate. Scored 1 Pass IBM
2.5 Ensure that the --peer-client-cert-auth argument is set to true. Scored 1 Pass IBM
2.6 Ensure that the --peer-auto-tls argument is not set to true. Scored 1 Pass IBM
2.7 Ensure that a unique Certificate Authority is used for etcd. Not Scored 2 Pass IBM

3 Control plane configuration

3.1 Authentication and authorization

Section 3.1 Authentication and authorization benchmark results

Recommendation. Scored? Level Result Responsibility
3.1.1 Client certificate authentication should not be used for users. Not Scored 1 Pass Shared
3.1.2 Service account token authentication should not be used for users. Not Scored 1 Pass Shared
3.1.3 Bootstrap token authentication should not be used for users. Not Scored 1 Pass Shared

3.2 Logging

Section 3.2 Logging benchmark results

Recommendation. Scored? Level Result Responsibility
3.2.1 Ensure that a minimal audit policy is created. Not Scored 1 Fail Shared
3.2.2 Ensure that the audit policy covers key security concerns. Not Scored 2 Fail Shared

4 Worker nodes (RHEL_9_64)

4.1 Worker node configuration files

Section 4.1 Worker node configuration files benchmark results

Recommendation. Scored? Level Result Responsibility
4.1.1 Ensure that the kubelet service file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
4.1.2 Ensure that the kubelet service file ownership is set to root:root. Scored 1 Pass IBM
4.1.3 If proxy kubeconfig file exists ensure permissions are set to 600 or more restrictive. Not Scored 1 Pass IBM
4.1.4 If proxy kubeconfig file exists ensure ownership is set to root:root. Not Scored 1 Pass IBM
4.1.5 Ensure that the --kubeconfig`` kubelet.conf file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
4.1.6 Ensure that the --kubeconfig`` kubelet.conf file ownership is set to root:root. Scored 1 Pass IBM
4.1.7 Ensure that the certificate authorities file permissions are set to 644 or more restrictive. Not Scored 1 Pass IBM
4.1.8 Ensure that the client certificate authorities file ownership is set to root:root. Not Scored 1 Pass IBM
4.1.9 If the kubelet config.yaml configuration file is being used validate permissions set to 600 or more restrictive. Scored 1 Pass IBM
4.1.10 If the kubelet config.yaml configuration file is being used validate file ownership is set to root:root. Scored 1 Pass IBM

4.2 Kubelet

Section 4.2 Kubelet benchmark results

Recommendation. Scored? Level Result Responsibility
4.2.1 Ensure that the --anonymous-auth argument is set to false. Scored 1 Pass IBM
4.2.2 Ensure that the --authorization-mode argument is not set to AlwaysAllow. Scored 1 Pass IBM
4.2.3 Ensure that the --client-ca-file argument is set as appropriate. Scored 1 Pass IBM
4.2.4 Verify that if defined, readOnlyPort is set to 0. Not Scored 1 Pass IBM
4.2.5 Ensure that the --streaming-connection-idle-timeout argument is not set to 0. Not Scored 1 Pass IBM
4.2.6 Ensure that the --make-iptables-util-chains argument is set to true. Scored 1 Pass IBM
4.2.7 Ensure that the --hostname-override argument is not set. Not Scored 1 Fail IBM
4.2.8 Ensure that the eventRecordQPS argument is set to a level which ensures appropriate event capture. Not Scored 2 Pass IBM
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate. Not Scored 1 Pass IBM
4.2.10 Ensure that the --rotate-certificates argument is not set to false. Scored 1 Fail IBM
4.2.11 Verify that the RotateKubeletServerCertificate argument is set to true. Not Scored 1 Pass IBM
4.2.12 Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers. Not Scored 1 Pass IBM
4.2.13 Ensure that a limit is set on pod PIDs. Not Scored 1 Pass IBM
4.2.14 Ensure that the --seccomp-default parameter is set to true. Not Scored 1 Pass IBM

4.3 Kube-proxy

Section 4.3 Kube-proxy benchmark results

Recommendation. Scored? Level Result Responsibility
4.3.1 Ensure that the kube-proxy metrics service is bound to localhost. Scored 1 Pass IBM

4 Worker node security configuration (RHCOS)

4.1 Worker node configuration files

Section 4.1 Worker node configuration files benchmark results

Recommendation. Scored? Level Result Responsibility
4.1.1 Ensure that the kubelet service file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
4.1.2 Ensure that the kubelet service file ownership is set to root:root. Scored 1 Pass IBM
4.1.3 If proxy kubeconfig file exists ensure permissions are set to 600 or more restrictive. Not Scored 1 Pass IBM
4.1.4 If proxy kubeconfig file exists ensure ownership is set to root:root. Not Scored 1 Pass IBM
4.1.5 Ensure that the --kubeconfig`` kubelet.conf file permissions are set to 600 or more restrictive. Scored 1 Pass IBM
4.1.6 Ensure that the --kubeconfig`` kubelet.conf file ownership is set to root:root. Scored 1 Pass IBM
4.1.7 Ensure that the certificate authorities file permissions are set to 644 or more restrictive. Not Scored 1 Pass IBM
4.1.8 Ensure that the client certificate authorities file ownership is set to root:root. Not Scored 1 Pass IBM
4.1.9 If the kubelet config.yaml configuration file is being used validate permissions set to 600 or more restrictive. Scored 1 Pass IBM
4.1.10 If the kubelet config.yaml configuration file is being used validate file ownership is set to root:root. Scored 1 Pass IBM

4.2 Kubelet

Section 4.2 Kubelet benchmark results

Recommendation. Scored? Level Result Responsibility
4.2.1 Ensure that the --anonymous-auth argument is set to false. Scored 1 Pass IBM
4.2.2 Ensure that the --authorization-mode argument is not set to AlwaysAllow. Scored 1 Pass IBM
4.2.3 Ensure that the --client-ca-file argument is set as appropriate. Scored 1 Pass IBM
4.2.4 Verify that if defined, readOnlyPort is set to 0. Not Scored 1 Pass IBM
4.2.5 Ensure that the --streaming-connection-idle-timeout argument is not set to 0. Not Scored 1 Pass IBM
4.2.6 Ensure that the --make-iptables-util-chains argument is set to true. Scored 1 Pass IBM
4.2.7 Ensure that the --hostname-override argument is not set. Not Scored 1 Fail IBM
4.2.8 Ensure that the eventRecordQPS argument is set to a level which ensures appropriate event capture. Not Scored 2 Pass IBM
4.2.9 Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate. Not Scored 1 Pass IBM
4.2.10 Ensure that the --rotate-certificates argument is not set to false. Scored 1 Pass IBM
4.2.11 Verify that the RotateKubeletServerCertificate argument is set to true. Not Scored 1 Pass IBM
4.2.12 Ensure that the Kubelet only makes use of Strong Cryptographic Ciphers. Not Scored 1 Pass IBM
4.2.13 Ensure that a limit is set on pod PIDs. Not Scored 1 Pass IBM
4.2.14 Ensure that the --seccomp-default parameter is set to true. Not Scored 1 Pass IBM

4.3 Kube-proxy

Section 4.3 Kube-proxy benchmark results

Recommendation. Scored? Level Result Responsibility
4.3.1 Ensure that the kube-proxy metrics service is bound to localhost. Scored 1 Pass IBM

5 Policies

5.1 RBAC and service accounts

Section 5.1 RBAC and service accounts benchmark results

Recommendation. Scored? Level Result Responsibility
5.1.1 Ensure that the cluster-admin role is only used where required. Not Scored 1 Pass Shared
5.1.2 Minimize access to secrets. Not Scored 1 Fail Shared
5.1.3 Minimize wildcard use in Roles and ClusterRoles. Not Scored 1 Fail Shared
5.1.4 Minimize access to create pods. Not Scored 1 Pass Shared
5.1.5 Ensure that default service accounts are not actively used. Not Scored 1 Fail Shared
5.1.6 Ensure that Service Account Tokens are only mounted where necessary. Not Scored 1 Fail Shared
5.1.7 Avoid use of system:masters group. Not Scored 1 Pass Shared
5.1.8 Limit use of the Bind, Impersonate and Escalate permissions in the Kubernetes cluster. Not Scored 1 Pass Shared
5.1.9 Minimize access to create persistent volumes. Not Scored 1 Pass Shared
5.1.10 Minimize access to the proxy sub-resource of nodes. Not Scored 1 Pass Shared
5.1.11 Minimize access to the approval sub-resource of certificatesigningrequests objects. Not Scored 1 Pass Shared
5.1.12 Minimize access to webhook configuration objects. Not Scored 1 Pass Shared
5.1.13 Minimize access to the service account token creation. Not Scored 1 Pass Shared

5.2 Pod security standards

Section 5.2 Pod security standards benchmark results

Recommendation. Scored? Level Result Responsibility
5.2.1 Ensure that the cluster has at least one active policy control mechanism in place. Not Scored 1 Pass Shared
5.2.2 Minimize the admission of privileged containers. Not Scored 1 Pass Shared
5.2.3 Minimize the admission of containers wishing to share the host process ID namespace. Not Scored 1 Pass Shared
5.2.4 Minimize the admission of containers wishing to share the host IPC namespace. Not Scored 1 Pass Shared
5.2.5 Minimize the admission of containers wishing to share the host network namespace. Not Scored 1 Pass Shared
5.2.6 Minimize the admission of containers with allowPrivilegeEscalation. Not Scored 1 Pass Shared
5.2.7 Minimize the admission of root containers. Not Scored 2 Pass Shared
5.2.8 Minimize the admission of containers with the NET_RAW capability. Not Scored 1 Pass Shared
5.2.9 Minimize the admission of containers with capabilities assigned. Not Scored 2 Pass Shared
5.2.10 Minimize the admission of Windows HostProcess Containers. Not Scored 1 Pass Shared
5.2.11 Minimize the admission of HostPath volumes. Not Scored 1 Pass Shared
5.2.12 Minimize the admission of containers which use HostPorts. Not Scored 1 Pass Shared

5.3 Network policies and CNI

Section 5.3 Network policies and CNI benchmark results

Recommendation. Scored? Level Result Responsibility
5.3.1 Ensure that the CNI in use supports Network Policies. Not Scored 1 Pass IBM
5.3.2 Ensure that all Namespaces have Network Policies defined. Not Scored 2 Pass Shared

5.4 Secrets management

Section 5.4 Secrets management benchmark results

Recommendation. Scored? Level Result Responsibility
5.4.1 Prefer using secrets as files over secrets as environment variables. Not Scored 2 Fail Shared
5.4.2 Consider external secret storage. Not Scored 2 Fail Shared

5.5 Extensible admission control

Section 5.5 Extensible admission control benchmark results

Recommendation. Scored? Level Result Responsibility
5.5.1 Configure Image Provenance using ImagePolicyWebhook admission controller. Not Scored 2 Fail Shared

5.6 General policies

Section 5.6 General policies benchmark results

Recommendation. Scored? Level Result Responsibility
5.6.1 Create administrative boundaries between resources using namespaces. Not Scored 1 Pass Shared
5.6.2 Ensure that the seccomp profile is set to docker/default in your pod definitions. Not Scored 2 Fail Shared
5.6.3 Apply Security Context to Your Pods and Containers. Not Scored 2 Fail Shared
5.6.4 The default namespace should not be used. Not Scored 2 Pass Shared

IBM remediations and explanations

Section IBM remediations and explanations benchmark results

Remediation and explanation.
1.2.1 Red Hat OpenShift on IBM Cloud utilizes RBAC for cluster protection, but allows anonymous discovery, which is considered reasonable per CIS Kubernetes Benchmark.
1.2.3 OpenShift employs other mitigating controls to restrict service external IPs.
1.2.9 Red Hat OpenShift on IBM Cloud does not enable the EventRateLimit admission controller since it is a Kubernetes alpha feature.
1.2.11 Red Hat OpenShift on IBM Cloud does not enable the AlwaysPullImages admission controller since it overrides a container's _imagePullPolicy_ and may impact performance.
1.2.17 Red Hat OpenShift on IBM Cloud can optionally enable Kubernetes API server auditing.
1.2.27 Red Hat OpenShift on IBM Cloud can optionally enable a Kubernetes Key Management Service (KMS) provider.
1.2.28 Red Hat OpenShift on IBM Cloud can optionally enable a Kubernetes Key Management Service (KMS) provider.
1.2.30 OpenShift does not support disabling --service-account-extend-token-expiration.
3.2.1 Red Hat OpenShift on IBM Cloud can optionally enable Kubernetes API server auditing.
3.2.2 Red Hat OpenShift on IBM Cloud can optionally enable Kubernetes API server auditing.
4.2.7 Red Hat OpenShift on IBM Cloud ensures that the hostname matches the name issued by the infrastructure.
4.2.10 Red Hat OpenShift on IBM Cloud rotates certificates on every worker node reload or update.
5.1.2 Red Hat OpenShift on IBM Cloud deploys some system components that could have their Kubernetes secret access further restricted.
5.1.3 Red Hat OpenShift on IBM Cloud deploys some system components that could have their Kubernetes resource access further restricted.
5.1.5 Red Hat OpenShift on IBM Cloud does not set [_automountServiceAccountToken: false_](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server){: external} for each default service account.
5.1.6 Red Hat OpenShift on IBM Cloud deploys some system components that could set [_automountServiceAccountToken: false_](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server){: external}.
5.2.2 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.3 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.4 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.5 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.6 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.7 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.8 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.2.9 Red Hat OpenShift on IBM Cloud can optionally configure OpenShift security context constraints and Kubernetes pod security admission which are similar to the deprecated Kubernetes pod security policies.
5.4.1 Red Hat OpenShift on IBM Cloud deploys some system components that could prefer using secrets as files over secrets as environment variables.
5.4.2 Red Hat OpenShift on IBM Cloud can optionally enable Secrets Manager service.
5.5.1 Red Hat OpenShift on IBM Cloud can optionally enable image security enforcement.
5.6.2 Red Hat OpenShift on IBM Cloud does not annotate all pods with seccomp profiles.
5.6.3 Red Hat OpenShift on IBM Cloud deploys some system components that do not set a pod or container securityContext.