2

I was trying to setup ssl mongodb connection from spring boot but I couldn't able to find a way. How can I add pem and ca file to below connection?

Please note I am using replica set

data:
     mongodb:
         authentication-database: admin
         database: <database>
         host: <host>
         password: <password>
         port: <port>
         username: <username>
1

You can try a configuration like the one below;

server:
    ssl:
        key-store: classpath:keystore.jks
        key-store-password: secret
        key-password: another-secret
data:
     mongodb:
        authentication-database: admin
        database: <database>
        host: <host>
        password: <password>
        port: <port>
        username: <username>
        ssl-enabled: true
| improve this answer | |
  • I need to add client.pem and rootCA.pem right? Could you please tell me relevant field for each? – Januka samaranyake May 19 '18 at 9:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.