You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Dineshkumar Yadav <di...@outlook.com> on 2020/10/13 15:59:29 UTC

Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

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

Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.


Repository: ranger


Description
-------

When import policy api is called and @PreAuthorize fails It does not return proper response with status code.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 


Diff: https://reviews.apache.org/r/72958/diff/1/


Testing
-------

after changes it is returning response with status-code

{"statusCode":401,"msgDesc":"User is not allowed to access the API"}


Thanks,

Dineshkumar Yadav


Re: Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

Posted by Mehul Parikh <xs...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72958/#review222146
-----------------------------------------------------------


Ship it!




Ship It!

- Mehul Parikh


On Oct. 29, 2020, 11:44 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72958/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2020, 11:44 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When import policy api is called and @PreAuthorize fails It does not return proper response with status code.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 
> 
> 
> Diff: https://reviews.apache.org/r/72958/diff/3/
> 
> 
> Testing
> -------
> 
> after changes it is returning response with status-code
> 
> {"statusCode":401,"msgDesc":"User is not allowed to access the API"}
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>


Re: Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

Posted by Dineshkumar Yadav <di...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72958/
-----------------------------------------------------------

(Updated Oct. 29, 2020, 11:44 a.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.


Changes
-------

change the method to produce same response code as HTTP status code


Repository: ranger


Description
-------

When import policy api is called and @PreAuthorize fails It does not return proper response with status code.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 


Diff: https://reviews.apache.org/r/72958/diff/3/

Changes: https://reviews.apache.org/r/72958/diff/2-3/


Testing
-------

after changes it is returning response with status-code

{"statusCode":401,"msgDesc":"User is not allowed to access the API"}


Thanks,

Dineshkumar Yadav


Re: Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72958/#review222097
-----------------------------------------------------------


Ship it!




Ship It!

- Abhay Kulkarni


On Oct. 20, 2020, 4:41 a.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72958/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2020, 4:41 a.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When import policy api is called and @PreAuthorize fails It does not return proper response with status code.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 
> 
> 
> Diff: https://reviews.apache.org/r/72958/diff/2/
> 
> 
> Testing
> -------
> 
> after changes it is returning response with status-code
> 
> {"statusCode":401,"msgDesc":"User is not allowed to access the API"}
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>


Re: Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

Posted by Dineshkumar Yadav <di...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72958/
-----------------------------------------------------------

(Updated Oct. 20, 2020, 4:41 a.m.)


Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.


Changes
-------

Code changes for returning proper response code in all pre authorization


Repository: ranger


Description
-------

When import policy api is called and @PreAuthorize fails It does not return proper response with status code.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 


Diff: https://reviews.apache.org/r/72958/diff/2/

Changes: https://reviews.apache.org/r/72958/diff/1-2/


Testing
-------

after changes it is returning response with status-code

{"statusCode":401,"msgDesc":"User is not allowed to access the API"}


Thanks,

Dineshkumar Yadav


Re: Review Request 72958: RANGER-3037 : Import policy API is not returning proper response in case pre authorization fails

Posted by Abhay Kulkarni <ak...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72958/#review222065
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java
Line 96 (original), 97 (patched)
<https://reviews.apache.org/r/72958/#comment311133>

    Please consider if this also needs to be changed. Also review other places in this file for the same.


- Abhay Kulkarni


On Oct. 13, 2020, 3:59 p.m., Dineshkumar Yadav wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72958/
> -----------------------------------------------------------
> 
> (Updated Oct. 13, 2020, 3:59 p.m.)
> 
> 
> Review request for ranger, Ankita Sinha, Gautam Borad, Kishor Gollapalliwar, Abhay Kulkarni, Mehul Parikh, and Velmurugan Periasamy.
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When import policy api is called and @PreAuthorize fails It does not return proper response with status code.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/security/context/RangerPreAuthSecurityHandler.java a4bf69486 
> 
> 
> Diff: https://reviews.apache.org/r/72958/diff/1/
> 
> 
> Testing
> -------
> 
> after changes it is returning response with status-code
> 
> {"statusCode":401,"msgDesc":"User is not allowed to access the API"}
> 
> 
> Thanks,
> 
> Dineshkumar Yadav
> 
>