自测指南 - v2.2
#
CIS Kubernetes Benchmark 1.4.1 - Rancher 2.2 - Kubernetes 1.13#
概述本文档是对 Rancher v2.2 安全加固指南的补充。加固指南提供了用于加固 Rancher 的生产环境集群的指南,该基准自测指南旨在帮助您针对安全基准中的每个控制,来评估加固集群的安全级别。本指南将逐步介绍各种控制,并提供更新的示例命令以审核 Rancher 创建的集群中的合规性。此文档的适用人群是:Rancher 运维人员、安全团队、审核员和决策者。
加固指南旨在与特定版本的安全加固指南,CIS Kubernetes Benchmark,Kubernetes 和 Rancher 一起使用:
自测指南版本 | Rancher 版本 | 安全加固指南版本 | Kubernetes 版本 | CIS Benchmark 版本 |
---|---|---|---|---|
自测指南 v2.2 | Rancher v2.2.x | 安全加固指南 v2.2 | Kubernetes v1.13 | Benchmark v1.4.1 |
由于 Rancher 和 RKE 以容器的方式安装 Kubernetes,因此 CIS Kubernetes Benchmark 中的许多控制验证检查均不适用,完成 CIS 扫描后,这些检测对应的结论是Not Applicable
(不适用)。
有关每个审核的更多详细信息,包括测试失败的原因和补救措施,您可以参考 CIS Kubernetes Benchmark v1.4.1 的相应部分。登录CISecurity.org后,可以下载基准测试。
#
测试控制方法Rancher 和 RKE 通过 Docker 容器安装 Kubernetes 服务。配置在初始化时通过给容器传递参数的方式设置,而不是通过配置文件定义。
如果控制审核与原始 CIS 基准不同,则会使用 Rancher Labs 特定的审核命令进行测试。执行测试时,您将需要访问所有三个 RKE 角色的主机上的 Docker 命令行。这些命令还利用了jq和kubectl(使用有效的 kubeconfig 文件)来测试和评估测试结果。
#
已知的失败的计分测试Rancher 目前无法通过以下计分测试,Rancher Labs 会通过发布版本升级来解决这些问题。
- 1.1.21 - Ensure that the
--kubelet-certificate-authority
argument is set as appropriate (Scored) - 1.4.11 - Ensure that the etcd data directory permissions are set to
700
or more-restrictive (Scored) - 1.4.12 - Ensure that the etcd data directory ownership is set to
etcd:etcd
(Scored) - 2.1.8 - Ensure that the
--hostname-override
argument is not set (Scored)
#
1 - Master Node Security Configuration#
1.1 - API Server--anonymous-auth
argument is set to false
(Scored)#
1.1.1 - Ensure that the Audit
Returned Value: --anonymous-auth=false
Result: Pass
--basic-auth-file
argument is not set (Scored)#
1.1.2 - Ensure that the Audit
Returned Value: null
Result: Pass
--insecure-allow-any-token
argument is not set (Scored)#
1.1.3 - Ensure that the Audit
Returned Value: null
Result: Pass
--kubelet-https
argument is set to true
(Scored)#
1.1.4 - Ensure that the Audit
Returned Value: null
Result: Pass
--insecure-bind-address
argument is not set (Scored)#
1.1.5 - Ensure that the Notes
Flag not set or --insecure-bind-address=127.0.0.1
. RKE sets this flag to --insecure-bind-address=127.0.0.1
Audit
Returned Value: null
Result: Pass
--insecure-port argument
is set to 0
(Scored)#
1.1.6 - Ensure that the Audit
Returned Value: --insecure-port=0
Result: Pass
--secure-port
argument is not set to 0
(Scored)#
1.1.7 - Ensure that the Audit
Returned Value: --secure-port=6443
Result: Pass
--profiling
argument is set to false
(Scored)#
1.1.8 - Ensure that the Audit
Returned Value: --profiling=false
Result: Pass
--repair-malformed-updates
argument is set to false
(Scored)#
1.1.9 - Ensure that the Note: This deprecated flag was removed in 1.14, so it cannot be set.
Result: Pass
AlwaysAdmit
is not set (Scored)#
1.1.10 - Ensure that the admission control plugin Audit
Returned Value: null
Result: Pass
AlwaysPullImages
is set (Scored)#
1.1.11 - Ensure that the admission control plugin Audit
Returned Value: AlwaysPullImages
Result: Pass
DenyEscalatingExec
is set (Scored)#
1.1.12 - Ensure that the admission control plugin Audit
Returned Value: DenyEscalatingExec
Result: Pass
SecurityContextDeny
is set (Not Scored)#
1.1.13 - Ensure that the admission control plugin Notes
This SHOULD NOT be set if you are using a PodSecurityPolicy
(PSP). From the CIS Benchmark document:
This admission controller should only be used where Pod Security Policies cannot be used on the cluster, as it can interact poorly with certain Pod Security Policies
Several system services (such as nginx-ingress
) utilize SecurityContext
to switch users and assign capabilities. These exceptions to the general principle of not allowing privilege or capabilities can be managed with PSP.
Audit
Returned Value: null
Result: Document
NamespaceLifecycle
is set (Scored)#
1.1.14 - Ensure that the admission control plugin Audit
Returned Value: NamespaceLifecycle
Result: Pass
--audit-log-path
argument is set as appropriate (Scored)#
1.1.15 - Ensure that the Notes
This path is the path inside of the container. It's combined with the RKE cluster.yml
extra-binds:
option to map the audit log to the host filesystem.
Audit logs should be collected and shipped off-system to guarantee their integrity.
Audit
Returned Value: --audit-log-log=/var/log/kube-audit/audit-log.json
Result: Pass
--audit-log-maxage
argument is set to 30
or as appropriate (Scored)#
1.1.16 - Ensure that the Notes
Audit logs should be collected and shipped off-system to guarantee their integrity. Rancher Labs recommends setting this argument to a low value to prevent audit logs from filling the local disk.
Audit
Returned Value: --audit-log-maxage=5
Result: Pass
--audit-log-maxbackup
argument is set to 10
or as appropriate (Scored)#
1.1.17 - Ensure that the Notes
Audit logs should be collected and shipped off-system to guarantee their integrity. Rancher Labs recommends setting this argument to a low value to prevent audit logs from filling the local disk.
Audit
Returned Value: --audit-log-maxbackup=5
Result: Pass
--audit-log-maxsize
argument is set to 100
or as appropriate (Scored)#
1.1.18 - Ensure that the Notes
Audit logs should be collected and shipped off-system to guarantee their integrity.
Audit
Returned Value: --audit-log-maxsize=100
Result: Pass
--authorization-mode
argument is not set to AlwaysAllow
(Scored)#
1.1.19 - Ensure that the Audit
Returned Value: --authorization-mode=Node,RBAC
Result: Pass
--token-auth-file
parameter is not set (Scored)#
1.1.20 - Ensure that the Audit
Returned Value: null
Result: Pass
--kubelet-certificate-authority
argument is set as appropriate (Scored)#
1.1.21 - Ensure that the Notes
RKE is using the kubelet's ability to automatically create self-signed certs. No CA cert is saved to verify the communication between kube-apiserver
and kubelet
.
Mitigation
Make sure nodes with role:controlplane
are on the same local network as your nodes with role:worker
. Use network ACLs to restrict connections to the kubelet port (10250/tcp) on worker nodes, only permitting it from controlplane nodes.
Audit
Returned Value: none
Result: Fail (See Mitigation)
--kubelet-client-certificate
and --kubelet-client-key
arguments are set as appropriate (Scored)#
1.1.22 - Ensure that the Audit (--kubelet-client-certificate
)
Returned Value: --kubelet-client-certificate=/etc/kubernetes/ssl/kube-apiserver.pem
Audit (--kubelet-client-key
)
Returned Value: --kubelet-client-key=/etc/kubernetes/ssl/kube-apiserver-key.pem
Result: Pass
--service-account-lookup
argument is set to true
(Scored)#
1.1.23 Ensure that the Audit
Returned Value: --service-account-lookup=true
Result: Pass
PodSecurityPolicy
is set (Scored)#
1.1.24 - Ensure that the admission control plugin Audit
Returned Value: PodSecurityPolicy
Result: Pass
--service-account-key-file
argument is set as appropriate (Scored)#
1.1.25 - Ensure that the Audit
Returned Value: --service-account-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem
Result: Pass
--etcd-certfile
and --etcd-keyfile
arguments are set as appropriate (Scored)#
1.1.26 - Ensure that the Audit (--etcd-certfile
)
Returned Value: --etcd-certfile=/etc/kubernetes/ssl/kube-node.pem
Audit (--etcd-keyfile
)
Returned Value: --etcd-keyfile=/etc/kubernetes/ssl/kube-node-key.pem
Result: Pass
ServiceAccount
is set (Scored)#
1.1.27 - Ensure that the admission control plugin Audit
Returned Value: ServiceAccount
Result: Pass
--tls-cert-file
and --tls-private-key-file
arguments are set as appropriate (Scored)#
1.1.28 - Ensure that the Audit (--tls-cert-file
)
Returned Value: --tls-cert-file=/etc/kubernetes/ssl/kube-apiserver.pem
Audit (--tls-key-file
)
Returned Value: --tls-private-key-file=/etc/kubernetes/ssl/kube-apiserver-key.pem
Result: Pass
--client-ca-file
argument is set as appropriate (Scored)#
1.1.29 - Ensure that the Audit
Returned Value: --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem
Result: Pass
#
1.1.30 - Ensure that the API Server only makes use of strong cryptographic ciphers (Not Scored)Audit (Allowed Ciphers)
Returned Value: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
Returned Value: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Returned Value: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
Returned Value: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Returned Value: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
Returned Value: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
Returned Value: TLS_RSA_WITH_AES_256_GCM_SHA384
Returned Value: TLS_RSA_WITH_AES_128_GCM_SHA256
Audit (Disallowed Ciphers)
Returned Value: null
Returned Value: null
Result: Pass
--etcd-cafile
argument is set as appropriate (Scored)#
1.1.31 - Ensure that the Audit
Returned Value: --etcd-cafile=/etc/kubernetes/ssl/kube-ca.pem
Result: Pass
--authorization-mode
argument includes Node (Scored)#
1.1.32 - Ensure that the Audit
Returned Value: --authorization-mode=Node,RBAC
Result: Pass
NodeRestriction
is set (Scored)#
1.1.33 - Ensure that the admission control plugin Audit
Returned Value: NodeRestriction
Result: Pass
--experimental-encryption-provider-config
argument is set as appropriate (Scored)#
1.1.34 - Ensure that the Notes
In Kubernetes 1.13.x this flag is --encryption-provider-config
Audit
Returned Value: encryption-provider-config=/opt/kubernetes/encryption.yaml
Result: Pass
#
1.1.35 - Ensure that the encryption provider is set to aescbc (Scored)Notes
Only the first provider in the list is active.
Audit
Returned Value: - aescbc:
Result: Pass
EventRateLimit
is set (Scored)#
1.1.36 - Ensure that the admission control plugin Notes
The EventRateLimit
plugin requires setting the --admission-control-config-file
option and configuring details in the following files:
/opt/kubernetes/admission.yaml
/opt/kubernetes/event.yaml
See Host Configuration for details.
Audit (Admissions plugin)
Returned Value: EventRateLimit
Audit (--admission-control-config-file
)
Returned Value: --admission-control-config-file=/opt/kubernetes/admission.yaml
Result: Pass
#
1.1.37 Ensure that the AdvancedAuditing argument is not set to false (Scored)Notes
AdvancedAuditing=false
should not be set, but --audit-policy-file
should be set and configured. See Host Configuration for a sample audit policy file.
Audit (Feature Gate)
Returned Value: null
Audit (Audit Policy File)
Returned Value: --audit-policy-file=/opt/kubernetes/audit.yaml
Result: Pass
--request-timeout
argument is set as appropriate (Scored)#
1.1.38 Ensure that the Notes
RKE uses the default value of 60s and doesn't set this option. Tuning this value is specific to the environment.
Audit
Returned Value: null
Result: Pass
#
Ensure that the --authorization-mode argument includes RBAC (Scored)Audit
Returned Value: "--authorization-mode=Node,RBAC"
Result: Pass
#
1.2 - Scheduler--profiling
argument is set to false (Scored)#
1.2.1 - Ensure that the Audit
Returned Value: --profiling=false
Result: Pass
--address
argument is set to 127.0.0.1 (Scored)#
1.2.2 - Ensure that the Audit
Returned Value: --address=127.0.0.1
Result: Pass
#
1.3 - Controller Manager--terminated-pod-gc-threshold
argument is set as appropriate (Scored)#
1.3.1 - Ensure that the Audit
Returned Value: --terminated-pod-gc-threshold=1000
Result: Pass
--profiling
argument is set to false (Scored)#
1.3.2 - Ensure that the Audit
Returned Value: --profiling=false
Result: Pass
--use-service-account-credentials
argument is set to true (Scored)#
1.3.3 - Ensure that the Audit
Returned Value: --use-service-account-credentials=true
Result: Pass
--service-account-private-key-file
argument is set as appropriate (Scored)#
1.3.4 - Ensure that the Audit
Returned Value: --service-account-private-key-file=/etc/kubernetes/ssl/kube-service-account-token-key.pem
Result: Pass
--root-ca-file
argument is set as appropriate (Scored)#
1.3.5 - Ensure that the Audit
Returned Value: --root-ca-file=/etc/kubernetes/ssl/kube-ca.pem
Result: Pass
#
1.3.6 - Ensure that the RotateKubeletServerCertificate argument is set to true (Scored)Notes
RKE does not yet support certificate rotation. This feature is due for the 0.1.12 release of RKE.
Audit
Returned Value: RotateKubeletServerCertificate=true
Result: Pass
--address
argument is set to 127.0.0.1 (Scored)#
1.3.7 - Ensure that the Audit
Returned Value: --address=127.0.0.1
Result: Pass
#
1.4 - Configuration Files#
1.4.1 - Ensure that the API server pod specification file permissions are set to 644 or more restrictive (Scored)Notes
RKE doesn't require or maintain a configuration file for kube-apiserver. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
root:root
(Scored)#
1.4.2 - Ensure that the API server pod specification file ownership is set to Notes
RKE doesn't require or maintain a configuration file for kube-apiserver. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
644
or more restrictive (Scored)#
1.4.3 - Ensure that the controller manager pod specification file permissions are set to Notes
RKE doesn't require or maintain a configuration file for kube-controller-manager
. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
root:root
(Scored)#
1.4.4 - Ensure that the controller manager pod specification file ownership is set to Notes
RKE doesn't require or maintain a configuration file for kube-controller-manager
. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
644
or more restrictive (Scored)#
1.4.5 - Ensure that the scheduler pod specification file permissions are set to Notes
RKE doesn't require or maintain a configuration file for kube-scheduler
. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
root:root
(Scored)#
1.4.6 - Ensure that the scheduler pod specification file ownership is set to Notes
RKE doesn't require or maintain a configuration file for kube-scheduler. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
etcd
pod specification file permissions are set to 644
or more restrictive (Scored)#
1.4.7 - Ensure that the Notes
RKE doesn't require or maintain a configuration file for etcd. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
etcd
pod specification file ownership is set to root:root
(Scored)#
1.4.8 - Ensure that the Notes
RKE doesn't require or maintain a configuration file for etcd. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
644
or more restrictive (Not Scored)#
1.4.9 - Ensure that the Container Network Interface file permissions are set to Notes
This is a manual check.
Audit (/var/lib/cni/networks/k8s-pod-network
)
Note This may return a lockfile. Permissions on this file do not need to be as restrictive as the CNI files.
Returned Value:
Audit (/etc/cni/net.d
)
Returned Value:
Result: Pass
root:root
(Not Scored)#
1.4.10 - Ensure that the Container Network Interface file ownership is set to Notes
This is a manual check.
Audit (/var/lib/cni/networks/k8s-pod-network
)
Returned Value:
Audit (/etc/cni/net.d
)
Returned Value:
Result: Pass
#
1.4.11 - Ensure that the etcd data directory permissions are set to 700 or more restrictive (Scored)Notes
Files underneath the data dir have permissions set to 700
Audit
Returned Value: 755
Result: Fail
etcd
data directory ownership is set to etcd:etcd
(Scored)#
1.4.12 - Ensure that the Notes
The etcd
container runs as the root
user. The data directory and files are owned by root
.
Audit
Returned Value: root:root
Result: Fail
admin.conf
are set to 644
or more restrictive (Scored)#
1.4.13 - Ensure that the file permissions for Notes
RKE does not store the kubernetes default kubeconfig credentials file on the nodes. It's presented to user where RKE is run. We recommend that this kube_config_cluster.yml file be kept in secure store.
Result: Pass (Not Applicable)
admin.conf
is set to root:root
(Scored)#
1.4.14 - Ensure that ownership of Notes
RKE does not store the default kubectl
config credentials file on the nodes. It presents credentials to the user when rke
is first run, and only on the device where the user ran the command. Rancher Labs recommends that this kube_config_cluster.yml
file be kept in secure store.
Result: Pass (Not Applicable)
scheduler.conf
are set to 644
or more restrictive (Scored)#
1.4.15 - Ensure that the file permissions for Audit
Returned Value: 644
Result: Pass
scheduler.conf
is set to root:root
(Scored)#
1.4.16 - Ensure that the file ownership of Audit
Returned Value: root:root
Result: Pass
controller-manager.conf
are set to 644
or more restrictive (Scored)#
1.4.17 - Ensure that the file permissions for Audit
Returned Value: 644
Result: Pass
controller-manager.conf
is set to root:root
(Scored)#
1.4.18 - Ensure that the file ownership of Audit
Returned Value: root:root
Result: Pass
#
1.4.19 - Ensure that the Kubernetes PKI directory and file ownership is set to root:root (Scored)Audit
Returned Value:
Result: Pass
644
or more restrictive (Scored)#
1.4.20 - Ensure that the Kubernetes PKI certificate file permissions are set to Audit
Returned Value:
Result: Pass
#
1.4.21 - Ensure that the Kubernetes PKI key file permissions are set to 600 (Scored)Audit
Returned Value:
Result: Pass
#
1.5 - etcd--cert-file
and --key-file
arguments are set as appropriate (Scored)#
1.5.1 - Ensure that the Audit (--cert-file
)
Note Certificate file name may vary slightly, since it contains the IP of the etcd container.
Returned Value: --cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-24-134.pem
Audit (--key-file
)
Note Key file name may vary slightly, since it contains the IP of the etcd container.
Returned Value: --key-file=/etc/kubernetes/ssl/kube-etcd-172-31-24-134-key.pem
Result: Pass
--client-cert-auth
argument is set to true
(Scored)#
1.5.2 - Ensure that the Notes
Setting "--client-cert-auth" is the equivalent of setting "--client-cert-auth=true".
Audit
Returned Value: --client-cert-auth
Result: Pass
--auto-tls
argument is not set to true
(Scored)#
1.5.3 - Ensure that the Audit
Returned Value: null
Result: Pass
--peer-cert-file
and --peer-key-file
arguments are set as appropriate (Scored)#
1.5.4 - Ensure that the Audit (--peer-cert-file
)
Note Certificate file name may vary slightly, since it contains the IP of the etcd container.
Returned Value: --peer-cert-file=/etc/kubernetes/ssl/kube-etcd-172-31-22-135.pem
Audit (--peer-key-file
)
Note Key file name may vary slightly, since it contains the IP of the etcd container.
Returned Value: --peer-key-file=/etc/kubernetes/ssl/kube-etcd-172-31-22-135-key.pem
Result: Pass
--peer-client-cert-auth
argument is set to true
(Scored)#
1.5.5 - Ensure that the Notes
Setting --peer-client-cert-auth
is the equivalent of setting --peer-client-cert-auth=true
.
Audit
Returned Value: --peer-client-cert-auth
Result: Pass
--peer-auto-tls
argument is not set to true
(Scored)#
1.5.6 - Ensure that the Audit
Returned Value: null
Result: Pass
etcd
(Not Scored)#
1.5.7 - Ensure that a unique Certificate Authority is used for Mitigation
RKE supports connecting to an external etcd cluster. This external cluster could be configured with its own discreet CA.
Notes
--trusted-ca-file
is set and different from the --client-ca-file
used by kube-apiserver
.
Audit
Returned Value: null
Result: Pass (See Mitigation)
#
1.6 - General Security PrimitivesThese "Not Scored" controls are implementation best practices. To ease the administrative burden, we recommend that you implement these best practices on your workload clusters by creating clusters with Rancher rather than using RKE alone.
#
1.6.1 - Ensure that the cluster-admin role is only used where required (Not Scored)Rancher has built in support for maintaining and enforcing Kubernetes RBAC on your workload clusters.
Rancher has the ability integrate with external authentication sources (LDAP, SAML, AD…) allows easy access with unique credentials to your existing users or groups.
#
1.6.2 - Create administrative boundaries between resources using namespaces (Not Scored)With Rancher, users or groups can be assigned access to all clusters, a single cluster or a "Project" (a group of one or more namespaces in a cluster). This allows granular access control to cluster resources.
#
1.6.3 - Create network segmentation using Network Policies (Not Scored)Rancher can (optionally) automatically create Network Policies to isolate "Projects" (a group of one or more namespaces) in a cluster.
See "Cluster Options" when creating a cluster with Rancher to turn on Network Isolation.
seccomp
profile is set to docker/default
in your pod definitions (Not Scored)#
1.6.4 - Ensure that the Since this requires the enabling of AllAlpha feature gates we would not recommend enabling this feature at the moment.
#
1.6.5 - Apply security context to your pods and containers (Not Scored)This practice does go against control 1.1.13, but we prefer using a PodSecurityPolicy and allowing security context to be set over a blanket deny.
Rancher allows users to set various Security Context options when launching pods via the GUI interface.
ImagePolicyWebhook
admission controller (Not Scored)#
1.6.6 - Configure image provenance using the Image Policy Webhook requires a 3rd party service to enforce policy. This can be configured in the --admission-control-config-file
. See the Host configuration section for the admission.yaml file.
#
1.6.7 - Configure network policies as appropriate (Not Scored)Rancher can (optionally) automatically create Network Policies to isolate projects (a group of one or more namespaces) within a cluster.
See the Cluster Options section when creating a cluster with Rancher to turn on network isolation.
#
1.6.8 - Place compensating controls in the form of PodSecurityPolicy (PSP) and RBAC for privileged container usage (Not Scored)Section 1.7 of this guide shows how to add and configure a default "restricted" PSP based on controls.
With Rancher you can create a centrally maintained "restricted" PSP and deploy it to all of the clusters that Rancher manages.
#
1.7 - Pod Security Policies (PSP)This RKE configuration has two Pod Security Policies.
default-psp
: assigned to namespaces that require additional privileged access:kube-system
,ingress-nginx
andcattle-system
.restricted
: This is the cluster default PSP and follows the best practices defined by controls in this section.
#
1.7.1 - Do not admit privileged containers (Not Scored)Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
#
1.7.2 - Do not admit containers wishing to share the host process ID namespace (Scored)Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
#
1.7.3 - Do not admit containers wishing to share the host IPC namespace (Scored)Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
#
1.7.4 - Do not admit containers wishing to share the host network namespace (Scored)Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
allowPrivilegeEscalation
(Scored)#
1.7.5 - Do not admit containers with Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
root
(Not Scored)#
1.7.6 - Do not admit containers whose processes run as Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: null
Result: Pass
#
1.7.7 - Do not admit containers with dangerous capabilities (Not Scored)Notes
The restricted PodSecurityPolicy is available to all ServiceAccounts.
Audit
Returned Value: [NET_RAW]
Result: Pass
#
2 - Worker Node Security Configuration#
2.1 - Kubelet--anonymous-auth
argument is set to false
(Scored)#
2.1.1 - Ensure that the Audit
Returned Value: --anonymous-auth=false
Result: Pass
--authorization-mode
argument is not set to AlwaysAllow
(Scored)#
2.1.2 - Ensure that the Audit
Returned Value: --authorization-mode=Webhook
Result: Pass
--client-ca-file
argument is set as appropriate (Scored)#
2.1.3 - Ensure that the Audit
Returned Value: --client-ca-file=/etc/kubernetes/ssl/kube-ca.pem
Result: Pass
--read-only-port
argument is set to 0
(Scored)#
2.1.4 - Ensure that the Audit
Returned Value: --read-only-port=0
Result: Pass
--streaming-connection-idle-timeout
argument is not set to 0
(Scored)#
2.1.5 - Ensure that the Audit
Returned Value: --streaming-connection-idle-timeout=1800s
Result: Pass
--protect-kernel-defaults
argument is set to true
(Scored)#
2.1.6 - Ensure that the Audit
Returned Value: --protect-kernel-defaults=true
Result: Pass
--make-iptables-util-chains
argument is set to true
(Scored)#
2.1.7 - Ensure that the Audit
Returned Value: --make-iptables-util-chains=true
Result: Pass
--hostname-override
argument is not set (Scored)#
2.1.8 - Ensure that the Notes This is used by most cloud providers. Not setting this is not practical in most cases.
Audit
Returned Value: --hostname-override=<ipv4 address>
Result: Fail
--event-qps
argument is set to 0
(Scored)#
2.1.9 - Ensure that the Audit
Returned Value: --event-qps=0
Result: Pass
--tls-cert-file
and --tls-private-key-file
arguments are set as appropriate (Scored)#
2.1.10 - Ensure that the Notes
RKE does not set these options and uses the kubelet's self generated certificates for TLS communication. These files are located in the default directory (/var/lib/kubelet/pki
).
Audit (--tls-cert-file
)
Returned Value: null
Audit (--tls-private-key-file
)
Returned Value: null
Result: Pass
--cadvisor-port
argument is set to 0
(Scored)#
2.1.11 - Ensure that the Audit
Returned Value: null
Result: Pass
--rotate-certificates
argument is not set to false
(Scored)#
2.1.12 - Ensure that the Notes
RKE handles certificate rotation through an external process.
Audit
Returned Value: null
Result: Pass (Not Applicable)
RotateKubeletServerCertificate
argument is set to true
(Scored)#
2.1.13 - Ensure that the Audit
Returned Value: RotateKubeletServerCertificate=true
Result: Pass
#
2.1.14 - Ensure that the kubelet only makes use of strong cryptographic ciphers (Not Scored)Audit (Allowed Ciphers)
Returned Value: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
Audit
Returned Value: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
Audit
Returned Value: TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305
Audit
Returned Value: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Audit
Returned Value: TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305
Audit
Returned Value: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
Audit
Returned Value: TLS_RSA_WITH_AES_256_GCM_SHA384
Audit
Returned Value: TLS_RSA_WITH_AES_128_GCM_SHA256
Audit (Disallowed Ciphers)
Returned Value: null
Audit
Returned Value: null
Result: Pass
#
2.2 - Configuration Fileskubelet.conf
are set to 644
or more restrictive (Scored)#
2.2.1 - Ensure that the permissions for Notes
This is the value of the --kubeconfig
option.
Audit
Returned Value: 644
Result: Pass
#
2.2.2 - Ensure that the kubelet.conf file ownership is set to root:root (Scored)Notes
This is the value of the --kubeconfig
option.
Audit
Returned Value: root:root
Result: Pass
644
or more restrictive (Scored)#
2.2.3 - Ensure that the kubelet service file permissions are set to Notes
RKE doesn't require or maintain a configuration file for kubelet. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
root:root
(Scored)#
2.2.4 - Ensure that the kubelet service file ownership is set to Notes
RKE doesn't require or maintain a configuration file for kubelet. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
644
or more restrictive (Scored)#
2.2.5 - Ensure that the proxy kubeconfig file permissions are set to Audit
Returned Value: 644
Result: Pass
root:root
(Scored)#
2.2.6 - Ensure that the proxy kubeconfig file ownership is set to Audit
Returned Value: root:root
Result: Pass
644
or more restrictive (Scored)#
2.2.7 - Ensure that the certificate authorities file permissions are set to Audit
Returned Value: 644
Result: Pass
root:root
(Scored)#
2.2.8 - Ensure that the client certificate authorities file ownership is set to Audit
Returned Value: root:root
Result: Pass
root:root
(Scored)#
2.2.9 - Ensure that the kubelet configuration file ownership is set to Notes
RKE doesn't require or maintain a configuration file for kubelet. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)
644
or more restrictive (Scored)#
2.2.10 - Ensure that the kubelet configuration file permissions are set to Notes
RKE doesn't require or maintain a configuration file for kubelet. All configuration is passed in as arguments at container run time.
Result: Pass (Not Applicable)