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/09/27 11:02:23 UTC

[1/2] tinkerpop git commit: Pass custom headers to the websocket connection

Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 abfe968c7 -> d516c6828


Pass custom headers to the websocket connection

In order to authorize to the gremlin server (in this case AWS Neptune) i need to pass custom headers for authorization to the service. the PR will allow to send any headers (like an API key or signature) and pass them to the Websocket function.
While there can be many use cases for this, in my case i pass the Authorization & x-amz-date required for Signature V4 (IAM) authentication.


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

Branch: refs/heads/tp32
Commit: 54ad5f45e73bae05b957b89539cb6a61d557f445
Parents: abfe968
Author: Lior Pollack <de...@gmail.com>
Authored: Mon Sep 10 22:16:38 2018 +0300
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Thu Sep 27 12:58:44 2018 +0200

----------------------------------------------------------------------
 .../gremlin-javascript/lib/driver/driver-remote-connection.js      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/54ad5f45/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
index 15836ba..ca059cf 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
@@ -49,12 +49,14 @@ class DriverRemoteConnection extends RemoteConnection {
    * @param {String} [options.traversalSource] The traversal source. Defaults to: 'g'.
    * @param {GraphSONWriter} [options.writer] The writer to use.
    * @param {Authenticator} [options.authenticator] The authentication handler to use.
+   * @param {Object} [options.headers] An associative array containing the additional header key/values for the initial request.
    * @constructor
    */
   constructor(url, options) {
     super(url);
     options = options || {};
     this._ws = new WebSocket(url, {
+      headers: options.headers,
       ca: options.ca,
       cert: options.cert,
       pfx: options.pfx,


[2/2] tinkerpop git commit: Merge branch 'TINKERPOP-2035' into tp32

Posted by jo...@apache.org.
Merge branch 'TINKERPOP-2035' into tp32


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

Branch: refs/heads/tp32
Commit: d516c68289c666a1b8f11dc3fe9dd1e75315596f
Parents: abfe968 54ad5f4
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Thu Sep 27 12:59:31 2018 +0200
Committer: Jorge Bay Gondra <jo...@gmail.com>
Committed: Thu Sep 27 12:59:31 2018 +0200

----------------------------------------------------------------------
 .../gremlin-javascript/lib/driver/driver-remote-connection.js      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------