diff options
author | Alex Rudyy <orudyy@apache.org> | 2013-01-18 17:56:36 +0000 |
---|---|---|
committer | Alex Rudyy <orudyy@apache.org> | 2013-01-18 17:56:36 +0000 |
commit | a04baaa2b75f271b79730f0e3dc3a740a3c14a11 (patch) | |
tree | 2d7234c6e5de0a3359780bde7de8139aa7d71e6d | |
parent | 02761632159ea75911384e83f277ffaf463d9fb8 (diff) | |
download | qpid-python-a04baaa2b75f271b79730f0e3dc3a740a3c14a11.tar.gz |
QPID-4390: Add defaults to http management
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-broker-config-qpid-4390@1435278 13f79535-47bb-0310-9956-ffa450edef68
17 files changed, 238 insertions, 260 deletions
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpConfiguration.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpConfiguration.java deleted file mode 100644 index e0767b34bc..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpConfiguration.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -package org.apache.qpid.server.management.plugin; - -public class HttpConfiguration -{ - private final int _sessionTimeout; - private final boolean _httpBasicAuthenticationEnabled; - private final boolean _httpsBasicAuthenticationEnabled; - private final boolean _httpSaslAuthenticationEnabled; - private final boolean _httpsSaslAuthenticationEnabled; - - private final String _keyStorePath; - private final String _keyStorePassword; - - public HttpConfiguration(int sessionTimeout, boolean httpBasicAuthenticationEnabled, boolean httpsBasicAuthenticationEnabled, - boolean httpSaslAuthenticationEnabled, boolean httpsSaslAuthenticationEnabled, String keyStorePath, String keyStorePassword) - { - super(); - _sessionTimeout = sessionTimeout; - _httpBasicAuthenticationEnabled = httpBasicAuthenticationEnabled; - _httpsBasicAuthenticationEnabled = httpsBasicAuthenticationEnabled; - _httpSaslAuthenticationEnabled = httpSaslAuthenticationEnabled; - _httpsSaslAuthenticationEnabled = httpsSaslAuthenticationEnabled; - _keyStorePath = keyStorePath; - _keyStorePassword = keyStorePassword; - } - - public int getSessionTimeout() - { - return _sessionTimeout; - } - - public boolean isHttpSaslAuthenticationEnabled() - { - return _httpSaslAuthenticationEnabled; - } - - public boolean isHttpBasicAuthenticationEnabled() - { - return _httpBasicAuthenticationEnabled; - } - - public boolean isHttpsSaslAuthenticationEnabled() - { - return _httpsSaslAuthenticationEnabled; - } - - public boolean isHttpsBasicAuthenticationEnabled() - { - return _httpsBasicAuthenticationEnabled; - } - - public String getKeyStorePath() - { - return _keyStorePath; - } - - public String getKeyStorePassword() - { - return _keyStorePassword; - } - -} diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java index 9c7ac10892..53da03be30 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java @@ -29,6 +29,7 @@ import java.util.Map; import java.util.UUID; import org.apache.log4j.Logger; +import org.apache.qpid.server.configuration.IllegalConfigurationException; import org.apache.qpid.server.logging.actors.CurrentActor; import org.apache.qpid.server.logging.messages.ManagementConsoleMessages; import org.apache.qpid.server.management.plugin.servlet.DefinedFileServlet; @@ -50,6 +51,7 @@ import org.apache.qpid.server.model.Exchange; import org.apache.qpid.server.model.Group; import org.apache.qpid.server.model.GroupMember; import org.apache.qpid.server.model.GroupProvider; +import org.apache.qpid.server.model.KeyStore; import org.apache.qpid.server.model.Plugin; import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.Protocol; @@ -60,6 +62,7 @@ import org.apache.qpid.server.model.User; import org.apache.qpid.server.model.VirtualHost; import org.apache.qpid.server.model.adapter.AbstractPluginAdapter; import org.apache.qpid.server.plugin.PluginFactory; +import org.apache.qpid.server.util.MapValueConverter; import org.eclipse.jetty.server.Connector; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.SessionManager; @@ -75,57 +78,66 @@ public class HttpManagement extends AbstractPluginAdapter // 10 minutes by default public static final int DEFAULT_TIMEOUT_IN_SECONDS = 60 * 10; + public static final boolean DEFAULT_HTTP_BASIC_AUTHENTICATION_ENABLED = false; + public static final boolean DEFAULT_HTTPS_BASIC_AUTHENTICATION_ENABLED = true; + public static final boolean DEFAULT_HTTP_SASL_AUTHENTICATION_ENABLED = true; + public static final boolean DEFAULT_HTTPS_SASL_AUTHENTICATION_ENABLED = true; + public static final String DEFAULT_NAME = "httpManagement"; public static final String TIME_OUT = "sessionTimeout"; - public static final String KEY_STORE_PATH = "keyStorePath"; - public static final String KEY_STORE_PASSWORD = "keyStorePassword"; public static final String HTTP_BASIC_AUTHENTICATION_ENABLED = "httpBasicAuthenticationEnabled"; public static final String HTTPS_BASIC_AUTHENTICATION_ENABLED = "httpsBasicAuthenticationEnabled"; public static final String HTTP_SASL_AUTHENTICATION_ENABLED = "httpSaslAuthenticationEnabled"; public static final String HTTPS_SASL_AUTHENTICATION_ENABLED = "httpsSaslAuthenticationEnabled"; - public static final String PLUGIN_NAME = "MANAGEMENT-HTTP"; + public static final String PLUGIN_TYPE = "MANAGEMENT-HTTP"; - private static final Collection<String> AVAILABLE_ATTRIBUTES = new HashSet<String>(Plugin.AVAILABLE_ATTRIBUTES); - static - { - AVAILABLE_ATTRIBUTES.add(HTTP_BASIC_AUTHENTICATION_ENABLED); - AVAILABLE_ATTRIBUTES.add(HTTPS_BASIC_AUTHENTICATION_ENABLED); - AVAILABLE_ATTRIBUTES.add(HTTP_SASL_AUTHENTICATION_ENABLED); - AVAILABLE_ATTRIBUTES.add(HTTPS_SASL_AUTHENTICATION_ENABLED); - AVAILABLE_ATTRIBUTES.add(TIME_OUT); - AVAILABLE_ATTRIBUTES.add(PluginFactory.PLUGIN_TYPE); - } + @SuppressWarnings("serial") + private static final Collection<String> AVAILABLE_ATTRIBUTES = Collections.unmodifiableSet(new HashSet<String>(Plugin.AVAILABLE_ATTRIBUTES) + {{ + add(HTTP_BASIC_AUTHENTICATION_ENABLED); + add(HTTPS_BASIC_AUTHENTICATION_ENABLED); + add(HTTP_SASL_AUTHENTICATION_ENABLED); + add(HTTPS_SASL_AUTHENTICATION_ENABLED); + add(TIME_OUT); + add(PluginFactory.PLUGIN_TYPE); + }}); public static final String ENTRY_POINT_PATH = "/management"; private static final String OPERATIONAL_LOGGING_NAME = "Web"; - protected static final boolean DEFAULT_HTTP_BASIC_AUTHENTICATION_ENABLED = false; - protected static final boolean DEFAULT_HTTPS_BASIC_AUTHENTICATION_ENABLED = true; - protected static final boolean DEFAULT_HTTP_SASL_AUTHENTICATION_ENABLED = true; - protected static final boolean DEFAULT_HTTPS_SASL_AUTHENTICATION_ENABLED = true; @SuppressWarnings("serial") - public static final Map<String, Object> DEFAULTS = new HashMap<String, Object>() + public static final Map<String, Object> DEFAULTS = Collections.unmodifiableMap(new HashMap<String, Object>() {{ put(HTTP_BASIC_AUTHENTICATION_ENABLED, DEFAULT_HTTP_BASIC_AUTHENTICATION_ENABLED); put(HTTPS_BASIC_AUTHENTICATION_ENABLED, DEFAULT_HTTPS_BASIC_AUTHENTICATION_ENABLED); put(HTTP_SASL_AUTHENTICATION_ENABLED, DEFAULT_HTTP_SASL_AUTHENTICATION_ENABLED); put(HTTPS_SASL_AUTHENTICATION_ENABLED, DEFAULT_HTTPS_SASL_AUTHENTICATION_ENABLED); - }}; + put(TIME_OUT, DEFAULT_TIMEOUT_IN_SECONDS); + put(NAME, DEFAULT_NAME); + }}); + + @SuppressWarnings("serial") + private static final Map<String, Class<?>> ATTRIBUTE_TYPES = Collections.unmodifiableMap(new HashMap<String, Class<?>>(){{ + put(HTTP_BASIC_AUTHENTICATION_ENABLED, Boolean.class); + put(HTTPS_BASIC_AUTHENTICATION_ENABLED, Boolean.class); + put(HTTP_SASL_AUTHENTICATION_ENABLED, Boolean.class); + put(HTTPS_SASL_AUTHENTICATION_ENABLED, Boolean.class); + put(NAME, Boolean.class); + put(TIME_OUT, Integer.class); + put(PluginFactory.PLUGIN_TYPE, String.class); + }}); private final Broker _broker; private Server _server; - private final HttpConfiguration _configuration; - - public HttpManagement(UUID id, Broker broker, HttpConfiguration configuration) + public HttpManagement(UUID id, Broker broker, Map<String, Object> attributes) { - super(id, DEFAULTS, null); + super(id, DEFAULTS, MapValueConverter.convert(attributes, ATTRIBUTE_TYPES)); _broker = broker; - _configuration = configuration; addParent(Broker.class, broker); } @@ -189,21 +201,9 @@ public class HttpManagement extends AbstractPluginAdapter } /** Added for testing purposes */ - String getKeyStorePassword() - { - return _configuration.getKeyStorePassword(); - } - - /** Added for testing purposes */ - String getKeyStorePath() - { - return _configuration.getKeyStorePath(); - } - - /** Added for testing purposes */ int getSessionTimeout() { - return _configuration.getSessionTimeout(); + return (Integer)getAttribute(TIME_OUT); } private boolean isManagementHttp(Port port) @@ -232,12 +232,18 @@ public class HttpManagement extends AbstractPluginAdapter } else if (protocols.contains(Protocol.HTTPS)) { - String keyStorePath = _configuration.getKeyStorePath(); - checkKeyStorePath(keyStorePath); + KeyStore keyStore = _broker.getDefaultKeyStore(); + if (keyStore == null) + { + throw new IllegalConfigurationException("Key store is not configured. Cannot start management on HTTPS port without keystore"); + } + String keyStorePath = (String)keyStore.getAttribute(KeyStore.PATH); + String keyStorePassword = keyStore.getPassword(); + validateKeystoreParameters(keyStorePath, keyStorePassword); SslContextFactory factory = new SslContextFactory(); factory.setKeyStorePath(keyStorePath); - factory.setKeyStorePassword(_configuration.getKeyStorePassword()); + factory.setKeyStorePassword(keyStorePassword); connector = new SslSocketConnector(factory); } @@ -255,7 +261,7 @@ public class HttpManagement extends AbstractPluginAdapter // set servlet context attributes for broker and configuration root.getServletContext().setAttribute(AbstractServlet.ATTR_BROKER, _broker); - root.getServletContext().setAttribute(AbstractServlet.ATTR_CONFIGURATION, _configuration); + root.getServletContext().setAttribute(AbstractServlet.ATTR_MANAGEMENT, this); addRestServlet(root, "broker"); addRestServlet(root, "virtualhost", VirtualHost.class); @@ -295,7 +301,7 @@ public class HttpManagement extends AbstractPluginAdapter final SessionManager sessionManager = root.getSessionHandler().getSessionManager(); - sessionManager.setMaxInactiveInterval(_configuration.getSessionTimeout()); + sessionManager.setMaxInactiveInterval((Integer)getAttribute(TIME_OUT)); return server; } @@ -305,23 +311,24 @@ public class HttpManagement extends AbstractPluginAdapter root.addServlet(new ServletHolder(new RestServlet(hierarchy)), "/rest/" + name + "/*"); } - private void checkKeyStorePath(String keyStorePath) + private void validateKeystoreParameters(String keyStorePath, String password) { if (keyStorePath == null) { throw new RuntimeException("Management SSL keystore path not defined, unable to start SSL protected HTTP connector"); } - else + if (password == null) { - File ksf = new File(keyStorePath); - if (!ksf.exists()) - { - throw new RuntimeException("Cannot find management SSL keystore file: " + ksf); - } - if (!ksf.canRead()) - { - throw new RuntimeException("Cannot read management SSL keystore file: " + ksf + ". Check permissions."); - } + throw new RuntimeException("Management SSL keystore password, unable to start SSL protected HTTP connector"); + } + File ksf = new File(keyStorePath); + if (!ksf.exists()) + { + throw new RuntimeException("Cannot find management SSL keystore file: " + ksf); + } + if (!ksf.canRead()) + { + throw new RuntimeException("Cannot read management SSL keystore file: " + ksf + ". Check permissions."); } } @@ -382,33 +389,24 @@ public class HttpManagement extends AbstractPluginAdapter return Collections.unmodifiableCollection(AVAILABLE_ATTRIBUTES); } - @Override - public Object getAttribute(String name) + public boolean isHttpsSaslAuthenticationEnabled() { - if(HTTP_BASIC_AUTHENTICATION_ENABLED.equals(name)) - { - return _configuration.isHttpBasicAuthenticationEnabled(); - } - else if(HTTPS_BASIC_AUTHENTICATION_ENABLED.equals(name)) - { - return _configuration.isHttpsBasicAuthenticationEnabled(); - } - else if(HTTP_SASL_AUTHENTICATION_ENABLED.equals(name)) - { - return _configuration.isHttpSaslAuthenticationEnabled(); - } - else if(HTTPS_SASL_AUTHENTICATION_ENABLED.equals(name)) - { - return _configuration.isHttpSaslAuthenticationEnabled(); - } - else if(TIME_OUT.equals(name)) - { - return _configuration.getSessionTimeout(); - } - else if(PluginFactory.PLUGIN_TYPE.equals(name)) - { - return PLUGIN_NAME; - } - return super.getAttribute(name); + return (Boolean)getAttribute(HTTPS_SASL_AUTHENTICATION_ENABLED); + } + + public boolean isHttpSaslAuthenticationEnabled() + { + return (Boolean)getAttribute(HTTP_SASL_AUTHENTICATION_ENABLED); } + + public boolean isHttpsBasicAuthenticationEnabled() + { + return (Boolean)getAttribute(HTTPS_BASIC_AUTHENTICATION_ENABLED); + } + + public boolean isHttpBasicAuthenticationEnabled() + { + return (Boolean)getAttribute(HTTP_BASIC_AUTHENTICATION_ENABLED); + } + } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java index 3b4e5cf6c6..ccf5373234 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagementFactory.java @@ -18,11 +18,6 @@ */ package org.apache.qpid.server.management.plugin; -import static org.apache.qpid.server.management.plugin.HttpManagement.*; -import static org.apache.qpid.server.util.MapValueConverter.getBooleanAttribute; -import static org.apache.qpid.server.util.MapValueConverter.getIntegerAttribute; -import static org.apache.qpid.server.util.MapValueConverter.getStringAttribute; - import java.util.Map; import java.util.UUID; @@ -36,21 +31,11 @@ public class HttpManagementFactory implements PluginFactory @Override public Plugin createInstance(UUID id, Map<String, Object> attributes, Broker broker) { - if (!PLUGIN_NAME.equals(attributes.get(PLUGIN_TYPE))) + if (!HttpManagement.PLUGIN_TYPE.equals(attributes.get(PLUGIN_TYPE))) { return null; } - HttpConfiguration configuration = new HttpConfiguration( - getIntegerAttribute(TIME_OUT, attributes, DEFAULT_TIMEOUT_IN_SECONDS), - getBooleanAttribute(HTTP_BASIC_AUTHENTICATION_ENABLED, attributes, false), - getBooleanAttribute(HTTPS_BASIC_AUTHENTICATION_ENABLED, attributes, true), - getBooleanAttribute(HTTP_SASL_AUTHENTICATION_ENABLED, attributes, true), - getBooleanAttribute(HTTPS_SASL_AUTHENTICATION_ENABLED, attributes, true), - getStringAttribute(KEY_STORE_PATH, attributes, null), - getStringAttribute(KEY_STORE_PASSWORD, attributes, null) - ); - - return new HttpManagement( id, broker, configuration); + return new HttpManagement(id, broker, attributes); } } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java index fadade1997..689bdb50d8 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/AbstractServlet.java @@ -42,7 +42,7 @@ import org.apache.qpid.server.logging.LogActor; import org.apache.qpid.server.logging.RootMessageLogger; import org.apache.qpid.server.logging.actors.CurrentActor; import org.apache.qpid.server.logging.actors.HttpManagementActor; -import org.apache.qpid.server.management.plugin.HttpConfiguration; +import org.apache.qpid.server.management.plugin.HttpManagement; import org.apache.qpid.server.management.plugin.session.LoginLogoutReporter; import org.apache.qpid.server.model.Broker; import org.apache.qpid.server.security.SecurityManager; @@ -63,7 +63,7 @@ public abstract class AbstractServlet extends HttpServlet /** * Servlet context attribute holding a reference to plugin configuration */ - public static final String ATTR_CONFIGURATION = "Qpid.configuration"; + public static final String ATTR_MANAGEMENT = "Qpid.management"; private static final String ATTR_LOGIN_LOGOUT_REPORTER = "AbstractServlet.loginLogoutReporter"; private static final String ATTR_SUBJECT = "AbstractServlet.subject"; @@ -71,7 +71,7 @@ public abstract class AbstractServlet extends HttpServlet private Broker _broker; private RootMessageLogger _rootLogger; - private HttpConfiguration _configuration; + private HttpManagement _httpManagement; protected AbstractServlet() { @@ -85,7 +85,7 @@ public abstract class AbstractServlet extends HttpServlet ServletContext servletContext = servletConfig.getServletContext(); _broker = (Broker)servletContext.getAttribute(ATTR_BROKER); _rootLogger = _broker.getRootMessageLogger(); - _configuration = (HttpConfiguration)servletContext.getAttribute(ATTR_CONFIGURATION); + _httpManagement = (HttpManagement)servletContext.getAttribute(ATTR_MANAGEMENT); super.init(); } @@ -397,8 +397,8 @@ public abstract class AbstractServlet extends HttpServlet private boolean isBasicAuthSupported(HttpServletRequest req) { - return req.isSecure() ? _configuration.isHttpsBasicAuthenticationEnabled() - : _configuration.isHttpBasicAuthenticationEnabled(); + return req.isSecure() ? _httpManagement.isHttpsBasicAuthenticationEnabled() + : _httpManagement.isHttpBasicAuthenticationEnabled(); } private HttpManagementActor getLogActorAndCacheInSession(HttpServletRequest req) @@ -456,9 +456,9 @@ public abstract class AbstractServlet extends HttpServlet return new HttpManagementActor(_rootLogger, request.getRemoteAddr(), request.getRemotePort()); } - protected HttpConfiguration getConfiguration() + protected HttpManagement getManagement() { - return _configuration; + return _httpManagement; } protected SecurityManager getSecurityManager() diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslServlet.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslServlet.java index ae734bf83c..069132af1e 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslServlet.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/SaslServlet.java @@ -25,7 +25,7 @@ import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.SerializationConfig; import org.apache.log4j.Logger; -import org.apache.qpid.server.management.plugin.HttpConfiguration; +import org.apache.qpid.server.management.plugin.HttpManagement; import org.apache.qpid.server.security.SubjectCreator; import org.apache.qpid.server.security.auth.AuthenticatedPrincipal; @@ -196,14 +196,14 @@ public class SaslServlet extends AbstractServlet private void checkSaslAuthEnabled(HttpServletRequest request) { boolean saslAuthEnabled; - HttpConfiguration configuration = getConfiguration(); + HttpManagement management = getManagement(); if (request.isSecure()) { - saslAuthEnabled = configuration.isHttpsSaslAuthenticationEnabled(); + saslAuthEnabled = management.isHttpsSaslAuthenticationEnabled(); } else { - saslAuthEnabled = configuration.isHttpSaslAuthenticationEnabled(); + saslAuthEnabled = management.isHttpSaslAuthenticationEnabled(); } if (!saslAuthEnabled) diff --git a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java index 9984ddf544..bb4c46826c 100644 --- a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java +++ b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/HttpManagementFactoryTest.java @@ -30,8 +30,6 @@ import org.apache.qpid.test.utils.QpidTestCase; public class HttpManagementFactoryTest extends QpidTestCase { - private static final String KEY_STORE_PASSWORD = "keyStorePassword"; - private static final String KEY_STORE_PATH = "keyStorePath"; private static final int SESSION_TIMEOUT = 3600; private PluginFactory _pluginFactory = new HttpManagementFactory(); @@ -49,31 +47,14 @@ public class HttpManagementFactoryTest extends QpidTestCase assertNull(_pluginFactory.createInstance(_id, _attributes, _broker)); } - public void testCreateInstanceWithoutKeystore() throws Exception + public void testCreateInstance() throws Exception { - _attributes.put(PluginFactory.PLUGIN_TYPE, HttpManagement.PLUGIN_NAME); + _attributes.put(PluginFactory.PLUGIN_TYPE, HttpManagement.PLUGIN_TYPE); _attributes.put(HttpManagement.TIME_OUT, SESSION_TIMEOUT); HttpManagement management = (HttpManagement) _pluginFactory.createInstance(_id, _attributes, _broker); assertEquals(_broker, management.getBroker()); - assertNull(management.getKeyStorePassword()); - assertNull(management.getKeyStorePath()); - assertEquals(SESSION_TIMEOUT, management.getSessionTimeout()); - } - - public void testCreateInstanceWithKeystore() throws Exception - { - _attributes.put(PluginFactory.PLUGIN_TYPE, HttpManagement.PLUGIN_NAME); - _attributes.put(HttpManagement.KEY_STORE_PASSWORD, KEY_STORE_PASSWORD); - _attributes.put(HttpManagement.KEY_STORE_PATH, KEY_STORE_PATH); - _attributes.put(HttpManagement.TIME_OUT, SESSION_TIMEOUT); - - HttpManagement management = (HttpManagement) _pluginFactory.createInstance(_id, _attributes, _broker); - - assertEquals(_broker, management.getBroker()); - assertEquals(KEY_STORE_PASSWORD, management.getKeyStorePassword()); - assertEquals(KEY_STORE_PATH, management.getKeyStorePath()); assertEquals(SESSION_TIMEOUT, management.getSessionTimeout()); } diff --git a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagedObjectRegistry.java b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagedObjectRegistry.java index 9eb03dd280..a045683de1 100644 --- a/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagedObjectRegistry.java +++ b/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagedObjectRegistry.java @@ -122,15 +122,12 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry if (connectorSslEnabled) { - checkKeyStorePathExistsAndIsReadable(); + String keyStorePath = System.getProperty("javax.net.ssl.keyStore"); + String keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword"); - CurrentActor.get().message(ManagementConsoleMessages.SSL_KEYSTORE(System.getProperty("javax.net.ssl.keyStore"))); + validateKeyStoreProperties(keyStorePath, keyStorePassword); - if (System.getProperty("javax.net.ssl.keyStorePassword") == null) - { - throw new IllegalConfigurationException( - "JMX management SSL keystore password not defined, unable to start requested SSL protected JMX server"); - } + CurrentActor.get().message(ManagementConsoleMessages.SSL_KEYSTORE(keyStorePath)); //create the SSL RMI socket factories csf = new SslRMIClientSocketFactory(); @@ -265,28 +262,28 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry return rmiRegistry; } - private void checkKeyStorePathExistsAndIsReadable() throws FileNotFoundException + private void validateKeyStoreProperties(String keyStorePath, String keyStorePassword) throws FileNotFoundException { - String keyStorePath = System.getProperty("javax.net.ssl.keyStore"); - if (keyStorePath == null) { - throw new IllegalConfigurationException( - "JVM system proprty 'javax.net.ssl.keyStore' is not set, unable to start SSL protected JMX ConnectorServer"); + throw new IllegalConfigurationException("JVM system property 'javax.net.ssl.keyStore' is not set, " + + "unable to start requested SSL protected JMX connector"); } - else + if (keyStorePassword == null) { - File ksf = new File(keyStorePath); + throw new IllegalConfigurationException( "JVM system property 'javax.net.ssl.keyStorePassword' is not set, " + + "unable to start requested SSL protected JMX connector"); + } - if (!ksf.exists()) - { - throw new FileNotFoundException("Cannot find JMX management SSL keystore file: " + ksf); - } - if (!ksf.canRead()) - { - throw new FileNotFoundException("Cannot read JMX management SSL keystore file: " - + ksf + ". Check permissions."); - } + File ksf = new File(keyStorePath); + if (!ksf.exists()) + { + throw new FileNotFoundException("Cannot find JMX management SSL keystore file: " + ksf); + } + if (!ksf.canRead()) + { + throw new FileNotFoundException("Cannot read JMX management SSL keystore file: " + + ksf + ". Check permissions."); } } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerProperties.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerProperties.java index 58d7604ee2..173881b888 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerProperties.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/BrokerProperties.java @@ -23,8 +23,8 @@ public class BrokerProperties public static final String PROPERTY_BROKER_DEFAULT_AMQP_PROTOCOL_EXCLUDES = "qpid.broker_default_amqp_protocol_excludes"; public static final String PROPERTY_BROKER_DEFAULT_AMQP_PROTOCOL_INCLUDES = "qpid.broker_default_amqp_protocol_includes"; - public static final String PROPERTY_MANAGEMENT_RIGHTS_INFER_ALL_ACCESS = "qpid.broker_management_rights_infer_all_access"; - public static final String PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY = "qpid.broker_use_custom_rmi_socket_factory"; + public static final String PROPERTY_MANAGEMENT_RIGHTS_INFER_ALL_ACCESS = "qpid.broker_jmx_method_rights_infer_all_access"; + public static final String PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY = "qpid.broker_jmx_use_custom_rmi_socket_factory"; private BrokerProperties() { diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java index 7ecb1954a8..c309be1787 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java @@ -55,8 +55,6 @@ public class ServerConfiguration extends AbstractConfiguration public static final int DEFAULT_HTTPS_MANAGEMENT_PORT = 8443; public static final long DEFAULT_MINIMUM_ALERT_REPEAT_GAP = 30000l; - public static final String USE_CUSTOM_RMI_SOCKET_FACTORY = BrokerProperties.PROPERTY_USE_CUSTOM_RMI_SOCKET_FACTORY; - public static final String QPID_HOME = "QPID_HOME"; public static final String QPID_WORK = "QPID_WORK"; public static final String LIB_DIR = "lib"; diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java index cb31228c71..aac469c571 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/XMLConfigurationEntryStore.java @@ -128,6 +128,18 @@ public class XMLConfigurationEntryStore implements ConfigurationEntryStore brokerAttributes.put(Broker.HEART_BEAT_DELAY, _serverConfiguration.getHeartBeatDelay()); brokerAttributes.put(Broker.STATISTICS_REPORTING_PERIOD, _serverConfiguration.getStatisticsReportingPeriod()); brokerAttributes.put(Broker.STATISTICS_REPORTING_RESET_ENABLED, _serverConfiguration.isStatisticsReportResetEnabled()); + + if (_serverConfiguration.getEnableSSL() && _serverConfiguration.getConnectorTrustStorePath() != null) + { + brokerAttributes.put(Broker.TRUST_STORE_PATH, _serverConfiguration.getConnectorTrustStorePath()); + brokerAttributes.put(Broker.TRUST_STORE_PASSWORD, _serverConfiguration.getConnectorTrustStorePassword()); + } + if (_serverConfiguration.getEnableSSL() || _serverConfiguration.getManagementSSLEnabled() || _serverConfiguration.getHTTPSManagementEnabled()) + { + brokerAttributes.put(Broker.KEY_STORE_PATH, _serverConfiguration.getConnectorKeyStorePath()); + brokerAttributes.put(Broker.KEY_STORE_PASSWORD, _serverConfiguration.getConnectorKeyStorePassword()); + brokerAttributes.put(Broker.KEY_STORE_CERT_ALIAS, _serverConfiguration.getCertAlias()); + } ConfigurationEntry rootEntry = new ConfigurationEntry(_rootId, Broker.class.getSimpleName(), brokerAttributes, Collections.unmodifiableSet(_rootChildren.keySet()), this); @@ -478,8 +490,8 @@ public class XMLConfigurationEntryStore implements ConfigurationEntryStore updateManagementPorts(_serverConfiguration, options); - createKeyStoreConfig(config, _rootChildren); - createTrustStoreConfig(config, _rootChildren); + //createKeyStoreConfig(config, _rootChildren); + //createTrustStoreConfig(config, _rootChildren); createGroupProviderConfig(_configuration, _rootChildren); createAuthenticationProviderConfig(_configuration, _rootChildren); createAmqpPortConfig(_serverConfiguration, _rootChildren, options); diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java index bb155ee1d2..51940c06b5 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java @@ -70,12 +70,22 @@ public interface Broker extends ConfiguredObject String STATISTICS_REPORTING_PERIOD = "statisticsReportingPeriod"; String STATISTICS_REPORTING_RESET_ENABLED = "statisticsReportingResetEnabled"; - /** + /* * A temporary attribute to pass the path to ACL file. * TODO: It should be a part of AuthorizationProvider. */ String ACL_FILE = "aclFile"; + /* + * A temporary attributes to set the broker default key/trust stores. + * TODO: Remove them after adding a full support to configure KeyStore/TrustStore via management layers. + */ + String KEY_STORE_PATH = "keyStorePath"; + String KEY_STORE_PASSWORD = "keyStorePassword"; + String KEY_STORE_CERT_ALIAS = "keyStoreCertAlias"; + String TRUST_STORE_PATH = "trustStorePath"; + String TRUST_STORE_PASSWORD = "trustStorePassword"; + // Attributes Collection<String> AVAILABLE_ATTRIBUTES = Collections.unmodifiableList( @@ -106,11 +116,17 @@ public interface Broker extends ConfiguredObject MAXIMUM_DELIVERY_ATTEMPTS, DEAD_LETTER_QUEUE_ENABLED, HOUSEKEEPING_CHECK_PERIOD, - ACL_FILE, SESSION_COUNT_LIMIT, HEART_BEAT_DELAY, STATISTICS_REPORTING_PERIOD, - STATISTICS_REPORTING_RESET_ENABLED + STATISTICS_REPORTING_RESET_ENABLED, + + ACL_FILE, + KEY_STORE_PATH, + KEY_STORE_PASSWORD, + KEY_STORE_CERT_ALIAS, + TRUST_STORE_PATH, + TRUST_STORE_PASSWORD )); //children @@ -163,4 +179,8 @@ public interface Broker extends ConfiguredObject * TODO: Remove this method. Eventually the broker will become a registry. */ VirtualHostRegistry getVirtualHostRegistry(); + + KeyStore getDefaultKeyStore(); + + TrustStore getDefaultTrustStore(); } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java index c91be045aa..69b4a47164 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java @@ -30,6 +30,8 @@ import java.util.HashMap; import java.util.Map; import java.util.UUID; +import javax.net.ssl.KeyManagerFactory; + import org.apache.log4j.Logger; import org.apache.qpid.common.QpidProperties; import org.apache.qpid.server.configuration.IllegalConfigurationException; @@ -49,6 +51,7 @@ import org.apache.qpid.server.model.Port; import org.apache.qpid.server.model.State; import org.apache.qpid.server.model.Statistics; import org.apache.qpid.server.model.TrustStore; +import org.apache.qpid.server.model.UUIDGenerator; import org.apache.qpid.server.model.VirtualHost; import org.apache.qpid.server.security.group.GroupPrincipalAccessor; import org.apache.qpid.server.security.SecurityManager; @@ -59,6 +62,7 @@ import org.apache.qpid.server.virtualhost.VirtualHostRegistry; public class BrokerAdapter extends AbstractAdapter implements Broker, ConfigurationChangeListener { + private static final Logger LOGGER = Logger.getLogger(BrokerAdapter.class); @SuppressWarnings("serial") @@ -84,6 +88,12 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat put(NAME, String.class); put(DEFAULT_VIRTUAL_HOST, String.class); put(DEFAULT_AUTHENTICATION_PROVIDER, String.class); + + put(KEY_STORE_PATH, String.class); + put(KEY_STORE_PASSWORD, String.class); + put(KEY_STORE_CERT_ALIAS, String.class); + put(TRUST_STORE_PATH, String.class); + put(TRUST_STORE_PASSWORD, String.class); }}); public static final int DEFAULT_STATISTICS_REPORTING_PERIOD = 0; @@ -101,6 +111,10 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat public static final int DEFAULT_HEART_BEAT_DELAY = 0; public static final int DEFAULT_SESSION_COUNT_LIMIT = 256; public static final String DEFAULT_NAME = "QpidBroker"; + private static final String DEFAULT_KEY_STORE_NAME = "defaultKeyStore"; + private static final String DEFAULT_TRUST_STORE_NAME = "defaultTrustStore"; + + private static final String DUMMY_PASSWORD_MASK = "********"; @SuppressWarnings("serial") private static final Map<String, Object> DEFAULTS = Collections.unmodifiableMap(new HashMap<String, Object>(){{ @@ -121,6 +135,8 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat put(Broker.NAME, DEFAULT_NAME); }}); + + private final StatisticsGatherer _statisticsGatherer; private final VirtualHostRegistry _virtualHostRegistry; private final LogRecorder _logRecorder; @@ -154,7 +170,6 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat _authenticationProviderFactory = authenticationProviderFactory; _portFactory = portFactory; _securityManager = new SecurityManager((String)getAttribute(ACL_FILE)); - } public Collection<VirtualHost> getVirtualHosts() @@ -545,6 +560,14 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat { return _defaultAuthenticationProvider == null ? null : _defaultAuthenticationProvider.getName(); } + else if (KEY_STORE_PASSWORD.equals(name)) + { + return DUMMY_PASSWORD_MASK; + } + else if (TRUST_STORE_PASSWORD.equals(name)) + { + return DUMMY_PASSWORD_MASK; + } return super.getAttribute(name); } @@ -821,4 +844,45 @@ public class BrokerAdapter extends AbstractAdapter implements Broker, Configurat return _virtualHostRegistry; } + @Override + public KeyStore getDefaultKeyStore() + { + // TODO: throw exception when password/path are not set (except + // management only mode) + Map<String, Object> actualAttributes = getActualAttributes(); + String storePath = (String) actualAttributes.get(KEY_STORE_PATH); + if (storePath != null) + { + Map<String, Object> attributes = new HashMap<String, Object>(); + attributes.put(KeyStore.NAME, DEFAULT_KEY_STORE_NAME); + attributes.put(KeyStore.PATH, storePath); + attributes.put(KeyStore.PASSWORD, (String) actualAttributes.get(KEY_STORE_PASSWORD)); + attributes.put(KeyStore.TYPE, java.security.KeyStore.getDefaultType()); + attributes.put(KeyStore.CERTIFICATE_ALIAS, actualAttributes.get(KEY_STORE_CERT_ALIAS)); + attributes.put(KeyStore.KEY_MANAGER_FACTORY_ALGORITHM, KeyManagerFactory.getDefaultAlgorithm()); + return new KeyStoreAdapter(UUIDGenerator.generateBrokerChildUUID(KeyStore.class.getSimpleName(), + DEFAULT_KEY_STORE_NAME), this, attributes); + } + return null; + } + + @Override + public TrustStore getDefaultTrustStore() + { + Map<String, Object> actualAttributes = getActualAttributes(); + String storePath = (String) actualAttributes.get(TRUST_STORE_PATH); + if (storePath != null) + { + Map<String, Object> attributes = new HashMap<String, Object>(); + attributes.put(TrustStore.NAME, DEFAULT_TRUST_STORE_NAME); + attributes.put(TrustStore.PATH, storePath); + attributes.put(TrustStore.PASSWORD, (String) actualAttributes.get(TRUST_STORE_PASSWORD)); + attributes.put(TrustStore.TYPE, java.security.KeyStore.getDefaultType()); + attributes.put(TrustStore.KEY_MANAGER_FACTORY_ALGORITHM, KeyManagerFactory.getDefaultAlgorithm()); + return new TrustStoreAdapter(UUIDGenerator.generateBrokerChildUUID(TrustStore.class.getSimpleName(), + DEFAULT_TRUST_STORE_NAME), this, attributes); + } + return null; + } + } diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/AmqpPortAdapter.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/AmqpPortAdapter.java index 9d4b770df2..6959f6827d 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/AmqpPortAdapter.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/AmqpPortAdapter.java @@ -125,17 +125,20 @@ public class AmqpPortAdapter extends PortAdapter private SSLContext createSslContext() { - Collection<KeyStore> brokerKeyStores = _broker.getKeyStores(); - if (brokerKeyStores.isEmpty()) + KeyStore keyStore = _broker.getDefaultKeyStore(); + if (keyStore == null) { - throw new IllegalConfigurationException("Kesy store is not configured for AMQP SSL port"); + throw new IllegalConfigurationException("SSL was requested on AMQP port '" + + this.getName() + "' but no key store defined"); + } + + TrustStore trustStore = _broker.getDefaultTrustStore(); + if (((Boolean)getAttribute(NEED_CLIENT_AUTH) || (Boolean)getAttribute(WANT_CLIENT_AUTH)) && trustStore == null) + { + throw new IllegalConfigurationException("Client certificate authentication is enabled on AMQP port '" + + this.getName() + "' but no trust store defined"); } - Collection<TrustStore> brokerTrustStores = _broker.getTrustStores(); - // TODO: use correct key store and trust store for a port - // XXX: temporarily using first keystore and trustore - KeyStore keyStore = brokerKeyStores.iterator().next(); - TrustStore trustStore = brokerTrustStores.isEmpty() ? null : brokerTrustStores.iterator().next(); String keystorePath = (String)keyStore.getAttribute(KeyStore.PATH); String keystorePassword = keyStore.getPassword(); String keystoreType = (String)keyStore.getAttribute(KeyStore.TYPE); diff --git a/qpid/java/broker/src/main/resources/default.json b/qpid/java/broker/src/main/resources/default.json index a81a3924e3..6951889590 100644 --- a/qpid/java/broker/src/main/resources/default.json +++ b/qpid/java/broker/src/main/resources/default.json @@ -58,11 +58,7 @@ "plugins" : [ { "type" : "Plugin", "pluginType" : "MANAGEMENT-HTTP", - "name" : "httpManagement", - "httpSaslAuthenticationEnabled" : true, - "httpsSaslAuthenticationEnabled" : false, - "httpBasicAuthenticationEnabled" : false, - "httpsBasicAuthenticationEnabled" : false + "name" : "httpManagement" }, { "type" : "Plugin", "pluginType" : "MANAGEMENT-JMX", diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/systest/management/jmx/ManagementLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/systest/management/jmx/ManagementLoggingTest.java index 84e38586ff..5ac06981d5 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/systest/management/jmx/ManagementLoggingTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/systest/management/jmx/ManagementLoggingTest.java @@ -25,6 +25,7 @@ import org.apache.qpid.server.configuration.BrokerProperties; import org.apache.qpid.server.configuration.ServerConfiguration; import org.apache.qpid.server.logging.AbstractTestLogging; import org.apache.qpid.test.utils.JMXTestUtils; +import org.apache.qpid.test.utils.TestSSLConstants; import org.apache.qpid.util.LogMonitor; import java.io.File; @@ -310,6 +311,9 @@ public class ManagementLoggingTest extends AbstractTestLogging { // This test requires we have an ssl connection setConfigurationProperty("management.ssl.enabled", "true"); + + setSystemProperty("javax.net.ssl.keyStore", "test-profiles/test_resources/ssl/java_broker_keystore.jks"); + setSystemProperty("javax.net.ssl.keyStorePassword", "password"); } startBroker(); diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java index e644e0e919..3416a4b89c 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java @@ -56,6 +56,6 @@ public class BrokerRestHttpsTest extends QpidRestTestCase Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES, Broker.BYTES_RETAINED, Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES, Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED, - Broker.ACL_FILE); + Broker.ACL_FILE, Broker.KEY_STORE_CERT_ALIAS, Broker.TRUST_STORE_PATH, Broker.TRUST_STORE_PASSWORD); } } diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java index bf7da5ce83..b6e60ad167 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java @@ -89,7 +89,9 @@ public class BrokerRestTest extends QpidRestTestCase { Asserts.assertAttributesPresent(brokerDetails, Broker.AVAILABLE_ATTRIBUTES, Broker.BYTES_RETAINED, Broker.PROCESS_PID, Broker.SUPPORTED_STORE_TYPES, - Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED, Broker.ACL_FILE); + Broker.CREATED, Broker.TIME_TO_LIVE, Broker.UPDATED, Broker.ACL_FILE, + Broker.KEY_STORE_PATH, Broker.KEY_STORE_PASSWORD, Broker.KEY_STORE_CERT_ALIAS, + Broker.TRUST_STORE_PATH, Broker.TRUST_STORE_PASSWORD); assertEquals("Unexpected value of attribute " + Broker.BUILD_VERSION, QpidProperties.getBuildVersion(), brokerDetails.get(Broker.BUILD_VERSION)); |