I'm facing the "How to keep private user data private in CouchDB" challenge. Detailed quite well on the couchdb wiki: http://wiki.apache.org/couchdb/PerDocumentAuthorization
I've chosen to make a new database per user, because that's the best fit for the applications I'm creating and because there's a lot of advice from the community to go that route.
I'm having trouble figuring out how to do this. Is there a built in way to do this in CouchDB? So far I have no other need for a middle tier or application tier, and would love to keep this purely a couch + htmll5 application. What is the best case practise for this?
A new feature will add support for auto creating/deleting a database per user.
The following section will be added to default.ini
and local.ini
:
[couch_peruser]
; If enabled, couch_peruser ensures that a private per-user database
; exists for each document in _users. These databases are writable only
; by the corresponding user. Databases are in the following form:
; userdb-{hex encoded username}
enable = true
; If set to true and a user is deleted, the respective database gets
; deleted as well.
delete_dbs = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With