1
votes

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.

1

1 Answers

2
votes

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.