mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Rojas <alexan...@mesosphere.io>
Subject Re: Review Request 56623: Implemented 'AuthenticationContext' in libprocess.
Date Thu, 16 Feb 2017 10:45:41 GMT

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




3rdparty/libprocess/include/process/http.hpp (line 22)
<https://reviews.apache.org/r/56623/#comment237662>

    This include is not needed since `iosfwd` already includes forward declarations for `std::ostream`.
    
    So I would say, unless you actually use it here, stick to the forward declaration.



3rdparty/libprocess/include/process/http.hpp (line 68)
<https://reviews.apache.org/r/56623/#comment237665>

    In order to keep things localized, I would prefer this declaration to be in `3rdparty/libprocess/include/process/authenticator.hpp`



3rdparty/libprocess/include/process/http.hpp (line 123)
<https://reviews.apache.org/r/56623/#comment237663>

    for lambda declarations you don't need to name the parameters, so I tend to omit them
if their meaning is not clear from the context, but in this case I think is clear that it
is an `AuthenticationContext`.
    
    Plus you don't name the parameters anywhere else where you use this callback type.



3rdparty/libprocess/src/authenticator_manager.cpp (line 100)
<https://reviews.apache.org/r/56623/#comment237664>

    Not yours (actually mine) but this message is strange if one doesn't have knowledge of
the Mesos internals. How about:
    
    ```
    HTTP Authentication expects either a 'context', an 'unauthorized' response or a 'forbidden'
response to be set.
    ```



3rdparty/libprocess/src/http.cpp (line 85)
<https://reviews.apache.org/r/56623/#comment237666>

    To keep things localized, this is better suited to `3rdparty/libprocess/src/authenticator.cpp`



3rdparty/libprocess/src/http.cpp (lines 87 - 109)
<https://reviews.apache.org/r/56623/#comment237667>

    Why not going the fancy way and use `jsonify()`?


- Alexander Rojas


On Feb. 14, 2017, 12:23 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56623/
> -----------------------------------------------------------
> 
> (Updated Feb. 14, 2017, 12:23 a.m.)
> 
> 
> Review request for mesos, Adam B, Alexander Rojas, Jan Schlicht, Till Toenshoff, and
Vinod Kone.
> 
> 
> Bugs: MESOS-7003
>     https://issues.apache.org/jira/browse/MESOS-7003
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a new struct, `AuthenticationContext`, to
> libprocess to represent an authenticated entity in the system.
> The new type contains a `principal` and a map containing
> arbitrary key-value pairs.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/authenticator.hpp e5489c6cb4adc8a822e7dd4515542618c36136f9

>   3rdparty/libprocess/include/process/http.hpp 3a406963c1defc037d58971f2400e40855503fbb

>   3rdparty/libprocess/include/process/process.hpp ceedbe86ccba5c24bf1e9e7f032d7dbcf6acb0f3

>   3rdparty/libprocess/src/authenticator.cpp cfedb6f7674e0f6690e77a633cdd1bd494c7d2c7

>   3rdparty/libprocess/src/authenticator_manager.cpp a22acd026a001788dc39b8005a56577e33c6800b

>   3rdparty/libprocess/src/http.cpp 0e37936eec5b2910e54d40788c26f98665cbe1f1 
>   3rdparty/libprocess/src/process.cpp 3ad485f9136cd9edf0a6db76ff1f475039236391 
> 
> Diff: https://reviews.apache.org/r/56623/diff/
> 
> 
> Testing
> -------
> 
> Testing information can be found at the end of this review chain.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>


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