Kubernetes API server authorization is evaluated via the --authorization-mode setting to detect any use of AlwaysAllow. The focus is whether policy-driven authorizers are configured instead of an allow-all mode.
Risk
AlwaysAllow permits all API requests, eroding confidentiality (secrets readable), integrity (privilege escalation, role changes, config edits), and availability (object deletion, cluster disruption). Enables rapid cluster takeover and data exfiltration.
prowler kubernetes --checks apiserver_auth_mode_not_always_allow
Recommendation
Use policy-based authorization and avoid AlwaysAllow. Prefer RBAC with Node (and Webhook if needed) to enforce least privilege and separation of duties. Define granular roles, avoid broad bindings like cluster-admin, and audit access for defense in depth.
Remediation
- SSH to the control plane node
- Edit the API server static pod manifest: /etc/kubernetes/manifests/kube-apiserver.yaml
- In the kube-apiserver container args, set the authorization mode (add or replace if present):
- --authorization-mode=RBAC - Save the file; the kubelet will automatically restart the API server with the updated setting
Source Code
Resource Type
Pod