Repository: ranger Updated Branches: refs/heads/master 41edc4675 -> e4a11c860
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/e4a11c86 Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/e4a11c86 Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/e4a11c86 Branch: refs/heads/master Commit: e4a11c860ab1a0151618d3579708b2c48076cf10 Parents: 41edc46 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:27:12 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/e4a11c86/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 b3aad74..bf588e2 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 @@ -140,8 +140,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()); }