mongosh should not ask for a password when the client certificate is not password protected

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: Embedded Shell
    • None
    • Not Needed

      Example

      $ mongosh --tls --tlsCertificateKeyFile /Users/abr/CAs/MongoDB-demo-CA/root/private/root.pem --tlsCAFile /Users/abr/CAs/MongoDB-demo-CA/root/certs/root.ca.crt.pem --host localhost --port 6578 --authenticationMechanism MONGODB-X509 --authenticationDatabase '$external' --username 'CN=MongoDB Admin,OU=Production MongoDB Clients,O=BK_man,ST=California,C=US' cg
      Current sessionID:  cb6eeba50563528547c4d2d2
      Enter password:
      Connecting to:      mongodb://localhost:6578/cg
      Using MongoDB:      4.4.0
      Using Mongosh Beta: 0.4.0
      For more information about mongosh, please see our docs: https://docs.mongodb.com/mongodb-shell/
      > db.runCommand({connectionStatus:1})
      {
        authInfo: {
          authenticatedUsers: [
            {
              user: 'CN=MongoDB Admin,OU=Production MongoDB Clients,O=BK_man,ST=California,C=US',
              db: '$external'
            }
      

      The private key in the client certificate is not protected by a password, therefore mongosh should skip asking for a password.

            Assignee:
            Unassigned
            Reporter:
            Massimiliano Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: