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

apiserver: add warning about not trusting authz of aggregator #61349

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Mar 19, 2018

The aggregator does authorization for proxied resources. But aggregated apiservers should not depend on it, but do delegated authorization in addition.

Add warnings that authors of aggregated API servers must not rely on authorization being done by the kube-apiserver.

@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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 19, 2018
@k8s-ci-robot k8s-ci-robot requested review from dims and enj March 19, 2018 12:39
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 19, 2018
@sttts
Copy link
Contributor Author

sttts commented Mar 19, 2018

Any other place we can document this better?

@davidvossel
Copy link

The aggregator does authorization for proxied resources. But aggregated apiservers should not depend on it, but do delegated authorization in addition.

If the aggregated apiserver endpoints are trusting user authentication performed by the k8 aggregator, then why can they not also depend on the authorization that the k8s aggregator is currently providing?

@deads2k
Copy link
Contributor

deads2k commented Mar 19, 2018

If the aggregated apiserver endpoints are trusting user authentication performed by the k8 aggregator, then why can they not also depend on the authorization that the k8s aggregator is currently providing?

No. The front proxy is an authentication proxy, not an authorization proxy. We document and use it that way and it is common for all apiservers. If we want to introduce the idea of an authorizing front proxy, it may be possible, but that is not what we have created or designed.

@kubernetes/sig-auth-misc

@k8s-ci-robot k8s-ci-robot added the sig/auth Categorizes an issue or PR as relevant to SIG Auth. label Mar 19, 2018
@davidvossel
Copy link

If we want to introduce the idea of an authorizing front proxy, it may be possible, but that is not what we have created or designed.

at the moment, my aggregated endpoint is not performing any form of authorization. However I can verify that without the correct RBAC roles, client requests are not forwarded to my endpoint. The client receives a 403 until the correct permissions are in place. So, authorization appears to be taking place.

Just to be clear, we're saying that the authorization performed before the request is forwarded to our aggregated endpoint is not safe to depend on and will be removed? If so, why?

@liggitt
Copy link
Member

liggitt commented Mar 19, 2018

Just to be clear, we're saying that the authorization performed before the request is forwarded to our aggregated endpoint is not safe to depend on and will be removed? If so, why?

The only guarantee your aggregated API server has from the request header user info is that the proxy is vouching for the fact that that user is making the API request. It makes no guarantee the user is authorized to make that call. (You could place a generic authenticating proxy in front of your API server, verify user info, pass the same user info headers, and your API server would still be expected to perform authorization).

@sttts
Copy link
Contributor Author

sttts commented Apr 3, 2018

@deads2k any comments about the actual PR contents?

@deads2k
Copy link
Contributor

deads2k commented Apr 3, 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 Apr 3, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, sttts

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 release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed 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 Apr 4, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit f5f3d0d into kubernetes:master Apr 4, 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 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/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

6 participants