开发者

Is there access control for CouchDB databases like PostgreSQL and MySQL privilege management?

开发者 https://www.devze.com 2023-02-09 17:33 出处:网络
I\'m thinking of writing a CouchDB-backed application that will store sensitive data. Is it possible to set things up开发者_高级运维 so that I can get something like MySQL\'s and PostgreSQL\'s access

I'm thinking of writing a CouchDB-backed application that will store sensitive data. Is it possible to set things up开发者_高级运维 so that I can get something like MySQL's and PostgreSQL's access control, where particular users on the system (users in the sense of Unix system users) can be denied or granted access to a particular CouchDB database?


Absolutely, you can set up users in the _users database. You can assign roles, groups, as well as any other custom fields for each user. In the validate_doc_update function in your design document(s), you can check user roles and approve or deny access based on that. You can also globally assign users as "readers" and "writers". You can authenticate users via Basic HTTP Authentication, OAuth and a variety of other methods.

Refer to the Security Features Overview and Document Update Validation pages on the wiki to get started.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号