Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-12 Thread Alexander Rojas

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




src/common/http.cpp (line 592)


Although we have some instances of `std::make_pair` (two in the source code 
and 8 in tests), I think a more common patter is to use either initialization 
lists, e.g.

```c++
callbacks.insert({
"/metrics/snapshot",
[authorizer](…) {…}});
```

or

```c++
callbacks["/metrics/snapshot"] = [authorizer](…){
  …
}});
```



src/common/http.cpp (line 594)


Do you really need to define the return type here? since the function only 
has one `return` and it is already a `Future` I would have expected C++ 
to be able to deduce it.


- Alexander Rojas


On May 10, 2016, 10:31 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46883/
> ---
> 
> (Updated May 10, 2016, 10:31 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Kapil Arya.
> 
> 
> Bugs: MESOS-5286
> https://issues.apache.org/jira/browse/MESOS-5286
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch adds a callback to the generating
> function `CreateAuthorizationCallbacks` for the
> '/metrics/snapshot' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 
> 
> Diff: https://reviews.apache.org/r/46883/diff/
> 
> 
> Testing
> ---
> 
> `make check` on OSX.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-10 Thread Kapil Arya

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


Ship it!




Ship It!

- Kapil Arya


On May 10, 2016, 4:31 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46883/
> ---
> 
> (Updated May 10, 2016, 4:31 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Kapil Arya.
> 
> 
> Bugs: MESOS-5286
> https://issues.apache.org/jira/browse/MESOS-5286
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch adds a callback to the generating
> function `CreateAuthorizationCallbacks` for the
> '/metrics/snapshot' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 
> 
> Diff: https://reviews.apache.org/r/46883/diff/
> 
> 
> Testing
> ---
> 
> `make check` on OSX.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-10 Thread Greg Mann

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

(Updated May 10, 2016, 8:31 p.m.)


Review request for mesos, Alexander Rojas and Kapil Arya.


Changes
---

Rebase.


Bugs: MESOS-5286
https://issues.apache.org/jira/browse/MESOS-5286


Repository: mesos


Description
---

This patch adds a callback to the generating
function `CreateAuthorizationCallbacks` for the
'/metrics/snapshot' endpoint.


Diffs (updated)
-

  src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 

Diff: https://reviews.apache.org/r/46883/diff/


Testing
---

`make check` on OSX.


Thanks,

Greg Mann



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-06 Thread Greg Mann

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

(Updated May 6, 2016, 9:16 p.m.)


Review request for mesos, Alexander Rojas and Kapil Arya.


Changes
---

Rebase, change dependency.


Bugs: MESOS-5286
https://issues.apache.org/jira/browse/MESOS-5286


Repository: mesos


Description
---

This patch adds a callback to the generating
function `CreateAuthorizationCallbacks` for the
'/metrics/snapshot' endpoint.


Diffs (updated)
-

  src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 

Diff: https://reviews.apache.org/r/46883/diff/


Testing
---

`make check` on OSX.


Thanks,

Greg Mann



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-05 Thread Greg Mann


> On May 4, 2016, 3:24 a.m., Kapil Arya wrote:
> > src/common/http.cpp, line 599
> > 
> >
> > Does non-existing `subject` mean "ANY"?

Yep, that's correct. In the local authorizer code 
(src/authorizer/local/authorizer.cpp), in the private definition of 
`LocalAuthorizerProcess::authorized`, we set the subject to ANY if it hasn't 
already been set.


- Greg


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


On May 5, 2016, 1:38 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46883/
> ---
> 
> (Updated May 5, 2016, 1:38 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Kapil Arya.
> 
> 
> Bugs: MESOS-5286
> https://issues.apache.org/jira/browse/MESOS-5286
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch adds a callback to the generating
> function `CreateAuthorizationCallbacks` for the
> '/metrics/snapshot' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 
> 
> Diff: https://reviews.apache.org/r/46883/diff/
> 
> 
> Testing
> ---
> 
> `make check` on OSX.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-05 Thread Greg Mann

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

(Updated May 5, 2016, 1:38 p.m.)


Review request for mesos, Alexander Rojas and Kapil Arya.


Changes
---

Addressed comment.


Bugs: MESOS-5286
https://issues.apache.org/jira/browse/MESOS-5286


Repository: mesos


Description
---

This patch adds a callback to the generating
function `CreateAuthorizationCallbacks` for the
'/metrics/snapshot' endpoint.


Diffs (updated)
-

  src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 

Diff: https://reviews.apache.org/r/46883/diff/


Testing
---

`make check` on OSX.


Thanks,

Greg Mann



Re: Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-03 Thread Kapil Arya

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




src/common/http.cpp (line 599)


Does non-existing `subject` mean "ANY"?



src/common/http.cpp (line 602)


const?


- Kapil Arya


On May 1, 2016, 8:03 p.m., Greg Mann wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46883/
> ---
> 
> (Updated May 1, 2016, 8:03 p.m.)
> 
> 
> Review request for mesos, Alexander Rojas and Kapil Arya.
> 
> 
> Bugs: MESOS-5286
> https://issues.apache.org/jira/browse/MESOS-5286
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> This patch adds a callback to the generating
> function `CreateAuthorizationCallbacks` for the
> '/metrics/snapshot' endpoint.
> 
> 
> Diffs
> -
> 
>   src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 
> 
> Diff: https://reviews.apache.org/r/46883/diff/
> 
> 
> Testing
> ---
> 
> `make check` on OSX.
> 
> 
> Thanks,
> 
> Greg Mann
> 
>



Review Request 46883: Added authorization callback for '/metrics/snapshot'.

2016-05-01 Thread Greg Mann

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

Review request for mesos, Alexander Rojas and Kapil Arya.


Bugs: MESOS-5286
https://issues.apache.org/jira/browse/MESOS-5286


Repository: mesos


Description
---

This patch adds a callback to the generating
function `CreateAuthorizationCallbacks` for the
'/metrics/snapshot' endpoint.


Diffs
-

  src/common/http.cpp ccf386898130c966903cb5aae4eaffbc9b63ca1f 

Diff: https://reviews.apache.org/r/46883/diff/


Testing
---

`make check` on OSX.


Thanks,

Greg Mann