graph-notebook
graph-notebook copied to clipboard
Missing ability to connect via basic auth to non AWS servers
Is your feature request related to a problem? Please describe. I have a non AWS server (cosmosdb), that hosts a gremlin graph, that I'd like to connect.
Describe the solution you'd like 'get_config_from_dict' doesn't have any ability to accept a basic auth token.
The config setup doesn't have a spot in that dict for a basic auth token:
{
"host": "wss://graph.gremlin.cosmos.azure.com",
"port": 443,
"ssl": false,
"gremlin": {
"traversal_source": "g"
}
}
Which means that you can only connect to a server that is openly exposed on that network (requires no authentication). This is apparent in the gremlin-server doc here.
Describe alternatives you've considered I can connect via appache tinkerpop to my graph using a basic auth key, as well as gremlin-python. For example:
endpoint = os.getenv("endpoint","env vars not set")
username = os.getenv("dbusername","env vars not set")
password = os.getenv("dbkey","env vars not set")+"=="
client_g = client.Client(
endpoint,
"g",
username=username,
password=password,
message_serializer=serializer.GraphSONSerializersV2d0(),
)
note that gremlin-python accepts a 'password' argument for basic auth.
Alternatively, I can just slop a workaround using gremlin-python
and networkx
but the notebook solution would be way cleaner.
Additional context
Obviously you would expect a crash, because there isn't a password that is passed along.