-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/74397/
-----------------------------------------------------------
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
5542250aa
Diff: https://reviews.apache.org/r/74397/diff/1/
Testing
-------
Tested the policy create request using a curl request on this patch change
instance and got 200 response code.
Thanks,
Pradeep Agrawal