ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject [1/2] incubator-ranger git commit: RANGER-361: modified default value for SSLEnabled flag and handling of the flag in web server
Date Thu, 02 Apr 2015 03:01:36 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 32f3262bc -> 62fa3616a


RANGER-361: modified default value for SSLEnabled flag and handling of the flag in web server

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


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

Branch: refs/heads/master
Commit: e70adbe4a91b9bfca26b41326345cfa63120bb46
Parents: d13617a
Author: sneethiraj <sneethir@apache.org>
Authored: Wed Apr 1 20:09:39 2015 -0400
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Wed Apr 1 20:34:10 2015 -0400

----------------------------------------------------------------------
 embeddedwebserver/conf/ranger_webserver.properties             | 6 +++---
 .../java/org/apache/ranger/server/tomcat/EmbeddedServer.java   | 6 ++++--
 2 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/e70adbe4/embeddedwebserver/conf/ranger_webserver.properties
----------------------------------------------------------------------
diff --git a/embeddedwebserver/conf/ranger_webserver.properties b/embeddedwebserver/conf/ranger_webserver.properties
index 7c98687..2cc1e0d 100644
--- a/embeddedwebserver/conf/ranger_webserver.properties
+++ b/embeddedwebserver/conf/ranger_webserver.properties
@@ -23,9 +23,9 @@ service.shutdownCommand=SHUTDOWN
 
 #
 # SSL Connector Information
-#
-#https.service.port=6182
-https.attrib.SSLEnabled=true
+# 
+https.service.port=6182
+https.attrib.SSLEnabled=false 
 https.attrib.sslProtocol=TLS
 https.attrib.clientAuth=false
 https.attrib.keyAlias=myKey

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/e70adbe4/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
----------------------------------------------------------------------
diff --git a/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
b/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
index 4460aa8..75653f8 100644
--- a/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
+++ b/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/EmbeddedServer.java
@@ -112,13 +112,15 @@ public class EmbeddedServer {
 		server.setPort(serverPort);
 		server.getServer().setPort(shutdownPort);
 		server.getServer().setShutdown(shutdownCommand);
+
+		boolean isHttpsEnabled = Boolean.valueOf(getConfig("https.attrib.SSLEnabled", "false"));
 		
-		if (sslPort > 0) {
+		if ((sslPort > 0) && isHttpsEnabled) {
 			Connector ssl = new Connector() ;
 			ssl.setPort(sslPort) ;
 			ssl.setSecure(true);
 			ssl.setScheme("https") ;
-			ssl.setAttribute("SSLEnabled", getConfig("https.attrib.SSLEnabled", "true"));
+			ssl.setAttribute("SSLEnabled", "true") ;
 			ssl.setAttribute("sslProtocol", getConfig("https.attrib.sslProtocol", "TLS")) ;
 			ssl.setAttribute("clientAuth", getConfig("https.attrib.clientAuth", "false"));
 			ssl.setAttribute("keyAlias", getConfig("https.attrib.keyAlias") ) ;


Mime
View raw message