Skip to main content

More Info:

Verifies that —authorization-mode does not include AlwaysAllow. AlwaysAllow authorizes every request and effectively disables access control.

Risk Level

Critical

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, back up the API server manifest:
  1. On every control plane node, open the manifest for editing:
  1. In the command: or args: section of the kube-apiserver container, locate any --authorization-mode entry that includes AlwaysAllow and change it to exclude AlwaysAllow, for example:
If --authorization-mode is missing, add a line like the above under the kube-apiserver container args. Save and exit.
Note: editing this file will cause the kube-apiserver static pod to restart automatically.
  1. Wait 30–60 seconds and confirm the kube-apiserver pod is running and ready (from any machine with kubectl access):
  1. On every control plane node, verify the running process no longer uses AlwaysAllow:
  1. In the output, ensure the kube-apiserver command line contains --authorization-mode without AlwaysAllow (for example --authorization-mode=Node,RBAC) and that AlwaysAllow does not appear anywhere in the arguments.
kubectl cannot modify the API server’s static pod manifest or process flags, so this finding cannot be fixed through the Kubernetes API. To remediate, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for detailed guidance.