You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Dylan Millikin (JIRA)" <ji...@apache.org> on 2015/11/09 16:02:11 UTC
[jira] [Created] (TINKERPOP3-950) SASL and in session requests fail
to recognize bindings
Dylan Millikin created TINKERPOP3-950:
-----------------------------------------
Summary: SASL and in session requests fail to recognize bindings
Key: TINKERPOP3-950
URL: https://issues.apache.org/jira/browse/TINKERPOP3-950
Project: TinkerPop 3
Issue Type: Bug
Components: server
Affects Versions: 3.0.2-incubating
Reporter: Dylan Millikin
Assignee: stephen mallette
We aren't entirely sure where the issue lies, once it becomes clearer I'll change the title.
The discussion around this issue can be found here : https://pony-poc.apache.org/thread.html/4402fe28badece112e51cf7d369844f8da3f382d3ce1ffb7666ed0bf@1446656912@%3Cdev.tinkerpop.apache.org%3E
In essence, when queries against gremlin-server are made using authentication in-session a couple of weird behaviors can be noticed:
- Variables need to be properly defined via {{def v = ...}} or we will get an exception.
- Variables set within queries aren't available in the following queries
Bellow is an example of payloads that recreate this error:
{code}
Message :
b'\x10application/json{"requestId":"1afa7873-df64-43a1-82a2-4aaa3cc35d82","processor":"session","args":{"bindings":null,"language":"gremlin-groovy","session":"e4deb7ef-c551-49bc-896d-089dba9cb5e6","gremlin":"v=graph.addVertex(\'name\', \'Dave\')","rebindings":{}},"op":"eval"}'
Response:
{'status': {'message': '', 'code': 407, 'attributes': {}}, 'requestId': '1afa7873-df64-43a1-82a2-4aaa3cc35d82', 'result': {'meta': {}, 'data': None}}
Message:
b'\x10application/json{"requestId":"78e3e4e1-08d9-4222-a57a-3fd07180d974","processor":"","args":{"sasl":"AHN0ZXBoZW4AcGFzc3dvcmQ="},"op":"authentication"}'
Response:
{'status': {'message': "startup failed:\nScript2.groovy: 1: [Static type checking] - The variable [v] is undeclared.\n @ line 1, column 1.\n v=graph.addVertex('name', 'Dave')\n ^\n\n1 error\n", 'code': 597, 'attributes': {}}, 'requestId': '1afa7873-df64-43a1-82a2-4aaa3cc35d82', 'result': {'meta': {}, 'data': None}}
{code}
It's worth noting that this same scenario seems to work when using gremlin-driver as per these tests : https://github.com/apache/incubator-tinkerpop/commit/4cb087d039990f643494146e48ab95264cc99805
First step will probably be to reproduce this with the "simple" client.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)