I want to create a Ring/Compojure webapp that would enable a clojure repl. All of this is meant to be running on a local machine and the webapp is just a convenient GUI for the local user. Since it is a enabling a repl, I want it to be secure. But, I also want it to be convenient.
Here's my idea:
- a user would run "lein ring server" to start the app.
- this opens the web-browser and causes it to fetch "/" from the app.
- any session request gets a unique session cookie, but the first session cookie is saved specially on the server
- any requests later check to see the current session cookie == first session cookie
Do you believe this is secure? I'm concerned with requests to your machine from other hosts and this seems to do the trick. I'm worried about other users logged into the local machine--could they see that session cookie somehow? Would I have to enable an https server to really fix this?
I would certainly love to hear if this is a solved problem...
Thanks!