Skip to main content

More Info:

Do not always authorize all requests.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, open the API server static pod manifest for editing:
  2. In the command: section, locate any existing --authorization-mode argument. If it is set to AlwaysAllow (alone or in a list), change it so that AlwaysAllow is not present. For example, replace a line like:
    or
    with:
    (or a combination that does not include AlwaysAllow, such as Node,RBAC if required by your design).
  3. If there is no --authorization-mode line, add one under the other - -- flags in the command: list:
  4. Save and exit the file. The kubelet will automatically detect the manifest change and restart the kube-apiserver static pod; expect a brief control-plane disruption while it restarts.
  5. Wait for the API server pod to become Ready again (from any machine with kubectl access):
  6. Verify on each control plane node that the API server no longer uses AlwaysAllow:
    Confirm the --authorization-mode value(s) shown do not contain AlwaysAllow (e.g., they show RBAC or Node,RBAC).
kubectl cannot modify the kube-apiserver static pod manifest or its process flags. To remediate this finding, you must edit /etc/kubernetes/manifests/kube-apiserver.yaml directly on every control plane node; see the Manual Steps section for the required host-level changes.

Additional Reading: