Wisser/Jailer

OSX Unable to connect to SSMS

imloualvaro opened this issue · 1 comments

How should I setup jailer to work with Microsoft SQL. Im using Microsoft JDBC Drive mssql-jdbc-11.2.0.jre8.jar and getting SSL error. My current URL jdbc:sqlserver://host:port

Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path
building failed: sun.security.provider. certpath.SunCertPathBuilderException:
unable to find valid certification path to requested target".
ClientConnectionld:2919551-6376-435b-b3b7-70b803f986fd
Caused by: SSLHandshakeException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid
certification path to requested target
Caused by: ValidatorException: PKIX path building failed:
sun.security.provider.certpath. SunCertPathBuilderException: unable to find valid
certification path to requested target
Caused by: SunCertPathBuilderException: unable to find valid certification path
to requested target```

Looks like the client (JDBC driver) cannot validate the authenticity of the database server because it lacks a corresponding certificate.
Try to bypass the validation by setting the parameter "trustServerCertificate" to "true". Add the following to the JDBC URL:
;trustServerCertificate=true
So in total like this: jdbc:sqlserver://host:port;trustServerCertificate=true

From the MSSQL documentation:
If the trustServerCertificate property is set to true, the SQL Server Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), certificate is automatically trusted when the communication layer is encrypted using TLS. In other words, the Microsoft JDBC Driver for SQL Server will not validate the SQL Server TLS/SSL certificate. The default value is false.