Connecting to an encrypted MS SQL Server 2016 DB

Installation Forum (Inactive)
Connecting to an encrypted MS SQL Server 2016 DB ed morris  2019-04-02 08:15
Status: Active
 

I have an environment running 18.2 that is currently connected to MS SQL 2012 for the labkey application database, and my DBA team is asking me to switch to their shared 2016 environment. Their environment requires encrypted connections to the DB server.

My attempted connection xml:
<Resource name="jdbc/labkeyDataSource" auth="Container"
type="javax.sql.DataSource"
username="labkey"
password="************"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://consqldev4.cc.emory.edu:1433/labkeydev"
maxActive="20"
maxIdle="10"
accessToUnderlyingConnectionAllowed="true"
validationQuery="SELECT 1"
TrustServerCertificate="true"
/>

I am getting a failed connection error message:

org.labkey.api.util.ConfigurationException: DataSources are not properly configured in ROOT.xml.
Caused by: org.labkey.api.util.ConfigurationException: Can't connect to data source "labkeyDataSource".
Caused by: java.sql.SQLException: I/O Error: DB server closed connection.
Caused by: java.io.IOException: DB server closed connection.

The DB server is showing this error in its event viewer:

Encryption is required to connect to this server but the client library does not support encryption; the connection has been closed. Please upgrade your client library. [CLIENT: xx.xx.xx.xx]

I've seen a thread here on the forum where 2016, even though it isn't officially supported yet, is functional in a test environment. Link. I'm wondering how far I should go troubleshooting this if this is not yet supported.

Thanks for any information you might be able to give.

 
 
ed morris responded:  2019-04-04 10:21
Status: Closed

This is resolved by using a patched jdbc driver, found here: https://www.netiq.com/communities/cool-solutions/enforcing-ssl-tlsv1-2-jdbc-connection-via-jtds-jdbc-driver.

Put a ";ssl=require" after your database name in your connect URL:

url="jdbc:jtds:sqlserver://server.univ.edu:1433/labkeydev;ssl=require"