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

Legacy mongo shell sends authenticate command with database "admin" for X.509

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • None
    • 5.3.0
    • None
    • None
    • Fully Compatible
    • ALL
    • v5.0, v4.4
    • Security 2022-01-10, Security 2022-01-24, Security 2022-02-07, Security 2022-02-21

    Description

      Based on some server-side logging, I see that using the legacy mongo shell v5.0.2 to connect with X.509 auth sends an "authenticate" command with the $db value set to "admin". This is how I'm connecting:

      > mongo --tlsAllowInvalidHostnames --tls --tlsCAFile ./testdata/certs/ca.pem --tlsCertificateKeyFile ./testdata/certs/client_combined.pem  --authenticationMechanism MONGODB-X509
      

      Using this against a locally running mongod succeeds, but interestingly, if I try to manually run such a command once authenticated, it fails as expected:

      > {"authenticate": {"$numberInt":"1"},"mechanism": "MONGODB-X509","user": "CN=x509TestClient","$db": "admin"}
      

      Attachments

        Activity

          People

            sara.golemon@mongodb.com Sara Golemon
            divjot.arora@mongodb.com Divjot Arora
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: