tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [18/27] tinkerpop git commit: Added Kerberos authentication test with ssl
Date Mon, 27 Feb 2017 12:02:26 GMT
Added Kerberos authentication test with ssl


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

Branch: refs/heads/master
Commit: 3668557f65c47292ccb28ea4556dbe6dcf43dd44
Parents: d81f0d7
Author: HadoopMarc <vtslab@xs4all.nl>
Authored: Wed Jan 18 21:38:07 2017 +0100
Committer: HadoopMarc <vtslab@xs4all.nl>
Committed: Wed Jan 18 21:38:07 2017 +0100

----------------------------------------------------------------------
 .../server/GremlinServerAuthKrb5IntegrateTest.java | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/3668557f/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
index 63d464d..e974118 100644
--- a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
+++ b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerAuthKrb5IntegrateTest.java
@@ -121,6 +121,9 @@ public class GremlinServerAuthKrb5IntegrateTest extends AbstractGremlinServerInt
                 };
                 authConfig.put("principal", principal);
                 break;
+            case "shouldAuthenticateWithSsl":
+                sslConfig.enabled = true;
+                break;
             case "shouldAuthenticateWithQop":
                 break;
         }
@@ -206,6 +209,20 @@ public class GremlinServerAuthKrb5IntegrateTest extends AbstractGremlinServerInt
     }
 
     @Test
+    public void shouldAuthenticateWithSsl() throws Exception {
+        final Cluster cluster = TestClientFactory.build().jaasEntry(TESTCONSOLE).enableSsl(true)
+                .protocol(kdcServer.serverPrincipalName).addContactPoint(kdcServer.hostname).create();
+        final Client client = cluster.connect();
+        try {
+            assertEquals(2, client.submit("1+1").all().get().get(0).getInt());
+            assertEquals(3, client.submit("1+2").all().get().get(0).getInt());
+            assertEquals(4, client.submit("1+3").all().get().get(0).getInt());
+        } finally {
+            cluster.close();
+        }
+    }
+
+    @Test
     public void shouldAuthenticateWithSerializeResultToString() throws Exception {
         MessageSerializer serializer = new GryoMessageSerializerV1d0();
         Map config = new HashMap<String, Object>();


Mime
View raw message