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

rbac: add information on unauthenticated discovery roles #10212

Conversation

philips
Copy link
Contributor

@philips philips commented Sep 6, 2018

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.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 6, 2018
@k8sio-netlify-preview-bot
Copy link
Collaborator

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typos: authenticated, sever

Copy link
Member

@liggitt liggitt Sep 6, 2018

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)

Copy link
Member

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

Copy link
Contributor Author

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.

@philips philips force-pushed the add-more-information-on-discovery-roles branch from c505442 to e9b89df Compare September 6, 2018 22:34
@k8sio-netlify-preview-bot
Copy link
Collaborator

Deploy preview for kubernetes-io-master-staging ready!

Built with commit e9b89df

https://deploy-preview-10212--kubernetes-io-master-staging.netlify.com

@k8sio-netlify-preview-bot
Copy link
Collaborator

k8sio-netlify-preview-bot commented Sep 6, 2018

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 582e192

https://deploy-preview-10212--kubernetes-io-master-staging.netlify.com

@philips philips force-pushed the add-more-information-on-discovery-roles branch from e9b89df to 21bc495 Compare September 6, 2018 22:36
Copy link
Member

@liggitt liggitt left a 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>
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed links

Copy link
Member

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.
@philips philips force-pushed the add-more-information-on-discovery-roles branch from 21bc495 to 582e192 Compare September 6, 2018 22:43
@liggitt
Copy link
Member

liggitt commented Sep 6, 2018

/lgtm

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

@tengqm tengqm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[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 /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 Sep 7, 2018
@k8s-ci-robot k8s-ci-robot merged commit 47d4c63 into kubernetes:master Sep 7, 2018
bsalamat pushed a commit to bsalamat/kubernetes.github.io that referenced this pull request Sep 7, 2018
…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.
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. 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.

5 participants