You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jay Guo <gu...@gmail.com> on 2017/05/08 07:56:07 UTC
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/
-----------------------------------------------------------
(Updated May 8, 2017, 3:56 p.m.)
Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
Changes
-------
rebase
Bugs: MESOS-7260
https://issues.apache.org/jira/browse/MESOS-7260
Repository: mesos
Description
-------
While /roles displays a list of frameworksIds that register with
a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
impose a security risk. This patch fixed this issue by taking a
frameworksApprover in `Master::Http::roles()` which is used to
filter framework IDs.
Diffs (updated)
-----
src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
Diff: https://reviews.apache.org/r/58096/diff/5/
Changes: https://reviews.apache.org/r/58096/diff/4-5/
Testing
-------
see next patch in the chain.
Thanks,
Jay Guo
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/#review174541
-----------------------------------------------------------
Ship it!
Ship It!
- Alexander Rojas
On May 10, 2017, 6:33 p.m., Jay Guo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58096/
> -----------------------------------------------------------
>
> (Updated May 10, 2017, 6:33 p.m.)
>
>
> Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
>
>
> Bugs: MESOS-7260
> https://issues.apache.org/jira/browse/MESOS-7260
>
>
> Repository: mesos
>
>
> Description
> -------
>
> While /roles displays a list of frameworksIds that register with
> a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
> impose a security risk. This patch fixed this issue by taking a
> frameworksApprover in `Master::Http::roles()` which is used to
> filter framework IDs.
>
>
> Diffs
> -----
>
> src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
>
>
> Diff: https://reviews.apache.org/r/58096/diff/7/
>
>
> Testing
> -------
>
> see next patch in the chain.
>
>
> Thanks,
>
> Jay Guo
>
>
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Jay Guo <gu...@gmail.com>.
> On May 17, 2017, 4:08 p.m., Adam B wrote:
> > src/master/http.cpp
> > Lines 3524 (patched)
> > <https://reviews.apache.org/r/58096/diff/7/?file=1714048#file1714048line3524>
> >
> > `futures` is an over-vague variable name, especially since neither are Futures by this point. Can we do better?
I'm running out of vocabulary here... two very different thing to be captured in one word. Maybe `collection`?
- Jay
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/#review175213
-----------------------------------------------------------
On June 22, 2017, 2 a.m., Jay Guo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58096/
> -----------------------------------------------------------
>
> (Updated June 22, 2017, 2 a.m.)
>
>
> Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
>
>
> Bugs: MESOS-7260
> https://issues.apache.org/jira/browse/MESOS-7260
>
>
> Repository: mesos
>
>
> Description
> -------
>
> While /roles displays a list of frameworksIds that register with
> a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
> impose a security risk. This patch fixed this issue by taking a
> frameworksApprover in `Master::Http::roles()` which is used to
> filter framework IDs.
>
>
> Diffs
> -----
>
> src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67
>
>
> Diff: https://reviews.apache.org/r/58096/diff/8/
>
>
> Testing
> -------
>
> see next patch in the chain.
>
>
> Thanks,
>
> Jay Guo
>
>
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Adam B <ad...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/#review175213
-----------------------------------------------------------
Looks pretty good to me. Just a few minor comments
src/master/http.cpp
Lines 3504 (patched)
<https://reviews.apache.org/r/58096/#comment248641>
What makes a role "active"? Having `active` frameworks registered for that role? This function seems to return a list of all roles that have one or more weights, quota, reservations, or registered frameworks associated with them. More accurate would be to call it `knownRoles`.
src/master/http.cpp
Lines 3507 (patched)
<https://reviews.apache.org/r/58096/#comment248639>
Nit: `ObjectApprover` singular, since it's a single approver that can approve/deny multiple frameworks, not an approver per framework.
src/master/http.cpp
Lines 3524 (patched)
<https://reviews.apache.org/r/58096/#comment248644>
`futures` is an over-vague variable name, especially since neither are Futures by this point. Can we do better?
- Adam B
On May 10, 2017, 9:33 a.m., Jay Guo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58096/
> -----------------------------------------------------------
>
> (Updated May 10, 2017, 9:33 a.m.)
>
>
> Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
>
>
> Bugs: MESOS-7260
> https://issues.apache.org/jira/browse/MESOS-7260
>
>
> Repository: mesos
>
>
> Description
> -------
>
> While /roles displays a list of frameworksIds that register with
> a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
> impose a security risk. This patch fixed this issue by taking a
> frameworksApprover in `Master::Http::roles()` which is used to
> filter framework IDs.
>
>
> Diffs
> -----
>
> src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
>
>
> Diff: https://reviews.apache.org/r/58096/diff/7/
>
>
> Testing
> -------
>
> see next patch in the chain.
>
>
> Thanks,
>
> Jay Guo
>
>
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Jay Guo <gu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/
-----------------------------------------------------------
(Updated June 22, 2017, 2 a.m.)
Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
Changes
-------
rebase & address comments
Bugs: MESOS-7260
https://issues.apache.org/jira/browse/MESOS-7260
Repository: mesos
Description
-------
While /roles displays a list of frameworksIds that register with
a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
impose a security risk. This patch fixed this issue by taking a
frameworksApprover in `Master::Http::roles()` which is used to
filter framework IDs.
Diffs (updated)
-----
src/master/http.cpp 4dd43fd7c3fb986f4eed78bce574b6d3af156b67
Diff: https://reviews.apache.org/r/58096/diff/8/
Changes: https://reviews.apache.org/r/58096/diff/7-8/
Testing
-------
see next patch in the chain.
Thanks,
Jay Guo
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Jay Guo <gu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/
-----------------------------------------------------------
(Updated May 11, 2017, 12:33 a.m.)
Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
Changes
-------
rebase
Bugs: MESOS-7260
https://issues.apache.org/jira/browse/MESOS-7260
Repository: mesos
Description
-------
While /roles displays a list of frameworksIds that register with
a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
impose a security risk. This patch fixed this issue by taking a
frameworksApprover in `Master::Http::roles()` which is used to
filter framework IDs.
Diffs (updated)
-----
src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
Diff: https://reviews.apache.org/r/58096/diff/7/
Changes: https://reviews.apache.org/r/58096/diff/6-7/
Testing
-------
see next patch in the chain.
Thanks,
Jay Guo
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Jay Guo <gu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/
-----------------------------------------------------------
(Updated May 10, 2017, 9:46 p.m.)
Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
Changes
-------
address comments.
Bugs: MESOS-7260
https://issues.apache.org/jira/browse/MESOS-7260
Repository: mesos
Description
-------
While /roles displays a list of frameworksIds that register with
a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
impose a security risk. This patch fixed this issue by taking a
frameworksApprover in `Master::Http::roles()` which is used to
filter framework IDs.
Diffs (updated)
-----
src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
Diff: https://reviews.apache.org/r/58096/diff/6/
Changes: https://reviews.apache.org/r/58096/diff/5-6/
Testing
-------
see next patch in the chain.
Thanks,
Jay Guo
Re: Review Request 58096: Added authorization for frameworks in /roles
endpoint.
Posted by Alexander Rojas <al...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58096/#review174445
-----------------------------------------------------------
src/master/http.cpp
Line 406 (original), 412-418 (patched)
<https://reviews.apache.org/r/58096/#comment247620>
More compact and readable if you do:
```c++
if (approveViewFrameworkInfo(frameworkApprover, framework->info)) {
writer->element(frameworkId.value());
}
```
src/master/http.cpp
Lines 422 (patched)
<https://reviews.apache.org/r/58096/#comment247619>
I think this comment should be in the previous patch.
- Alexander Rojas
On May 8, 2017, 9:56 a.m., Jay Guo wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58096/
> -----------------------------------------------------------
>
> (Updated May 8, 2017, 9:56 a.m.)
>
>
> Review request for mesos, Adam B, Alexander Rojas, and Benjamin Mahler.
>
>
> Bugs: MESOS-7260
> https://issues.apache.org/jira/browse/MESOS-7260
>
>
> Repository: mesos
>
>
> Description
> -------
>
> While /roles displays a list of frameworksIds that register with
> a role, it did NOT filter them based on VIEW_FRAMEWORK ACL, which
> impose a security risk. This patch fixed this issue by taking a
> frameworksApprover in `Master::Http::roles()` which is used to
> filter framework IDs.
>
>
> Diffs
> -----
>
> src/master/http.cpp e2590a17044ac019b24a24629428d4ec8adc0c31
>
>
> Diff: https://reviews.apache.org/r/58096/diff/5/
>
>
> Testing
> -------
>
> see next patch in the chain.
>
>
> Thanks,
>
> Jay Guo
>
>