Remote cassandra connection via Titan : How to pass on auth credentials

34 views
Skip to first unread message

bhuvanrk

unread,
Aug 25, 2016, 1:51:57 PM8/25/16
to Aurelius
Hi, 

I'm using a Titan package to access and do read/write operations on a remote Cassandra cluster. Currently the gremlin-server yaml and property files have all the configuration settings needed for this access. 

I'd like for this file to pick up credentials such as storage.username and storage.password when gremlin-server spawns and connects to the cluster. I dont want to hard-code these statically on these files. How can I do this securely ?

What is the recommended method to do so ?

Thanks

Stephen Mallette

unread,
Aug 29, 2016, 6:36:45 PM8/29/16
to Aurelius
This is a good question. Rather than instantiate your graphs in the gremlin server yaml file you could instantiate them in an init script. For instance, given the packaged init script:

https://github.com/apache/tinkerpop/blob/4d1b0277fa12b6f7e047b2d4617a9947c93357ab/gremlin-server/scripts/empty-sample.groovy

you could add the following line to the end:

globals << [newGraph : TinkerFactory.createModern()]

it will programmtically add "newGraph" to the list of available bindings. So for Titan you could use TitanFactory with whatever config you want (i.e. with credentials you decrypt from a file perhaps) and create your graphs that way. Any Graph or TraversalSource you add to globals should make it to the GraphManager in Gremlin Server which is all you need to have happen for everything to work properly.



--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/4bc3fbdb-72d6-4b19-b12b-4dbf7be75409%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages