> On July 1, 2019, 2:19 a.m., Ramesh Mani wrote:
> > agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerTagsNotPresentConditionEvaluator.java
> > Lines 72 (patched)
> > <https://reviews.apache.org/r/70981/diff/1/?file=2152911#file2152911line72>
> >
> >     when resourceTags will be null here.
> >     
> >     Set<String> resourceTags    = context.getAllTagTypes()  going to give 
> > either null or set of resource tags.
> >     So in that case when null we don't allow.
> >     I shall check for empty also here so it wont be confusing.
> 
> Don Bosco Durai wrote:
>     Ideally, it should be consistent. I not sure when we would get null. If 
> it is error condition, then not allowing is fine. But if it could be null 
> because there are no tags, then we should allow, because the condition says 
> "Tags not present", so empty tag list means the tags are not present.

I have updated the patch now. If resource-tags  are not null or empty, then 
only check for the corresponding matches is done, else matcher will return 
"true". I have updated the conditions in both the scenarios. Thanks.


- Ramesh


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


On July 1, 2019, 6:37 a.m., Ramesh Mani wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70981/
> -----------------------------------------------------------
> 
> (Updated July 1, 2019, 6:37 a.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Gautam Borad, Abhay Kulkarni, 
> Madhan Neethiraj, Pradeep Agrawal, Selvamohan Neethiraj, Sailaja Polavarapu, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-2494
>     https://issues.apache.org/jira/browse/RANGER-2494
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> RANGER-2494:Ranger Custom PolicyCondition for TagsNotPresent and AnyTagPresent
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerTagsAnyPresentConditionEvaluator.java
>  PRE-CREATION 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/conditionevaluator/RangerTagsNotPresentConditionEvaluator.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70981/diff/2/
> 
> 
> Testing
> -------
> 
> Testing done in LOCAL VM
> 
> 
> Thanks,
> 
> Ramesh Mani
> 
>

Reply via email to