mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam B <a...@mesosphere.io>
Subject Re: Review Request 47805: Add authorization to GET /weights.
Date Thu, 26 May 2016 10:30:23 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/47805/#review134954
-----------------------------------------------------------



Great start! I've got some nits and minor suggestions, but we should be able to commit this
soon.
Thanks!


include/mesos/authorizer/acls.proto (line 233)
<https://reviews.apache.org/r/47805/#comment199938>

    Please rebase, pick the next number, and place this field in numeric order.



include/mesos/authorizer/authorizer.proto (line 67)
<https://reviews.apache.org/r/47805/#comment199939>

    Please rebase, pick the next number, and reorder numerically.



src/master/master.hpp (line 1058)
<https://reviews.apache.org/r/47805/#comment199942>

    s/authorize/authorizeUpdateWeights/



src/master/weights_handler.cpp (line 58)
<https://reviews.apache.org/r/47805/#comment199940>

    s/std::string/string/



src/master/weights_handler.cpp (line 84)
<https://reviews.apache.org/r/47805/#comment199945>

    s/=/request, weightInfos/
    s/list<bool>/list<bool>&/



src/master/weights_handler.cpp (lines 308 - 309)
<https://reviews.apache.org/r/47805/#comment199948>

    Please wrap the output role in `'`s



src/tests/dynamic_weights_tests.cpp (line 450)
<https://reviews.apache.org/r/47805/#comment199953>

    s/weight/weights/



src/tests/dynamic_weights_tests.cpp (line 451)
<https://reviews.apache.org/r/47805/#comment199954>

    s/WeightRequest/WeightsRequest/



src/tests/dynamic_weights_tests.cpp (line 464)
<https://reviews.apache.org/r/47805/#comment199957>

    s/getAcl_1/getACL1/
    Only ALL_CAPS_CONSTANTS and protobuf_messages use snake case.



src/tests/dynamic_weights_tests.cpp (line 468)
<https://reviews.apache.org/r/47805/#comment199959>

    s/getAcl_2/getACL2/



src/tests/dynamic_weights_tests.cpp (lines 492 - 494)
<https://reviews.apache.org/r/47805/#comment199960>

    Seems like `checkWithGetRequest` should take the credential as a parameter, rather than
hiding that credential-selection logic inside the check method.



src/tests/dynamic_weights_tests.cpp (line 512)
<https://reviews.apache.org/r/47805/#comment199961>

    Since this test already uses a principal, why not only allow that principal to get the
weights?
    Then you can also test that a get request without a principal (or with CREDENTIAL_2) will
see no roles.


- Adam B


On May 24, 2016, 7:04 p.m., zhou xing wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/47805/
> -----------------------------------------------------------
> 
> (Updated May 24, 2016, 7:04 p.m.)
> 
> 
> Review request for mesos and Adam B.
> 
> 
> Bugs: mesos-5335
>     https://issues.apache.org/jira/browse/mesos-5335
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add 'GET_WEIGHTS_WITH_ROLE' for the authorization of GET /weights.
> 
> 
> Diffs
> -----
> 
>   docs/endpoints/master/weights.md 1e540795c5fb90c8ea957dd444b9e564e0b1ac23 
>   include/mesos/authorizer/acls.proto b178f53a299a2941afc073af963f6aff26af1ca8 
>   include/mesos/authorizer/authorizer.proto 911a2271211249a41c4467f6754e9996f640bf38

>   src/authorizer/local/authorizer.cpp dc53bc4374aea98b5ed41ade5617374d2447229b 
>   src/master/http.cpp b36b439a1fa07c52146deff2b90728f92676ade3 
>   src/master/master.hpp 1a875c32eddfb6d884e3d0dda7f5716ee53966c3 
>   src/master/weights_handler.cpp 4bc060fdb015df6658194eef92fe11b14aa15c79 
>   src/tests/dynamic_weights_tests.cpp 362c59aae7b305710d5985bfec28f881be3b64b8 
> 
> Diff: https://reviews.apache.org/r/47805/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> 
> Thanks,
> 
> zhou xing
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message