More Info:
Do not always authorize all requests.Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
On every control plane node, open the API server static pod manifest for editing:
-
In the
command:section, locate any existing--authorization-modeargument. If it is set toAlwaysAllow(alone or in a list), change it so thatAlwaysAllowis not present. For example, replace a line like:orwith:(or a combination that does not includeAlwaysAllow, such asNode,RBACif required by your design). -
If there is no
--authorization-modeline, add one under the other- --flags in thecommand:list: -
Save and exit the file. The kubelet will automatically detect the manifest change and restart the
kube-apiserverstatic pod; expect a brief control-plane disruption while it restarts. -
Wait for the API server pod to become Ready again (from any machine with kubectl access):
-
Verify on each control plane node that the API server no longer uses
AlwaysAllow:Confirm the--authorization-modevalue(s) shown do not containAlwaysAllow(e.g., they showRBACorNode,RBAC).
Using kubectl
Using kubectl
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.Automation
Automation

