PostgreSQL datasource with SSL only connects when using NonValidatingFactory for SSL factory

Solution Unverified - Updated -

Issue

  • Creating a PostgreSQL datasource secured with SSL and specified the keystore containing the database's public certificate using the javax.net.ssl.trustStore system properties. The JDBC driver is not able to validate the database server certificate and will only work if the sslfactory=org.postgresql.ssl.NonValidatingFactory flag is contained in the JDBC connection string.

Environment

  • Red Hat JBoss Enterprise Application Platform 6
  • PostgreSQL database

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content