Splunk® Enterprise

Securing the Splunk Platform

Acrobat logo Download manual as PDF


Splunk Enterprise version 6.x is no longer supported as of October 23, 2019. See the Splunk Software Support Policy for details. For information about upgrading to a supported version, see How to upgrade Splunk Enterprise.
Acrobat logo Download topic as PDF

Obtain certificates signed by a third-party for Splunk Web

On Splunk Enterprise only, you can create and have a third party sign certificates necessary to configure Splunk Web for SSL authentication and encryption.

There are multiple ways you can create these certificates, depending upon your organization's policies, your network structure, and the tools that you are using to create the certificates.

If you have already generated these certificates and keys, or if you are experienced with creating third-party certificates, you can skip this step and go directly to the configuration topic in this manual at Secure Splunk Web with your own certificate.

Prerequisites

Before you attempt to perform the commands in this procedure, you must understand what the $SPLUNK_HOME directory means. In this procedure, $SPLUNK_HOME refers to the Splunk Enterprise installation directory.

  • For Windows, the default installation directory is C:\Program Files\splunk.
  • For most *nix platforms, the default installation directory is /opt/splunk.
  • For Mac OS, the default installation directory is /Applications/splunk.

You must also have experience using either a shell prompt (on Unix) or a command prompt or PowerShell window (on Windows.)

Create a new private key file

  1. Create a new directory to host the certificates and keys. This example uses $SPLUNK_HOME/etc/auth/mycerts.

    Place your new certificates in a different directory than $SPLUNK_HOME/etc/auth/splunkweb so that you don't overwrite the existing certificates. This ensures that you can use the certificates that ship with Splunk for other Splunk components as necessary.

  2. Generate a new private key. Splunk Web supports 2048-bit and longer keys.
    Unix command Windows command
    $SPLUNK_HOME/bin/splunk cmd openssl genrsa -aes256 -out mySplunkWebPrivateKey.key 2048
    $SPLUNK_HOME\bin\splunk cmd openssl genrsa -aes256 -out mySplunkWebPrivateKey.key 2048

  3. When the OpenSSL command prompts you, create a password to enter the passphrase for the original key. A new private key file mySplunkWebPrivateKey.key appears in your directory. You can use this key file to sign your CSR.
  4. Remove the password from the private key. You must do this because Splunk Web does not support private key passwords.
    Unix command Windows command
    $SPLUNK_HOME/bin/splunk cmd openssl rsa -in mySplunkWebPrivateKey.key
     -out mySplunkWebPrivateKey.key
    $SPLUNK_HOME\bin\splunk cmd openssl rsa -in mySplunkWebPrivateKey.key
     -out mySplunkWebPrivateKey.key

    You can use to following command to confirm that your password was successfully removed:

    # openssl rsa -in mySplunkWebPrivateKey.key -text

    If the password was successfully removed, you can view the certificate contents without providing a password.

Create a Certificate Authority (CA) request and obtain your server certificate

  1. Create a new certificate signature request using your private key file mySplunkWebPrivateKey.key:
    Unix command Windows command
    $SPLUNK_HOME/bin/splunk cmd openssl req -new -key mySplunkWebPrivateKey.key -out mySplunkWebCert.csr
    $SPLUNK_HOME\bin\splunk cmd openssl req -new -key mySplunkWebPrivateKey.key -out mySplunkWebCert.csr

    If you receive an error similar to the following:

    Unable to load config info from c:\\build-amd64-5.0.2-20130120-1800\\splunk/ssl/openssl.cnf

    Try typing the following in your command prompt then run the openssl command again:

    set OPENSSL_CONF=c:/Program Files/Splunk/openssl.cnf

  2. Use the CSR file mySplunkWebCert.csr to request a new signed certificate from your Certificate Authority (CA). The process for requesting a signed certificate varies depending on how your Certificate Authority handles a certificate signature request. Contact your CA for more information.
  3. When your CA advises you that your certificate is ready, download the certificate from the CA. This example uses the name mySplunkWebCert.pem for the downloaded file.
  4. Download your Certificate Authority public CA certificate.This example uses the name "myCAcert.pem for this file.
  5. Confirm that both the server certificate and the public CA certificate are in privacy-enhanced mail (PEM) format. If the certificates are not in PEM format, convert them using the openssl command appropriate to your existing file type. Following is an example of a command that you can use for Distinguished Encoding Rules (DER) formats:
    $SPLUNK_HOME/bin/splunk cmd openssl x509 -in mySplunkWebCert.crt -inform DER -out mySplunkWebCert.pem -outform PEM
    $SPLUNK_HOME\bin\splunk cmd openssl x509 -in myCACert.crt -inform DER -out myCACert.pem -outform PEM
  6. Check both certificates to confirm they have the necessary information and do not have a password associated with them.
    Unix commands Windows commands
    $SPLUNK_HOME/bin/splunk cmd openssl x509 -in myCACert.pem -text
    $SPLUNK_HOME/bin/splunk cmd openssl x509 -in mySplunkWebCert.pem -text
    $SPLUNK_HOME\bin\splunk cmd openssl x509 -in myCACert.pem -text
    $SPLUNK_HOME\bin\splunk cmd openssl x509 -in mySplunkWebCert.pem -text

    The issuer information for mySplunkWebCert.pem should be the subject information for myCACert.pem, unless you are using intermediate certificates.

Combine your certificate and keys into a single file

Combine your server certificate and public certificate, in that order, into a single PEM file.

Set up certificate chains

To use multiple certificates, append the intermediate certificate to the end of the server's certificate file in the following order:

[ server certificate]
[ intermediate certificate]
[ root certificate (if required)]

For example, a certificate chain might look like the following:

	
-----BEGIN CERTIFICATE-----
... (certificate for your server)...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
... (the intermediate certificate)...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
... (the root certificate for the CA)...
-----END CERTIFICATE-----

The root CA that signed the intermediate certificate and all intermediate certificates must be in browser certificate stores.

Next steps

After you have created the certificate chains, you can then use them with Splunk Enterprise and Splunk Web. The web.conf configuration file lets you use your certificates for authentication. See Secure Splunk Web with your own certificate for more information.

Last modified on 05 November, 2021
PREVIOUS
Self-sign certificates for Splunk Web
 

This documentation applies to the following versions of Splunk® Enterprise: 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.3.5, 6.3.6, 6.3.7, 6.3.8, 6.3.9, 6.3.10, 6.3.11, 6.3.12, 6.3.13, 6.3.14, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.10, 6.4.11, 6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 6.5.6, 6.5.7, 6.5.8, 6.5.9, 6.5.10, 6.6.0, 6.6.1, 6.6.2, 6.6.3, 6.6.4, 6.6.5, 6.6.6, 6.6.7, 6.6.8, 6.6.9, 6.6.10, 6.6.11, 6.6.12, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.0.4, 7.0.5, 7.0.6, 7.0.7, 7.0.8, 7.0.9, 7.0.10, 7.0.11, 7.0.13, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.1.8, 7.1.9, 7.1.10, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.2.8, 7.2.9, 7.2.10, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.3.6, 7.3.7, 7.3.8, 7.3.9, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6, 8.0.7, 8.0.8, 8.0.9, 8.0.10, 8.1.0, 8.1.1, 8.1.2, 8.1.3, 8.1.4, 8.1.5, 8.1.6, 8.1.7, 8.2.0, 8.2.1, 8.2.2, 8.2.3


Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters