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

authz: nodes should not be able to delete themselves #62818

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

mikedanese
Copy link
Member

@mikedanese mikedanese commented Apr 18, 2018

@kubernetes/sig-auth-pr-reviews

legacy release note (removed because this was reverted in #63712):

kubelets are no longer allowed to delete their own Node API object. Prior to 1.11, in rare circumstances related to cloudprovider node ID changes, kubelets would attempt to delete/recreate their Node object at startup. If a legacy kubelet encounters this situation, a cluster admin can remove the Node object:
* `kubectl delete node/<nodeName>`
or grant self-deletion permission explicitly:
* `kubectl create clusterrole self-deleting-nodes --verb=delete --resource=nodes`
* `kubectl create clusterrolebinding self-deleting-nodes --clusterrole=self-deleting-nodes --group=system:nodes`
NONE

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/auth Categorizes an issue or PR as relevant to SIG Auth. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 18, 2018
@mikedanese mikedanese force-pushed the selfdelete branch 2 times, most recently from c6a4c21 to c632ba3 Compare April 18, 2018 23:49
@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

TestNodeAuthorizer tests need updating

@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

updated release note, PTAL

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 20, 2018
@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

/retest

@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

cc @kubernetes/sig-node-pr-reviews

@k8s-ci-robot k8s-ci-robot added the sig/node Categorizes an issue or PR as relevant to SIG Node. label Apr 20, 2018
@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

for reference, the node self-deletion case that required this permission was removed in #61877

@mikedanese can you summarize your findings on when that scenario was exercised (which cloudproviders, which circumstances)?

@liggitt
Copy link
Member

liggitt commented Apr 20, 2018

/lgtm
/hold
will hold for comments from @kubernetes/sig-node-pr-reviews

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Apr 20, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, mikedanese

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 Apr 20, 2018
@mikedanese
Copy link
Member Author

/retest

@mikedanese
Copy link
Member Author

can you summarize your findings on when that scenario was exercised (which cloudproviders, which circumstances)?

ExternalID was immutable but we changed the format of the feature between releases for some of the cloud providers. Thus kubelet's had to delete and recreate their node object when it changed. We no longer update that field so nodes don't need the delete permission anymore.

@liggitt
Copy link
Member

liggitt commented Apr 23, 2018

thanks for the explanation. will hold through tomorrow for comments, then tag.

@liggitt
Copy link
Member

liggitt commented Apr 24, 2018

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 24, 2018
@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 62590, 62818, 63015, 62922, 63000). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 15b61bc into kubernetes:master Apr 24, 2018
@mikedanese mikedanese deleted the selfdelete branch April 24, 2018 21:24
@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 11, 2018
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/node Categorizes an issue or PR as relevant to SIG Node. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants