[COMPASS-5691] Connected to Atlas Cluster but it shows empty database Created: 05/Apr/22  Updated: 29/Oct/23  Resolved: 07/Apr/22

Status: Closed
Project: Compass
Component/s: Data, Users
Affects Version/s: 1.29.6, 1.30.1, 1.31.1
Fix Version/s: 1.31.2

Type: Bug Priority: Major - P3
Reporter: Blaise Crisologo (Inactive) Assignee: Rhys Howell
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 10


Attachments: Text File compass-v1311-logs.txt     Text File compass_624c29f94027f17e2a4807fb_log.txt     PNG File image-2022-04-05-11-06-27-760.png     PNG File image-2022-04-05-11-07-11-575.png     PNG File image-2022-04-05-11-34-33-601.png     PNG File image-2022-04-05-11-51-01-407.png     PNG File image-2022-04-05-12-15-02-161.png     PNG File image-2022-04-05-12-15-36-887.png     PNG File image.png    
Issue Links:
Duplicate
Problem/Incident
Related
related to COMPASS-7258 User with Custom Role having @db_name... Closed
Documentation Changes: Not Needed
Sprint: Iteration Yonkers

 Description   

Problem Statement/Rationale

I have a customer on intercom who reported the incident:

They were able establish connection using Compass to their M2 cluster carpediemxp-test-0000001, but it shows an empty DB content as per the first image.  However, checking their Atlas DE shows that there should be DB content, which is not reflected on Compass as shown in the second image.

The current DB user role they have has the following permissions:

  • dbAdmin@carpediemxp-test-0000001
  • readWrite@carpediemxp-test-0000001

I've attached the logs obtained from the version 1.31.1 Compass trial in text format.

However, they are not encountering the same issue when connecting to a different cluster, in particular this M0 Cluster0 that's on a different Atlas Organization.  They can view it as per below:

 

Similar incident reported on this slack thread under #compass channel.

Steps to Reproduce

Setting a DB user with only "specific privileges" and no role for the admin DB such as below:

I don't see any DB content either for even the specific DB and collections allowed for the DB user above:

Expected Results

DB Content should be shown given the appropriate DB user role and permissions.

Actual Results

Compass is not showing the DB content for their M2 cluster.

Additional Notes

Asked the customer above to try Compass 1.29.6 and 1.31.0 and 1.30.1 and they mentioned they encounter the same errors.



 Comments   
Comment by Githook User [ 19/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: clustered-collections
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 11/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: COMPASS-5669-aggregate-results
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Rhys Howell [ 11/Apr/22 ]

will.huang@mongodb.com blaise.crisologo@mongodb.com We've just published Compass `v1.31.2-beta.5` with a partial workaround for this issue which will fix listing databases for users with limited built in roles on shared tier clusters.
We'd like to get this in a GA release early this week.
You can find a download it here:
https://www.mongodb.com/try/download/compass
https://github.com/mongodb-js/compass/releases

While hopefully this workaround will cover most general use cases, as well as the case in this ticket, this is a partial workaround. This is partial because, without being able to retrieve the privileges for a certain user, we can currently only derive a user's permissions from the built in roles that users have. For permissions stemming from privileges given by custom roles we'll have to wait for a fix to be deployed on the Atlas side of things. So that will start working one day without a Compass release. That work is tracked here: https://jira.mongodb.org/browse/CLOUDP-118942
Thanks for reporting the issue!

Comment by Githook User [ 11/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: remove-metrics
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 08/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: 5628-dev
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 08/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: COMPASS-5695-collection-packag-typescript
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: 1.31-releases
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: COMPASS-5588-update-perf-toolbar
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: fix(data-service): use databases where user has built in roles in listDatabases COMPASS-5691 (#2959)
Branch: main
https://github.com/mongodb-js/compass/commit/b487f417791fb39ead3a7a65d4bd09538e04451f

Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Rhys', 'email': 'Anemy@users.noreply.github.com', 'username': 'Anemy'}

Message: Merge branch 'main' into COMPASS-5691-use-built-in-roles-for-displaying-databases
Branch: COMPASS-5691-use-built-in-roles-for-displaying-databases
https://github.com/mongodb-js/compass/commit/67838e545946f310f5cdabeeb548176146ce84b2

Comment by Githook User [ 07/Apr/22 ]

Author:

{'name': 'Le Roux Bodenstein', 'email': 'lerouxb@gmail.com', 'username': 'lerouxb'}

Message: Merge branch 'main' into COMPASS-5691-use-built-in-roles-for-displaying-databases
Branch: COMPASS-5691-use-built-in-roles-for-displaying-databases
https://github.com/mongodb-js/compass/commit/a4706d1316c317e606c836d619526a9a1f0404a5

Generated at Wed Feb 07 22:40:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.