[GitHub] tinkerpop issue #928: TINKERPOP-2015 Expose WebSocket configuration in Greml...

2018-10-03 Thread deejvince
Github user deejvince commented on the issue:

https://github.com/apache/tinkerpop/pull/928
  
@FlorianHockmann

Could you please post a working example on how to use the delegate with the 
driver connection with GremlinClient?


---


[GitHub] tinkerpop issue #929: TINKERPOP-2035 Pass custom headers to the websocket co...

2018-09-26 Thread deejvince
Github user deejvince commented on the issue:

https://github.com/apache/tinkerpop/pull/929
  
@jorgebay @spmallette, Could you merge this PR, or it requires some more 
approvals ?


---


[GitHub] tinkerpop pull request #929: TINKERPOP-2035 Pass custom headers to the webso...

2018-09-13 Thread deejvince
Github user deejvince commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/929#discussion_r217515752
  
--- Diff: 
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 {String} [options.headers] Add custom headers to the request.
--- End diff --

Regarding other GLVs, yes i believe its important to have that.


---


[GitHub] tinkerpop pull request #929: TINKERPOP-2035 Pass custom headers to the webso...

2018-09-13 Thread deejvince
Github user deejvince commented on a diff in the pull request:

https://github.com/apache/tinkerpop/pull/929#discussion_r217509807
  
--- Diff: 
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 {String} [options.headers] Add custom headers to the request.
--- End diff --

Hi, You're correct, i'm fixing this right away.
Thanks!


---


[GitHub] tinkerpop issue #929: Pass custom headers to the websocket connection

2018-09-12 Thread deejvince
Github user deejvince commented on the issue:

https://github.com/apache/tinkerpop/pull/929
  
Hi @JavierGarciaGarcia,
Yes I made it work by using url ws://neptune-endpoint:8182/gremlin
Signing host;x-amz-date

And passing the signature in the Authorization header as well as the 
required x-amz-date header to the WebSocket via option.headers.


---


[GitHub] tinkerpop pull request #929: Pass custom headers to the websocket connection

2018-09-10 Thread deejvince
GitHub user deejvince opened a pull request:

https://github.com/apache/tinkerpop/pull/929

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.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/deejvince/tinkerpop patch-1

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/tinkerpop/pull/929.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #929


commit 1acb4f78d827f7903d4ebe73a21a0b45f0ce124e
Author: Lior Pollack 
Date:   2018-09-10T19:16:38Z

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.




---