Skip to main content

system:public-info-viewer: One Binding, Two Trust Levels

High severityKubernetes About 20 minutes to fixGenerated 28 Jul 2026

Overview

The system:public-info-viewer ClusterRoleBinding, an API server bootstrap default, lists both system:authenticated and system:unauthenticated as subjects of one ClusterRole, so any rule added to that role for monitoring or discovery tooling becomes reachable without credentials.

At a glance

Symptom
A rule added to the bound ClusterRole for observability or discovery tooling becomes reachable by unauthenticated requests via the system:unauthenticated subject.
Likely cause
system:public-info-viewer ClusterRoleBinding lists both system:authenticated and system:unauthenticated as subjects against one shared ClusterRole.
Impact
Anonymous requests to the API server gain whatever permissions were added to the shared ClusterRole, with no distinct audit signal separating them from routine anonymous health-check traffic.
Verification signal
Re-run the detection test and a controlled negative-path test.
Safe correction
Split the default binding, remove the system:unauthenticated subject, and gate any new nonResourceURLs rules behind a dedicated authenticated-only ClusterRole.
Rollback or recovery
Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

The Trap

Extending the ClusterRole behind the default system:public-info-viewer ClusterRoleBinding, not realising that binding’s subject list already includes Group system:unauthenticated alongside Group system:authenticated.

The Default State

Every RBAC-enabled cluster ships (as an API server bootstrap default) a ClusterRoleBinding named system:public-info-viewer that binds the ClusterRole of the same name to two group subjects at once: system:authenticated and system:unauthenticated. Out of the box that ClusterRole only permits GET on a handful of nonResourceURLs: /healthz, /version, /livez, /readyz (plus /version/), with no subpath wildcard. Platform teams later run kubectl edit clusterrole system:public-info-viewer, or apply a Helm chart that patches it, to expose additional discovery endpoints for monitoring agents, assuming the change is scoped to logged-in identities only. It is not; the rule set attaches to the ClusterRole, and the ClusterRole is bound to both groups simultaneously.

The Blast Radius

Once a new rule lands on that ClusterRole, granting GET on nonResourceURLs such as /metrics, /debug/pprof/*, or a custom aggregated discovery path, the endpoint becomes reachable by curl https://<apiserver>:6443/metrics with no Authorization header and no client certificate at all. With --anonymous-auth left at its default of true on most kubeadm and managed control planes, the unauthenticated request is authenticated internally as user system:anonymous, placed in group system:unauthenticated, and matches the shared binding cleanly. The authorization decision is a legitimate allow, so there is no denied-request audit entry to alert on; the request appears in logs as routine anonymous traffic hitting a health endpoint. Exposed data typically includes API server metrics revealing resource types, object counts and request patterns, build version strings useful for CVE targeting, or profiling output from pprof revealing goroutine stacks and memory layout.

The Lead Mechanic Fix

Run kubectl get clusterrolebinding system:public-info-viewer -o yaml before touching the associated ClusterRole. Never extend the shared role, and remove any rule already added to it (start-up reconciliation only adds missing permissions, it never removes extras). Do not strip the anonymous subject: kubeadm’s API server liveness, readiness and startup probes call /livez and /readyz without credentials and would fail, and the API server re-adds missing default subjects at every start unless rbac.authorization.kubernetes.io/autoupdate is set to false. For any additional discovery or metrics rule, create a dedicated ClusterRole and ClusterRoleBinding scoped only to Group system:authenticated or a named service account, never append to the default binding. Setting --anonymous-auth=false breaks those same probes; where supported, limit anonymous access to the health paths with the authentication configuration’s anonymous.conditions instead. Reconcile drift periodically with kubectl auth reconcile -f locked-rbac.yaml --remove-extra-permissions --remove-extra-subjects.

3

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

kubectl get clusterrolebinding system:public-info-viewer -o yaml
/livez
/readyz
4

Verify, roll back or escalate

Verify

Re-run the detection test and a controlled negative-path test. Confirm the unsafe behaviour is blocked while approved traffic still succeeds.

Rollback

Restore the exported configuration if the new control blocks required production traffic, then narrow the policy before redeployment.

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

The KBY Brief

Fixed? Get the next one before it hits you: The KBY Brief

Practical fixes for the systems you run, by email about twice a week. Unsubscribe at any time.

About this page

Credited to

Dates

Published

Last updated

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

system:public-info-viewer: One Binding, Two Trust Levels