Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1054

--authenticationDatabase not overriding authSource in connection uri

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • No version
    • Affects Version/s: No version
    • Component/s: Connectivity
    • None
    • Environment:
      macos / ubuntu
    • Not Needed

      Problem Statement/Rationale

      When using "mongosh --host mongodb+srv://connection string", --authenticationDatabase is not overriding the authSource if authSource is specified in the dns TXT records (guide https://docs.mongodb.com/manual/reference/connection-string/#dns-seed-list-connection-format)

      We can override this when using mongodb NodeJS driver, but not when using shell.

      Steps to Reproduce

      create a connection seed list with "authSource=admin"

      Expected Results

      --authenticationDatabase "$external" should override the authSource in connection string.

      Actual Results

      Error returns MONGODB+X509  can only have authSource set to '$external'

      Additional Notes

      Applies to mongo and mongosh

        1. image-2021-11-29-05-20-15-855.png
          image-2021-11-29-05-20-15-855.png
          114 kB
        2. image-2022-01-19-10-57-11-055.png
          image-2022-01-19-10-57-11-055.png
          87 kB
        3. image-2022-01-19-19-34-33-797.png
          image-2022-01-19-19-34-33-797.png
          162 kB
        4. image-2022-01-19-19-34-56-948.png
          image-2022-01-19-19-34-56-948.png
          106 kB
        5. image-2022-01-19-19-44-08-075.png
          image-2022-01-19-19-44-08-075.png
          844 kB

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            daveteu@gmail.com Dave Teu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: