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

Handle createIndexes on roles collection in RoleGraphUpdate

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.10
    • Affects Version/s: 3.6.12, 4.0.9
    • Component/s: Security
    • None
    • Fully Compatible
    • Security 2019-05-20

      The master branch's role graph update logic has support for the following event on admin.system.roles:

      BSON("createIndexes"
                                                    << "system.roles"
                                                    << "v"
                                                    << 2
                                                    << "name"
                                                    << "role_1_db_1"
                                                    << "key"
                                                    << BSON("role" << 1 << "db" << 1)
                                                    << "unique"
                                                    << true)
      {

      We should ensure older stable branches can handle it as well. Without support, nodes may attempt to create a default index on the roles collection and trigger the following error message:
      Unsupported modification to roles collection in oplog; restart this process to reenable user-defined roles; OplogOperationUnsupported: Unsupported oplog operation.

            Assignee:
            spencer.jackson@mongodb.com Spencer Jackson
            Reporter:
            spencer.jackson@mongodb.com Spencer Jackson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: