knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pzamp...@apache.org
Subject knox git commit: KNOX-1154 - Dump Kerberos settings upon startup. (Rick Kellogg via Phil Zampino)
Date Wed, 16 May 2018 17:28:36 GMT
Repository: knox
Updated Branches:
  refs/heads/master d990bcb59 -> 925c879ae


KNOX-1154 - Dump Kerberos settings upon startup. (Rick Kellogg via Phil Zampino)


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

Branch: refs/heads/master
Commit: 925c879ae4bf2885dfa3844c21e42e38e9b75083
Parents: d990bcb
Author: Rick Kellogg <rkellogg@dqtools.com>
Authored: Thu Dec 21 16:30:58 2017 -0500
Committer: Phil Zampino <pzampino@apache.org>
Committed: Wed May 16 12:58:04 2018 -0400

----------------------------------------------------------------------
 .../java/org/apache/knox/gateway/GatewayServer.java | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/925c879a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
index 8ebaff8..2d6011e 100644
--- a/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
+++ b/gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java
@@ -231,12 +231,16 @@ public class GatewayServer {
   }
 
   private static void configureKerberosSecurity( GatewayConfig config ) {
-    System.setProperty(GatewayConfig.HADOOP_KERBEROS_SECURED, "true");
-    System.setProperty(GatewayConfig.KRB5_CONFIG, config.getKerberosConfig());
-    System.setProperty(GatewayConfig.KRB5_DEBUG,
-        Boolean.toString(config.isKerberosDebugEnabled()));
-    System.setProperty(GatewayConfig.KRB5_LOGIN_CONFIG, config.getKerberosLoginConfig());
-    System.setProperty(GatewayConfig.KRB5_USE_SUBJECT_CREDS_ONLY,  "false");
+    setSystemProperty(GatewayConfig.HADOOP_KERBEROS_SECURED, "true");
+    setSystemProperty(GatewayConfig.KRB5_CONFIG, config.getKerberosConfig());
+    setSystemProperty(GatewayConfig.KRB5_DEBUG, Boolean.toString(config.isKerberosDebugEnabled()));
+    setSystemProperty(GatewayConfig.KRB5_LOGIN_CONFIG, config.getKerberosLoginConfig());
+    setSystemProperty(GatewayConfig.KRB5_USE_SUBJECT_CREDS_ONLY,  "false");
+  }
+
+  private static void setSystemProperty(String name, String value) {
+	  System.setProperty(name, value);
+    log.logSysProp(name, System.getProperty(name));
   }
 
   private static Properties loadBuildProperties() {


Mime
View raw message