cayley db username and password

106 views
Skip to first unread message

Işık Faruk S. Can

unread,
Oct 24, 2015, 3:55:11 PM10/24/15
to cayley-users
How to have a password and username protected cayley db?
For example, on nom package for the cayley driver for the cayley db

var client = cayley("http://localhost:64210/");

is give for establishing a connection, but without any db name, db username and password.

oren...@gmail.com

unread,
Oct 25, 2015, 1:03:11 PM10/25/15
to cayley-users
Hi Işık!

I am new to cayley but from conversation in the chat (#cayley on freenode) I was told that there is no authentication and this is something you'll have to do yourself.

For example, if you want to build HTTP endpoints that can access your DB, you'll have to write a Node.js server (express or anything else you are familiar with) and that server will do the authentication/authorization and if the request is from a valid user that is allowed to access your DB, that server will make another HTTP call against the cayley API.

If you don't like that idea of making 2 HTTP calls you can embed Cayley inside your app. The only constrain with this approach is your server side must be writen in Go. This is not fully documented yet but you can take a look here until we'll have better docs: https://github.com/google/cayley/wiki/Cayley-Go-API-(as-a-Library-in-your-own-projects).


Also, please join the chat #cayley on freenode. you can use whatever IRC client you like or even the web interface - https://webchat.freenode.net/?channels=cayley

Let me know if it helps.

ogo...@sanguinebio.com

unread,
Oct 25, 2015, 11:06:37 PM10/25/15
to cayley-users, oren...@gmail.com
I just discussed your question on #cayley and there is another alternative for embedding cayley: you can simple run the node.js server on the same server with the cayley (make sure you enable http for cayley). Now on every request to the node.js, make http call to localhost:64210. this will be very fast (especially on linux).

nav.navpr...@gmail.com

unread,
May 1, 2016, 2:17:03 PM5/1/16
to cayley-users
Reply all
Reply to author
Forward
0 new messages