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

db.auth() helper errors when using X.509 authentication

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.4
    • Component/s: Shell API
    • Labels:
      None
    • Documentation Changes:
      Not Needed
    • Sprint:
      Iteration Phnom Penh

      Description

      Problem Statement/Rationale

      Attempting to follow the "Authenticate after Connection" instructions in step 3 of the X.509 docs results in an error:

      > db.getSiblingDB("$external").auth({mechanism: "MONGODB-X509"})
      MongoshInvalidInputError: [COMMON-10001] auth expects user document with 'user' and 'pwd' fields
      

      Steps to Reproduce

      Follow the instructions in the docs linked above and choose the "Authenticate after Connection" option rather than "Connect with Authentication".

      Expected Results

      Authentication succeeds.

      Actual Results

      Authentication fails with the error shown above.

      Additional Notes

        Attachments

          Activity

            People

            Assignee:
            anna.henningsen Anna Henningsen
            Reporter:
            divjot.arora Divjot Arora
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: