Configuring TLS communication
When configuring the Agent for TLS communication, Elasticsearch should be configured as described in the page titled Securing Elasticsearch of the Portal Dedicated Installation Guide.
To enable TLS communication from the Java Agent to Elasticsearch, ensure the waratek.properties file contains the following flag:
com.waratek.ElasticsearchSecure=true
Using KeyStore
- The Portal Dedicated is supplied with a self-signed certificate to enable TLS connection to the service.
- This is sufficient for testing, but will generate a browser warning when connecting as the certificate won't match the domain name and IP address of the server.
- For use in production it is strongly recommended to use a CA issued certificate, as described in the Production Configuration pages of the Portal Dedicated Installation Guide.
If using the supplied keyStore, do the following:
-
Ensure you have the
PortalDedicatedCert.crtfile, which was created in the Agents to use HTTPS step in the page titled Securing Elasticsearch of the Portal Dedicated Installation Guide. (when completing the “Milestone 3” steps) -
Execute the following
keytoolcommand as sudo to addPortalDedicatedCert.crtto the JDK keystore, specifying thealiasand entering thepassword, as required.sudo <jdk>/bin/keytool -import -alias PortalAlias -file PortalDedicatedCert.crt -storetype JKS -keystore war_keystore.jksNote, use the keytool that is present at
<jdk>/bin/keytoolin the bin directory of the Java JDK that the agent is running with.When prompted to Trust this certificate?, enter
yes; When successfully added, the following output is logged by the keytool command;Certificate was added to keystore -
Edit the appropriate
waratek.propertiesfile(s).com.waratek.trustStore=<absolute_directory_path_to>/waratek_secure_keystore.jks
# change the value for the password if you done so in previous steps
com.waratek.trustStorePassword=password
Start/Restart Application
Start/restart your application and confirm it connects to the Portal correctly and shows as “ONLINE” in the Portal browser.