Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories MongoDB Shell
Created by Guest
Created on Nov 20, 2023

Avoid issuing commands upon connection where the user is unauthorized to execute them

Presently when a user connects to a MongoDB cluster mongosh will execute several command helpers. Unless the users have specific privileges these commands will trigger several unauthorised messages similar to below: ``` {"msg":"Checking authorization failed","attr":{"error":{"code":13,"codeName":"Unauthorized","errmsg":"not authorized on admin to execute command { getParameter: 1, featureCompatibilityVersion: 1, apiVersion: \"1\"... $db: \"admin\" }"}}} ``` This causes issues for some security monitoring applications, and requires the security monitoring application to be filtered to ignore these events. A similar issue is described in the Jira ticket: https://jira.mongodb.org/browse/MONGOSH-1298