Check provider logo

API server pod does not use the AlwaysAllow authorization mode

apiserver_auth_mode_not_always_allow

Severitycritical
Serviceapiserver
by Prowler

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.

Run this check with Prowler CLI

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

Other
  1. SSH to the control plane node
  2. Edit the API server static pod manifest: /etc/kubernetes/manifests/kube-apiserver.yaml
  3. In the kube-apiserver container args, set the authorization mode (add or replace if present):
    - --authorization-mode=RBAC
    
  4. Save the file; the kubelet will automatically restart the API server with the updated setting

Source Code

Resource Type

Pod

References