Skip to content

respect scopes in list/watch projects#10252

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
deads2k:filter-project-by-scope
Aug 12, 2016
Merged

respect scopes in list/watch projects#10252
openshift-bot merged 1 commit intoopenshift:masterfrom
deads2k:filter-project-by-scope

Conversation

@deads2k
Copy link
Copy Markdown
Contributor

@deads2k deads2k commented Aug 5, 2016

Updates the project cache to filter the project list with respect to scopes.

In a follow-on piece of work, this will make it possible to let an SA get list of projects it can access with the token its given or the list of all projects available depending on which scope the user selects.

@openshift/api-review
@sosiouxme you've asked for this, so did stef, and I needed it for my demo.

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Aug 5, 2016

@smarterclayton I'd like this and my new scope (coming soon) in 1.3 to make the SA oauth client more valuable.

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Aug 5, 2016

[test]

@liggitt liggitt self-assigned this Aug 9, 2016
@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Aug 10, 2016

@liggitt bump.


for _, evaluator := range ScopeEvaluators {
if evaluator.Handles(scope) {
found = true
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

break ranging over evaluators or let them all have a shot at it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

break ranging over evaluators or let them all have a shot at it?

sure.

@liggitt
Copy link
Copy Markdown
Contributor

liggitt commented Aug 11, 2016

relevant test failures, a few nits, LGTM otherwise

@deads2k deads2k force-pushed the filter-project-by-scope branch 2 times, most recently from 05c8ef3 to 31ff266 Compare August 11, 2016 17:17
@deads2k deads2k force-pushed the filter-project-by-scope branch from 31ff266 to 012dd2f Compare August 12, 2016 11:44
@openshift-bot
Copy link
Copy Markdown
Contributor

Evaluated for origin test up to 012dd2f

@openshift-bot
Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7838/)

@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Aug 12, 2016

[merge]

@openshift-bot
Copy link
Copy Markdown
Contributor

openshift-bot commented Aug 12, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/7855/) (Image: devenv-rhel7_4813)

@openshift-bot
Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to 012dd2f

@openshift-bot openshift-bot merged commit 29ff45f into openshift:master Aug 12, 2016
@deads2k
Copy link
Copy Markdown
Contributor Author

deads2k commented Aug 12, 2016

@ewolinetz this closed an information leak in list projects that didn't properly limit the list to the scope of the token by default.

We're introducing a second scope to indicate the distinction between "list projects this token can see based on other permissions" and "list all projects this user can see regard of the other permissions on this token". As I recall from openshift/origin-aggregated-logging#139, you need the latter. To close the hole, the new scope is called "user:list-all-projects". See #9977

@deads2k deads2k deleted the filter-project-by-scope branch September 6, 2016 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants