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 44319: Removed initialize method from the authorizer interface.
Date Fri, 11 Mar 2016 10:02:06 GMT


> On March 10, 2016, 8:32 p.m., Vinod Kone wrote:
> > src/master/main.cpp, line 372
> > <https://reviews.apache.org/r/44319/diff/6/?file=1293232#file1293232line372>
> >
> >     So, we create non-default authorizer if --authorizers specifies a non-default
name but create the default authorizer only if --acls is present (irrespective of whether
--authorizers says "local)". 
> >     
> >     I think those semantics are a bit weird to grok. IIRC, we did it that way for
backwards compatibility with old releases that didn't have "--authorizers" flag? We should
atleast mention this behavior in the flags help.
> 
> Alexander Rojas wrote:
>     That is not how the block reads, that block is equivalent to:
>     
>     ```c++
>     if (authorizerName != master::DEFAULT_AUTHORIZER) {
>         LOG(INFO) << "Creating '" << authorizerName << "' authorizer";
>     
>         create = Authorizer::create(authorizerName);
>       } else { // authorizerName is the default authorizer at this point!
>         if (flags.acls.isSome()) {
>           LOG(INFO) << "Creating default '" << authorizerName << "'
authorizer";
>     
>           create = Authorizer::create(flags.acls.get());
>         } 
>       }
>     ```
>     
>     So `--authorizer` has to say _local_ **and** `--acls` have to be present.

I changed the code to the snippet above, so there are no confusions in the future.


- Alexander


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


On March 9, 2016, 3:06 p.m., Alexander Rojas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44319/
> -----------------------------------------------------------
> 
> (Updated March 9, 2016, 3:06 p.m.)
> 
> 
> Review request for mesos, Adam B, Joerg Schad, and Vinod Kone.
> 
> 
> Bugs: MESOS-2950
>     https://issues.apache.org/jira/browse/MESOS-2950
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Removed initialize method from the authorizer interface.
> 
> 
> Diffs
> -----
> 
>   include/mesos/authorizer/authorizer.hpp 705482656788ac12e9d21e355b71fd2ede2be558 
>   src/authorizer/authorizer.cpp 54278b022118c40d3b976794fd472ce8d8b6a5e2 
>   src/authorizer/local/authorizer.hpp c87a9915bae6bae7744bd57abd12e8d857181051 
>   src/authorizer/local/authorizer.cpp 15c857de79cd7dd2c29b6b8cfb81204b919f1b28 
>   src/examples/test_authorizer_module.cpp 95d77fbff0cdfdb360a8597fbba28404b59d0042 
>   src/local/local.cpp 359fc54d7c4081f536a8de8b1dfcde413d75c9a9 
>   src/master/main.cpp 4263110c9b889984ef74eb94fed629958f2abd79 
>   src/tests/authorization_tests.cpp 2b2297036550412a955ff479f6ec9d7dad8cb0e3 
>   src/tests/cluster.cpp 084fb1ce37a315c561c4587c4761c870f54c8625 
> 
> Diff: https://reviews.apache.org/r/44319/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Alexander Rojas
> 
>


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