Include the directShardOperations role for mongo user starting with mongo 8

Description

Starting with MongoDB 8.0 you can only run certain commands on shards. If you attempt to connect directly to a shard and run an unsupported command, MongoDB returns an error:

"You are connecting to a sharded cluster improperly by connecting directlyto a shard. Please connect to the cluster via a router (mongos)."

We need to include the directShardOperations role for mongo user starting with mongodb 8.0.

Operator team needs to be aware of this and include the new permission when creating user for monitoring.

Environment

None

AFFECTED CS IDs

PS0002336

Activity

Show:

Details

Assignee

Reporter

Needs Review

Yes

Needs QA

Yes

Priority

Smart Checklist

Created last month
Updated last month

Flag notifications