Search code examples
sslhttpskeystoretomcat8symmetricds

symmetricDS two way ssl handshake(clientAuth=false)


Problem summary: I am trying to run symmetric ds on tomcat with ssl. Setup details 1). MasterNode M1: running on tomcat. 2). Cleint node C1: running on tomcat. I am able to run symmetricds on tomcat without ssl. This setup works fine all sync happens. Now when I am trying to run tomcat with following setting for ssl, it gives bad_certificate error on client node: connection setting on Master node:

<Connector SSLEnabled="true" acceptCount="10"
algorithm="PKIX" allowTrace="false" 
ciphers=""
clientAuth="true"
enableLookups="true"
keystoreFile="/root/symmetric-server-3.8.28/security/keystore.p12"
keystorePass="changeit@1"
keystoreType="pkcs12"
port="31415"
redirectPort="-1"
scheme="https"
secure="true"
sslEnabledProtocols="TLSv1.2"
sslProtocol="TLSv1.2"
truststoreFile="/root/symmetric-server-3.8.28/security/keystore.p12"
truststorePass="changeit@1"
truststoreType="pkcs12"/>

connector setting on Client node:

<Connector SSLEnabled="true" acceptCount="10"
algorithm="PKIX" allowTrace="false" 
ciphers=""
clientAuth="true"
enableLookups="true"
keystoreFile="/root/symmetric-server-3.8.28/security/keystore2.p12"
keystorePass="changeit@1"
keystoreType="pkcs12"
port="31415"
redirectPort="-1"
scheme="https"
secure="true"
sslEnabledProtocols="TLSv1.2"
sslProtocol="TLSv1.2"
truststoreFile="/root/symmetric-server-3.8.28/security/keystore2.p12"
truststorePass="changeit@1"
truststoreType="pkcs12"/>

Note: If I run Master node tomcat with clientAuth=false then everything works fine. On further debugging I found that client is not providing its certificate during TLS handshake. Following is error: Experts please help what config I need to do so that client provide certificate:

Error: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate


Solution

  • Upgrade to SymmetricDS 3.8.31. There was an issue that was fixed that allows for client TLS authentication now:

    http://www.symmetricds.org/issues/view.php?id=2886