This is an automated email from the ASF dual-hosted git repository.

pengjianhua pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git


The following commit(s) were added to refs/heads/master by this push:
     new f8e89b6  RANGER-2533: update xasecure.audit.is.enabled default value 
to true in AuditProviderFactory.java and remove unnecessary unit test changes
f8e89b6 is described below

commit f8e89b63f9fde52c54c181b27b353fe93da4751c
Author: xingpeng1 <xing.pe...@zte.com.cn>
AuthorDate: Sat Aug 31 10:33:05 2019 +0800

    RANGER-2533: update xasecure.audit.is.enabled default value to true in 
AuditProviderFactory.java and remove unnecessary unit test changes
    
    Signed-off-by: peng.jianhua <peng.jian...@zte.com.cn>
---
 .../java/org/apache/ranger/audit/provider/AuditProviderFactory.java     | 2 +-
 .../src/test/java/org/apache/ranger/audit/TestAuditQueue.java           | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java
 
b/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java
index 405fb1d..88cf99b 100644
--- 
a/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java
+++ 
b/agents-audit/src/main/java/org/apache/ranger/audit/provider/AuditProviderFactory.java
@@ -125,7 +125,7 @@ public class AuditProviderFactory {
                MiscUtil.setApplicationType(appType);
 
                boolean isEnabled = MiscUtil.getBooleanProperty(props,
-                               AUDIT_IS_ENABLED_PROP, false);
+                               AUDIT_IS_ENABLED_PROP, true);
         if (!isEnabled) {
             LOG.info("AuditProviderFactory: Audit not enabled..");
             mProvider = getDefaultProvider();
diff --git 
a/security-admin/src/test/java/org/apache/ranger/audit/TestAuditQueue.java 
b/security-admin/src/test/java/org/apache/ranger/audit/TestAuditQueue.java
index 99b7c49..cb0dcc4 100644
--- a/security-admin/src/test/java/org/apache/ranger/audit/TestAuditQueue.java
+++ b/security-admin/src/test/java/org/apache/ranger/audit/TestAuditQueue.java
@@ -179,7 +179,6 @@ public class TestAuditQueue {
                logger.debug("testAuditSummaryByInfra()...");
 
                Properties props = new Properties();
-               props.put(AuditProviderFactory.AUDIT_IS_ENABLED_PROP, "true");
                // Destination
                String propPrefix = AuditProviderFactory.AUDIT_DEST_BASE + 
".test";
                props.put(propPrefix, "enable");
@@ -595,7 +594,6 @@ public class TestAuditQueue {
                File logFile = new File(logFolder, logFileName);
 
                Properties props = new Properties();
-               props.put(AuditProviderFactory.AUDIT_IS_ENABLED_PROP, "true");
                // Destination
                String filePropPrefix = AuditProviderFactory.AUDIT_DEST_BASE + 
".file";
                props.put(filePropPrefix, "enable");

Reply via email to