ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhay Kulkarni <akulka...@hortonworks.com>
Subject Re: Review Request 72670: RANGER-2772: Fix regression introduced by earlier patch for applyPolicy REST API
Date Tue, 14 Jul 2020 19:29:22 GMT

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

(Updated July 14, 2020, 7:29 p.m.)


Review request for ranger, Dineshkumar Yadav, Madhan Neethiraj, and Velmurugan Periasamy.


Changes
-------

Addressed review comment


Bugs: RANGER-2772
    https://issues.apache.org/jira/browse/RANGER-2772


Repository: ranger


Description
-------

applyPolicy() semantics implies that it is equivalent to createPolicy() with 'mergeIfExists'
set to value "true". However, a regression was introduced by a patch for RANGER-2772 which
violates this implication; 'mergeIfExists' is presumed to be set to "false" by default. This
leads to applyPolicy() to implement updatePolicy() semantics when it's target is an existing
policy.


Diffs (updated)
-----

  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 3422e436b 


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

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


Testing
-------

Verified that default value of 'mergeIfExists' is set up correctly in all (two) contexts.
1. When it is used from createPolicy(), and
2. When it is invoked through REST API.

Verified that legacy code using applyPolicy REST API is not broken.


Thanks,

Abhay Kulkarni


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message