Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-95999

Investigate if $shardedDataDistribution Executed for a Specific Namespace can Require Lower Permissions

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 7.0.15, 6.0.19, 8.0.3
    • Component/s: Aggregation Framework
    • None
    • Catalog and Routing

      $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" }
          }
      ]) 

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.panton@mongodb.com Matt Panton
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: