If you configure the Syslog destination
to use the TCP protocol, you can enable the destination to use SSL/TLS to connect to
the Syslog server.
-
In the Syslog Connection tab, select the Enable
SSL property.
-
If the Syslog server certificate is signed by a private CA or not trusted by
the default Java truststore, create a custom truststore file or modify a copy of
the default Java truststore file to add the CA to the file. Then configure Data Collector to use the modified truststore file.
By default, Data Collector uses the Java truststore file located in
$JAVA_HOME/jre/lib/security/cacerts. If your
certificate is signed by a CA that is included in the default Java
truststore file, you do not need to create a truststore file and can skip
this step.
In these steps, we show how to modify the default truststore file to add an
additional CA to the list of trusted CAs. If you prefer to create a custom
truststore file, see the
keytool documentation.
-
Use the following command to set the JAVA_HOME environment
variable:
export JAVA_HOME=<Java home directory>
-
Use the following command to set the SDC_CONF environment
variable:
export SDC_CONF=<Data Collector configuration directory>
For example, for an RPM installation
use:
export SDC_CONF=/etc/sdc
For
example:
export SDC_CONF=/streamsets-datacollector-4.1.0/etc
-
Use the following command to copy the default Java truststore file to
the Data Collector configuration directory:
cp "${JAVA_HOME}/jre/lib/security/cacerts" "${SDC_CONF}/truststore.jks"
-
Use the following keytool command to import the CA certificate into the
truststore file:
keytool -import -file <Syslog certificate> -trustcacerts -noprompt -alias <Syslog alias> -storepass <password> -keystore "${SDC_CONF}/truststore.jks"
For
example:
keytool -import -file mySyslogServer.pem -trustcacerts -noprompt -alias MySyslogServer -storepass changeit -keystore "${SDC_CONF}/truststore.jks"
-
Define the following options in the SDC_JAVA_OPTS
environment variable:In Control Hub, edit the
deployment. In the Configure Engine section, click
Advanced Configuration. Then, click Java
Configuration. Define the following options in the Java Options
property:
- javax.net.ssl.trustStore - Path to the
truststore file on the Data Collector
machine.
- javax.net.ssl.trustStorePassword -
Truststore password.
Modify environment variablesModify environment
variables using the method required by your installation
type.
For example, define the options as
follows:
export SDC_JAVA_OPTS="${SDC_JAVA_OPTS} -Djavax.net.ssl.trustStore=/etc/sdc/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword -Xmx1024m -Xms1024m -server -XX:-OmitStackTraceInFastThrow"
-Djavax.net.ssl.trustStore=/streamsets-datacollector-4.1.0/etc/truststore.jks -Djavax.net.ssl.trustStorePassword=mypassword
Or to avoid saving the password in the export command, save the
password in a text file and then define the truststore password option as
follows: -Djavax.net.ssl.trustStorePassword=$(cat
passwordfile.txt)
Then ensure that the password file is readable only by the user
executing the export command.
-
Restart Data Collector to enable the changes.Save the changes to
the deployment and restart all engine instances.