This page describes how to secure communication between the Java Agent and these AppDynamics components using SSL:

  • AppDynamics Controller: Before you configure the agent to communicate with the Controller through SSL, you must either use a SaaS Controller or configure the on-premises Controller to use SSL. See Gather SSL Configuration Details.
  • AppDynamics Analytics Agent: Before you configure the agent to communicate with the Analytics Agent through SSL, you must Enable SSL for the Analytics Agent.

The Java Agent supports extending and enforcing the SSL trust chain when in SSL mode.

Gather SSL Configuration Details

In preparation to secure Java Agent communications through SSL, you need information about the SSL configuration of the Controller or the Analytics Agent:

  • The SSL port:
    • For SaaS Controllers, the SSL port is 443.
    • For on-premises Controllers, the default SSL port is 8181, but you may configure the Controller to listen for SSL on another port.
    • You configure the port for the Analytics Agent using the ad.dw.http.port property. See Enable SSL for the Analytics Agent.
  • The signature method for the certificates:
    • A publicly known certificate authority (CA) signed the certificate. This applies for DigiCert, Verisign, Thawte, and other commercial CAs.
    • A CA internal to your organization signed the certificate. Some companies maintain internal certificate authorities to manage trust and encryption within their domain.
    • The Controller or Analytics agent uses a self-signed certificate.

Establish Trust for the Controller SSL Certificate

To establish trust between the Java Agent and the AppDynamics Controller, you must import the root certificate for the authority that signed the Controller's certificate into the agent truststore.

If you secured your on-premises Controller with a self-signed certificate, see Keystore Certificate Extractor Utility for instructions to create the agent truststore.

  1. Obtain the root certificate for the authority that signed the certificate for the Controller.
    1. For SaaS Controller deployments only: You can download the DigiCert root certificates certificate at the following location: Ensure to include at least the following certificates:

        • DigiCert Global Root CA
        • DigiCert Global Root G2
        • DigiCert Global Root G3
        • DigiCert TLS ECC P384 Root G5
        • DigiCert TLS RSA4096 Root G5
    2. You must import only the Root CA Certificate into the Java SSL Trust Store because Host Certificates have a very short lifespan and change often. Trusting the Root CA Certificate ensures uninterrupted connectivity to the controller when the Host Certificate changes before expiry.

  2. Run the Java keytool command to import the root certificate. The command creates the keystore in the versioned agent configuration directory if it does not exist:

    keytool -import -alias rootCA -file <root_certificate_file_name> -keystore <agent_home>/<version_number>/conf/cacerts.jks -storepass <truststore_password>

    For example:

    keytool -import -alias ControllerRootCA -file /usr/home/appdynamics/DigicertGlobalRootCA.pem -keystore /usr/local/appagent/ -storepass MySecurePassword

    Make note of the truststore password, you need it to configure the Java Agent.

Enable SSL between the Java Agent and the Controller

Configure these system properties in the versioned controller-info.xml<agent_home>/<version_number>/conf/controller-info.xml. See SSL Configuration Properties for full details on each property.

  • Controller Port: The SSL port for the controller. 443 for AppDynamics SaaS.


  • Controller SSL Enabled: true. 


  • Controller Keystore Password: The plaintext password for the agent truststore.


    If you enabled the Secure Credential Store, encrypt the password and enter it here. See Encrypt Agent Credentials.

  • Controller Keystore Filename: Path of the agent truststore relative to <agent home>/<version>/conf. Required if you use a truststore other than the default <agent_home>/<version_number>/conf/cacerts.jks.


    You can specify the Controller port and enable SSL for the Controller in the JVM startup script, but you must specify the truststore password and filename in the versioned controller-info.xml file.

Restart the JVM after you complete the configuration changes.

Sample Controller-info.xml with SSL and Secure Credential Store Encryption Enabled

<?xml version="1.0" encoding="UTF-8"?>
    <!-- Encrypted Controller keystore / agent trust store password -->
    <!-- Secure Credential Store configuration -->
    <!-- Enable the Secure Credential Store -->
    <!-- Path to they secure credential keystore -->
    <!-- Obfuscated secure credential keystore password -->

Establish Trust for the Analytics Agent SSL Certificate

To establish trust between the Java Agent and the Analytics Agent, you must import the root certificate for the authority that signed the Analytics Agent's certificate into the agent truststore.

  1. Obtain the root certificate for the authority that signed the certificate for the Analytics Agent.
  2. Run the Java keytool command to import the root certificate into the JRE truststore.

    keytool -import -trustcacerts -alias analytics-agent -file <root_certificate_file_name> -keystore $JAVA_HOME/jre/lib/security/cacerts

    For example:

    keytool -import -trustcacerts -alias analytics-agent -file /usr/home/appdynamics/MyAnalyticsCert.crt -keystore $JAVA_HOME/jre/lib/security/cacerts

Establish Trust for Analytics without an Analytics Agent

You can retrieve Transaction Analytics data through Java Agent >= 4.5.16 without the need for a dedicated Analytics Agent. In this deployment model, the Java Agent communicates with the Events Service directly. 

If you use a custom trust store for the Java Agent, you need to establish trust with the Events Service to enable Transaction Analytics without an Analytics Agent. These commands demonstrate how to import the Events Service certificate to the Java Agent trust store:

  • Using a signed certificate:

    keytool -import -trustcacerts -v -alias events_service -file /path/to/CA-cert.txt -keystore cacerts.jks
  • Using a self-signed certificate:

    keytool -import -v -alias events_service -file events_service.crt -keystore cacerts.jks

If you do not establish trust for the private certificate, you cannot retrieve Transaction Analytics data through your Java Agent. Any applications and business transactions you have configured for Transaction Analytics cannot be enabled if the Java Agent cannot communicate with the Events Service. 

You can override this behavior using the -Dappdynamics.force.default.ssl.certificate.validation property. See Java Agent Configuration Properties for details. 

Enable SSL Between the Java Agent and the Analytics Agent

To enable the Java Agent to access the Analytics Agent over SSL, configure the system property for the JVM.

  • Use the HTTPS protocol.
  • Use the Analytics Agent SSL port. The port should be the same value as the Analytics Agent ad.dw.http.port property. See Enable SSL for the Analytics Agent<analytics_agent_host>:<analytics_agent_port>/v2/sinks/bt

    For example:

    java -javaagent:/home/appdynamics/agent/javaagent.jar -Dappdynamics.controller.port=8090 -Dappdynamics.agent.applicationName=ACMEOnline -Dappdynamics.agent.tierName=Inventory -Dappdynamics.agent.nodeName=Inventory1 ACMEOnline.jar

    Restart the JVM after you complete the configuration changes.

Secure the Java Agent Truststore

To prevent tampering with the Java Agent truststore, you should:

  • Secure the truststore file through filesystem permissions:
    • Make the agent truststore readable by any user.

    • Make the truststore owned by a privileged user.

    • Make the truststore writable only by the specified privileged user.

  • Secure the agent configuration files so that they are only readable by the agent runtime user and only writable by a privileged user:

    • Versioned configuration file: <agent_home>/<version_number>/conf/controller-info.xml.

    • Global configuration file: <agent_home>/conf/controller-info.xml.

Keystore Certificate Extractor Utility

The Keystore Certificate Extractor Utility exports certificates from the Controller's Java keystore and writes them to an agent truststore. It installs to this location:


To avoid copying the Controller keystore to an agent machine, you can run this utility from the Controller server. Access the agent distribution on the Controller at this location:

  1. Execute kr.jar and pass these parameters:
    • The full path to the Controller's keystore:

    • The truststore output file name. By default, the agent looks for a Java truststore file named cacerts.jks in the <agent_home>/<version>/conf directory in the agent home. 
    • The password for the Controller's certificate, which defaults to "changeit". If you don't include a password, the extractor applies the password "changeit" to the output truststore.

      /<full path to application JRE>/bin/java -jar kr.jar <controller_home>/appserver/glassfish/domains/domain1/config/keystore.jks cacerts.jks <controller_certificate_password>
  2. Install the agent trust store to the versioned agent configuration directory:


Resolve SSL Issues

If you run into problems with the version of TLS/SSL, see SSL Compatibility between Java Agent and Controller and AppDynamics Agent SSL Protocol.