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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 1.1.4
    • Shell API
    • None
    • Not Needed
    • 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

            anna.henningsen@mongodb.com Anna Henningsen
            divjot.arora@mongodb.com Divjot Arora
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: