I need to connect to postgresql using SSL Certificate from spring boot application. I have got the certificate and currently i am connecting to db using username and password which i have provided in application.yml file.
Can someone point me to the right tutorial? I could not find anything relevant for spring boot ssl database connection.
you need to append below in URL
&sslmode=verify-full&sslrootcert=/path/to/pemfile
Your URL will look something like
jdbc:postgresql://server:5432/databaseName?currentSchema=dbschema
&sslmode=verify-full&sslrootcert=/home/certificates/mycert.pem
you can refer below URLs
https://jdbc.postgresql.org/documentation/head/connect.html#ssl
https://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With