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 2019/10/08 18:34:00 UTC

Review Request 71593: RANGER-2610: NPE in PolicyRefresher if service-policies in policy-cache contain only service definition

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

Review request for ranger and Madhan Neethiraj.


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


Repository: ranger


Description
-------

If plugin cannot connect to ranger-admin server to download policies, it attempts to load policies from local policy cache file. If that file contains only service-definition, then policy-refresher code throws NPE. It does not affect access evaluation, however, it is better to check for such condition and avoid a NPE in plugin code.


Diffs
-----

  agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java b81f50c8f 
  agents-common/src/main/java/org/apache/ranger/plugin/util/PolicyRefresher.java d4d790274 


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


Testing
-------

Ran all unit tests.


Thanks,

Abhay Kulkarni


Re: Review Request 71593: RANGER-2610: NPE in PolicyRefresher if service-policies in policy-cache contain only service definition

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71593/#review218137
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Oct. 8, 2019, 6:34 p.m., Abhay Kulkarni wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/71593/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2019, 6:34 p.m.)
> 
> 
> Review request for ranger and Madhan Neethiraj.
> 
> 
> Bugs: RANGER-2610
>     https://issues.apache.org/jira/browse/RANGER-2610
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> If plugin cannot connect to ranger-admin server to download policies, it attempts to load policies from local policy cache file. If that file contains only service-definition, then policy-refresher code throws NPE. It does not affect access evaluation, however, it is better to check for such condition and avoid a NPE in plugin code.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java b81f50c8f 
>   agents-common/src/main/java/org/apache/ranger/plugin/util/PolicyRefresher.java d4d790274 
> 
> 
> Diff: https://reviews.apache.org/r/71593/diff/1/
> 
> 
> Testing
> -------
> 
> Ran all unit tests.
> 
> 
> Thanks,
> 
> Abhay Kulkarni
> 
>