Merge branch '1.6.1-SNAPSHOT'

Conflicts:
        
server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java


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

Branch: refs/heads/master
Commit: eeb06e3a17839c7f256164675b1f3a4077d59f8a
Parents: a458a2f 4d70739
Author: Josh Elser <els...@apache.org>
Authored: Thu Aug 7 13:39:43 2014 -0400
Committer: Josh Elser <els...@apache.org>
Committed: Thu Aug 7 13:56:21 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/core/conf/Property.java |  2 ++
 .../accumulo/monitor/EmbeddedWebServer.java     | 27 ++++++++++++++------
 2 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/eeb06e3a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eeb06e3a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java
----------------------------------------------------------------------
diff --cc 
server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java
index c76b4cf,888913a..0ff914a
--- 
a/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java
+++ 
b/server/monitor/src/main/java/org/apache/accumulo/monitor/EmbeddedWebServer.java
@@@ -18,11 -18,13 +18,13 @@@ package org.apache.accumulo.monitor
  
  import javax.servlet.http.HttpServlet;
  
+ import org.apache.accumulo.core.conf.AccumuloConfiguration;
  import org.apache.accumulo.core.conf.Property;
+ import org.apache.hadoop.util.StringUtils;
 +import org.eclipse.jetty.server.HttpConnectionFactory;
  import org.eclipse.jetty.server.Server;
 -import org.eclipse.jetty.server.nio.SelectChannelConnector;
 +import org.eclipse.jetty.server.ServerConnector;
  import org.eclipse.jetty.server.session.SessionHandler;
 -import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
  import org.eclipse.jetty.servlet.ServletContextHandler;
  import org.eclipse.jetty.util.ssl.SslContextFactory;
  
@@@ -40,20 -42,29 +42,29 @@@ public class EmbeddedWebServer 
  
    public EmbeddedWebServer(String host, int port) {
      server = new Server();
-     if 
(EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE))
-         || 
EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS))
-         || 
EMPTY.equals(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE))
 || EMPTY.equals(Monitor.getSystemConfiguration().get(
- Property.MONITOR_SSL_TRUSTSTOREPASS))) {
+     final AccumuloConfiguration conf = Monitor.getSystemConfiguration();
+     if (EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTORE)) || 
EMPTY.equals(conf.get(Property.MONITOR_SSL_KEYSTOREPASS))
+         || EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTORE)) || 
EMPTY.equals(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS))) {
 -      connector = new SelectChannelConnector();
 +      connector = new ServerConnector(server, new HttpConnectionFactory());
        usingSsl = false;
      } else {
        SslContextFactory sslContextFactory = new SslContextFactory();
-       
sslContextFactory.setKeyStorePath(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTORE));
-       
sslContextFactory.setKeyStorePassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_KEYSTOREPASS));
-       
sslContextFactory.setTrustStorePath(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTORE));
-       
sslContextFactory.setTrustStorePassword(Monitor.getSystemConfiguration().get(Property.MONITOR_SSL_TRUSTSTOREPASS));
+       
sslContextFactory.setKeyStorePath(conf.get(Property.MONITOR_SSL_KEYSTORE));
+       
sslContextFactory.setKeyStorePassword(conf.get(Property.MONITOR_SSL_KEYSTOREPASS));
 -      
sslContextFactory.setTrustStore(conf.get(Property.MONITOR_SSL_TRUSTSTORE));
++      
sslContextFactory.setTrustStorePath(conf.get(Property.MONITOR_SSL_TRUSTSTORE));
+       
sslContextFactory.setTrustStorePassword(conf.get(Property.MONITOR_SSL_TRUSTSTOREPASS));
+ 
+       final String includedCiphers = 
conf.get(Property.MONITOR_SSL_INCLUDE_CIPHERS);
+       if 
(!Property.MONITOR_SSL_INCLUDE_CIPHERS.getDefaultValue().equals(includedCiphers))
 {
+         
sslContextFactory.setIncludeCipherSuites(StringUtils.split(includedCiphers, 
','));
+       }
+ 
+       final String excludedCiphers = 
conf.get(Property.MONITOR_SSL_EXCLUDE_CIPHERS);
+       if 
(!Property.MONITOR_SSL_EXCLUDE_CIPHERS.getDefaultValue().equals(excludedCiphers))
 {
+         
sslContextFactory.setExcludeCipherSuites(StringUtils.split(excludedCiphers, 
','));
+       }
  
 -      connector = new SslSelectChannelConnector(sslContextFactory);
 +      connector = new ServerConnector(server, sslContextFactory);
        usingSsl = true;
      }
  

Reply via email to