Community edition 7.0 on Ubuntu 24.04
I created a CA cert and installed it (update-ca-certificates
etc.)
I created the server cert.
I configured mongodb.conf
(excerpt):
tls:
mode: requireTLS
certificateKeyFile: /the/path/to/pem
allowInvalidCertificates: true
# to use our snake oil CA + cert
setParameter:
tlsUseSystemCA: true
After all this was done, mongodb successfully started and is running.
However, I have not found an invocation that will successfully connect to MongoDB from mongosh or Compass.
mongosh 'mongodb://admin:********@myserver?tls=true&tlsCAFile=%2fsome%2fpath%2fto%2fcert'
and every combination I can think of results in “No SSL certificate provided by peer; connection rejected”
How do I make a connection?