[SERVER-40817] Handle createIndexes on roles collection in RoleGraphUpdate Created: 25/Apr/19  Updated: 29/Oct/23  Resolved: 14/May/19

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 3.6.12, 4.0.9
Fix Version/s: 4.0.10

Type: Task Priority: Major - P3
Reporter: Spencer Jackson Assignee: Spencer Jackson
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Sprint: Security 2019-05-20
Participants:
Case:

 Description   

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.



 Comments   
Comment by Githook User [ 14/May/19 ]

Author:

{'email': 'spencer.jackson@mongodb.com', 'name': 'Spencer Jackson', 'username': 'spencerjackson'}

Message: SERVER-40817 Handle createIndexes on roles collection in RoleGraphUpdate
Branch: v4.0
https://github.com/mongodb/mongo/commit/dd86afd305328e61889fa1b39cfc5de0b84811bd

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