Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that list, get and watch can return data #34873

Merged
merged 1 commit into from
Jul 9, 2022

Conversation

SamLR
Copy link
Contributor

@SamLR SamLR commented Jul 8, 2022

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.

I'm not certain whether this is the best/only location that this should be called out (another option would be on the various specific authorization pages) but it feels like a reasonable start.

This was prompted by a private discussion and this issue: kubernetes/kubernetes#110866

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.
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 8, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: SamLR / name: Sam Cook (2f0d4a5)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jul 8, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @SamLR!

It looks like this is your first PR to kubernetes/website 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/website has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. language/en Issues or PRs related to English language labels Jul 8, 2022
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jul 8, 2022
@netlify
Copy link

netlify bot commented Jul 8, 2022

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 2f0d4a5
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/62c8047a70fd3f00083e4ba7
😎 Deploy Preview https://deploy-preview-34873--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@tengqm
Copy link
Contributor

tengqm commented Jul 8, 2022

This is an important reminder for new users.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 8, 2022
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: bd719eec81be1512cb8b27dfd1a7a2833b1ec0e2

@sftim
Copy link
Contributor

sftim commented Jul 9, 2022

This is an important reminder for new users.

💯

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2022
@k8s-ci-robot k8s-ci-robot merged commit d05f0ff into kubernetes:main Jul 9, 2022
@mtardy
Copy link
Member

mtardy commented Jul 11, 2022

Just wanted to highlight that this warning is present on the RBAC good practices page https://kubernetes.io/docs/concepts/security/rbac-good-practices/#listing-secrets! :)

@SamLR SamLR deleted the patch-1 branch July 11, 2022 09:38
@SamLR
Copy link
Contributor Author

SamLR commented Jul 11, 2022

Just wanted to highlight that this warning is present on the RBAC good practices page https://kubernetes.io/docs/concepts/security/rbac-good-practices/#listing-secrets! :)

Ah thank you! I don't think I was aware of this page.

@mtardy
Copy link
Member

mtardy commented Jul 11, 2022

No problem, thanks Tim for making the connection: kubernetes/sig-security#28 (comment). By the way, if you want to take a look at the work he was mentioning since it is linked to what you merged here -> security checklist here #33992 😃 .

@sftim
Copy link
Contributor

sftim commented Jul 14, 2022

Relevant to #32564

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants