Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Issue:
When you run a VA scan or test VA credentials against a PostgreSQL instance, you see the following error:
Please Check Connection Parameters Cannot create PoolableConnectionFactory (The connection attempt failed.)
When you look at dbs.log, you also see the following:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The connection attempt failed.)
Caused by: org.postgresql.util.PSQLException: The connection attempt failed.
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
PostgreSQL 11 and later present the public key certificate in a format that is incompatible with the Database Security Server default settings.
Solution:
You have two options to fix the issue:
Option 1 (recommended):
Extract the public key certificate from PostgreSQL and import it to Database Security Server’s Java KeyStore file.
Option 2 (not recommended):
NOTE: This change disables public key certificate validation for this connection, which is a potential security risk.