ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: ARGUS-14: Fix-Repository-Type-for-Knox-policy-operation
Date Wed, 27 Aug 2014 21:03:12 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master 2003d3ae6 -> 0521c1426


ARGUS-14: Fix-Repository-Type-for-Knox-policy-operation


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

Branch: refs/heads/master
Commit: 0521c14261b2d07fc0f76c9a039fa0eed8eba3db
Parents: 2003d3a
Author: sneethiraj <sneethir@apache.org>
Authored: Wed Aug 27 14:02:55 2014 -0700
Committer: sneethiraj <sneethir@apache.org>
Committed: Wed Aug 27 14:02:55 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/com/xasecure/biz/AssetMgr.java  | 18 +++++++++---------
 .../KnoxPolicyDeleteOperationDiff_tmpl.html       |  2 +-
 .../reports/KnoxPolicyOperationDiff_tmpl.html     |  2 +-
 .../KnoxPolicyUpdateOperationDiff_tmpl.html       |  3 ++-
 .../reports/PolicyDeleteOperationDiff_tmpl.html   |  2 +-
 .../reports/PolicyUpdateOperationDiff_tmpl.html   |  2 +-
 6 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
index 2e6a3fb..0a42024 100644
--- a/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
+++ b/security-admin/src/main/java/com/xasecure/biz/AssetMgr.java
@@ -1,18 +1,16 @@
 package com.xasecure.biz;
 
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.IOException;
 import java.security.cert.X509Certificate;
-import java.util.Date;
 import java.sql.Timestamp;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Random;
-import java.util.Map.Entry;
 import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.TimeUnit;
@@ -38,7 +36,6 @@ import org.springframework.transaction.support.TransactionTemplate;
 import com.xasecure.common.AppConstants;
 import com.xasecure.common.ContextUtil;
 import com.xasecure.common.DateUtil;
-import com.xasecure.common.GUIDUtil;
 import com.xasecure.common.JSONUtil;
 import com.xasecure.common.MessageEnums;
 import com.xasecure.common.PropertiesUtil;
@@ -74,7 +71,6 @@ import com.xasecure.view.VXAccessAuditList;
 import com.xasecure.view.VXAsset;
 import com.xasecure.view.VXAuditMap;
 import com.xasecure.view.VXAuditMapList;
-import com.xasecure.view.VXGroup;
 import com.xasecure.view.VXPermMap;
 import com.xasecure.view.VXPermMapList;
 import com.xasecure.view.VXPolicyExportAuditList;
@@ -2113,8 +2109,10 @@ public class AssetMgr extends AssetMgrBase {
 						if(tempPreviousArr[i].contains("{\"password")){
 							vXTrxLog.setPreviousValue(tempPreviousStr.replace(tempPreviousArr[i], "{\"password\":\"*****\"}"));
 							break;
-						}
-						if(tempPreviousArr[i].contains("\"password")){
+						}else if(tempPreviousArr[i].contains("\"password") && tempPreviousArr[i].contains("}")){
+							vXTrxLog.setPreviousValue(tempPreviousStr.replace(tempPreviousArr[i], "\"password\":\"******\"}"));
+							break;
+						}else if(tempPreviousArr[i].contains("\"password")){
 							vXTrxLog.setPreviousValue(tempPreviousStr.replace(tempPreviousArr[i], "\"password\":\"******\""));
 							break;
 						}
@@ -2127,8 +2125,10 @@ public class AssetMgr extends AssetMgrBase {
 						if(tempNewArr[i].contains("{\"password")){
 							vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], "{\"password\":\"*****\"}"));
 							break;
-						}
-						if(tempNewArr[i].contains("\"password")){
+						}else if(tempNewArr[i].contains("\"password") && tempNewArr[i].contains("}")){
+							vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], "\"password\":\"******\"}"));
+							break;
+						}else if(tempNewArr[i].contains("\"password")){
 							vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], "\"password\":\"******\""));
 							break;
 						}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/webapp/templates/reports/KnoxPolicyDeleteOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/reports/KnoxPolicyDeleteOperationDiff_tmpl.html
b/security-admin/src/main/webapp/templates/reports/KnoxPolicyDeleteOperationDiff_tmpl.html
index 7de39d2..9bb9d09 100644
--- a/security-admin/src/main/webapp/templates/reports/KnoxPolicyDeleteOperationDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/KnoxPolicyDeleteOperationDiff_tmpl.html
@@ -1,4 +1,4 @@
-<label class="no-margin label-size13-weightbold">ID : {{objectId}}</label>
+<label class="no-margin label-size13-weightbold">Name : {{objectName}}</label>
 <label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
 <label class="no-margin label-size13-weightbold"> Date  &nbsp;&nbsp;:  {{objectCreatedDate}}</label>
 <label class="no-margin label-size13-weightbold" > Deleted By  &nbsp;&nbsp;:
 {{userName}}</label>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/webapp/templates/reports/KnoxPolicyOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/reports/KnoxPolicyOperationDiff_tmpl.html
b/security-admin/src/main/webapp/templates/reports/KnoxPolicyOperationDiff_tmpl.html
index 29255a7..717f2ac 100644
--- a/security-admin/src/main/webapp/templates/reports/KnoxPolicyOperationDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/KnoxPolicyOperationDiff_tmpl.html
@@ -1,6 +1,6 @@
 <div class="diff-content">
 	<label class="no-margin label-size13-weightbold">Name : {{objectName}}</label>
-	<!-- <label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
-->
+	<label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
 	<label class="no-margin label-size13-weightbold"> Date  &nbsp;&nbsp;:  {{objectCreatedDate}}</label>
 	<label class="no-margin label-size13-weightbold" > Created By  &nbsp;&nbsp;:
 {{userName}}</label>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/webapp/templates/reports/KnoxPolicyUpdateOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/reports/KnoxPolicyUpdateOperationDiff_tmpl.html
b/security-admin/src/main/webapp/templates/reports/KnoxPolicyUpdateOperationDiff_tmpl.html
index 99297a3..c58fea8 100644
--- a/security-admin/src/main/webapp/templates/reports/KnoxPolicyUpdateOperationDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/KnoxPolicyUpdateOperationDiff_tmpl.html
@@ -1,7 +1,8 @@
 <div class="diff-content">
 	<div class="row-fluid">
 		<div class="span6">
-			<label class="no-margin label-size13-weightbold">ID : {{objectId}}</label>
+			<!-- <label class="no-margin label-size13-weightbold">ID : {{objectId}}</label>
-->
+			<label class="no-margin label-size13-weightbold">Name : {{objectName}}</label>
 			<label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
 			<label class="no-margin label-size13-weightbold"> Date  &nbsp;&nbsp;:  {{objectCreatedDate}}</label>
 			<label class="no-margin label-size13-weightbold" > Updated By  &nbsp;&nbsp;:
 {{userName}}</label>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/webapp/templates/reports/PolicyDeleteOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/reports/PolicyDeleteOperationDiff_tmpl.html
b/security-admin/src/main/webapp/templates/reports/PolicyDeleteOperationDiff_tmpl.html
index c52ddc7..909bcd0 100644
--- a/security-admin/src/main/webapp/templates/reports/PolicyDeleteOperationDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PolicyDeleteOperationDiff_tmpl.html
@@ -1,4 +1,4 @@
-<label class="no-margin label-size13-weightbold">ID : {{objectId}}</label>
+<label class="no-margin label-size13-weightbold">Name : {{objectName}}</label>
 <label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
 <label class="no-margin label-size13-weightbold"> Date  &nbsp;&nbsp;:  {{objectCreatedDate}}</label>
 <label class="no-margin label-size13-weightbold" > Deleted By  &nbsp;&nbsp;:
 {{userName}}</label>

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/0521c142/security-admin/src/main/webapp/templates/reports/PolicyUpdateOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/reports/PolicyUpdateOperationDiff_tmpl.html
b/security-admin/src/main/webapp/templates/reports/PolicyUpdateOperationDiff_tmpl.html
index 1c5657d..795bc34 100644
--- a/security-admin/src/main/webapp/templates/reports/PolicyUpdateOperationDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PolicyUpdateOperationDiff_tmpl.html
@@ -1,7 +1,7 @@
 <div class="diff-content">
 	<div class="row-fluid">
 		<div class="span6">
-			<label class="no-margin label-size13-weightbold">ID : {{objectId}}</label>
+			<label class="no-margin label-size13-weightbold">Name : {{objectName}}</label>
 			<label class="no-margin label-size13-weightbold">Repository Type : {{repositoryType}}</label>
 			<label class="no-margin label-size13-weightbold"> Date  &nbsp;&nbsp;:  {{objectCreatedDate}}</label>
 			<label class="no-margin label-size13-weightbold" > Updated By  &nbsp;&nbsp;:
 {{userName}}</label>


Mime
View raw message