> On Oct. 6, 2019, 4:13 p.m., Madhan Neethiraj wrote: > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerAuthContext.java > > Lines 82 (patched) > > <https://reviews.apache.org/r/71584/diff/1/?file=2168195#file2168195line82> > > > > when 'other' is null but 'policyEngine' is not (refer to call from > > RangerPolicyEngineImpl.java #230), this.policyEngine is set to null #92. > > This perhaps isn't right? Please review.
The condition that policyEngine not null and other is null will never happen when a policy-engine is being constructed using policy-deltas from an existing policy-engine. Please refer to (RangerPolicyEngineImpl.java #269). I can take out the check in RangerAuthContext.java construction, if that is confusing. - Abhay ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/71584/#review218098 ----------------------------------------------------------- On Oct. 5, 2019, 10:27 p.m., Abhay Kulkarni wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/71584/ > ----------------------------------------------------------- > > (Updated Oct. 5, 2019, 10:27 p.m.) > > > Review request for ranger and Madhan Neethiraj. > > > Bugs: RANGER-2510 > https://issues.apache.org/jira/browse/RANGER-2510 > > > Repository: ranger > > > Description > ------- > > Ensure that policy cache is correctly updated when only resource policy is > updated. Also, ensure that updated policy-engine is used for evaluation when > policy deltas are used to build policy engine. > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineCache.java > 5dae0c12b > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyEngineImpl.java > 576d5e5bb > > agents-common/src/main/java/org/apache/ranger/plugin/policyengine/RangerPolicyRepository.java > ae88c73ea > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerAuthContext.java > 6cd1df69e > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java > 1325a4020 > > agents-common/src/main/java/org/apache/ranger/plugin/util/RangerPolicyDeltaUtil.java > 9c50f8a33 > > agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java > ef5f1d53f > > agents-common/src/main/java/org/apache/ranger/plugin/util/ServiceDefUtil.java > 596f5e841 > > agents-common/src/main/java/org/apache/ranger/plugin/util/ServicePolicies.java > f6beac675 > security-admin/src/main/java/org/apache/ranger/biz/ServiceDBStore.java > 51e08e14b > > > Diff: https://reviews.apache.org/r/71584/diff/1/ > > > Testing > ------- > > Tested: > 1. policy-cache is correctly updated. > 2. Policy evaluation when tag policies are updated. > 3. Policy evaluation when tags are updated. > > > Thanks, > > Abhay Kulkarni > >