Splunk® Enterprise

Securing Splunk Enterprise

Download manual as PDF

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/.

sslPassword = certificate password

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.

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. Your server.conf should also have the following (skip this for Windows configurations):

sslRootCAPath = Absolute path to the cacert, for example, the default value is 
$SPLUNK_HOME/etc/auth/cacert.pem

4. 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

clientCert = <path> The full path to the client SSL certificate in PEM format. If this value is provided, the connection will use SSL.

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

sslPassword = The password for the CAcert

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

sslVerifyServerCert = (Optional) Enable if you wish to use common name checking. Defaults 
to no common name checking. 

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

cipherSuite = (Optional) Splunk uses any specified cipher string for the input 
processors. If not set, Splunk uses the default cipher string provided by OpenSSL.

When you save the file in $SPLUNK_HOME/etc/system/local/outputs.conf, Splunk encrypts and overwrites the clear-text server certificate password when splunkd restarts.

3. Your server.conf should also have the following (skip this for Windows configurations):

[sslConfig]
sslRootCAPath = Absolute path to the cacert, for example, the default value 
is $SPLUNK_HOME/etc/auth/cacert.pem

4. 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

clientCert = $SPLUNK_HOME/etc/auth/client.pem

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

sslPassword = The password for the CAcert

sslCommonNameToCheck = indexercn.example.org

sslVerifyServerCert = true

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.

PREVIOUS
Configure Splunk forwarding to use the default certificate
  NEXT
Validate your configuration

This documentation applies to the following versions of Splunk® Enterprise: 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.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.1.6, 7.1.7, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.3.0


Comments

The outputs.conf example shows you putting the CA's password on your remote forwarder rather than the local certificate's password.

"sslPassword = The password for the CAcert"

Joe
April 25, 2019

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