You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by jo...@apache.org on 2018/08/23 12:51:44 UTC

[13/16] tinkerpop git commit: Updated documentation reflecting TINKERPOP-1977 changes. Added helper for auth to the gremlin-javascript exports.

Updated documentation reflecting TINKERPOP-1977 changes.
Added helper for auth to the gremlin-javascript exports.


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

Branch: refs/heads/tp33
Commit: a561ee01455757ed2948aab3eb46e327310ce73a
Parents: cc57c2b
Author: Matthew Allen <ma...@runbox.com>
Authored: Thu Aug 23 06:44:58 2018 +0100
Committer: Matthew Allen <ma...@runbox.com>
Committed: Thu Aug 23 06:44:58 2018 +0100

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                          | 1 +
 docs/src/reference/gremlin-variants.asciidoc                | 9 +++++++++
 docs/src/upgrade/release-3.2.x-incubating.asciidoc          | 2 ++
 .../src/main/javascript/gremlin-javascript/index.js         | 6 +++++-
 4 files changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a561ee01/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index eb1a6c5..f12c4ad 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -51,6 +51,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Fixed a bug in `TinkerGraphCountStrategy`, which didn't consider that certain map steps may not emit an element.
 * Fixed a bug in JavaScript GLV where DriverRemoteConnection close() method didn't returned a Promise instance.
 * Bumped to Jackson 2.9.6.
+* Sasl Plain Text Authentication added to Gremlin Javascript.
 
 [[release-3-2-9]]
 === TinkerPop 3.2.9 (Release Date: May 8, 2018)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a561ee01/docs/src/reference/gremlin-variants.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-variants.asciidoc b/docs/src/reference/gremlin-variants.asciidoc
index e8b4c21..290b39b 100644
--- a/docs/src/reference/gremlin-variants.asciidoc
+++ b/docs/src/reference/gremlin-variants.asciidoc
@@ -484,6 +484,15 @@ const graph = new Graph();
 const g = graph.traversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin'));
 ----
 
+or for Gremlin Servers requiring SASL authentication
+
+[source,javascript]
+----
+const graph = new Graph();
+const Authenicator = gremlin.driver.auth.PlainTextSaslAuthenicator;
+const g = graph.traversal().withRemote(new DriverRemoteConnection('ws://localhost:8182/gremlin', { authenticator: new Authenticator(username, password, optionalAuthzid) });
+----
+
 When a traversal from the `GraphTraversalSource` is iterated, the traversal’s `Bytecode` is sent over the wire via
 the registered `RemoteConnection`. The bytecode is used to construct the equivalent traversal at the remote
 traversal source.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a561ee01/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index af03937..6f2aff8 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -29,6 +29,8 @@ Please see the link:https://github.com/apache/tinkerpop/blob/3.2.10/CHANGELOG.as
 
 === Upgrading for Users
 
+The Gremlin Javascript Driver now supports SASL Plain Text authentication against a Gremlin Server. See: link:http://tinkerpop.apache.org/docs/current/reference#gremlin-javascript[Reference Documentation - Gremlin Javasctipt]
+
 ==== Bulk Import and Export
 
 TinkerPop has provided some general methods for importing and exporting data, but more and more graph providers are

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a561ee01/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
index d4c6d88..9cc6349 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/index.js
@@ -31,13 +31,17 @@ const rc = require('./lib/driver/remote-connection');
 const Bytecode = require('./lib/process/bytecode');
 const utils = require('./lib/utils');
 const DriverRemoteConnection = require('./lib/driver/driver-remote-connection');
+const PlainTextSaslAuthenticator = require('./lib/driver/auth/plain-text-sasl-authenticator');
 
 module.exports = {
   driver: {
     RemoteConnection: rc.RemoteConnection,
     RemoteStrategy: rc.RemoteStrategy,
     RemoteTraversal: rc.RemoteTraversal,
-    DriverRemoteConnection: DriverRemoteConnection
+    DriverRemoteConnection: DriverRemoteConnection,
+    auth: {
+      PlainTextSaslAuthenticator: PlainTextSaslAuthenticator
+    }
   },
   process: {
     Bytecode: Bytecode,