Skip to content

Commit 2f0d4a5

Browse files
author
Sam Cook
authored
Clarify that list, get and watch can return data
The `get`, `list` and `watch` verbs can all be used to retrieve the full details of a resource. It is not an uncommon assumption amongst users that they return different data (e.g. that `list` only returns the names of resources; when it can return the full object). This adds a caution block to highlight this potential gotcha.
1 parent 3584ae3 commit 2f0d4a5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

content/en/docs/reference/access-authn-authz/authorization.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ PUT | update
7474
PATCH | patch
7575
DELETE | delete (for individual resources), deletecollection (for collections)
7676

77+
{{< caution >}}
78+
The `get`, `list` and `watch` verbs can all return the full details of a resource. In terms of the returned data they are equivalent. For example, `list` on `secrets` will still reveal the `data` attributes of any returned resources.
79+
{{< /caution >}}
80+
7781
Kubernetes sometimes checks authorization for additional permissions using specialized verbs. For example:
7882

7983
* [PodSecurityPolicy](/docs/concepts/security/pod-security-policy/)

0 commit comments

Comments
 (0)