How to set up admin for a specific database for CouchDB

284 Views Asked by At

I am new to CouchDB. I am trying to set up a server with the following management plan

  • for each database, I want to specify one or two admin accounts that can create/add/delete/update the database or add design documents, but not to modify any other databases
  • for a subset of databases, I want to enable read-only access (listing _all_docs or run _find queries) from either without authentication (anonymously), or from a public account (such as anonymous:anonymous), but this account can not make any change to these databases

is this possible?

1

There are 1 best solutions below

9
Zeta On

permission admin

CouchDB is shipped with a Fauxton server. You can manage almost everything in there.

  1. access fauxton server http://localhost:5984/_utils
  2. click the database you want to assign a admin.
  3. on the left panel there is a permissions, click on it.
  4. You can add admin in that menu

For the second question, CouchDB has no database hierachy. So there is no subset of database. You should do the same thing for every database you need to.

https://docs.couchdb.org/en/stable/intro/security.html Here is couch db documentation about authority.