Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 76a2eeef4 -> 3822217cd


AMBARI-16782. API output show protocol as http on 'https' and SSL enabled 
Ambari server (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3822217c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3822217c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3822217c

Branch: refs/heads/branch-2.4
Commit: 3822217cdb78aa1894f43eba4f1d9689013fa8f3
Parents: 76a2eee
Author: Nate Cole <[email protected]>
Authored: Fri May 20 06:55:33 2016 -0400
Committer: Nate Cole <[email protected]>
Committed: Fri May 20 06:55:33 2016 -0400

----------------------------------------------------------------------
 .../org/apache/ambari/server/controller/AmbariServer.java   | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3822217c/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index db66961..99a6cab 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -19,9 +19,6 @@
 package org.apache.ambari.server.controller;
 
 
-import javax.crypto.BadPaddingException;
-import javax.servlet.DispatcherType;
-
 import java.io.File;
 import java.io.IOException;
 import java.net.Authenticator;
@@ -34,6 +31,9 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.LogManager;
 
+import javax.crypto.BadPaddingException;
+import javax.servlet.DispatcherType;
+
 import org.apache.ambari.eventdb.webservice.WorkflowJsonService;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StateRecoveryManager;
@@ -556,6 +556,7 @@ public class AmbariServer {
 
         HttpConfiguration httpConfigurationSSL = new HttpConfiguration();
         httpConfigurationSSL.setSecurePort(configs.getClientSSLApiPort());
+        httpConfigurationSSL.addCustomizer(new SecureRequestCustomizer());
         setHeaderSize(httpConfigurationSSL);
 
         ServerConnector https = new ServerConnector(server, new 
SslConnectionFactory(contextFactoryApi, "http/1.1"),
@@ -747,7 +748,7 @@ public class AmbariServer {
     // by default all protocols should be available
     factory.setExcludeProtocols();
     factory.setIncludeProtocols(new String[] { "SSLv2Hello","TLSv1"});
-    
+
     if (!configs.getSrvrDisabledCiphers().isEmpty()) {
       String[] masks = 
configs.getSrvrDisabledCiphers().split(DISABLED_ENTRIES_SPLITTER);
       factory.setExcludeCipherSuites(masks);

Reply via email to