CouchDB的读取权限

编程入门 行业动态 更新时间:2024-10-10 10:26:18
本文介绍了CouchDB的读取权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

In couchdb website -> technical overview -> security and validation - couchdb.apache/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:

  • 让您的用户和数据库之间的应用程序。使用MySQL已经这样做了(例如Ruby on Rails的)的Web应用程序99%。保留ACL信息在数据库和应用程序的赠款/决绝根据ACL访问。
  • 保持每个用户专用的数据库。您可能需要修改你的架构,但也许不会。您可以使用复制过滤器,以仅一个用户的数据复制到自己的数据库中。然后,他从他的数据库读取和写入中央数据库。
  • 更多推荐

    CouchDB的读取权限

    本文发布于:2023-10-30 05:11:35,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1541859.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:权限   CouchDB

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!