简体   繁体   English

是否有像PostgreSQL和MySQL权限管理这样的CouchDB数据库的访问控制?

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

I'm thinking of writing a CouchDB-backed application that will store sensitive data. 我正在考虑编写一个存储敏感数据的CouchDB支持的应用程序。 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? 是否有可能进行设置,以便我可以获得类似MySQL和PostgreSQL的访问控制,系统中的特定用户(Unix系统用户意义上的用户)可以被拒绝或被授予对特定CouchDB数据库的访问权限?

Absolutely, you can set up users in the _users database. 当然,您可以在_users数据库中设置用户。 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. 在设计文档的validate_doc_update函数中,您可以检查用户角色并根据该角色批准或拒绝访问。 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. 您可以通过基本HTTP身份验证,OAuth和各种其他方法对用户进行身份验证。

Refer to the Security Features Overview and Document Update Validation pages on the wiki to get started. 请参阅Wiki上的安全功能概述文档更新验证页面以开始使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM