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

Expose a way to know whether the directShardOperations role is being used.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Server Security
    • Fully Compatible
    • Sharding EMEA 2023-03-20, Sharding EMEA 2023-04-03, Sharding EMEA 2023-04-17

      In SERVER-65088 we created a new role called 'directShardOperations' that didn't have any privilege associated to it, it was just a placeholder for the upcoming work.

      In 7.0, this role should be associated with a new privilege that allows users to perform direct operations against shards (i.e. without going through the mongos).

      Sharding EMEA will need a way to query whether that privilege is enabled given an operation context (through the AuthorizationSession , using the client associated with the opCtx ?).

      Some customers might want to opt in to this role, we don't expect it to happen very often but it might happen: the most common use case would be to manually delete orphan documents: instead of relying on the native way of removing orphan documents after a migration (i.e. range deletions) we had some customers in the past that manually removed them. Since those documents are just an artifact of the chunk migration, they couldn't remove them connecting through the mongos: they would have removed the legit documents on the recipient shard instead of the orphan documents on the donor shard. So they ended up doing this cleanup connecting directly to the shards.

            Assignee:
            sergi.mateo-bellido@mongodb.com Sergi Mateo Bellido
            Reporter:
            adam.rayner@mongodb.com Adam Rayner
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: