More Info:
The special group system:masters should not be used to grant permissions to any user or service account, except where strictly necessary (e.g. bootstrapping access prior to RBAC being fully available)Risk Level
HighAddress
SecurityCompliance Standards
- CIS Kubernetes
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all subjects currently bound to
system:masters- On any machine with kubectl access:
- Identify any
ClusterRoleBindingwhere:.roleRef.nameiscluster-admin, and/or- Any subject has
kind: Userorkind: Groupwithname: system:masters.
- On any machine with kubectl access:
-
Inventory which concrete identities rely on
system:masters- For each binding referencing
system:masters(either asroleRef==cluster-adminor subject group name), capture full details: - Note which are:
- Human users (e.g., corporate SSO groups, individual user names).
- Service accounts (kind: ServiceAccount).
- External identities mapped to
system:mastersvia authentication (e.g., OIDC, client cert CN/O, cloud IAM).
- For each binding referencing
-
Review necessity of cluster‑wide superuser access for each subject
- For each user/group/service account discovered:
- Determine its actual operational purpose (admin, CI/CD, monitoring, break‑glass, etc.).
- Confirm with owners whether:
- Ongoing
cluster-admin/system:masterslevel access is required, or - Access can be reduced to specific namespaces/verbs/resources, or
- Access is only needed for rare break‑glass scenarios.
- Ongoing
- For each user/group/service account discovered:
-
Design replacement RBAC where full superuser is not strictly required
- For subjects that do not need full
system:masters/cluster-admin:- Identify the minimal
ClusterRole/Role(existing or to be created) that matches required permissions. - Prepare corresponding
RoleBinding/ClusterRoleBindingmanifests that:- Bind the subject to that minimal role.
- Do not reference the
system:mastersgroup and avoid unnecessarycluster-adminusage.
- Save the manifests locally (e.g.
restricted-access-<subject>.yaml) for change review/approval.
- Identify the minimal
- For subjects that do not need full
-
Apply reduced‑privilege bindings, then remove
system:mastersmembership- On any machine with kubectl access, for each subject you have redesigned access for:
- Apply the replacement binding(s):
- Remove the previous binding that relied on
system:masters/cluster-admin(only after confirming new access works in a test):
- For identities mapped to
system:mastersat the auth layer (e.g., client certs with O=system:masters, OIDC groups, cloud IAM bindings), coordinate with the identity/IAM team to:- Stop mapping those identities into
system:masters. - Map them into the new, least‑privilege roles instead.
- Stop mapping those identities into
- Apply the replacement binding(s):
- On any machine with kubectl access, for each subject you have redesigned access for:
-
Verify no users are effectively granted via
system:masters- On any machine with kubectl access, confirm there are no bindings referencing
system:mastersor unintendedcluster-admingrants: - Manually confirm that:
- Any remaining
cluster-adminbinding is strictly necessary (e.g., a controlled break‑glass account). - No regular user, group, or service account is granted access via
system:masters.
- Any remaining
- On any machine with kubectl access, confirm there are no bindings referencing
Using kubectl
Using kubectl
- Any ClusterRoleBinding that:
- Has
roleRef.name: cluster-adminand a subject withname: system:masters, or - Has any subject with
kind: Groupandname: system:masters, means membership insystem:mastersgives full admin access.
- Has
subjectsentries like:kind: Groupwithname: system:masters- Any identity provider group (e.g. from OIDC) that you know is mapped to
system:masters
roleRefwithname: cluster-adminor any highly privileged role.
system:masters is present in subjects, or if you know an external group is mapped to system:masters, that binding is high risk and needs human review.- Any RoleBinding where a subject has
kind: Groupandname: system:mastersis using this special group to grant namespace-scoped access and should be reviewed. Even if the Role is notcluster-admin, those subjects also inherit any cluster-wide privileges ofsystem:masters.
- Any user identity that you know (from your IdP, certificates, or API server auth config) is mapped into the
system:mastersgroup is a candidate for review. kubectl cannot see that mapping; you must correlate with your authentication setup.
system:masters group. If it still returns any names, those bindings still need human review and a decision on whether to keep or change them.Automation
Automation
- A definite problem for this specific control is any line in sections 1 or 2 where:
KIND=GroupandNAME=system:masters
- These bindings should be reviewed and, if not strictly required, updated to remove the
system:mastersgroup subject.

