[SERVER-36262] mongo shell: allow users to show dbs (on <4.0 versions of the server) without the listDatabases privilege Created: 24/Jul/18  Updated: 29/Oct/23  Resolved: 15/Oct/18

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 4.0.5, 4.1.5

Type: Improvement Priority: Major - P3
Reporter: Alyson Cabral (Inactive) Assignee: Sara Golemon
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-37526 IDLify listDatabases command Closed
depends on SERVER-37551 Add {authorizedDatabases:bool} param ... Closed
Documented
is documented by DOCS-12160 Docs for SERVER-36262: mongo shell: a... Closed
Related
related to SERVER-32942 mongo shell: for users authorized to ... Closed
is related to SERVER-35638 Shell auto-completion blocks when lis... Closed
Backwards Compatibility: Minor Change
Backport Requested:
v4.0
Sprint: Security 2018-10-22
Participants:

 Description   

Related to SERVER-32942

That ticket changed the behavior of show collections to : If the shell obtains an Unauthorized error, which it would if it ran the listCollections command against an older version of the server which didn't respect authorizedCollections, it will attempt to parse out the set of collections it has been granted privileges on from the output of connectionStatus.

The same pattern should be applied to show dbs (listDatabases)



 Comments   
Comment by Githook User [ 09/Nov/18 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-36262 Support inferring database names from privileges in mongo shell when speaking to pre-4.0 mongod

(cherry picked from commit ce7d8e88d3ffa8a1415a5f0c915ffe65b718e637)
Branch: v4.0
https://github.com/mongodb/mongo/commit/b404b1fe2c83e36080b186d8fe978389ac40995c

Comment by Githook User [ 15/Oct/18 ]

Author:

{'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}

Message: SERVER-36262 Support inferring database names from privileges in mongo shell when speaking to pre-4.0 mongod
Branch: master
https://github.com/mongodb/mongo/commit/ce7d8e88d3ffa8a1415a5f0c915ffe65b718e637

Generated at Thu Feb 08 04:42:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.