Controller SSL and Certificates
The Controller comes with a preconfigured HTTPS port (port 8181 by default) that is secured by a self-signed certificate. This page describes how to replace the default certificate with your own custom certificate.
About Controller SSL and Certificates
For production use, we recommend that you replace the self-signed certificate with a certificate signed by a third-party Certificate Authority (CA) or your own internal CA. If you are deploying .NET Agents, you must replace the self-signed certificate with one signed by a CA, since the .NET agents do not work with self-signed certificates.
Controller SSL Certificates
You can manage your Controller SSL certificate using the command line or the Enterprise Console UI under Configurations. On the UI, the Appserver Configurations and Reports Service Configurations and Fleet Management Configurations pages both contain sections that display the SSL certificate information and provide an Edit Certificateo ption.
See Import an Existing Keypair into the Keystore Using the Command Line and Import an Existing Keypair into the Keystore Using the Enterprise Console UI.
Controller Keystore and Artifacts
This page describes how to replace the existing key in the default keystore. Replacing the entire keystore is not recommended unless you first export the existing artifacts from the default keystore and import them into your own keystore.
The default Controller keystore includes the following artifacts:
- s1as: A self-signed private key provided with the Glassfish application server used by the Controller for secure communication on port 8181.
- reporting-instance: A private key used by the reporting service, the service that enables scheduled reports.
Update Keystore Passwords
You can modify the password for the keystore.jks and cacert.jks files that are used to generate the keystore artifacts. The password for both files must be the same.
You cannot modify, however, the password for the reporting-service.pfx file that is generated by the keystore artifact reporting-instance and used by the Reporting Service.
How to View the Keystore
You can view the contents of the keystore yourself using the keytool utility in your jre/<version>bin directory. Enter the default keystore password changeit when prompted.
keytool -list -v -keystore controller_home/appserver/jetty/etc/ keystore.jks
The exact steps to implement security typically vary depending on the security policies for the organization. For example, if your organization already has a certificate to use, such as a wildcard certificate used for your organization's domain, you can import the existing certificate into the Controller keystore. Otherwise, you'll need to generate a new one along with a certificate signing request. The following sections take you through these scenarios.
Before Starting
The following instructions describe how to configure SSL using the Java keytool utility bundled with the Controller installation. You can find the keytool utility in a directory at the same level as <controller_home>. In other words, from <controller_home>, navigate to ../jre/<version>/bin:
The steps assume that the keytool is in the operating system's path variable. To run the commands as shown, you first need to put the keytool utility in your system's path. Use the method appropriate for your operating system to add the keytool to your path.
While the directory paths in this topic use forward slashes, the instructions apply to both Linux and Windows Operating System environments. The steps note where there are differences in the use of commands between operating systems.
Create a Certificate and Generate a CSR
If you don't have a certificate to use for the Controller, create it as follows.
Splunk AppDynamics On-Premises requires using a X.509 digital certificate, which works with any file type.
In these steps, you generate a new certificate within the Controller's active keystore, so it has immediate effect.
The steps are intended to be used in a staging environment, and require the Controller to be shut down and restarted. Alternatively, you can generate the key as described here but in a temporary keystore rather than the Controller's active keystore. After the certificate is signed, you can import the key from the temporary keystore to the Controller's keystore.
Import an Existing Keypair into the Keystore Using the Command Line
These steps describe how to import an existing public and private key into the Controller keystore. We'll step through this scenario assuming that the existing public and private keys need to be converted to a format compatible with Java Keystore, say from DER format to PKCS#12. You'll need to use OpenSSL to combine the public and private keys, and then use keytool to import the combined keys into the Controller's keystore.
Most Linux distributions include OpenSSL. If you are using Windows or your Linux distribution does not include OpenSSL, you may find more information on the OpenSSL website.
This assumes that we have the following files:
- private key:
private.key - signed public key:
cert.crt - CA root chain:
ca.crt
The private key you use for the following steps must be in plain text format. You must assign the default password (changeit) to the private key when you convert it to PKCS12 keystore format.
Use OpenSSL to combine your existing private key and public key into a compatible Java keystore:
openssl pkcs12 -inkeyprivate.key -in cert.crt -export -out keystore.p12- If the Controller is still running, stop it.
Change to the
keystoredirectory:cd <Controller_home>/appserver/jetty/etc/Create a backup of the
keystorefile. For example, on Linux, you can run:cp keystore.jks keystore.jks.backupOn Windows, you can use the copy command in a similar manner.
Delete the self-signed certificate with alias
s1asfrom the default keystore:keytool -delete -alias s1as -keystore keystore.jksImport the PKCS #12 key into the default keystore:
keytool -importkeystore -srckeystore keystore.p12 -srcstoretype pkcs12 -destkeystore keystore.jks -deststoretype JKSUpdate the alias name on the key pair you just imported:
The alias name should be
s1as. Do not change it from this name.keytool -changealias -alias"1"-destalias"s1as"-keystore keystore.jksChange the password of the imported private key:
keytool -keypasswd -keystore keystore.jks -alias s1as -keypass <.p12_file_password> -new<password>For the new private key password, use the default (
changeit) or the master password set as described in Change Keystore Password, if changed.If you get the error "Failed to establish chain from reply", install the issuing Certificate Authority'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
cacerts.jkstruststore, you may need to import additional root certificates. To do so:keytool -import-alias <Any_alias> -file <path_to_root_or_intermediate_cert> -keystore <Controller_home>/appserver/jetty/etc/cacerts.jksWhen done, try importing the signed certificate again.
- Start the Controller.
Import an Existing Keypair into the Keystore Using the Enterprise Console UI
- Log in to the Enterprise Console.
- Navigate to Configurations > Controller Settings > Appserver Configurations.
- Click the SSL Certificate Management tab.
- Click Edit Certificate.
- In the Edit Certificate pop-up window, add the Certificate Body, Certificate Chain (optional), and Private Key.
- In the Edit Certificate pop-up window, click Save.
- On the Appserver Configurations age, click Save.
- When the Appserver Configurationspop-up window appears, click OK.
- Wait until the Controller Configurations Update job finishes. You can review its status on the Jobs page.
Verify the Use of SSL
To make sure the configuration works, use a browser to connect to the Controller over the default secure port, port 8181:
https: //<controller_host>:8181/controller |
Make sure the Controller entry page loads in the browser correctly. Also, verify that the browser indicates a secure connection. Most browsers display a lock icon next to the URL to indicate a secure connection.
After changing the certificate on the Controller, you will need to import the public key of the certificate to the agent truststore. For information on how to do this, see the topic specific for the agent type:
- EUM aggregator: Troubleshoot Browser RUM
- Java Agent: Enable SSL for the Java Agent
- .NET: Enable SSL for the .NET Agent
If there is no proxy configured and the agent is reporting to the Controller itself, then the following changes are also mandatory:
modifyJVMOptions.sh script to make the changes.Change Keystore Password
The default password for the keystore used by the Controller is changeit. This is the default password for the Jetty keystore, and is a well-known (and thus insecure) password. For a secure installation, you need to change it.
Changing keystore password should include setting the same passwords for all the keys as well.
By default, keystore.jks contains s1as and reporting-instance keys.
Updating an Expired Certificate
The steps to renew an expired or soon-to-expire certificate are similar to those for replacing the default certificate, as documented in Create a Certificate and Generate a CSR. To update the expired certificate:
Trust Stores and Keystores
- Java trust store, cacerts, contain root certificates of well-known certification authorities. The validity of a certificate presented during the TLS/SSL (Transport Layer Security/Secure Sockets Layer) session is checked from
cacerts.jks. There are no private keys or passwords in cacerts. They will contain the intermediate and root certificates of certification authorities. - Java Keystore is used to store private key and the identify certificate for the server, which means that the keystore is used to store your server’s credentials.
Troubleshoot Certificate Issues
You may encounter issues when you use default self-signed certificates. Follow these instructions to troubleshoot the issues.
Issue: 'net::ERR_CERT_COMMON_NAME_INVALID'
net::ERR_CERT_COMMON_NAME_INVALID 'This error is displayed even though you import the the default self-signed certificate into "Certificates" of [Trusted Root Certification Authorities] of a Windows machine. Because, the Chrome 58 or higher and Edge browsers do not trust the TLS certificates if the Subject Alternative Name (SAN) is absent.
To troubleshoot this issue, you must regenerate the certificate with SAN and import into "Certificates" of [Trusted Root Certification Authorities] of a Windows machine:
- Back up the following
keystore.jksfile.<AppD Home>\Platform\product\controller\appserver\jetty\etc\keystore.jks - Delete the
s1asentry fromkeystore.jks.keytool -delete -alias s1as -keystore <AppD Home>\Platform\product\controller\appserver\jetty\etc\keystore.jks - Create a new key-pair and the
s1asentry inkeystore.jks, and add it tokeystore.jks.keytool -genkeypair -alias s1as -keyalg RSA -keystore <AppD Home>\Platform\product\controller\appserver\jetty\etc\keystore.jks -keysize 2048 -validity 1825 -storepass changeit -keypass changeit -dname "CN=<hostname>" -ext "SAN=dns:<hostname>" - Export the certificate from
keystore.jks.keytool -exportcert -alias s1as -keystore keystore.jks -file <AppD Home>\Platform\product\controller\appserver\jetty\etc\keystore_controller.crt -rfc -storepass changeit Open the keystore_controller.crt Certificate Manager, select Certificates under Trusted Root Certification Authorities, and import
- Restart the Controller.