Robomongo: Robo 3T 1.1.1 Unable to show databases when using a read only account

Created on 17 Jul 2017  路  5Comments  路  Source: Studio3T/robomongo

Robot 3T 1.1.1
Mongo DB 3.2.10 Wired Tiger

We have 2 accounts, a read/write any db, as well as a read only account.

The read only account is unable to list any of my databases on MongoDB in the tree navigator. It only shows System->admin db. However, it does have permissions to "use database" and then query find etc. The read/write account is able to list the databases fine. Could somebody please tell me what commands does robo mongo use internally to list collections?

I suspect I'm missing a command.

Thanks,

Gary

duplicate

Most helpful comment

What would be nice is if you have a 'Preferred Database' setting in the connection the code here:
https://github.com/Studio3T/robomongo/blob/bf94b75960624ea52fbada33c1f75cf7be12bb13/src/robomongo/core/mongodb/MongoWorker.cpp#L293

Would add the preferred database to the list if the listDatabases() call fails.

All 5 comments

It uses the listDatabases command for this. The permission required to execute this is:
https://docs.mongodb.com/manual/reference/privilege-actions/#listDatabases

In my read-only user account I use these roles:

"roles" : [ 
    {
        "role" : "readAnyDatabase",
        "db" : "admin"
    }, 
    {
        "role" : "backup",
        "db" : "admin"
    }, 
    {
        "role" : "clusterMonitor",
        "db" : "admin"
    }
]

The clusterMonitor role includes listDatabases privilege over the cluster resource.
You could also create a custom role with just that privilege too.

What would be nice is if you have a 'Preferred Database' setting in the connection the code here:
https://github.com/Studio3T/robomongo/blob/bf94b75960624ea52fbada33c1f75cf7be12bb13/src/robomongo/core/mongodb/MongoWorker.cpp#L293

Would add the preferred database to the list if the listDatabases() call fails.

Very 馃憤 on @luketn's suggestion. Since the user already knows the database's name, Robo 3T should use it.

Hi all, we have added a related feature similar to @luketn's suggestion in v1.4.
I hope it will help you -> https://blog.robomongo.org/robo-3t-1-4/#a2

Feel free to re-open if you still have the problem.

1696

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matgenois picture matgenois  路  4Comments

stennie picture stennie  路  4Comments

axe-z picture axe-z  路  3Comments

kphamilton picture kphamilton  路  3Comments

fabritw picture fabritw  路  3Comments