You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by pr...@apache.org on 2021/12/09 04:24:30 UTC
[ranger] 02/02: RANGER-3490 : Make policy resource signature is unique in a service part2
This is an automated email from the ASF dual-hosted git repository.
pradeep pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
commit 65543320e43b94e09b07eba647bf347b8b64fe14
Author: Dineshkumar Yadav <di...@outlook.com>
AuthorDate: Tue Dec 7 13:32:41 2021 +0530
RANGER-3490 : Make policy resource signature is unique in a service part2
Signed-off-by: pradeep <pr...@apache.org>
---
.../org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java b/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java
index 77b274e..a2f4b9a 100644
--- a/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java
+++ b/agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPolicyResourceSignature.java
@@ -121,8 +121,8 @@ public class RangerPolicyResourceSignature {
LOG.debug("isPolicyValidForResourceSignatureComputation: resources collection on policy was null!");
} else if (_policy.getResources().containsKey(null)) {
LOG.debug("isPolicyValidForResourceSignatureComputation: resources collection has resource with null name!");
- } else if (StringUtils.isEmpty(_policy.getGuid())) {
- LOG.debug("isPolicyValidForResourceSignatureComputation: policy GUID is empty!");
+ } else if (!_policy.getIsEnabled() && StringUtils.isEmpty(_policy.getGuid())) {
+ LOG.debug("isPolicyValidForResourceSignatureComputation: policy GUID is empty for a disabled policy!");
} else {
valid = true;
}