ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dillido...@apache.org
Subject git commit: ARGUS-12: Knox Audit Event times are not shown correctly
Date Wed, 27 Aug 2014 23:09:32 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master b27ae69da -> 895f0f2c7


ARGUS-12: Knox Audit Event times are not shown correctly


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/895f0f2c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/895f0f2c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/895f0f2c

Branch: refs/heads/master
Commit: 895f0f2c7992c1ba0ccf85a931311272c8043702
Parents: b27ae69
Author: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Authored: Wed Aug 27 14:53:20 2014 -0700
Committer: Dilli Dorai Arumugam <darumugam@hortonworks.com>
Committed: Wed Aug 27 14:53:20 2014 -0700

----------------------------------------------------------------------
 .../java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/895f0f2c/agents-impl/src/main/java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java
----------------------------------------------------------------------
diff --git a/agents-impl/src/main/java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java
b/agents-impl/src/main/java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java
index af67146..92c0a4a 100644
--- a/agents-impl/src/main/java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java
+++ b/agents-impl/src/main/java/com/xasecure/pdp/knox/filter/XASecurePDPKnoxFilter.java
@@ -21,7 +21,6 @@ package com.xasecure.pdp.knox.filter;
 import java.io.IOException;
 import java.security.AccessController;
 import java.security.Principal;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.Set;
 
@@ -49,6 +48,7 @@ import com.xasecure.authorization.hadoop.config.XaSecureConfiguration;
 import com.xasecure.authorization.hadoop.constants.XaSecureHadoopConstants;
 import com.xasecure.authorization.knox.KnoxAccessVerifier;
 import com.xasecure.authorization.knox.KnoxAccessVerifierFactory;
+import com.xasecure.authorization.utils.StringUtil;
 
 public class XASecurePDPKnoxFilter implements Filter {
 
@@ -188,7 +188,7 @@ public class XASecurePDPKnoxFilter implements Filter {
 		auditEvent.setResourceType("service");
 		auditEvent.setAccessType(accessType);
 		auditEvent.setClientIP(clientIp);
-		auditEvent.setEventTime(new Date());
+		auditEvent.setEventTime(StringUtil.getUTCDate());
 		auditEvent.setAccessResult((short) (accessGranted ? 1 : 0));
 		auditEvent.setResultReason(null);
 		auditEvent.setRepositoryType(EnumRepositoryType.KNOX);


Mime
View raw message