----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70817/#review215766 -----------------------------------------------------------
agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerMultipleTagsConditionEvaluator.java Lines 36 (patched) <https://reviews.apache.org/r/70817/#comment302587> Please consider marking policyConditionTags this as 'final' agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerMultipleTagsConditionEvaluator.java Lines 48 (patched) <https://reviews.apache.org/r/70817/#comment302588> Please review if 'allowAny' can be avoided - by treating policyConditionTags.isEmpty() as a special case in isMatched() below. agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerMultipleTagsConditionEvaluator.java Lines 82 (patched) <https://reviews.apache.org/r/70817/#comment302585> policyConditionTags shouldn't be modified while evaluating in a policy. Also, there is no need to include context.getCurrentTagType(). agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerMultipleTagsConditionEvaluator.java Lines 84 (patched) <https://reviews.apache.org/r/70817/#comment302586> equals() expect the resource to have exactly the same tags as the policy. However, what is required is for the resource to have "at least" all the tags in the policy. So, #84 - #86 should be rewriten as: matched = resourceTags != null && resourceTags.containsAll(policyConditionTags); - Madhan Neethiraj On June 7, 2019, 11:42 p.m., Ramesh Mani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70817/ > ----------------------------------------------------------- > > (Updated June 7, 2019, 11:42 p.m.) > > > Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, > Madhan Neethiraj, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, > and Velmurugan Periasamy. > > > Repository: ranger > > > Description > ------- > > RANGER-2465:Create a PolicyCondition to apply if all given tags are present > for the accessed resource > > > Diffs > ----- > > > agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerMultipleTagsConditionEvaluator.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/70817/diff/1/ > > > Testing > ------- > > Tested in Local VM. > > > Thanks, > > Ramesh Mani > >
