Hi
I have a SSL enabled remote PostgreSQL database and I wish to connect from the Atlas UI to generate a cohort definition.
I am using the broadsea-webtools docker container as per https://github.com/OHDSI/Broadsea-WebTools
In my configuration
-
datasource_url is set to : jdbc:postgresql://$(datasource_hostname):$(datasource_port)/$(datasource_dbname)?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
-
flyway_datasource_url is set to : jdbc:postgresql://$(datasource_hostname):$(datasource_port)/$(datasource_dbname)?ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
The Atlas UI is working and I can see data sources.
Using the sample data from OHDSI in a box, I attempt to generate a cohort definition on “Warfarin New Users 65 or Older at Index with Prior Atrial Fibrillation”
The command fails with the response: Error: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host “xxx”, user “xxx”, database “xxx”, SSL off
Generally this error means that the client is configured to connect to without SSL, but PostgreSQL requires SSL.
Given I have set ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory, why is the DB connection failing?
Is it ever possible to pass in the contents of the SSL root certificate of my PostgreSQL as an env variable to the DatabaseConnector via the WebAPI?
Regards
Brendan