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

Mongo shell is conflating authentication & network errors

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Won't Fix
    • None
    • None
    • Networking, Shell
    • None
    • v4.4
    • STM 2020-08-10, STM 2020-08-24
    • 1

    Description

      The mongo shell attempts to authenticate right after it connects to a server and returns an exception if it's unable to. This means that if the client credentials are invalid, it will interpret that as a connection failure and raise an exception.

      It is unexpected that the shell would conflate an authentication problem with the general class of network connection failures. Here's what clients see when all that's wrong is invalid credentials:

      *** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.
      

      It's unclear to me if this is expected behavior (it's confusing at best). If so, using a more generic error message instead of specifically offering that clients check their IP allowlist would be less confusing to users. If not, we should fix it.

      Attachments

        Issue Links

          Activity

            People

              robert.guo@mongodb.com Robert Guo
              adinoyi.omuya@mongodb.com Adinoyi Omuya
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: