hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject incubator-hawq git commit: HAWQ-1443. Implement Ranger lookup for HAWQ with Kerberos enabled.
Date Sat, 27 May 2017 02:09:26 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 9775424ba -> 6768af3e0


HAWQ-1443. Implement Ranger lookup for HAWQ with Kerberos enabled.


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

Branch: refs/heads/master
Commit: 6768af3e033737ba6386c76ef0c8b201c0706938
Parents: 9775424
Author: hubertzhang <hubertzhang@apache.org>
Authored: Sat May 27 10:06:11 2017 +0800
Committer: hubertzhang <hubertzhang@apache.org>
Committed: Sat May 27 10:06:11 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/hawq/ranger/service/HawqClient.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/6768af3e/ranger-plugin/admin-plugin/src/main/java/org/apache/hawq/ranger/service/HawqClient.java
----------------------------------------------------------------------
diff --git a/ranger-plugin/admin-plugin/src/main/java/org/apache/hawq/ranger/service/HawqClient.java
b/ranger-plugin/admin-plugin/src/main/java/org/apache/hawq/ranger/service/HawqClient.java
index 7e05a82..f8a252b 100644
--- a/ranger-plugin/admin-plugin/src/main/java/org/apache/hawq/ranger/service/HawqClient.java
+++ b/ranger-plugin/admin-plugin/src/main/java/org/apache/hawq/ranger/service/HawqClient.java
@@ -72,7 +72,7 @@ public class HawqClient extends BaseClient {
     private static final String DEFAULT_DATABASE = "postgres";
     private static final String JDBC_DRIVER_CLASS = "org.postgresql.Driver";
 
-    private boolean isKerberosAuth;
+    private boolean isKerberosAuth = false;
     private Connection con;
     private Map<String, String> connectionProperties;
     
@@ -94,7 +94,9 @@ public class HawqClient extends BaseClient {
     }
     
     public void initHawq() throws Exception {
-		isKerberosAuth = connectionProperties.get(AUTHENTICATION).equals(KERBEROS);
+    	if(connectionProperties.containsKey(AUTHENTICATION)) {
+    		isKerberosAuth = connectionProperties.get(AUTHENTICATION).equals(KERBEROS);
+    	}
 		if (isKerberosAuth) {
 			LOG.info("Secured Mode: JDBC Connection done with preAuthenticated Subject");
 			


Mime
View raw message