You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Abhay Kulkarni <ak...@hortonworks.com> on 2020/07/14 19:56:10 UTC
Review Request 72680: RANGER-2772: Fix regression introduced by
earlier patch for applyPolicy REST API
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72680/
-----------------------------------------------------------
Review request for ranger, Dineshkumar Yadav, Madhan Neethiraj, and Velmurugan Periasamy.
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
-----
agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java dbdb78048
Diff: https://reviews.apache.org/r/72680/diff/1/
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
Re: Review Request 72680: RANGER-2772: Fix regression introduced by
earlier patch for applyPolicy REST API
Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72680/#review221211
-----------------------------------------------------------
Ship it!
Ship It!
- Madhan Neethiraj
On July 14, 2020, 7:56 p.m., Abhay Kulkarni wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72680/
> -----------------------------------------------------------
>
> (Updated July 14, 2020, 7:56 p.m.)
>
>
> Review request for ranger, Dineshkumar Yadav, Madhan Neethiraj, and Velmurugan Periasamy.
>
>
> 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
> -----
>
> agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java dbdb78048
>
>
> Diff: https://reviews.apache.org/r/72680/diff/1/
>
>
> 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
>
>