Closed rev111 closed 4 months ago
I found the information here: https://stackoverflow.com/questions/3684749/creating-regular-users-in-couchdb?rq=3
A new user is created by adding a new document to the database "_users" in couchDB. The document must have this structure:
{ "_id": "org.couchdb.user:mydbuser", "name": "mydbuser", "type": "user", "roles": ["mydbrole1","mydbrole2"], "password": "plaintext_password" }
(sorry can't find how to put linebreaks here)
"mydbuser" would be the name of the user. It must be the same in "_id" and "name" or an error is thrown. The password is hashed and salted upon save, the document will look different after that, so I leave the above example as reference.
Expected Behavior
When/after creating a database as admin user, create users / passwords for user access.
Current Behavior
I can add users to a database by name, but it seems the actual creation of that user has to be done elsewhere
Possible Solution
Document how a user should be created with or without Fauxton before adding that user to a database with Fauxton. Possibly: Implement the ability to create couchdb users.
Context
The couchdb docs instruct me how to create users through a curl command / PUT request. I was hoping / expecting that Fauxton could help me with user management in a couchdb instance. However, I only can find "create server admin" under "Your account"->"User management" which is confusing because I was under the impression that I am already logged in into fauxton with an admin account (but I can't see any hint in Fauxton that this account exists or is registered as administrator). So I wonder why can I create a server admin, but not a regular user? And why I can't find anyone on the net who asked the same question before, maybe I completely misunderstood something...
Any advice would be appreciated.
Your Environment