Check: CNTR-K8-000380
Kubernetes STIG:
CNTR-K8-000380
(in versions v2 r2 through v1 r10)
Title
The Kubernetes kubelet must enable explicit authorization. (Cat I impact)
Discussion
Kubelet is the primary agent on each node. The API server communicates with each kubelet to perform tasks such as starting/stopping pods. By default, kubelets allow all authenticated requests, even anonymous ones, without requiring any authorization checks from the API server. This default behavior bypasses any authorization controls put in place to limit what users may perform within the Kubernetes cluster. To change this behavior, the default setting of AlwaysAllow for the authorization mode must be set to "Webhook".
Check Content
On each Control Plane and Worker Node, run the command: ps -ef | grep kubelet If the "--authorization-mode" option exists, this is a finding. Note the path to the config file (identified by --config). Inspect the content of the config file: Locate the "authorization" section. If the field "mode" does not exist or is not set to "Webhook", this is a finding.
Fix Text
On each Control Plane and Worker Node, run the command: ps -ef | grep kubelet Remove the "--authorization-mode" option if present. Note the path to the config file (identified by --config). Edit the config file: In the "authorization" section, set "mode" to "Webhook". Restart the kubelet service using the following command: systemctl daemon-reload && systemctl restart kubelet
Additional Identifiers
Rule ID: SV-242392r960792_rule
Vulnerability ID: V-242392
Group Title: SRG-APP-000033-CTR-000095
Expert Comments
CCIs
Number | Definition |
---|---|
CCI-000213 |
Enforce approved authorizations for logical access to information and system resources in accordance with applicable access control policies. |
Controls
Number | Title |
---|---|
AC-3 |
Access Enforcement |