You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@falcon.apache.org by Balu Vellanki <bv...@hortonworks.com> on 2015/08/10 16:29:42 UTC

Review Request 37297: Add supporting REST API calls for new UI

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

Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.


Bugs: FALCON-1316
    https://issues.apache.org/jira/browse/FALCON-1316


Repository: falcon-git


Description
-------

API to get authenticated user
API to clear hadoop.auth cookie
Add property that says if auth is enabled into admin/version API
Allow non-admin users access above apis.
Unit tests.


Diffs
-----

  common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
  prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
  prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
  prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 

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


Testing
-------

End2End testing done on multiple operating systems.


Thanks,

Balu Vellanki


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Ying Zheng <yz...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37297/#review101967
-----------------------------------------------------------

Ship it!


Ship It!

- Ying Zheng


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Ajay Yadava <aj...@gmail.com>.

> On Oct. 9, 2015, 6:38 a.m., Ajay Yadava wrote:
> > prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java, line 176
> > <https://reviews.apache.org/r/37297/diff/1/?file=1036331#file1036331line176>
> >
> >     Can you please elaborate on motivation for this API? Isn't the response for it always deduced from request parameters and hence already available to client? Not sure about the kerberos case though.
> 
> Balu Vellanki wrote:
>     Exactly, need this to help UI get the authenticated user in secure vs non-secure setups.

Earlier the authenticated user was always maintained in the HTML5 cache, if that is still the case then why do we need this API? Has that behavior changed, if yes then any particular reason for that as that seems like the better solution to me?


- Ajay


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


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Balu Vellanki <bv...@hortonworks.com>.

> On Oct. 9, 2015, 6:38 a.m., Ajay Yadava wrote:
> > prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java, line 159
> > <https://reviews.apache.org/r/37297/diff/1/?file=1036331#file1036331line159>
> >
> >     Isn't this more like a POST action?

This was brought up by Ying and will be addressed in a separate Jira.


> On Oct. 9, 2015, 6:38 a.m., Ajay Yadava wrote:
> > prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java, line 176
> > <https://reviews.apache.org/r/37297/diff/1/?file=1036331#file1036331line176>
> >
> >     Can you please elaborate on motivation for this API? Isn't the response for it always deduced from request parameters and hence already available to client? Not sure about the kerberos case though.

Exactly, need this to help UI get the authenticated user in secure vs non-secure setups.


> On Oct. 9, 2015, 6:38 a.m., Ajay Yadava wrote:
> > prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java, line 170
> > <https://reviews.apache.org/r/37297/diff/1/?file=1036331#file1036331line170>
> >
> >     I think returning HTTP Status 204 might be sufficient for your use cases, right?

Yes, there is no need to return any text. Just returning 204 would suffice.


- Balu


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


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Ajay Yadava <aj...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37297/#review98043
-----------------------------------------------------------



prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java (line 159)
<https://reviews.apache.org/r/37297/#comment154234>

    Isn't this more like a POST action?



prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java (line 170)
<https://reviews.apache.org/r/37297/#comment154237>

    I think returning HTTP Status 204 might be sufficient for your use cases, right?



prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java (line 176)
<https://reviews.apache.org/r/37297/#comment154240>

    Can you please elaborate on motivation for this API? Isn't the response for it always deduced from request parameters and hence already available to client? Not sure about the kerberos case though.


- Ajay Yadava


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Venkat Ranganathan <n....@live.com>.

> On Oct. 8, 2015, 2:47 p.m., Ying Zheng wrote:
> > prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java, line 159
> > <https://reviews.apache.org/r/37297/diff/1/?file=1036331#file1036331line159>
> >
> >     From the functionality, it looks more like a PUT method instead of GET. See details:
> >     
> >     http://www.restapitutorial.com/lessons/httpmethods.html
> >     
> >     The HTTP GET method is used to **read** (or retrieve) a representation of a resource.
> >     
> >     PUT is most-often utilized for **update** capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource.

This just manages the cookie handling - Even GET queries will update cookies


- Venkat


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


On Aug. 10, 2015, 7:29 a.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 7:29 a.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Ying Zheng <yz...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37297/#review101963
-----------------------------------------------------------



prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java (line 159)
<https://reviews.apache.org/r/37297/#comment159477>

    From the functionality, it looks more like a PUT method instead of GET. See details:
    
    http://www.restapitutorial.com/lessons/httpmethods.html
    
    The HTTP GET method is used to **read** (or retrieve) a representation of a resource.
    
    PUT is most-often utilized for **update** capabilities, PUT-ing to a known resource URI with the request body containing the newly-updated representation of the original resource.


- Ying Zheng


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Balu Vellanki <bv...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37297/#review101966
-----------------------------------------------------------



prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java (line 159)
<https://reviews.apache.org/r/37297/#comment159479>

    That makes sense Ying, I will open a separate Jira for this change.


- Balu Vellanki


On Aug. 10, 2015, 2:29 p.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 2:29 p.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>


Re: Review Request 37297: Add supporting REST API calls for new UI

Posted by Venkat Ranganathan <n....@live.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37297/#review101958
-----------------------------------------------------------

Ship it!


+1.   This is needed for 1315

- Venkat Ranganathan


On Aug. 10, 2015, 7:29 a.m., Balu Vellanki wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37297/
> -----------------------------------------------------------
> 
> (Updated Aug. 10, 2015, 7:29 a.m.)
> 
> 
> Review request for Falcon, Ajay Yadava, Sowmya Ramesh, and Venkat Ranganathan.
> 
> 
> Bugs: FALCON-1316
>     https://issues.apache.org/jira/browse/FALCON-1316
> 
> 
> Repository: falcon-git
> 
> 
> Description
> -------
> 
> API to get authenticated user
> API to clear hadoop.auth cookie
> Add property that says if auth is enabled into admin/version API
> Allow non-admin users access above apis.
> Unit tests.
> 
> 
> Diffs
> -----
> 
>   common/src/main/java/org/apache/falcon/security/DefaultAuthorizationProvider.java 449be80 
>   prism/src/main/java/org/apache/falcon/resource/admin/AdminResource.java 50b668c 
>   prism/src/test/java/org/apache/falcon/resource/admin/AdminResourceTest.java PRE-CREATION 
>   prism/src/test/java/org/apache/falcon/resource/admin/MockHttpServletResponse.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/37297/diff/
> 
> 
> Testing
> -------
> 
> End2End testing done on multiple operating systems.
> 
> 
> Thanks,
> 
> Balu Vellanki
> 
>