knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject git commit: KNOX-188 - do not generate the alias for encryptQueryString on every deployment. Must not overwrite a previous value.
Date Thu, 24 Oct 2013 18:55:09 GMT
Updated Branches:
  refs/heads/master b912ed689 -> e7057b723


KNOX-188 - do not generate the alias for encryptQueryString on every deployment. Must not
overwrite a previous value.

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

Branch: refs/heads/master
Commit: e7057b723fcd524c1f120523542be5bb24b83a95
Parents: b912ed6
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Thu Oct 24 14:54:12 2013 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Thu Oct 24 14:54:12 2013 -0400

----------------------------------------------------------------------
 .../gateway/securequery/SecureQueryDeploymentContributor.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-knox/blob/e7057b72/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributor.java
----------------------------------------------------------------------
diff --git a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributor.java
b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributor.java
index f534c1f..248e441 100644
--- a/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributor.java
+++ b/gateway-provider-rewrite-step-secure-query/src/main/java/org/apache/hadoop/gateway/securequery/SecureQueryDeploymentContributor.java
@@ -55,7 +55,11 @@ public class SecureQueryDeploymentContributor
     super.initializeContribution(context);
 
     String clusterName = context.getTopology().getName();
-    this.as.generateAliasForCluster(clusterName, "encryptQueryString");
+    
+    // we don't want to overwrite an existing alias from a previous topology deployment
+    // so we can't just blindly generateAlias here.
+    // this version of getPassword will generate a value for it only if missing
+    this.as.getPasswordFromAliasForCluster(clusterName, "encryptQueryString", true);
   }
 
   @Override


Mime
View raw message