CNTR-K8-000380 - The Kubernetes kubelet must enable explicit authorization.

Information

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'.

Solution

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

See Also

https://dl.dod.cyber.mil/wp-content/uploads/stigs/zip/U_Kubernetes_V2R1_STIG.zip

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-3, CAT|I, CCI|CCI-000213, Rule-ID|SV-242392r960792_rule, STIG-ID|CNTR-K8-000380, Vuln-ID|V-242392

Plugin: Unix

Control ID: 10765d056b93d44c351a5ae51f9abe5213bfbf291542d69765c515b28bb323a8