Description
Enable the API server’s RBAC authorizer if your cluster uses roles and bindings to manage users and service accounts.
Potential impact
If RBAC is disabled or another authorizer grants access, callers may reach resources you intended to restrict through roles.
Remediation
Select RBAC in --authorization-mode or, on a version that supports it, in AuthorizationConfiguration. Prepare roles and bindings for the required actions and resources. Check other authorizers for broader grants.
Examples
The excerpts show Kubernetes 1.34 API server arguments. Configure node authentication, roles and bindings separately.
Before
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: registry.k8s.io/kube-apiserver:v1.34.0
command: ["kube-apiserver"]
args: ["--authorization-mode=AlwaysAllow"]
After
apiVersion: v1
kind: Pod
metadata:
name: command-demo
spec:
containers:
- name: command-demo-container
image: registry.k8s.io/kube-apiserver:v1.34.0
command: ["kube-apiserver"]
args: ["--authorization-mode=RBAC,Node"]
The second excerpt replaces AlwaysAllow with RBAC,Node. Test that an intended user or service account can perform the required actions and is denied unrelated ones.