W3tTr3y's blog

A personal technology focused blog

Splunk: One SSL Certificate to Rule Them All

Background

In most Splunk setups you have 2-3 SSL certificates in use:

  1. $SPLUNK_HOME/etc/auth/splunkweb/.pem for SplunkWeb, typically 8443
  2. $SPLUNK_HOME/etc/auth/server.pem Splunk’s management port, typically 8089
  3. A certificate for 9997

Typically it doesn’t matter that there are so many certificates; as long as the forwarders know what certificate to expect when connecting to an indexer on 9997 and splunk internally can validate the cert on 8089, there is no reason for them to be signed by a 3rd party CA.

For the SplunkWeb certificate, a user using a browser will be connecting; if you have a private CA whose certificate if installed in all of your company’s browsers then great, use it. For our purposes, we have standardized on a 3rd party CA that’s widely trusted so we have a certificate signed by them.

Desire for Fewer Certificates

Now comes the fun part, I’m managing two SSL certs on all of our Splunk infrastructure servers: SplunkWeb and Splunkd certs on searchheads and Data (9997) and Splunkd on the indexers. Being the lazy person that I am, I’d love to get that down to one cert to make renewals easier.

Another benefit of using 3rd party CA’s is our risk people want every certificate signed by a 3rd party CA. There’s nothing magical about a 3rd party CA so that requirements doesn’t increase security in anyway. Their desire means I have to fill out an exception for every self-signed or internally signed certificate, so switching to a 3rd party signed certificate makes my life easier.

Combine key and cert into one

In $SPLUNK_HOME/etc/auth/splunkweb, combine the key and certificate into one file (e.g. cd /opt/splunk/etc/auth/splunkweb && cat server.key server.pem > ../server.pem )

where

  • splunkweb/server.key is the private key
  • splunkweb/server.pem is the certificate chain (certificate and any intermediates)

Then in web.conf update:

  1. privKeyPath = etc/auth/server.pem
  2. caCertPath = etc/auth/server.pem