More Info:
Verifies no (Cluster)RoleBinding targets system:anonymous or system:unauthenticated. Such bindings grant access to unauthenticated callers.Risk Level
CriticalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all RoleBindings and ClusterRoleBindings that reference
system:anonymousorsystem:unauthenticated(run on any machine with kubectl access): -
For each violating binding you plan to remove, inspect it to understand what access it grants and whether an authenticated subject (e.g., specific user/group/service account) should replace it (run on any machine with kubectl access). Example for a namespaced RoleBinding:
Example for a ClusterRoleBinding:
-
If you decide the binding is not required, delete the offending RoleBinding or ClusterRoleBinding (run on any machine with kubectl access). Example for a namespaced RoleBinding:
Example for a ClusterRoleBinding:
-
If equivalent access is still needed, create or update a binding that grants the same Role/ClusterRole only to authenticated subjects (run on any machine with kubectl access). For example, to bind a ClusterRole to a specific group instead of
system:unauthenticated: -
Repeat steps 2–4 until all RoleBindings and ClusterRoleBindings that reference
system:anonymousorsystem:unauthenticatedhave been deleted or appropriately replaced. -
Verify compliance (run on any machine with kubectl access):
The output should be:
Using kubectl
Using kubectl
On any machine with kubectl access:Example:Example:Apply it:
- Identify violating RoleBindings / ClusterRoleBindings
- For each violating RoleBinding, delete it
- Namespaced RoleBinding (replace
<namespace>and<name>):
- For each violating ClusterRoleBinding, delete it
- Cluster-wide ClusterRoleBinding (replace
<name>):
- Re-apply any required access using authenticated subjects only (optional, declarative)
rb-authenticated-only.yaml) with safe subjects, then apply:- Verification (must return
is_compliant=true)
Automation
Automation

