-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
rbac: add information on unauthenticated discovery roles #10212
rbac: add information on unauthenticated discovery roles #10212
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit c505442 https://deploy-preview-10212--kubernetes-io-master-staging.netlify.com |
@@ -452,6 +452,14 @@ Auto-reconciliation is enabled in Kubernetes version 1.6+ when the RBAC authoriz | |||
|
|||
### Discovery Roles | |||
|
|||
Discovery roles, by default, enable unauthenticated and authenticaed users to read API information that is deemed safe to be publicly accessible. To disable unauthenticated access via these roles add `--anonymous-auth=false` to the API sever configuration or edit the roles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos: authenticated, sever
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be more accurate to say the default bindings authorize all users, and this includes anonymous requests unless the apiserver is started with --anonymous-auth=false (which disables unauthenticated access completely, not just to these roles)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editing the role is not recommended (and will get re-updated automatically on next apiserver start unless you opt out by flipping the reconcile annotation to false). Disabling anonymous requests is more likely the right thing to recommend to someone who wants no access to unauthenticated users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fast review. Great points. PTAL and new updates.
c505442
to
e9b89df
Compare
Deploy preview for kubernetes-io-master-staging ready! Built with commit e9b89df https://deploy-preview-10212--kubernetes-io-master-staging.netlify.com |
Deploy preview for kubernetes-io-master-staging ready! Built with commit 582e192 https://deploy-preview-10212--kubernetes-io-master-staging.netlify.com |
e9b89df
to
21bc495
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question on the links, lgtm
@@ -462,12 +472,12 @@ Auto-reconciliation is enabled in Kubernetes version 1.6+ when the RBAC authoriz | |||
<tr> | |||
<td><b>system:basic-user</b></td> | |||
<td><b>system:authenticated</b> and <b>system:unauthenticated</b> groups</td> | |||
<td>Allows a user read-only access to basic information about themselves.</td> | |||
<td>Allows a user read-only access to basic information about themselves. As of 1.12 that role is [implemented here](https://github.com/kubernetes/kubernetes/blob/c3062bae218928b3ec94fa9bde84ead528604c75/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/policy.go#L211).</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of referencing the implementation? Do we intend to keep that link updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a permalink to the implementation as of 1.12. I don't know how else to show people what "discovery endpoints" means besides this or copy/pasting the URLs.
With my "ops" hat on I need to make a call whether to flip the anonymous auth flag and before I do that I would like to know which APIs are exposed.
I guess we can just say run kubectl get clusterorles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed links
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the kubectl command seems more evergreen. I don't feel that strongly, but immediately stale links raise an eyebrow
The Product Security Team got a report about these unauthenticated discovery roles. The reporter was surprised about getting 200 requests when unauthenticated. And given the light documentation on the intention of these roles it is justifiable. Increase documentation on these roles.
21bc495
to
582e192
Compare
/lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tengqm 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 |
…10212) The Product Security Team got a report about these unauthenticated discovery roles. The reporter was surprised about getting 200 requests when unauthenticated. And given the light documentation on the intention of these roles it is justifiable. Increase documentation on these roles.
The Product Security Team got a report about these unauthenticated
discovery roles. The reporter was surprised about getting 200 requests
when unauthenticated. And given the light documentation on the intention
of these roles it is justifiable.
Increase documentation on these roles.