Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

does clojure repl support authenticate?

Tags:

clojure

nrepl

I checked both repl from lein and clojure 1.8 socket repl, looks like none of them support username/password. if I open the repl to outside connection, how to make it safe? Or need to use ssh to login into the host and then from that host to connect to repl?

like image 223
Daniel Wu Avatar asked Jan 25 '16 12:01

Daniel Wu


1 Answers

By default, the socket REPL binds to loopback, so it will only accept connections made from that machine. That seems to be the safest method by far. Then you can use whatever auth methods you like to get onto that machine. SSH, or my personal favourite mosh are both good options.

It is plausible that you could create some kind of authentication system by providing your own REPL function, and allowing only authenticated connections from all comers, but I think that is likely to be extremely unwise and unsafe.

like image 50
Daniel Compton Avatar answered Nov 11 '22 22:11

Daniel Compton