Repository: ranger
Updated Branches:
  refs/heads/ranger-1 798e9e4dd -> 1f541a470


RANGER-2201:Fix to log no ranger audits when entityId value is not null or 
empty string

Signed-off-by: Mehul Parikh <me...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/1f541a47
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/1f541a47
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/1f541a47

Branch: refs/heads/ranger-1
Commit: 1f541a4702fe63529536fabf0afbbe8881c3abc6
Parents: 798e9e4
Author: nixonrodrigues <ni...@apache.org>
Authored: Mon Aug 27 17:57:44 2018 +0530
Committer: Mehul Parikh <me...@apache.org>
Committed: Mon Aug 27 20:28:29 2018 +0530

----------------------------------------------------------------------
 .../authorization/atlas/authorizer/RangerAtlasAuthorizer.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/1f541a47/plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
----------------------------------------------------------------------
diff --git 
a/plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
 
b/plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
index 29d66b0..c02e9e6 100644
--- 
a/plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
+++ 
b/plugin-atlas/src/main/java/org/apache/ranger/authorization/atlas/authorizer/RangerAtlasAuthorizer.java
@@ -141,8 +141,8 @@ public class RangerAtlasAuthorizer implements 
AtlasAuthorizer {
                 perf = RangerPerfTracer.getPerfTracer(PERF_LOG, 
"RangerAtlasAuthorizer.isAccessAllowed(" + request + ")");
             }
 
-            // not initializing audit handler, so that audits are not logged 
when entity details are NULL
-            if (!(request.getEntityId() == null && request.getClassification() 
== null && request.getEntity() == null)) {
+            // not initializing audit handler, so that audits are not logged 
when entity details are NULL or EMPTY STRING
+            if (!(StringUtils.isEmpty(request.getEntityId()) && 
request.getClassification() == null && request.getEntity() == null)) {
                 auditHandler = new RangerAtlasAuditHandler(request, 
getServiceDef());
             }
 

Reply via email to