You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2017/12/07 22:01:21 UTC
[1/2] activemq-artemis git commit: ARTEMIS-1538: Allow trustAll to
apply from a connection URI
Repository: activemq-artemis
Updated Branches:
refs/heads/master d9acc649a -> de355e9bd
ARTEMIS-1538: Allow trustAll to apply from a connection URI
Previously when configuring a connectionFactory by URI this property was
ignored
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/3d2e24d4
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3d2e24d4
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3d2e24d4
Branch: refs/heads/master
Commit: 3d2e24d42929c599e58e75990cbe684b81167143
Parents: d9acc64
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Authored: Thu Dec 7 16:48:11 2017 -0500
Committer: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Committed: Thu Dec 7 16:48:11 2017 -0500
----------------------------------------------------------------------
.../remoting/impl/netty/TransportConstants.java | 1 +
.../ssl/CoreClientOverTwoWaySSLTest.java | 31 ++++++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3d2e24d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 5d86aaa..890b508 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -342,6 +342,7 @@ public class TransportConstants {
allowableConnectorKeys.add(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME);
allowableConnectorKeys.add(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME);
allowableConnectorKeys.add(TransportConstants.VERIFY_HOST_PROP_NAME);
+ allowableConnectorKeys.add(TransportConstants.TRUST_ALL_PROP_NAME);
allowableConnectorKeys.add(TransportConstants.TCP_NODELAY_PROPNAME);
allowableConnectorKeys.add(TransportConstants.TCP_SENDBUFFER_SIZE_PROPNAME);
allowableConnectorKeys.add(TransportConstants.TCP_RECEIVEBUFFER_SIZE_PROPNAME);
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/3d2e24d4/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java
index 6e30879..609174e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ssl/CoreClientOverTwoWaySSLTest.java
@@ -16,13 +16,13 @@
*/
package org.apache.activemq.artemis.tests.integration.ssl;
-import javax.net.ssl.SSLPeerUnverifiedException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import io.netty.handler.ssl.SslHandler;
+import javax.net.ssl.SSLPeerUnverifiedException;
+
import org.apache.activemq.artemis.api.core.ActiveMQException;
import org.apache.activemq.artemis.api.core.ActiveMQNotConnectedException;
import org.apache.activemq.artemis.api.core.Interceptor;
@@ -51,6 +51,8 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import io.netty.handler.ssl.SslHandler;
+
@RunWith(value = Parameterized.class)
public class CoreClientOverTwoWaySSLTest extends ActiveMQTestBase {
@@ -243,6 +245,31 @@ public class CoreClientOverTwoWaySSLTest extends ActiveMQTestBase {
}
@Test
+ public void testTwoWaySSLVerifyClientTrustAllTrueByURI() throws Exception {
+ NettyAcceptor acceptor = (NettyAcceptor) server.getRemotingService().getAcceptor("nettySSL");
+ acceptor.getConfiguration().put(TransportConstants.NEED_CLIENT_AUTH_PROP_NAME, true);
+ server.getRemotingService().stop(false);
+ server.getRemotingService().start();
+ server.getRemotingService().startAcceptors();
+
+ //Set trust all so this should work even with no trust store set
+ StringBuilder uri = new StringBuilder("tcp://" + tc.getParams().get(TransportConstants.HOST_PROP_NAME).toString()
+ + ":" + tc.getParams().get(TransportConstants.PORT_PROP_NAME).toString());
+
+ uri.append("?").append(TransportConstants.SSL_ENABLED_PROP_NAME).append("=true");
+ uri.append("&").append(TransportConstants.TRUST_ALL_PROP_NAME).append("=true");
+ uri.append("&").append(TransportConstants.KEYSTORE_PROVIDER_PROP_NAME).append("=").append(storeType);
+ uri.append("&").append(TransportConstants.KEYSTORE_PATH_PROP_NAME).append("=").append(CLIENT_SIDE_KEYSTORE);
+ uri.append("&").append(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME).append("=").append(PASSWORD);
+
+ server.getRemotingService().addIncomingInterceptor(new MyInterceptor());
+
+ ServerLocator locator = addServerLocator(ActiveMQClient.createServerLocator(uri.toString()));
+ ClientSessionFactory sf = createSessionFactory(locator);
+ sf.close();
+ }
+
+ @Test
public void testTwoWaySSLVerifyClientTrustAllFalse() throws Exception {
NettyAcceptor acceptor = (NettyAcceptor) server.getRemotingService().getAcceptor("nettySSL");
acceptor.getConfiguration().put(TransportConstants.NEED_CLIENT_AUTH_PROP_NAME, true);
[2/2] activemq-artemis git commit: This closes #1694
Posted by ta...@apache.org.
This closes #1694
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/de355e9b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/de355e9b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/de355e9b
Branch: refs/heads/master
Commit: de355e9bd1de8608cacadf6d37d0d42bf3b5f2b6
Parents: d9acc64 3d2e24d
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Dec 7 17:00:03 2017 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Dec 7 17:00:03 2017 -0500
----------------------------------------------------------------------
.../remoting/impl/netty/TransportConstants.java | 1 +
.../ssl/CoreClientOverTwoWaySSLTest.java | 31 ++++++++++++++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
----------------------------------------------------------------------