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

Login for user having only database specific roles #27

Open
creharmony opened this issue Dec 5, 2021 · 1 comment
Open

Login for user having only database specific roles #27

creharmony opened this issue Dec 5, 2021 · 1 comment

Comments

@creharmony
Copy link

creharmony commented Dec 5, 2021

Hi

context

I've a test environment with a test mongo database and a test user account:

  • a dedicated mongo user account
  • this user is associated to a custom role targeting only test database:

(example on mongodb.com > manage access view > custom role)

image

NB/ in following example, I replaced real data with "blah blah".

uri login test case

When using "mongo uri login page" with following entry

 mongodb+srv://testuser:password@blah.blah.mongodb.net/test-database?retryWrites=true&w=majority

Then I got the following Screen:
image

detailed fields login test case

If I retry using "detailed fields login ui", then I'm able to get in and I see

  • my database name in upper-left corner
  • but on db name click, I'got a 500 with the following alert message :
Error: No suitable servers found (`serverSelectionTryOnce` set): [Failed to resolve 'blah.blah.mongodb.net']

NB: I got no more logs on docker side:

[Sun Dec  5 14:51:34 2021] 172.21.0.1:53274 Accepted
[Sun Dec  5 14:51:34 2021] 172.21.0.1:53274 [500]: POST /listCollections
[Sun Dec  5 14:51:34 2021] 172.21.0.1:53274 Closing

mongo shell test

Please note that if I'm trying to connect from command line in order to list collections, I've no issue

mongo.exe mongodb+srv://testuser:password@blah.blah.mongodb.net/test-database?retryWrites=true\&w=majority
PRIMARY> show collections
.coll
collB

expected evolution

I expect to use MongoDB-PHP-UI even if my security context doesn't allow me to list all databases (end so on.. manage index/users..)

If I've no access to some feature, I may have a feedback to understand that point
If I've only database read/and/or/write access, then I must be able to use MongoDB-PHP-GUI related feature (find/count..)

@SamuelTallet SamuelTallet changed the title improvement: login for user having only database specific roles Login for user having only database specific roles Dec 15, 2021
@SamuelTallet
Copy link
Owner

Hi, Thanks for this detailed explanation. I planned to rework error handling. I will probably handle this issue at the same time...

@SamuelTallet SamuelTallet pinned this issue Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants