I am trying to access the oplog.rs collection and I get:
MongoServerError: not authorized on local to execute command { aggregate: “oplog.rs”, pipeline: [ { $match: {} }, { $group: { _id: 1, n: { $sum: 1 } } } ], cursor: {},…
I gave dbAdmin on local DB to that user and it looks like not enough, what should I do?
I want to get some information about my change Stream like:
count(), count with conditions (to see how many documents are left to the change stream working on),
I don’t think dbadmin has access to opslog.rs.You have to create a role with read on local db and find action on that collection or give a more privileged built in role who has access to system collections of local db