Skip to main content

More Info:

Setting the kubelet authorization mode to AlwaysAllow permits every authenticated request without checking permissions. Use Webhook mode so requests are authorized against the API server.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS EKS

Triage and Remediation

Remediation

Manual Steps

  1. On every worker node, confirm how kubelet is configured and where its config file is:
    • If you see --config=/var/lib/kubelet/config.yaml (or another path), note that path.
    • If you instead see flags like --authorization-mode=AlwaysAllow directly, follow step 3 (flag-based config).
  2. If using the kubelet config file (e.g. /var/lib/kubelet/config.yaml), edit it to enable webhook authn/z (YAML form of the benchmark’s JSON example):
    Ensure these sections exist and are set as follows (add or adjust as needed):
    Save the file.
  3. If using executable arguments and you find --authorization-mode=AlwaysAllow or missing webhook options in the systemd drop-in, edit the kubelet args file:
    In the line defining extra args (for example KUBELET_ARGS= or KUBELET_CONFIG_ARGS=), remove any --authorization-mode=AlwaysAllow and ensure the following flags are present:
    Save the file.
  4. Reload systemd configuration and restart kubelet (this will restart the kubelet on this worker node):
  5. Confirm kubelet is healthy on the node:
  6. Verify that kubelet is no longer using AlwaysAllow and that Webhook mode is in use:
    In the output:
    • You should NOT see --authorization-mode=AlwaysAllow.
    • If using flags, you SHOULD see --authorization-mode=Webhook and --authentication-token-webhook.
    • If using a config file only, you should still not see AlwaysAllow, and you have already set authorization.mode: Webhook in /var/lib/kubelet/config.yaml.
kubectl cannot change the kubelet’s --authorization-mode or the contents of /var/lib/kubelet/config.yaml, because these are host-level settings managed on each worker node’s OS and systemd units. To remediate this finding, make the changes directly on every worker node as described in the Manual Steps section.