Finding ID | Version | Rule ID | IA Controls | Severity |
---|---|---|---|---|
V-242392 | CNTR-K8-000380 | SV-242392r879530_rule | High |
Description |
---|
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". |
STIG | Date |
---|---|
Kubernetes Security Technical Implementation Guide | 2023-02-27 |
Check Text ( C-45667r863779_chk ) |
---|
Run the following command on each Worker Node: ps -ef | grep kubelet Verify that the --authorization-mode exists and is set to "Webhook". If the --authorization-mode argument exists and is not set to "Webhook", this is a finding. If the --authorization-mode does not exist, check the Control Plane Kubelet config file: On the Kubernetes Control Plane, run the command: ps -ef | grep kubelet Check the config file (path identified by: --config). Verify authorization: mode. If this is not set to "Webhook", this is a finding. If "--authorization-mode=Webhook" argument does not exist on the worker nodes or "authorization: mode=Webhook" does not exist on the Control Plane, this is a finding. |
Fix Text (F-45625r863780_fix) |
---|
Edit the Kubernetes Kubelet file in the --config directory on the Kubernetes Control Plane: Set the argument "authorization: mode=Webhook" If using worker node arguments, edit the kubelet service file identified in the --config directory: On each Worker Node: set the parameter in KUBELET_SYSTEM_PODS_ARGS variable to "--authorization-mode=Webhook". Reset Kubelet service using the following command: service kubelet restart |