Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication Database option isn't used properly #1696

Closed
bbuivn opened this issue Dec 24, 2019 · 10 comments
Closed

Authentication Database option isn't used properly #1696

bbuivn opened this issue Dec 24, 2019 · 10 comments
Assignees
Projects

Comments

@bbuivn
Copy link

bbuivn commented Dec 24, 2019

Hi,

Here's my environment:

Robot 3T 1.3.1
MacOS 10.15.1

5 Nodes Replicaset
MongoDB 3.6.13

SSL is configured with a private CA

What am I trying to do?

I'm trying to connect directly to a Secondary node of the replicaset - using Direct Connection - to a database and authenticating on another one.

This does work like a charm with mongodb cli, as expected with the authSource/--authenticationDatabase parameters.
But it doesn't when I use Robot 3T.

What happens?

I've setup a standalone MongoDB with authentication enabled, an authentication database authdb and two other databases: mydb and otherdb.
I've setup a user named benoit.bui with the following accesses:

"roles" : [ 
    { "role" : "read", "db" : "mydb" }, 
    { "role" : "read", "db" : "otherdb" } ]

Here's captures of my configuration
image
image
image

With this configuration, authentication and connection does work but I end up on the authdb database, not mydb as specified on the Default Database setting in the Advanced toggle.

This does work with Studio 3T
image

This results to a scan of accessible databases:
image

I do have the same behaviour with MongoDB Compass, it scans accessible databases
image
image

Am I missing something or did I misconfigure Robot 3T?

Thanks!

@bbuivn
Copy link
Author

bbuivn commented Jan 7, 2020

Any input on this, please?

@bbuivn bbuivn changed the title Authentication Database option isn't really used Authentication Database option isn't used properly Jan 10, 2020
@simsekgokhan
Copy link
Collaborator

simsekgokhan commented Apr 22, 2020

Hi, thanks a lot for reporting the problem with details. We will investigate.

The only part that is not clear is the result in Robo 3T. Which dbs can you access with Robo 3T? Maybe you can attach a screenshot of accessible databases, like you did with Studio 3T?

@bbuivn
Copy link
Author

bbuivn commented Apr 22, 2020

The only part that is not clear is the result in Robo 3T. Which dbs can you access with Robo 3T? Maybe you can attach a screenshot of accessible databases, like you did with Studio 3T?

Hi,
On Robo 3T the issue is that, I can only see the DB I authenticate against authdb.
What I want to achieve is using authdb as authSource but explore explore mydb
image
Here's a screencap, the only accessible database is the one I authenticate against, contrary to what Studio 3T is able to see/explore.

@anand-prem
Copy link

anand-prem commented Jun 1, 2020

The only part that is not clear is the result in Robo 3T. Which dbs can you access with Robo 3T? Maybe you can attach a screenshot of accessible databases, like you did with Studio 3T?

Hi,
On Robo 3T the issue is that, I can only see the DB I authenticate against authdb.
What I want to achieve is using authdb as authSource but explore explore mydb
image
Here's a screencap, the only accessible database is the one I authenticate against, contrary to what Studio 3T is able to see/explore.

Any leads about this? Does this issue resolved?

@simsekgokhan
Copy link
Collaborator

simsekgokhan commented Jun 11, 2020

@bbuivn Thanks a lot again for your great detailed problem report.
Hi @anand-prem.
We have started to investigate. Seems to me that this is a known problem.
Can you create those dbs (mydb and otherdb) manually and see if it works? (If this workaround solution works, this confirms that you have this known problem that we are trying to solve right now)

@simsekgokhan simsekgokhan self-assigned this Jun 11, 2020
simsekgokhan added a commit that referenced this issue Jun 14, 2020
simsekgokhan added a commit that referenced this issue Jul 17, 2020
…on a non-admin auth. db, only auth db is shown
@quique0194
Copy link

quique0194 commented Jul 30, 2020

I have only read permissions to the db, so creating manually the db doesn't always work

@simsekgokhan
Copy link
Collaborator

simsekgokhan commented Jul 31, 2020

Hi @quique0194. Creating db on Robo 3T is an offline/independent operation. You should be able to create in any condition.

@simsekgokhan
Copy link
Collaborator

simsekgokhan commented Sep 4, 2020

Hi @bbuivn, we have some fixes related to this problem in the new version.
I hope Robo 3T 1.4 will fix it -> Robo 3T 1.4
Please let us know.

@quique0194 , I hope this will help you:
New feature - Manually specify visible databases ->https://blog.robomongo.org/robo-3t-1-4/#a2

@bbuivn
Copy link
Author

bbuivn commented Sep 18, 2020

Hi @simsekgokhan
I've tested Robo3T 1.4 and I can confirme that it does work like a charm with the box Manually specify visible databases ticked.
image

I will add some details about the issue though.
This is an issue that looks related versions of MongoDB prior to 4.0 see the explanation about listDatabase behavior

And indeed, from 4.0.6 there's no need to specify databases manually. You'll only need it on priori version (3.6 and prior).

Thanks a lot!
I will close this issue now :)

@bbuivn bbuivn closed this as completed Sep 18, 2020
@simsekgokhan
Copy link
Collaborator

simsekgokhan commented Sep 21, 2020

@bbuivn Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Robo 3T 1.4
Awaiting triage
Development

No branches or pull requests

4 participants