Skip to content

JDBC connection without certificate validation

SSL connections are enabled by default on our PostgreSQL instances. This might be a problem when connecting to the database using JDBC if the certificates are not correctly installed to be used by Java, as it does a strict host certificate validation. To avoid Java checking certificates, please use the following connection string:

jdbc:postgresql://{IP_ALIAS}:{PORT}/{USER}?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory