atultherajput
atultherajput

Reputation: 175

How to disable read permission on couchdb database

The problem is I have multiple couchdb local clients databases say A_db, B_db, C_db which is replicating to a couchdb server master database says server_db. Now each client is creating a document say A_doc, B_doc, C_doc in their local db which automatically replicating to server_db. So now server_db will have 3 documents, one for each client. Since every client can see all documents of server_db using

server_db/_all_docs?include_docs=true

But I want to restrict clients to read/write other client documents which is on server_db. And only server_db admin to view documents all documents.

Upvotes: 0

Views: 295

Answers (1)

Juanjo Rodriguez
Juanjo Rodriguez

Reputation: 2131

Document level read restriction is not supported by CouchDB. I point you to a similar question:

The suggested pattern is to have a db per user or db per role as it seems you are doing.

You should restrict the access to server_db only to authorized users, not to clients.

Some helpful links:

Upvotes: 1

Related Questions