[SERVER-33148] add db.collection.getInfo() collection method Created: 06/Feb/18  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Querying, Security
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Adinoyi Omuya Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-25804 The listCollections command does not ... Closed
Assigned Teams:
Query Execution
Participants:

 Description   

We already have db.getCollectionInfos(). However, numerous users have run into issues where they aren't able to get information specific to a collection (information such as what listCollections provides) because they do not have the necessary privileges to do so.

Exposing a new method on the collection, one that returns the same information as db.getCollectionInfos() - but for the current namespace - will address most of these issues.



 Comments   
Comment by Adinoyi Omuya [ 09/Feb/18 ]

kyle.suarez yes, that would suffice. I'm primarily requesting a feature tantamount to db.getCollectionInfos() - but for collections. AFAICT, a read role (or a colstat privilege) on the namespace should be all that's needed.

asya I prefer this solution since it won't affect existing behavior in listCollections that users might be relying on.

Comment by Asya Kamsky [ 09/Feb/18 ]

It seems that the related ticket is the more correct solution - allow anyone to run listCollections but only return to them things they can see?

Comment by Kyle Suarez [ 09/Feb/18 ]

adinoyi.omuya, would it be sufficient to provide this information in the $collStats aggregation stage? Are there particular auth requirements that we should be aware of?

spencer.jackson, should this go to Platforms if it's a security/privilege related thing?

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