...
If you need to connect to a MongoDB configured to Use TLS/SSL you need to set the following attributes into the noSQLConnectionProvider tag:
Attribute | Value | Description |
---|---|---|
sslEnabled | true | Enables the ssl on the Aspire MongoDB client |
sslInvalidHostNameAllowed | true/false | Disables the hostname verification from the SSL validation |
Aspire 4.0 only supports authenticating to MongoDB using X.509.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- noSql database provider for the 4.0 connector framework --> <noSQLConnectionProvider sslEnabled="true" sslInvalidHostNameAllowed="false"> <implementation>com.searchtechnologies.aspire:aspire-mongodb-provider</implementation> <servers>mongodb-host1:27017,mongodb-host2:27017,mongodb-host3:27017,mongodb-host4:27017</servers> <x509username>CN=user,OU=OrgUnit,O=myOrg</x509username> </noSQLConnecitonProvider> |
...
If you want to be extra safe and encrypt the URLs, IDs, or any other metadata stored in MongoDB, you can do by specifying the name of the fields to encrypt:
...