You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Ramachandran Krishnan <ra...@gmail.com> on 2023/05/04 16:17:53 UTC

Re: Review Request 74397: RANGER-4188: updatePolicy results in 400 status code

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


Ship it!




Ship It!

- Ramachandran Krishnan


On April 14, 2023, 3:14 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74397/
> -----------------------------------------------------------
> 
> (Updated April 14, 2023, 3:14 p.m.)
> 
> 
> Review request for ranger, Abhishek  Kumar, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Nikhil P, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4188
>     https://issues.apache.org/jira/browse/RANGER-4188
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement: ** Ranger createPolicy request failed with response code 400 and following stacktrace.
> 
> 2023-04-12 16:05:31,526 INFO  org.apache.zookeeper.ClientCnxn: [Thread-2-SendThread(pfelker-dest-1.pfelker-dest.root.hwx.site:2181)]: Socket connection established, initiating se2023-04-12 16:30:53,674 INFO  org.apache.ranger.common.RESTErrorUtil: [https-jsse-nio-6182-exec-3]: Request failed. loginId=ranger, logMessage=policyID mismatch
> javax.ws.rs.WebApplicationException: null
>         at org.apache.ranger.common.RESTErrorUtil.createRESTException(RESTErrorUtil.java:338) [classes/:?]
>         at org.apache.ranger.rest.ServiceREST.updatePolicy(ServiceREST.java:1782) [classes/:?]
>         at org.apache.ranger.rest.ServiceREST.applyPolicy(ServiceREST.java:1749) [classes/:?]
>         at org.apache.ranger.rest.ServiceREST.createPolicy(ServiceREST.java:1658) [classes/:?]
>         
> **Proposed solution: ** After debugging the issue found the call from applyPolicy is sending policy id as null which is caused by RANGER-3883. Rather sending a null value the proposed patch shall pass the policy id.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 83086106b 
> 
> 
> Diff: https://reviews.apache.org/r/74397/diff/2/
> 
> 
> Testing
> -------
> 
> Tested the policy create request using a curl request on this patch change instance and got 200 response code.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>