The out-of-the-box Sync Service provides keystore (sync.jks) and truststore (sync.truststore). The password for the keystore and truststore for the default installation is specified in the applicationConnectors section of the config.yml file:
server:
applicationConnectors:
keyStorePassword:
The keystore contains a private key and a self-signed certificate for the Sync Service. The truststore contains the self-signed certificate exported from the keystore to create a trust relationship between the Sync Service and itself. In production systems, the truststore usually contains only certificates that are trusted and signed by certificate authorities (CA).
Note
For production systems, it's strongly advised that you use your own SSL key and a certificate that's signed by a certificate authority.
-
Start the Sync Service by enabling SSL and pass on the path, password, and the store type to the keystore and truststore:
-Dcom.sun.management.jmxremote.ssl=true -Djavax.net.ssl.keyStore=/path/to/keystore -Djavax.net.ssl.keyStorePassword=<password> -Djavax.net.ssl.keyStoreType=<type> -Djavax.net.ssl.trustStore=/path/to/truststore -Djavax.net.ssl.trustStoreType=<type> -Djavax.net.ssl.trustStorePassword=<password>For example:
cd <installLocation>/service-syncjava -Xmx2G -Dcom.sun.management.jmxremote=true -Djava.rmi.server.hostname=34.253.209.238 -Dcom.sun.management.jmxremote.port=50800 -Dcom.sun.management.jmxremote.rmi.port=50801 -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=/path/to/jmx.password -Dcom.sun.management.jmxremote.ssl=true -Djavax.net.ssl.keyStore=/path/to/sync.jks -Djavax.net.ssl.keyStorePassword=<password> -Djavax.net.ssl.keyStoreType=JCEKS -Djavax.net.ssl.trustStore=/path/to/sync.truststore -Djavax.net.ssl.trustStoreType=JCEKS -Djavax.net.ssl.trustStorePassword=<password> -Djava.io.tmpdir=/var/tmp/dsync -cp postgresql.jar:service-sync-3.0.x.jar org.alfresco.service.sync.dropwizard.SyncService server config.ymlNote
Replace
service-sync-3.0.x.jarwith your exact version. -
Copy the Sync Service truststore into your local machine or export the Sync Service certificate into a new truststore. See the example steps in How to export and import SSL certificate.
-
Start JConsole:
jconsole -J-Djavax.net.ssl.trustStore=sync.truststore -J-Djavax.net.ssl.trustStoreType=JCEKS -J-Djavax.net.ssl.trustStorePassword=<password> -
Select Remote Process and enter the Sync Service IP and
com.sun.management.jmxremote.portvaluevalue, user name, and password, as in the earlier example.