Download PDF
Download page Enable SSL for the Analytics Agent.
Enable SSL for the Analytics Agent
Related pages:
Run the
keytool
command to create a new key pair for the Analytics Agent in the keystore. Refer to the Oracle documentation for more details on using keytool. The following command creates a keystore if it doesn't exist and generates the public/private key pair:keytool -genkeypair -alias analytics-agent -keystore aa-keystore.jks -validity 1825
CODEFollow the on-screen instructions to configure the certificate. This generates a self-signed certificate in the keystore. The next step generates a signing request for the certificate. Note the following:
- For the first and last name, enter the domain name where the Analytics Agent is running.
The domain name used in theappdynamics.analytics.agent.url
property must match the Common Name (CN) of the certificate used by the Analytics Agent. For example, if the URL washttps://localhost:9090/v2/sinks/bt
then the CN of the certificate should belocalhost
. If the names don't match then the client marks the certificate as invalid and the HTTPS connection is not established”. - Enter a secure password for the key.
This command creates a key pair with a validity of 1825 days (5 years). Replace 1825 with the validity period appropriate for your environment.
- For the first and last name, enter the domain name where the Analytics Agent is running.
Generate a certificate signing request for the certificate you created as follows:
keytool -certreq -alias analytics-agent -keystore aa-keystore.jks -file AppDynamics.csr
CODESubmit the certificate signing request file generated by the command (
AppDynamics.csr
in the example command) to your Certificate Authority (CA) of choice.- When it's ready, the CA returns the signed certificate and any root and intermediary certificates required for the trust chain. The response from the CA should include any special instructions for importing the certificate if needed. If the CA supplies the certificate in text format, copy and paste the text into a text file.
Import the signed certificate:
keytool -import -trustcacerts -alias analytics-agent -file mycert.cer -keystore aa-keystore.jks
CODEThis command assumes the certificate is located in a file named
mycert.cer
.If you see the error "Failed to establish chain from reply", install the issuing CA's root and any intermediate certificates into the keystore. The root CA chain establishes the validity of the CA signature on your certificate. Although most common root CA chains are included in the bundled JVM's trust store, you may need to import additional root certificates, such as certificates belonging to a private CA. To do so:
keytool -import -alias [Any_alias] -file <path_to_root_or_intermediate_cert> -keystore <controller_home>/appserver/glassfish/domains/domain1/config/aa-keystore.jks
CODEWhen done importing the certificate chain, try importing the signed certificate again.
- Update the following properties in the analytics-agent.properties file:
ad.dw.https.enabled
=true to enable the HTTPS connector on the Analytics Agent. The HTTPS connection is exposed on the port defined by thead.dw.http.port
property.ad.dw.https.keyStorePath
= absolute path to the Java keystore that contains the Analytics Agent public and private key.ad.dw.https.keyStorePassword
= Java keystore password.ad.dw.https.trustStorePath
=absolute path to the truststore that establishes the chain of trust for the Analytics Agent public key certificate.ad.dw.https.trustStorePassword
=the truststore password.ad.dw.https.certAlias
= alias of the public key certificate stored in the Java Key Store.
- Start the Analytics Agent.
The HTTPS connection should now be exposed. Confirm that the app server agent is configured to trust the Analytics Agent certificate.
For details on enabling SSL communication, see:Agent
Location
Java Agent Enable SSL Between the Java Agent and the Analytics Agent