-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Minor - P4
-
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.