---
title: "Explain why a Kubernetes named resource grant does not allow an unfiltered list | Proofline"
description: "When a Role restricts access with resourceNames, look for the object name on a get or a matching metadata.name field selector on a list or watch."
url: https://proofline.sh/learn/kubernetes-rbac-resourcenames-list/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# Explain why a Kubernetes named resource grant does not allow an unfiltered list

When a Role restricts access with resourceNames, look for the object name on a get or a matching metadata.name field selector on a list or watch.

Permission errors The Proofline team November 24, 2026 1 min read

Suppose a fictional job may get and list ConfigMap `report-format` in `reports`. Its Role sets `resourceNames: ["report-format"]`, and a named get succeeds. The library's unfiltered list fails. Use the same credential context to check the list with a selector for the approved name.

```
kubectl get configmaps -n reports \
  --field-selector metadata.name=report-format -o name
```

If the job only reads one known ConfigMap, a named get may meet its needs with a narrower verb set. If a list or watch is necessary, inspect the client's actual request to make sure it passes the selector. Removing `resourceNames` from a list rule can reveal every ConfigMap in the namespace. [Kubernetes RBAC resourceNames behavior](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources) · [Kubernetes field selectors](https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/)

[Trace another denied request](/learn/permission-denied-request-triage/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Trace a permission denial to the caller and the policy](/learn/permission-denied-request-triage/)
    
    Permission errors The Proofline team November 24, 2026 3 min read
    
-   ### [Check pods/log when kubectl can read a pod but cannot read its logs](/learn/kubernetes-pods-log-forbidden/)
    
    Permission errors The Proofline team November 24, 2026 1 min read
