gbif / ipt

GBIF Integrated Publishing Toolkit (IPT)
https://www.gbif.org/ipt
Apache License 2.0
128 stars 58 forks source link

Connection to remote MSSQL server fails with SSL issue #2513

Open shahmanash opened 2 months ago

shahmanash commented 2 months ago

Connection to a remote MSSQL server from an IPT running in docker fails with SSL related error, see attached screenshot.

ms-sql-server-tls-error

The testing (temporary) fix is to add trustServerCertificate=true; to the JDBC url definition in the jdbc.properties file i.e. Change https://github.com/gbif/ipt/blob/master/src/main/resources/jdbc.properties#L25

mssql.url=jdbc:sqlserver://{host};databaseName={database} to mssql.url=jdbc:sqlserver://{host};databaseName={database};trustServerCertificate=true;

However it is not persistant in a docker container and probably not the best way in a prod environment.

Please advise on the best possible way to address the issue.

mike-podolskiy90 commented 2 months ago

Thank you for contacting us. We'll get back to you.

bart-v commented 2 months ago

Just add ;encrypt=false to your database name (thus in the field "Database"), so it becomes Ring;encrypt=false

shahmanash commented 2 months ago

Thanks, I can confirm that the suggested fix of adding the ;trustServerCertificate=true or ;encrypt=false to the value in the Database field works. But it might not be the most elegant way to solve the issue.

mike-podolskiy90 commented 2 months ago

Yes, it seems it works as a workaround right now. We'll make a fix to address it properly