CouchDB/Iris Couch - 菜鸟安全问题
我一直在使用 Futon、curl 玩 Iris Couch 并阅读 CouchDB 安全 Wiki 页面我对读者、管理员和管理员有点困惑。服务器管理员。
我是否正确地说,Futon 中的“创建服务器管理”弹出窗口实际上并不是在创建服务器管理(维基提到这只能通过编辑 local.ini 文件来完成)?
您真正要做的是在 _users 数据库中创建文档 - 为用户提供用户名和密码。进行身份验证的密码,然后将其名称或角色与针对数据库安全对象定义的任何名称/角色进行比较?
另外,我注意到“require_valid_user”默认设置为 false,因此假设 Iris Couch 有服务器管理员,这是否意味着虽然用户必须提供用户名/密码进行身份验证 - 他们被验证为匿名,所以没有是否与任何数据库定义的安全性进行比较?
如果我想将用户限制到特定数据库,是否需要将“require_valid_user”设置设置为 true?
干杯
I've been playing with Iris Couch using Futon, curl and reading the CouchDB security Wiki page and I'm a little confused about readers, admins & server admins.
Am I correct in saying that the "Create Server Admin" pop-up in Futon isn't actually creating a server admin, (the wiki mentions this is only done by editing a local.ini file)?
What you're really doing is creating documents in the _users database - giving users a username & password to authenticate with, after which their name or role is compared to any names/roles defined against a database security object?
Also, I noticed that the "require_valid_user" is set to false by default, so assuming Iris Couch has a server admin, does this mean that although users have to provide their username/password to authenticate - they're validated as anonymous, so no comparison is made against any database-defined security?
If I want to restrict a user to a specific database, do I need the "require_valid_user" setting to be set to true?
Cheers
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当您使用“创建服务器管理”弹出表单时,这与编辑 .ini 文件相同。 (在内部,Futon 将查询 /_config URL,这是一个用于编辑 .ini 文件的 HTTP API。)
_users
数据库是所有用户帐户、密码和角色的权威位置。当用户使用密码(或会话 cookie)查询 CouchDB 时,该名称和角色将用于授予或拒绝他们的查询。首先通过检查数据库中的_security
对象来决定是否允许或禁止其查询。他们必须位于“读者”部分:他们的名字位于“名称”列表中,或者他们的角色必须位于“角色”列表中。我建议您避免使用 require_valid_user 选项。它适用于非常特殊的情况。
When you use the "Create server admin" popup form, that is the same as editing the .ini files. (Internally, Futon will query the a /_config URL which is an HTTP API to edit the .ini files.)
The
_users
database is the authoritative location for all user acounts, their passwords, and their roles. When a user queries CouchDB with a password (or with a session cookie), that name and role will be used to grant or deny their query. The decision of whether to allow or disallow their query is made by checking the_security
object in the database first. They must be in the "readers" section: either their name is in the "names" list, or their role must be in the "roles" list.I recommend that you avoid the require_valid_user option. It is for very specialized situations.
您可以拥有特定于数据库的用户和角色。您需要修改给定数据库的
_security
“文档”。 wiki 上此处也对此进行了记录。You can have database-specific users and roles. You need to modify the
_security
"document" for a given database. It's also documented here on the wiki.