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 73363: RANGER-3291: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
Date Thu, 20 May 2021 21:03:58 GMT

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

(Updated May 20, 2021, 9:03 p.m.)


Review request for ranger, Madhan Neethiraj, Mahesh Bandal, Ramesh Mani, Sailaja Polavarapu,
and Velmurugan Periasamy.


Changes
-------

Ensure that policyVersion is set correctly in the default service policies.


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


Repository: ranger


Description
-------

This issue is seen only if incremental policy downloads are enabled. If the first ever policy
download request made by the service returns no policies or policy-deltas (because ranger
repository does not contain any policies), then the policy-engine's value remains null. This
causes any subsequent incremental downloads to fail with NPE.

The fix is if the policy-engine does not require any update after policy download, then ensure
that it is initialized with default-service-policies.


Diffs (updated)
-----

  agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java 0aab80945

  security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 2369f4193 


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

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


Testing
-------

Passes all unit tests.


Thanks,

Abhay Kulkarni


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