Splunk® Enterprise

Securing the Splunk Platform

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.
This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF

Configure Splunk forwarding to use your own certificates

This topic describes how to send data from your forwarders to your indexers using your own certificates. These certificates can be self-signed, or signed by a third party. This topic describes the following steps:

  • Configure the indexer(s) to use a new signed certificate, as described in this topic.
  • Configure the forwarder(s) to use a new signed certificate, as described in this topic.

Before you begin, you must procure and prepare your certificates. Make sure your certificates are PEM files in x509 format and that your key is in RSA format. If you need help, we've provided a few simple examples to help you create and prepare your own certificates. See About securing data from forwarders and About securing inter-Splunk communication for more information.

You can also create multiple certificates (signed by the same CA ) with different common names and distribute those to your indexers for added security. When given the CA's public key, the forwarder trusts the CA and verifies the certificate of the CA and matches the sslCommonNameToCheck OR sslAltNameToCheck

Configure your indexer to use your certificates

1. Copy your server certificate and CA public certificate into an accessible folder on the indexer(s) you intend to configure. For example: $SPLUNK_HOME/etc/auth/mycerts/

Warning: If you configure inputs.conf or outputs.conf in an app directory, the password is NOT encrypted and the clear-text value remains in the file. For this reason, you may prefer to create different certificates (signed by the same root CA) to use when configuring SSL in app directories.

2. Configure inputs.conf on the indexer(s) to use the new server certificate. In $SPLUNK_HOME/etc/system/local/inputs.conf (or in the appropriate directory of any app you are using to distribute your forwarding configuration), stanzas:

[splunktcp-ssl:9997]

disabled=0

[SSL]

serverCert = Absolute path to the certificate. The default certificate can be found at 
$SPLUNK_HOME/etc/auth/.

Password = certificate password

rootCA = <path> Full path to the root CA (Certificate Authority) certificate store.

requireClientCert = Set to true if you want your indexer to require authentication from
the client (which in this case is the forwarder).

sslVersions = (Optional) String of accepted password ssl versions. Defaults to recommended 
setting of "*,-ssl2", which is anything newer than SSLv2.

cipherSuite = (Optional) Cipher suite string. If not set, the default cipher string is used.

ecdhCurves = <comma separated list of ec curves> ECDH curves to use for ECDH key negotiation, the curves should be specified in order of preference.

sslCommonNameToCheck = (Optional) <commonName1>, <commonName2>, ... When 
populated, Splunk software checks the common name of the client's certificate against 
this list of names. If there is no match the Splunk instance is not authenticated. 
The requireClientCert attribute must be set to true to use this attribute.

sslAltNameToCheck = (Optional) <alternateName1>, <alternateName2>, ... If provided, 
Splunk software checks the alternate name of the client certificate against this list of 
names. If there is no match the Splunk instance is not authenticated. requireClientCert 
attribute must be set to true to use this attribute.

Note that when you edit the file in $SPLUNK_HOME/etc/system/local/inputs.conf, Splunk software encrypts the password and overwrites the clear-text server certificate password that you provided when you restarted Splunk Enterprise.

3. Restart splunkd.

# $SPLUNK_HOME/bin/splunk restart splunkd

Configure your forwarders to use your certificates

1. Generate a new certificate (ie. client.pem) and copy the new certificate and the CA public certificate myCACertificate.pem into an accessible folder on the forwarders you plan to configure. For this example, we are placing them in $SPLUNK_HOME/etc/auth/mycerts/.

Warning: If you configure inputs.conf or outputs.conf in an app directory, the password is NOT encrypted and the clear-text value remains in the file. For this reason, you may prefer to create different certificates (signed by the same root CA) to use when configuring SSL in app directories.

2. Define the [SSL] stanza in $SPLUNK_HOME/etc/system/local/outputs.conf (or in the appropriate directory of any app you are using to distribute your forwarding configuration):

[tcpout:group1]

server=10.1.1.197:9997

disabled = 0

[tcpout:splunkssl]

sslPassword = The password for the CAcert

sslCertPath = <path>This is the path to the client certificate. If specified, this connection must use SSL.

sslCipher = <string> If set, Splunk uses the specified cipher string for the input processors. Otherwise, the default cipher string is used.

ecdhCurves = <comma separated list of ec curves> A list of the ECDH curves to use for ECDH key negotiation. The curves should be specified in the order of preference.

sslRootCAPath = <path> Full path to the root CA (Certificate Authority) certificate store.

sslVerifyServerCert = must be enabled to use common name checking. Defaults 
to no common name checking. 

tlsHostname = [<string>] TLS extension that allows sending an identifier with SSL Client Hello

sslCommonNameToCheck = (Optional) <commonName1>, <commonName2>, ... 

sslAltNameToCheck = (Optional) <alternateName1>, <alternateName2>, ... 

useClientSSLCompression = <true> Disabling tls compression can cause bandwidth issues.

cipherSuite = (Optional) Splunk uses any specified cipher string for the input 
processors. If not set, Splunk uses the default cipher string provided by OpenSSL. <!--added in 6.4.3, need to brand from 6,4,2 to 6,4,3-->

sslVersions = <string> Comma-separated list of SSL versions to support. The available versions are "ssl3", "tls1.0", "tls1.1", and "tls1.2"

3. Restart splunkd.

# $SPLUNK_HOME/bin/splunk restart splunkd

To forward data to more than one indexer

To configure a forwarder to authenticate to multiple indexers, simply add each HOST:PORT address as a comma-separated list in the "server" attribute of the target group definition stanza.

The following outputs.conf example uses the same certificate for the indexer and the forwarders:

[tcpout]

[tcpout:group1]

server = 10.1.12.112:9997,10.1.12.111:9999

disabled = 0

[tcpout:splunkssl]

sslPassword = The password for the CAcert

sslCertPath = <path to the client certificate>, Populating this setting forces the connection to use SSL.

sslCipher = <string>, If this setting is populated SSL uses the specified cipher string for the input processors, otherwise, the default cipher string is used.,

sslRootCAPath = Full path to the root CA (Certificate Authority) certificate store. The <path> must refer to a PEM format file containing one or more root CA certificates concatenated together.

sslVerifyServerCert = [true|false]. When set to true, both the common name and the alternate name of the server are then checked for a match.

sslCommonNameToCheck = indexercn.example.org

useClientSSLCompression = <true> Defaults to the value set in the useClientSSLCompression 
attribute set in server.conf.

sslVerifyServerCert = true

sslVersions = <string>. Comma-separated list of SSL versions to support.

To forward data to multiple indexers using certificates with different common names

You can create and configure one server certificate for each indexer by configuring the forwarder's outputs.conf with one server-specific [SSLConfig] stanza per indexer.

If you have created one server certificate per indexer and you have set a unique sslCommonNameToCheck OR sslAltNameToCheck in each indexer certificate to be checked by the forwarders, you will need to configure one [tcpout-server://HOST:PORT] configuration stanza per indexer in outputs.conf. This is so that you can specify which name to check for which indexer.

Next steps

Next, you should check your connection to make sure your configuration works. See Validate your configuration for more information.

Last modified on 19 May, 2018
PREVIOUS
Configure Splunk forwarding to use the default certificate
  NEXT
Validate your configuration

This documentation applies to the following versions of Splunk® Enterprise: 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


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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