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

Shell fails to connect to Atlas clusters with X.509 authentication

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.0.7
    • Affects Version/s: None
    • Component/s: Connectivity
    • None
    • Not Needed

      Problem Statement/Rationale

      The copy/paste instructions provided by Atlas for X.509 authentication to a cluster fail with mongosh 1.0.5.

      Steps to Reproduce

      Create an Atlas cluster and an X.509 user in the project. Get the X.509 connection instructions from the Atlas UI and try to run them:

      mongosh  "mongodb+srv://<HOSTNAME>/myFirstDatabase?authSource=%24external&authMechanism=MONGODB-X509" --tls true --tlsCertificateKeyFile ./testdata/certs/client_combined.pem
      

      Expected Results

      Connection succeeds.

      Actual Results

      Connection fails with "MongoParseError: All values of tls must be the same."

      Additional Notes

      The connection succeeds if I remove "--tls" from the connection instructions. It also fails if I pass a URI that contains "tls=true&tls=true". Per the drivers URI options spec, it doesn't seem like this should be an error.

            Assignee:
            Unassigned Unassigned
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: