Hello MongoDB Community,
I have a question regarding the current validity of the configuration outlined in the Connect to MongoDB Instances Using Encryption documentation for the latest versions of MongoDB. When I attempt to set up SSL/TLS encryption following this guide, I receive an error referring to SERVER-72839, which seems to indicate changes in how MongoDB handles SSL/TLS configurations.
As a result, I am compelled to follow an alternative configuration path using Set Up mongod and mongos with Client Certificate Validation. However, this approach presents an additional issue: I don’t intend to use client certificate validation. My goal is to enforce server certificate verification only (i.e., ensuring the client validates the server’s CA).
Issue
When using Set Up mongod and mongos with Client Certificate Validation and providing the certificate and .key
file in the mongosh
client configuration (despite concerns about client possession of the server’s key for security), I encounter the following error:
"ctx":"conn80","msg":"SSL peer certificate validation failed","attr":{"error":"SSL peer certificate validation failed: unsupported certificate purpose"}}
After examining this, it seems MongoDB may be expecting a TLS Web Client Authentication certificate from the client. In our case, the client certificate has only TLS Web Server Authentication, as it’s intended solely for server validation, not mutual client-server authentication.
Question
-
Is it possible to configure MongoDB with SSL/TLS where only the server’s certificate is validated by the client (without requiring client certificate authentication)? If so, are there specific configurations to achieve this that avoid using
allowConnectionsWithoutCertificates
, as it feels less secure? -
Should the documentation be updated to reflect any changes in MongoDB’s approach to SSL/TLS configuration for the latest versions, especially concerning SERVER-72839?
Thank you for your assistance and any insights on achieving the most secure and accurate configuration!
Best regards,