Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Username and Password to Rethinkdb connection?

Tags:

rethinkdb

How to add username and password to rethinkdb connection?

In my network there are 100 plus machines. Out which only 2 machines are under my control. Out of 2, one is virtual machine and one is physical machine.

If i run rethinkdb on virtual machine with below command

rethinkdb --bind all

Now my rethinkdb http:// ip:8080 is exposed to all machines in the network. How to set username and password to restrict others?

If i use localhost:8080 in the virtual machine, administrative HTTP connection is useless as it can't be accessed neither on the physical machine nor on the virtual machine.

How do i solve this?

Thanks

like image 854
ekanna Avatar asked Apr 22 '13 10:04

ekanna


1 Answers

RethinkDB doesn't provide an authentication system yet, see https://github.com/rethinkdb/rethinkdb/issues/266

The best way for is probably not to start rethinkdb with the --bind all flags.

You can still access the web interface with a ssh tunnel. If you're on linux, the command is

ssh -D <PORT> <LOGIN>@<MACHINE>

Then set up your browser to use the ssh tunnel. In chrome it's in settings > proxy settings Set the socks host to and port to you use before.

Then if you hit machine:8080 in your browser, you should be able to see the adminstration http interface.

like image 80
neumino Avatar answered Sep 20 '22 09:09

neumino