Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I prevent anonymous users from deleting/editing my documents in couchDB?

I know that CouchDB does not allow non-admin users to edit/delete design documents, but how do I prevent them from editing/deleting all documents?

The only info I could find is that user permissions can be set with validation functions. I am a little confused on how I would write a validation function to do this/where validation functions live. Are they all in the _users DB?

Thanks

like image 677
Andrew Campoli Avatar asked Apr 25 '13 18:04

Andrew Campoli


1 Answers

Another way to restrict access to your database is to configure the [couch_httpd_auth] with require_valid_user:true

Then every request must send credentials to login to your couchdb.

like image 102
Claudio Santos Avatar answered Oct 19 '22 02:10

Claudio Santos