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

Unable to view system.views on mongos

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • ALL
    • Hide
      1. Create a sharded cluster with auth
      2. Create a user with the roles listed above 
      3. Connect to the mongos 
      4. Create a view on any collection 
      5. Try to run any command (i.e. db.system.views.find() and see the  authentication error
      6. Repeat the above steps on a replica set and see that there is no error when running commands on system.views 
      Show
      Create a sharded cluster with auth Create a user with the roles listed above  Connect to the mongos  Create a view on any collection  Try to run any command (i.e. db.system.views.find() and see the  authentication error Repeat the above steps on a replica set and see that there is no error when running commands on system.views  
    • Security 2022-05-30

      For a sharded cluster with auth enabled, running any operation on system.views results in an authentication error despite being connected as a user with the following roles: 

      {         "role" : "backup",         "db" : "admin"       }

      ,
           

      {         "role" : "clusterMonitor",         "db" : "admin"       }

      ,
           

      {         "role" : "dbAdminAnyDatabase",         "db" : "admin"       }

      ,
           

      {         "role" : "enableSharding",         "db" : "admin"       }

      ,
           

      {         "role" : "readWriteAnyDatabase",         "db" : "admin"       }

       

      Additionally, when I run show collections on a database with views, the system.views collection is not shown. This behavior differs from that of a replica set. When I create a replica set with auth and authenticate as a user with the same roles as above, I see the system.views collection and am able to run operations on the collection accordingly.

      Is this difference in behavior between mongos and mongod intentional?

            Assignee:
            julia.ruddy@mongodb.com Julia Ruddy (Inactive)
            Reporter:
            julia.ruddy@mongodb.com Julia Ruddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: