Background
Right now, I'm trying to build an app with couchDB/couchapp that would store persistent and crucial information from the user, and am stuck on the steps required for user signup with couchapp.
Essentially, what I want to do is to have a simple signup form that users can use to register an account for using my app. This would entail creation of a new user in the couchdb _users database, and the creation of a new database, with the new user assigned the role of database admin.
All that requires server admin credentials.
Ideally, I'd love to be able to make a call using one of the jquery.couch.js
functions, but there doesn't seem to be a secure way to do that. (or is there??)
Question
What is the most efficient yet secure way to offload this task to a middle-layer software or otherwise?
By efficient, I mean needing the least amount of steps for the user, not necessarily the least amount of hassle for me.
As of right now, I've set up a separate node.js server that receives signup requests. My couchDB server admin credentials are stored as supposed private variables on the node server.js
file. I then POST any db creation request back to couchDB using couch-client
.
Am I jumping through too many (potential insecure) hoops here? Is there a better way to ensure a secure signup process?
Thanks.