You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/02/26 20:36:55 UTC
[tinkerpop] branch master updated (a233097 -> 6083dc4)
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git.
from a233097 Added GraphBinary 3.5.0 test. CTR
add 99713ff Add trustStoreType such that keystore and truststore can be different type
new a25b7ae Merge branch 'pr-1244' into 3.3-dev
new 616862d Updated changelog CTR
new 6d329ae Merge branch '3.3-dev' into 3.4-dev
new bb0a9df All SSL tests moved to their own class
new 6083dc4 Merge branch '3.4-dev'
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGELOG.asciidoc | 3 +
.../apache/tinkerpop/gremlin/driver/Cluster.java | 17 ++++-
.../apache/tinkerpop/gremlin/driver/Settings.java | 9 +++
.../tinkerpop/gremlin/driver/SettingsTest.java | 2 +
.../gremlin/server/AbstractChannelizer.java | 6 +-
.../apache/tinkerpop/gremlin/server/Settings.java | 5 ++
.../AbstractGremlinServerIntegrationTest.java | 2 +
.../gremlin/server/GremlinServerIntegrateTest.java | 2 +
.../server/GremlinServerSslIntegrateTest.java | 78 ++++++++++++++++++++++
9 files changed, 119 insertions(+), 5 deletions(-)
[tinkerpop] 02/05: Updated changelog CTR
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 616862d45859843d25ffb0a4231e4c9d2d1e64ad
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Feb 26 14:24:19 2020 -0500
Updated changelog CTR
---
CHANGELOG.asciidoc | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 2419b52..27afa55 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -24,6 +24,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
[[release-3-3-11]]
=== TinkerPop 3.3.11 (Release Date: NOT OFFICIALLY RELEASED YET)
+* Added `trustStoreType` such that keystore and truststore can be of different types in the Java driver.
[[release-3-3-10]]
=== TinkerPop 3.3.10 (Release Date: February 3, 2020)
[tinkerpop] 05/05: Merge branch '3.4-dev'
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 6083dc4fcb214df64be72483f8779d81e73c0fac
Merge: a233097 bb0a9df
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Feb 26 15:36:41 2020 -0500
Merge branch '3.4-dev'
CHANGELOG.asciidoc | 3 +
.../apache/tinkerpop/gremlin/driver/Cluster.java | 17 ++++-
.../apache/tinkerpop/gremlin/driver/Settings.java | 9 +++
.../tinkerpop/gremlin/driver/SettingsTest.java | 2 +
.../gremlin/server/AbstractChannelizer.java | 6 +-
.../apache/tinkerpop/gremlin/server/Settings.java | 5 ++
.../AbstractGremlinServerIntegrationTest.java | 2 +
.../gremlin/server/GremlinServerIntegrateTest.java | 2 +
.../server/GremlinServerSslIntegrateTest.java | 78 ++++++++++++++++++++++
9 files changed, 119 insertions(+), 5 deletions(-)
diff --cc gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 21d1619,77cd465..e6987c1
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@@ -265,41 -272,58 +265,43 @@@ public abstract class AbstractChanneliz
final SslContextBuilder builder;
- // DEPRECATED: If the config has the required, deprecated settings, then use it
- if (null != sslSettings.keyCertChainFile && null != sslSettings.keyFile) {
- logger.warn("Using deprecated SSL keyFile support");
- final File keyCertChainFile = new File(sslSettings.keyCertChainFile);
- final File keyFile = new File(sslSettings.keyFile);
- final File trustCertChainFile = null == sslSettings.trustCertChainFile ? null : new File(sslSettings.trustCertChainFile);
-
- // note that keyPassword may be null here if the keyFile is not
- // password-protected. passing null to
- // trustManager is also ok (default will be used)
- builder = SslContextBuilder.forServer(keyCertChainFile, keyFile, sslSettings.keyPassword).trustManager(trustCertChainFile);
- } else {
-
- // Build JSSE SSLContext
- try {
- final KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
-
- // Load private key and signed cert
- if (null != sslSettings.keyStore) {
- final String keyStoreType = null == sslSettings.keyStoreType ? KeyStore.getDefaultType() : sslSettings.keyStoreType;
- final KeyStore keystore = KeyStore.getInstance(keyStoreType);
- final char[] password = null == sslSettings.keyStorePassword ? null : sslSettings.keyStorePassword.toCharArray();
- try (final InputStream in = new FileInputStream(sslSettings.keyStore)) {
- keystore.load(in, password);
- }
- kmf.init(keystore, password);
- } else {
- throw new IllegalStateException("keyStore must be configured when SSL is enabled.");
+ // Build JSSE SSLContext
+ try {
+ final KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
+
+ // Load private key and signed cert
+ if (null != sslSettings.keyStore) {
+ final String keyStoreType = null == sslSettings.keyStoreType ? KeyStore.getDefaultType() : sslSettings.keyStoreType;
+ final KeyStore keystore = KeyStore.getInstance(keyStoreType);
+ final char[] password = null == sslSettings.keyStorePassword ? null : sslSettings.keyStorePassword.toCharArray();
+ try (final InputStream in = new FileInputStream(sslSettings.keyStore)) {
+ keystore.load(in, password);
}
+ kmf.init(keystore, password);
+ } else {
+ throw new IllegalStateException("keyStore must be configured when SSL is enabled.");
+ }
- builder = SslContextBuilder.forServer(kmf);
+ builder = SslContextBuilder.forServer(kmf);
- // Load custom truststore for client auth certs
- if (null != sslSettings.trustStore) {
- final String trustStoreType = null != sslSettings.trustStoreType ? sslSettings.trustStoreType
+ // Load custom truststore for client auth certs
+ if (null != sslSettings.trustStore) {
- final String keystoreType = null == sslSettings.keyStoreType ? KeyStore.getDefaultType() : sslSettings.keyStoreType;
- final KeyStore truststore = KeyStore.getInstance(keystoreType);
++ final String trustStoreType = null != sslSettings.trustStoreType ? sslSettings.trustStoreType
+ : sslSettings.keyStoreType != null ? sslSettings.keyStoreType : KeyStore.getDefaultType();
+
- final KeyStore truststore = KeyStore.getInstance(trustStoreType);
- final char[] password = null == sslSettings.trustStorePassword ? null : sslSettings.trustStorePassword.toCharArray();
- try (final InputStream in = new FileInputStream(sslSettings.trustStore)) {
- truststore.load(in, password);
- }
- final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
- tmf.init(truststore);
- builder.trustManager(tmf);
++ final KeyStore truststore = KeyStore.getInstance(trustStoreType);
+ final char[] password = null == sslSettings.trustStorePassword ? null : sslSettings.trustStorePassword.toCharArray();
+ try (final InputStream in = new FileInputStream(sslSettings.trustStore)) {
+ truststore.load(in, password);
}
-
- } catch (UnrecoverableKeyException | NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e) {
- logger.error(e.getMessage());
- throw new RuntimeException("There was an error enabling SSL.", e);
+ final TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+ tmf.init(truststore);
+ builder.trustManager(tmf);
}
+ } catch (UnrecoverableKeyException | NoSuchAlgorithmException | KeyStoreException | CertificateException | IOException e) {
+ logger.error(e.getMessage());
+ throw new RuntimeException("There was an error enabling SSL.", e);
}
if (null != sslSettings.sslCipherSuites && !sslSettings.sslCipherSuites.isEmpty()) {
[tinkerpop] 03/05: Merge branch '3.3-dev' into 3.4-dev
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 6d329aeb03fc353b36f00d775fd9c4c869acbfdc
Merge: b4fd63e 616862d
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Feb 26 14:24:33 2020 -0500
Merge branch '3.3-dev' into 3.4-dev
CHANGELOG.asciidoc | 1 +
.../apache/tinkerpop/gremlin/driver/Cluster.java | 17 ++++-
.../apache/tinkerpop/gremlin/driver/Settings.java | 9 +++
.../tinkerpop/gremlin/driver/SettingsTest.java | 2 +
.../gremlin/server/AbstractChannelizer.java | 6 +-
.../apache/tinkerpop/gremlin/server/Settings.java | 5 ++
.../AbstractGremlinServerIntegrationTest.java | 2 +
.../gremlin/server/GremlinServerIntegrateTest.java | 80 ++++++++++++++++++++++
8 files changed, 117 insertions(+), 5 deletions(-)
diff --cc gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 4212fac,09056c2..7cb785e
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@@ -1189,7 -1514,72 +1204,72 @@@ public class GremlinServerIntegrateTes
client.submit(script, b).all().get();
fail("Should have tanked out because of number of parameters used and size of the compile script");
} catch (Exception ex) {
- assertThat(ex.getMessage(), containsString("The Gremlin statement that was submitted exceed the maximum compilation size allowed by the JVM"));
+ assertThat(ex.getMessage(), containsString("The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM"));
}
}
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthWithDifferentStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_JKS)
+ .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ assertEquals("test", client.submit("'test'").one().getString());
+ } finally {
+ cluster.close();
+ }
+
+ final Cluster cluster2 = TestClientFactory.build().enableSsl(true)
+ .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_JKS)
+ .create();
+ final Client client2 = cluster2.connect();
+
+ try {
+ assertEquals("test", client2.submit("'test'").one().getString());
+ } finally {
+ cluster2.close();
+ }
+ }
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectKeyStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ String res = client.submit("'test'").one().getString();
+ fail("Should throw exception because incorrect keyStoreType is specified");
+ } catch (Exception x) {
+ final Throwable root = ExceptionUtils.getRootCause(x);
+ assertThat(root, instanceOf(TimeoutException.class));
+ } finally {
+ cluster.close();
+ }
+ }
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectTrustStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ client.submit("'test'").one();
+ fail("Should throw exception because incorrect trustStoreType is specified");
+ } catch (Exception x) {
+ final Throwable root = ExceptionUtils.getRootCause(x);
+ assertThat(root, instanceOf(TimeoutException.class));
+ } finally {
+ cluster.close();
+ }
+ }
}
[tinkerpop] 04/05: All SSL tests moved to their own class
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit bb0a9dfbdcce8b0504a66402fa03ca674aa115ef
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Feb 26 14:54:28 2020 -0500
All SSL tests moved to their own class
Need to move the new ones added after merge of #1244 CTR
---
CHANGELOG.asciidoc | 2 +
.../gremlin/server/GremlinServerIntegrateTest.java | 78 ----------------------
.../server/GremlinServerSslIntegrateTest.java | 78 ++++++++++++++++++++++
3 files changed, 80 insertions(+), 78 deletions(-)
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index d7af336..76f1779 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -23,6 +23,8 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
[[release-3-4-7]]
=== TinkerPop 3.4.7 (Release Date: NOT OFFICIALLY RELEASED YET)
+This release also includes changes from <<release-3-3-11, 3.3.11>>.
+
[[release-3-4-6]]
=== TinkerPop 3.4.6 (Release Date: February 20, 2020)
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 7cb785e..23d4fe0 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -204,19 +204,6 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
case "shouldCloseChannelIfClientDoesntRespond":
settings.idleConnectionTimeout = 1000;
break;
- case "shouldEnableSslAndClientCertificateAuthWithDifferentStoreType":
- case "shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectKeyStoreType":
- case "shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectTrustStoreType":
- settings.ssl = new Settings.SslSettings();
- settings.ssl.enabled = true;
- settings.ssl.needClientAuth = ClientAuth.REQUIRE;
- settings.ssl.keyStore = JKS_SERVER_KEY;
- settings.ssl.keyStorePassword = KEY_PASS;
- settings.ssl.keyStoreType = KEYSTORE_TYPE_JKS;
- settings.ssl.trustStore = P12_SERVER_TRUST;
- settings.ssl.trustStorePassword = KEY_PASS;
- settings.ssl.trustStoreType = TRUSTSTORE_TYPE_PKCS12;
- break;
default:
break;
}
@@ -1207,69 +1194,4 @@ public class GremlinServerIntegrateTest extends AbstractGremlinServerIntegration
assertThat(ex.getMessage(), containsString("The Gremlin statement that was submitted exceeds the maximum compilation size allowed by the JVM"));
}
}
-
- @Test
- public void shouldEnableSslAndClientCertificateAuthWithDifferentStoreType() {
- final Cluster cluster = TestClientFactory.build().enableSsl(true)
- .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_JKS)
- .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
- .create();
- final Client client = cluster.connect();
-
- try {
- assertEquals("test", client.submit("'test'").one().getString());
- } finally {
- cluster.close();
- }
-
- final Cluster cluster2 = TestClientFactory.build().enableSsl(true)
- .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
- .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_JKS)
- .create();
- final Client client2 = cluster2.connect();
-
- try {
- assertEquals("test", client2.submit("'test'").one().getString());
- } finally {
- cluster2.close();
- }
- }
-
- @Test
- public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectKeyStoreType() {
- final Cluster cluster = TestClientFactory.build().enableSsl(true)
- .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
- .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
- .create();
- final Client client = cluster.connect();
-
- try {
- String res = client.submit("'test'").one().getString();
- fail("Should throw exception because incorrect keyStoreType is specified");
- } catch (Exception x) {
- final Throwable root = ExceptionUtils.getRootCause(x);
- assertThat(root, instanceOf(TimeoutException.class));
- } finally {
- cluster.close();
- }
- }
-
- @Test
- public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectTrustStoreType() {
- final Cluster cluster = TestClientFactory.build().enableSsl(true)
- .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
- .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
- .create();
- final Client client = cluster.connect();
-
- try {
- client.submit("'test'").one();
- fail("Should throw exception because incorrect trustStoreType is specified");
- } catch (Exception x) {
- final Throwable root = ExceptionUtils.getRootCause(x);
- assertThat(root, instanceOf(TimeoutException.class));
- } finally {
- cluster.close();
- }
- }
}
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSslIntegrateTest.java b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSslIntegrateTest.java
index 7a3d499..ab75b8e 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSslIntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerSslIntegrateTest.java
@@ -131,6 +131,19 @@ public class GremlinServerSslIntegrateTest extends AbstractGremlinServerIntegrat
settings.ssl.keyStoreType = KEYSTORE_TYPE_JKS;
settings.ssl.sslCipherSuites = Collections.singletonList("TLS_DHE_RSA_WITH_AES_128_CBC_SHA");
break;
+ case "shouldEnableSslAndClientCertificateAuthWithDifferentStoreType":
+ case "shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectKeyStoreType":
+ case "shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectTrustStoreType":
+ settings.ssl = new Settings.SslSettings();
+ settings.ssl.enabled = true;
+ settings.ssl.needClientAuth = ClientAuth.REQUIRE;
+ settings.ssl.keyStore = JKS_SERVER_KEY;
+ settings.ssl.keyStorePassword = KEY_PASS;
+ settings.ssl.keyStoreType = KEYSTORE_TYPE_JKS;
+ settings.ssl.trustStore = P12_SERVER_TRUST;
+ settings.ssl.trustStorePassword = KEY_PASS;
+ settings.ssl.trustStoreType = TRUSTSTORE_TYPE_PKCS12;
+ break;
}
return settings;
@@ -337,4 +350,69 @@ public class GremlinServerSslIntegrateTest extends AbstractGremlinServerIntegrat
cluster.close();
}
}
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthWithDifferentStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_JKS)
+ .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ assertEquals("test", client.submit("'test'").one().getString());
+ } finally {
+ cluster.close();
+ }
+
+ final Cluster cluster2 = TestClientFactory.build().enableSsl(true)
+ .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_JKS)
+ .create();
+ final Client client2 = cluster2.connect();
+
+ try {
+ assertEquals("test", client2.submit("'test'").one().getString());
+ } finally {
+ cluster2.close();
+ }
+ }
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectKeyStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(JKS_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(P12_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ String res = client.submit("'test'").one().getString();
+ fail("Should throw exception because incorrect keyStoreType is specified");
+ } catch (Exception x) {
+ final Throwable root = ExceptionUtils.getRootCause(x);
+ assertThat(root, instanceOf(TimeoutException.class));
+ } finally {
+ cluster.close();
+ }
+ }
+
+ @Test
+ public void shouldEnableSslAndClientCertificateAuthAndFailWithIncorrectTrustStoreType() {
+ final Cluster cluster = TestClientFactory.build().enableSsl(true)
+ .keyStore(P12_CLIENT_KEY).keyStorePassword(KEY_PASS).keyStoreType(KEYSTORE_TYPE_PKCS12)
+ .trustStore(JKS_CLIENT_TRUST).trustStorePassword(KEY_PASS).trustStoreType(TRUSTSTORE_TYPE_PKCS12)
+ .create();
+ final Client client = cluster.connect();
+
+ try {
+ client.submit("'test'").one();
+ fail("Should throw exception because incorrect trustStoreType is specified");
+ } catch (Exception x) {
+ final Throwable root = ExceptionUtils.getRootCause(x);
+ assertThat(root, instanceOf(TimeoutException.class));
+ } finally {
+ cluster.close();
+ }
+ }
}
[tinkerpop] 01/05: Merge branch 'pr-1244' into 3.3-dev
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit a25b7ae4a47306b931790c9312afc5439b4e0423
Merge: b807268 99713ff
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Wed Feb 26 13:13:17 2020 -0500
Merge branch 'pr-1244' into 3.3-dev
.../apache/tinkerpop/gremlin/driver/Cluster.java | 17 ++++-
.../apache/tinkerpop/gremlin/driver/Settings.java | 9 +++
.../tinkerpop/gremlin/driver/SettingsTest.java | 2 +
.../gremlin/server/AbstractChannelizer.java | 6 +-
.../apache/tinkerpop/gremlin/server/Settings.java | 5 ++
.../AbstractGremlinServerIntegrationTest.java | 2 +
.../gremlin/server/GremlinServerIntegrateTest.java | 80 ++++++++++++++++++++++
7 files changed, 116 insertions(+), 5 deletions(-)