CouchDB的读取权限 [英] CouchDB read authorization

查看:339
本文介绍了CouchDB的读取权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在CouchDB的网站 - >技术概述 - >安全和验证 -
http://couchdb.apache.org/docs/overview.html - 它写道,(在读者访问
部分)保护文档内容,CouchDB的文档可以有一个读者名单。
这是允许阅读文档阅读器,名称的可选列表。当一个
读者名单时,受保护的文档只能由列出的用户查看。我
搜索有关如何使用它,但我什么也没发现。因此,它是实际使用,如果
这是怎么了?

In couchdb website -> technical overview -> security and validation - http://couchdb.apache.org/docs/overview.html - it writes that (on reader access part) "To protect document contents, CouchDB documents can have a reader list. This is an optional list of reader-names allowed to read the document. When a reader list is used, protected documents are only viewable by listed users." I searched about how to use it but i found nothing. So is it actually used and if it is how?

感谢。

- 穆斯塔法

推荐答案

您是对的,这是令人困惑的。请参阅 0.11破的详细信息更改

You are right, it is confusing. Please see the 0.11 "breaking" changes for more information.

每个文档读取的控制是不可能;在阅读字段是访问整个DB 的。欲了解更多信息,加载数据库中的被褥,然后点击顶部的安全... 链接。

Per-document read control is not possible; the readers field is for access to the entire DB. For more information, load your database in Futon and click the Security... link at the top.

原因读控制是不可能的,因为视图(map和reduce),可以从数据库中的所有文件中提取信息,所以一般不可能prevent用户以某种方式看到私人数据。

The reason read control is not possible is because views (map and reduce) can draw information from all documents in the database, so it is generally impossible to prevent users from seeing private data in some form.

有关详细的访问控制,你有两个主要选择:

For detailed access control, you have two major choices:


  1. 让您的用户和数据库之间的应用程序。使用MySQL已经这样做了(例如Ruby on Rails的)的Web应用程序99%。保留ACL信息在数据库和应用程序的赠款/决绝根据ACL访问。

  2. 保持每个用户专用的数据库。您可能需要修改你的架构,但也许不会。您可以使用复制过滤器,以仅一个用户的数据复制到自己的数据库中。然后,他从他的数据库读取和写入中央数据库。

这篇关于CouchDB的读取权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆