cancel
Showing results for 
Search instead for 
Did you mean: 

SSL configuration for connecting to Postgres DB

SOLVED
New Contributor

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!

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Moderator

Re: SSL configuration for connecting to Postgres DB

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


Join the annual community event and share your stories to win gifts
Wintertainment2019

View solution in original post

Moderator

Re: SSL configuration for connecting to Postgres DB

Hi all,

 

Thank you for your reply, @MarcusJ!

 

@mogranovitch, have you had a chance to try the above suggestion? Does this help?


Olga Terentieva
SmartBear Assistant Community Manager

View solution in original post

2 REPLIES 2
Moderator

Re: SSL configuration for connecting to Postgres DB

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


Join the annual community event and share your stories to win gifts
Wintertainment2019

View solution in original post

Moderator

Re: SSL configuration for connecting to Postgres DB

Hi all,

 

Thank you for your reply, @MarcusJ!

 

@mogranovitch, have you had a chance to try the above suggestion? Does this help?


Olga Terentieva
SmartBear Assistant Community Manager

View solution in original post