How to connect from spring boot to mongodb securely over TLS / SSL
How to connect from spring boot to mongodb securely over TLS / SSL For a secure production setup, MongoDB deployment should use valid CA certificates generated and signed by a certificate authority. This document / blog outlines the steps to be followed in setting up a SpringBoot application can connect to MongoDb using valid certificates. However the process of obtaining and managing certificates is beyond the scope of this documentation. There is not much good documentation around connecting a SpringBoot application securely using a certificate and hence this document attempts to bridge the gap. Step 1 : Configure MongoDb: The first step is essentially preparing MongoDb to start with SSL mode enabled. Once it is done – only it accepts request from clients who has encrypted the data using MongoDB’s public key. For development purpose, you can generate a self-signed certificate and private key on a Unix system with a command that resembles the followin...