Azure CosmosDB - MongoDB在帐户级别提供读写和只读密钥。 CosmosDB SDK和API可以在其中创建用户,并且可以在数据库和文档级别定义访问权限。
•但是我需要做的是创建一对用户名和密码,并对MongoDB数据库进行受限访问,类似于可安装的MongoDB提供的数据库。
•用户如何使用RoboMongo仅连接CosmosDB MongoDB数据库。
高度赞赏任何帮助。
Azure CosmosDB - MongoDB provides keys for Read-Write and Read Only at account level. CosmosDB SDK and API are there through which users can be created and access can be define at database and document level.
• But What I need to do is to create a pair of username and password with restricted access to a MongoDB database similar to one provided by installable MongoDB.
• How a user can connect only CosmosDB MongoDB database using RoboMongo.
Highly appreciate any help.
最满意答案
阿米特 -
今天,通过使用两个密钥,主密钥和只读密钥来提供宇宙数据库访问。 但是,如果要限制用户对每个集合,每个文档等的访问权限,则必须使用资源令牌。 你可以在这里阅读更多关于它的信息 ,请看看CH9视频 ,看看实施细节。 资源令牌服务可以实现为Azure功能。 这里是让你开始的代码 。
但是,如果您使用的是RoboMongo,则必须使用本文档中定义的键。 此时您无法为数据库定义不同的用户和密钥。
Amit -
Today, Cosmos DB access are provided by using two keys, Master Key and Read Only key. However, if you want to restrict user access per collection, per document etc, you have to use Resource Tokens. You can read more about it here and please take a look at CH9 video to see the implementation details. Resource Token service can be implemented as an Azure Function. Here is code to get you started.
But if you are using RoboMongo you have to Use the keys as define in this document. At this time you cannot define different users and Keys for a Database.
更多推荐
发布评论