SSL configuration for connecting to Postgres DB
Hi,
I'm using ReadyAPI 2.8 and now have problems connecting our cloud-based DB server with Postgres DB.
It was working find untill couple of days ago our Server was changed to accept only requests sent through SSL with valid certificate getting error "org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "xxx.xxx.xxx.xxx", user "xxx", database "XXX", SSL off"
Based on somesuggestions, I tried to add at the end of connection string &ssl=true or &ssl=false - getting same error.
I found how to set keystore for use by SOAP or REST API calls, but do not see instructions for using cert's for JDBC calls.
Some suggestions I found asking to add my app's IP/Username/etc. to the pg_hba.conf file on DB server. Unfortunately, cloud-based DB server does not have that file.
Is there a way to properly configure such connection or to bypass this SSL error?
Thank you in advance!
Hi,
You can bypass SSL validation in the Postgres JDBC driver by adding this parameter to the jdbc connection string.
sslfactory=org.postgresql.ssl.NonValidatingFactory
Regards,
Marcus James
SmartBear Support
Hi all,
Thank you for your reply, MarcusJ!
mogranovitch, have you had a chance to try the above suggestion? Does this help?