-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 7.0.15, 6.0.19, 8.0.3
-
Component/s: Aggregation Framework
-
Catalog and Routing
-
CAR Team 2024-11-11, CAR Team 2024-11-25
$shardedDataDistribution has it's own privilege action which is included in the clusterMonitor role. When running $shardedDataDistribution without a filter on a specific namespace this make sense as the aggregation will return information for sharded collections across all databases.
When a customer is looking for the data distribution of a specific namespace (example below) the requirement to have the clusterMonitor role (or the specific shardedDataDistribution privilege action) seems unnecessary. Other commands such as collStats and listCollections are included in the read role for a database and it seems (if possible) that $shardedDataDistribution should align with that from a UX PoV.
db.aggregate([ { $shardedDataDistribution: {} }, { $match: { "ns": "test.foo" } } ])