You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Greg Mann <gr...@mesosphere.io> on 2017/03/03 07:48:16 UTC

Re: Review Request 56754: Implemented a JWT secret generator.

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



Looks good, thanks Jan! A few comments below.


src/authentication/executor/jwt_secret_generator.hpp
Lines 31-34 (patched)
<https://reviews.apache.org/r/56754/#comment239665>

    Sorry, this comment is a bit confusing to me :) I might suggest something like:
    
    "Creates a VALUE-type secret containing a JWT. When the secret is presented to the `JWTAuthenticator` module, the authenticator will return the principal which is provided here as an argument."



src/authentication/executor/jwt_secret_generator.hpp
Lines 40 (patched)
<https://reviews.apache.org/r/56754/#comment239659>

    Use `override` instead of `virtual` here?



src/authentication/executor/jwt_secret_generator.hpp
Lines 42-44 (patched)
<https://reviews.apache.org/r/56754/#comment239656>

    `override` implies `virtual`, so you can remove the `virtual` here.



src/authentication/executor/jwt_secret_generator.cpp
Lines 38-40 (patched)
<https://reviews.apache.org/r/56754/#comment239667>

    Should there be two newlines here?



src/tests/secret_generator_tests.cpp
Lines 45 (patched)
<https://reviews.apache.org/r/56754/#comment239670>

    I don't think this is needed?



src/tests/secret_generator_tests.cpp
Lines 53 (patched)
<https://reviews.apache.org/r/56754/#comment239672>

    The name `secrets` seems a bit weird to me, makes me think it would be a list of secrets? Maybe `generator` instead?


- Greg Mann


On Feb. 28, 2017, 1:39 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56754/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2017, 1:39 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7000
>     https://issues.apache.org/jira/browse/MESOS-7000
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This can be used to create a 'Secret' from an 'AuthenticationContext'.
> The resulting secret will provide a JWT.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 76d58a0bbd77fe59ff8a81ba7a68c84dc7169750 
>   src/authentication/executor/jwt_secret_generator.hpp PRE-CREATION 
>   src/authentication/executor/jwt_secret_generator.cpp PRE-CREATION 
>   src/tests/secret_generator_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/56754/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 56754: Implemented a JWT secret generator.

Posted by Greg Mann <gr...@mesosphere.io>.

> On March 3, 2017, 7:48 a.m., Greg Mann wrote:
> > src/authentication/executor/jwt_secret_generator.hpp
> > Lines 40 (patched)
> > <https://reviews.apache.org/r/56754/diff/4/?file=1651715#file1651715line40>
> >
> >     Use `override` instead of `virtual` here?
> 
> Jan Schlicht wrote:
>     Do we use that for destructors as well? Seems uncommon in that context and haven't seen any examples in our source base.

If the destructor is overriding a virtual destructor from the base class, then it's appropriate to use `override`. We don't make very wide use of the `override` keyword in the codebase currently (see MESOS-4871); for an example of a place where it was recently added, see the declaration of the `LibeventSSLSocketImpl` class in libprocess.


- Greg


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


On March 6, 2017, 2:57 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56754/
> -----------------------------------------------------------
> 
> (Updated March 6, 2017, 2:57 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7000
>     https://issues.apache.org/jira/browse/MESOS-7000
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This can be used to create a 'Secret' from a 'Principal'.
> The resulting secret will provide a JWT.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am bb917c5d1b36f5106a74914fa3a864038a95e8bb 
>   src/authentication/executor/jwt_secret_generator.hpp PRE-CREATION 
>   src/authentication/executor/jwt_secret_generator.cpp PRE-CREATION 
>   src/tests/secret_generator_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/56754/diff/5/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>


Re: Review Request 56754: Implemented a JWT secret generator.

Posted by Jan Schlicht <ja...@mesosphere.io>.

> On March 3, 2017, 8:48 a.m., Greg Mann wrote:
> > src/authentication/executor/jwt_secret_generator.hpp
> > Lines 40 (patched)
> > <https://reviews.apache.org/r/56754/diff/4/?file=1651715#file1651715line40>
> >
> >     Use `override` instead of `virtual` here?

Do we use that for destructors as well? Seems uncommon in that context and haven't seen any examples in our source base.


- Jan


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


On Feb. 28, 2017, 2:39 p.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56754/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2017, 2:39 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Greg Mann.
> 
> 
> Bugs: MESOS-7000
>     https://issues.apache.org/jira/browse/MESOS-7000
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This can be used to create a 'Secret' from an 'AuthenticationContext'.
> The resulting secret will provide a JWT.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 76d58a0bbd77fe59ff8a81ba7a68c84dc7169750 
>   src/authentication/executor/jwt_secret_generator.hpp PRE-CREATION 
>   src/authentication/executor/jwt_secret_generator.cpp PRE-CREATION 
>   src/tests/secret_generator_tests.cpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/56754/diff/4/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>