[ https://issues.apache.org/jira/browse/RANGER-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16876561#comment-16876561 ]
Ramesh Mani commented on RANGER-2494: ------------------------------------- [~bosco][~abhayk] I have added some unit test and more explanation to avoid confusion around this. > Ranger Custom PolicyCondition for TagsNotPresent and AnyTagPresent > ------------------------------------------------------------------- > > Key: RANGER-2494 > URL: https://issues.apache.org/jira/browse/RANGER-2494 > Project: Ranger > Issue Type: Bug > Components: Ranger > Affects Versions: master, 2.0.0 > Reporter: Ramesh Mani > Assignee: Ramesh Mani > Priority: Major > Fix For: 2.0.0 > > Attachments: RANGER-2494-04.patch > > > Ranger Custom PolicyCondition for TagsNotPresent and AnyTagPresent. > - Two new Custom Policy Conditions are to be created. > 1) RangerAnyOfExpectedTagsPresentConditionEvaluator - This condition > evaluates to "true" when "Any of the Policy condition Tag" defined is > present in the tags associated to the Resource. > * When any tag in the resourceTags matches policyConditionTags it should > return TRUE > * When no Tag Matches between resourceTags and PolicyConditionTags it should > return FALSE > * When policyConditionTags and resourceTags contains empty set it should > return TRUE as empty set matches. > * When policyConditionTags is not empty and resourceTags empty it should > return FALSE as there is no any match. > * When policyConditionTags is not empty and resourceTags empty it should > return FALSE as there is no any match. > * When policyConditionTags is NULL by any changes condition evaluator will > return TRUE > > 2) RangerNoneOfExpectedTagsPresentConditionEvaluator - This condition > evaluates to "true" when "None of the Policy condition Tag" defined is > present in the tags associated to the resource. > * When no Tag Matches between resourceTags and PolicyConditionTags it should > return TRUE > * When any Tag Matches between resourceTags and PolicyConditionTags it > should return FALSE > * When policyConditionTags and resourceTags both are empty is should return > FALSE as both matches. > * When policyConditionTags is not empty and resourceTags empty it should > return TRUE as there is no tag match between these two sets. > * When policyConditionTags is empty and resourceTags in not empty it should > return TRUE as there is no tag match between these two sets. > * When policyConditionTags is NULL by any changes condition evaluator will > return TRUE > These new custom policy conditions are in addition to the one created in > https://issues.apache.org/jira/browse/RANGER-2465 -- This message was sent by Atlassian JIRA (v7.6.3#76005)