Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Joshua Cohen

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



src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java


Do you foresee us exposing other authorized servlets in this manner? If so, 
how does this scale in those cases? Might it make sense to extract something 
that can act on a set of servlet/auth configuration rather than explicitly 
listing each servlet for each switch case?

A TODO acknowledging that we'd want to address if/when we add more is 
probably fine for now.



src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java


Why don't need this anymore?



src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java


Use constant for this?

assertEquals(ClientResponse.Status.OK.getStatusCode(), 
response.getStatus())



src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java


Same here and below.


- Joshua Cohen


On June 3, 2015, 10:08 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 3, 2015, 10:08 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Joshua Cohen


> On June 4, 2015, 4:36 p.m., Joshua Cohen wrote:
> > src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java,
> >  lines 78-80
> > 
> >
> > Why don't need this anymore?

Er, ignore this, I meant to delete after I read through the rest of the diff ;).


- Joshua


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


On June 3, 2015, 10:08 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 3, 2015, 10:08 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Maxim Khutornenko

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

(Updated June 4, 2015, 7:31 p.m.)


Review request for Aurora, Joshua Cohen and Kevin Sweeney.


Changes
---

Joshua's comments.


Bugs: AURORA-1287
https://issues.apache.org/jira/browse/AURORA-1287


Repository: aurora


Description
---

Adding support for connecting to H2 DB via management console: 
http://www.h2database.com/html/quickstart.html

The H2 console servlet is put behind Shiro. Users are expected to have 
`h2_management_console` permission or be a member of admin role to access the 
console.

Vagrant example JDBC URL: jdbc:h2:mem:aurora


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
 079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java 
0163ba1a6df647a644948a42f772bd838c2146ef 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
 28e6b98b39a073251bfae483575edd9635ae783a 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
 PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java 
6743d06be828247b1c3a232aea145b0a0c492eca 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
 33783c88b7c6c1a7343f3271523a7db39c73e4a1 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
 e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
 PRE-CREATION 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 

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


Testing
---

./gradlew -Pq build
./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
Connecting to H2 in Vagrant.


Thanks,

Maxim Khutornenko



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Maxim Khutornenko


> On June 4, 2015, 4:36 p.m., Joshua Cohen wrote:
> > src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java,
> >  lines 136-141
> > 
> >
> > Do you foresee us exposing other authorized servlets in this manner? If 
> > so, how does this scale in those cases? Might it make sense to extract 
> > something that can act on a set of servlet/auth configuration rather than 
> > explicitly listing each servlet for each switch case?
> > 
> > A TODO acknowledging that we'd want to address if/when we add more is 
> > probably fine for now.

I am hesitant to refactor without seeing more use cases first. The registration 
order is important here and having all filters close by really helps. Punting 
for now as any attempt to refactor will add verbosity and reduce readability.


> On June 4, 2015, 4:36 p.m., Joshua Cohen wrote:
> > src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java, line 
> > 36
> > 
> >
> > Use constant for this?
> > 
> > assertEquals(ClientResponse.Status.OK.getStatusCode(), 
> > response.getStatus())

Done.


> On June 4, 2015, 4:36 p.m., Joshua Cohen wrote:
> > src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java,
> >  line 303
> > 
> >
> > Same here and below.

Done.


- Maxim


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


On June 3, 2015, 10:08 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 3, 2015, 10:08 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Aurora ReviewBot

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

Ship it!


Master (ed4415c) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On June 4, 2015, 7:31 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 4, 2015, 7:31 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Kevin Sweeney

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

Ship it!


Looks good, only style nits


src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java


Either static import the above API_PATH or qualify H2_PATH, but please use 
a consistent style.



src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java


Use a MediaType constant here.


- Kevin Sweeney


On June 4, 2015, 12:31 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 4, 2015, 12:31 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Joshua Cohen

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

Ship it!


Ship It!

- Joshua Cohen


On June 4, 2015, 7:31 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 4, 2015, 7:31 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Maxim Khutornenko


> On June 4, 2015, 8:12 p.m., Kevin Sweeney wrote:
> > src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java, line 
> > 37
> > 
> >
> > Use a MediaType constant here.

Done.


> On June 4, 2015, 8:12 p.m., Kevin Sweeney wrote:
> > src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java,
> >  line 128
> > 
> >
> > Either static import the above API_PATH or qualify H2_PATH, but please 
> > use a consistent style.

Done.


- Maxim


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


On June 4, 2015, 7:31 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 4, 2015, 7:31 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Maxim Khutornenko

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

(Updated June 4, 2015, 8:49 p.m.)


Review request for Aurora, Joshua Cohen and Kevin Sweeney.


Changes
---

Kevin's comments.


Bugs: AURORA-1287
https://issues.apache.org/jira/browse/AURORA-1287


Repository: aurora


Description
---

Adding support for connecting to H2 DB via management console: 
http://www.h2database.com/html/quickstart.html

The H2 console servlet is put behind Shiro. Users are expected to have 
`h2_management_console` permission or be a member of admin role to access the 
console.

Vagrant example JDBC URL: jdbc:h2:mem:aurora


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
 079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java 
0163ba1a6df647a644948a42f772bd838c2146ef 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
 28e6b98b39a073251bfae483575edd9635ae783a 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
 PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java 
6743d06be828247b1c3a232aea145b0a0c492eca 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
 33783c88b7c6c1a7343f3271523a7db39c73e4a1 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
 e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
 PRE-CREATION 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 

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


Testing
---

./gradlew -Pq build
./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
Connecting to H2 in Vagrant.


Thanks,

Maxim Khutornenko



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Maxim Khutornenko

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

(Updated June 4, 2015, 8:56 p.m.)


Review request for Aurora, Joshua Cohen and Kevin Sweeney.


Changes
---

comment typo


Bugs: AURORA-1287
https://issues.apache.org/jira/browse/AURORA-1287


Repository: aurora


Description
---

Adding support for connecting to H2 DB via management console: 
http://www.h2database.com/html/quickstart.html

The H2 console servlet is put behind Shiro. Users are expected to have 
`h2_management_console` permission or be a member of admin role to access the 
console.

Vagrant example JDBC URL: jdbc:h2:mem:aurora


Diffs (updated)
-

  src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
PRE-CREATION 
  src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
 079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java 
0163ba1a6df647a644948a42f772bd838c2146ef 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
 28e6b98b39a073251bfae483575edd9635ae783a 
  
src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
 PRE-CREATION 
  src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
PRE-CREATION 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java 
6743d06be828247b1c3a232aea145b0a0c492eca 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
 33783c88b7c6c1a7343f3271523a7db39c73e4a1 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
 e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
  
src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
 PRE-CREATION 
  src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 

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


Testing
---

./gradlew -Pq build
./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
Connecting to H2 in Vagrant.


Thanks,

Maxim Khutornenko



Re: Review Request 34566: Adding H2 management console.

2015-06-04 Thread Aurora ReviewBot

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

Ship it!


Master (ed4415c) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing "@ReviewBot 
retry"

- Aurora ReviewBot


On June 4, 2015, 8:56 p.m., Maxim Khutornenko wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34566/
> ---
> 
> (Updated June 4, 2015, 8:56 p.m.)
> 
> 
> Review request for Aurora, Joshua Cohen and Kevin Sweeney.
> 
> 
> Bugs: AURORA-1287
> https://issues.apache.org/jira/browse/AURORA-1287
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> Adding support for connecting to H2 DB via management console: 
> http://www.h2database.com/html/quickstart.html
> 
> The H2 console servlet is put behind Shiro. Users are expected to have 
> `h2_management_console` permission or be a member of admin role to access the 
> console.
> 
> Vagrant example JDBC URL: jdbc:h2:mem:aurora
> 
> 
> Diffs
> -
> 
>   src/main/java/org/apache/aurora/scheduler/http/H2ConsoleModule.java 
> PRE-CREATION 
>   src/main/java/org/apache/aurora/scheduler/http/JettyServerModule.java 
> 16515f6ce4518e0d7eec27dfcde6fe036ee05d1d 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityModule.java
>  079ff5d2c30cc94bf4aef97cd4d791d480ebeab9 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroIniParser.java
>  0163ba1a6df647a644948a42f772bd838c2146ef 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilter.java
>  28e6b98b39a073251bfae483575edd9635ae783a 
>   
> src/main/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilter.java
>  PRE-CREATION 
>   src/test/java/org/apache/aurora/scheduler/http/H2ConsoleModuleIT.java 
> PRE-CREATION 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ApiSecurityIT.java
>  6743d06be828247b1c3a232aea145b0a0c492eca 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroAuthorizingParamInterceptorTest.java
>  33783c88b7c6c1a7343f3271523a7db39c73e4a1 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosAuthenticationFilterTest.java
>  e335a439a6ccc301cf7c93e138c90660fbfdc6d0 
>   
> src/test/java/org/apache/aurora/scheduler/http/api/security/ShiroKerberosPermissiveAuthenticationFilterTest.java
>  PRE-CREATION 
>   src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> 6e9e3b2a8d731e51d0d55d0a5075b6d2d51a02ac 
> 
> Diff: https://reviews.apache.org/r/34566/diff/
> 
> 
> Testing
> ---
> 
> ./gradlew -Pq build
> ./src/test/sh/org/apache/aurora/e2e/test_kerberos_end_to_end.sh 
> Connecting to H2 in Vagrant.
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>



Re: Review Request 34300: Do better sanitation on the client side when encountering unbound pystachio refs

2015-06-04 Thread Kevin Sweeney

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

Ship it!



src/main/python/apache/aurora/config/thrift.py


Why set this at all? Does the scheduler read this field?


- Kevin Sweeney


On June 1, 2015, 11:05 a.m., Brian Wickman wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/34300/
> ---
> 
> (Updated June 1, 2015, 11:05 a.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Bugs: AURORA-739
> https://issues.apache.org/jira/browse/AURORA-739
> 
> 
> Repository: aurora
> 
> 
> Description
> ---
> 
> It's possible to define nested refs that can cause the executor to stack 
> trace, e.g.
> {{derp[{{thermos.ports[http]}}]}} is perfectly valid but crashes the executor.
> 
> 
> Diffs
> -
> 
>   src/main/python/apache/aurora/config/__init__.py 
> dd2f89014a3da730364b14e01c499ac0f2c288c1 
>   src/main/python/apache/aurora/config/schema/base.py 
> a87524a8b3ad5aa0e337e0a0028cecb85865b4e6 
>   src/main/python/apache/aurora/config/thrift.py 
> 810febb637d168b07c4aea77984e1d1451a39af2 
>   src/main/python/apache/aurora/executor/common/task_info.py 
> d110faf08135d94d9af95ad74613950c56248c09 
>   src/main/python/apache/thermos/config/dsl.py 
> 0663a9ad8ae194b63ce6d77dabfe65564e2d26dd 
>   src/main/python/apache/thermos/config/loader.py 
> d77ab9a52b16e9d65acdb95f01fd251ae8ab2b6e 
>   src/test/python/apache/aurora/client/test_config.py 
> c56779712b91f621261358aa7ebd6c4fc65446a0 
>   src/test/python/apache/aurora/config/test_thrift.py 
> 654c0b5ae82c98db163c7a44301ff6b23e19b211 
>   src/test/python/apache/aurora/executor/common/test_task_info.py 
> 102ba531aa6c28f2d74bd0d7f1668e5861e3a6b8 
> 
> Diff: https://reviews.apache.org/r/34300/diff/
> 
> 
> Testing
> ---
> 
> Added some regression tests.
> 
> 
> Thanks,
> 
> Brian Wickman
> 
>