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

Mongo shell is conflating authentication & network errors

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Networking, Shell
    • Labels:
      None
    • Backport Requested:
      v4.4
    • Sprint:
      STM 2020-08-10, STM 2020-08-24
    • Story Points:
      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

              Assignee:
              robert.guo Robert Guo
              Reporter:
              adinoyi.omuya Adinoyi Omuya
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: