Splunk SSL Presentation
Splunk SSL Presentation
Type of exchange Client function Server function Encryption Certificate Common Name Type of data
Authentication checking exchanged
Browser to Splunk Web Browser Splunk Web NOT enabled by dictated by client dictated by client search term results
default (browser) (browser)
Inter-Splunk Splunk Web splunkd enabled by default NOT enabled by default NOT enabled by default search term results
communication
Forwarding splunkd as a forwarder splunkd as an indexer NOT enabled by NOT enabled by default NOT enabled by default data to be indexed
default
Inter-Splunk splunkd as a deployment splunkd as deployment enabled by default NOT enabled by default NOT enabled by default configuration data
communication client server
Inter-Splunk splunkd as a search head splunkd as search peer Enabled by default NOT enabled by default NOT enabled by default search data
communication
Our Example Architecture
Choosing an SSL CA - Commercial
+ Root certs in everyone’s browser
- You have to keep the root cert’s key secure and practice
good CA operations
- You have to deal with revocations
$ cd $SPLUNK_HOME/etc/auth/myOrg
$ openssl req -nodes -newkey rsa:2048 -keyout splunk-
idx01.web.key -out splunk-idx01.csr
$ openssl rsa -in splunk-idx01.web.key -des3 -out
splunk-idx01.key
To make the Indexer formatted pem:
$ cat splunk-idx01.crt splunk-idx01.key cacert.crt >
splunk-idx01.pem
The Indexer - Inputs.conf
vi $SPLUNK_HOME/etc/system/local/inputs.conf
!
[splunktcp-ssl://9998]
disabled = 0
acceptFrom = 10.0.0.0/8
!
[SSL]
password = <REDACTED>
rootCA = $SPLUNK_HOME/etc/auth/myOrg/cacert.crt
serverCert = $SPLUNK_HOME/etc/auth/myOrg/splunk-idx01.pem
supportSSLV3Only = true
requireClientCert = true
The Forwarder - NON ECC
First make certificates as you would for SplunkWeb. This can be done on your splunk-d server.
$ cd $SPLUNK_HOME/etc/auth/myOrg/forwarder
$ openssl req -nodes -newkey rsa:2048 -keyout splunk-
forwarder.web.key -out splunk-forwarder.csr
$ openssl rsa -in splunk-forwarder.web.key -des3 -out
splunk-forwarder.key
Just throw away splunk-forwarder.web.key
$ cat splunk-forwarder.crt splunk-forwarder.key
cacert.crt > splunk-forwarder.pem
Copy the splunk-forwarder.pem and cacert.crt to your
Forwarder(s): Yes you could use an APP for this.
Forwarder to Indexer - Outputs.conf
vi $SPLUNK_HOME/etc/system/local/outputs.conf
(or use an app)
!
[tcpout]
defaultGroup = myIndexers
!
[tcpout:myIndexers]
maxQueueSize = 128MB
server = splunk-idx01.myorg.com:9998
sslCertPath = $SPLUNK_HOME/etc/auth/myOrg/splunk-forwarder.pem
sslPassword = <REDACTED>
sslRootCAPath = $SPLUNK_HOME/etc/auth/myOrg/cacert.crt
sslVerifyServerCert = true
sslCommonNameToCheck = splunk-idx01.myorg.com
useACK = true
Gotcha - Forwarder to Indexer
If you mistype the sslRootCAPath argument in outputs.conf, the forwarder
will default to not-SSL when trying to talk to indexer. The error on the indexer
will look like the following:
!
6-23-2014 20:46:48.918 +0000 ERROR TcpInputProc - Error
encountered for connection from src=10.0.1.57:41778.
error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown
protocol
Architecture - Status
The Deployment Server - NON ECC
First make certificates as you would for SplunkWeb.
$ cd $SPLUNK_HOME/etc/auth/myOrg
$ openssl req -nodes -newkey rsa:2048 -keyout splunk-
d.web.key -out splunk-d.csr
$ openssl rsa -in splunk-d.web.key -des3 -out splunk-
d.key
!
To make the Deployment Server formatted pem:
$ cat splunk-d.crt splunk-d.key cacert.crt > splunk-
d.pem
The Deployment Server - server.conf
vi $SPLUNK_HOME/etc/system/local/server.conf
!
[sslConfig]
caCertFile = cacert.crt
caPath = $SPLUNK_HOME/etc/auth/myOrg
sslKeysfile = splunk-d.pem
sslKeysfilePassword = <REDACTED>
supportSSLV3Only = true
requireClientCert = false
Splunk Forwarder - DS Clients
vi $SPLUNK_HOME/etc/system/local/server.conf
!
[sslConfig]
caCertFile = cacert.crt
caPath = $SPLUNK_HOME/etc/auth/myOrg
sslKeysfile = splunk-forwarder.pem
sslKeysfilePassword = <REDACTED>
supportSSLV3Only = true
sslVerifyServerCert = true
sslCommonNameToCheck = splunk-d.myorg.com
Architecture - Status
Splunk - Server to Server
vi $SPLUNK_HOME/etc/system/local/server.conf
!
[sslConfig]
caCertFile = cacert.crt
caPath = $SPLUNK_HOME/etc/auth/myOrg
sslKeysfile = splunk-srvXX.pem
sslKeysfilePassword = <REDACTED>
supportSSLV3Only = true
requireClientCert = false
sslVerifyServerCert = true
sslCommonNameList = splunk-srv01.myorg.com, splunk-
d.myorg.com, splunk-idx01.myorg.com, splunk-
idx02.myorg.com, ...
Architecture - Status
Splunk LDAPS
Each LDAP strategy has an SSL toggle on/off
!
In GUI, it’s a checkbox
!
In authentication.conf, each LDAP stanza needs SSLEnabled=1
!
Minimum Certificate settings in $SPLUNK_HOME/etc/openldap/ldap.conf
TLS_REQCERT demand
TLS_CACERT /opt/splunk/etc/auth/LDAProotcert.crt
!
Optional Settings:
TLS_CIPHER_SUITE
(If you have organizational requirements about allowed ciphers)
Wrap-up
Taking these steps to configure Splunk Web, Data Inputs/Outputs, and Inter-
Splunk will greatly improve your security posture.
!
Bonus that you get to tell your auditors you are not using “defaults.”
Thank You!
Other resources
Splunk IRC ( EFNet #splunk )
Splunk Answers ( http://answers.splunk.com )
Splunk community wiki ( http://wiki.splunk.com )
http://www.georgestarcher.com/
http://www.duanewaddle.com/
!
Other “must-see” .conf 2014 presentations
• From Tool to Team Member:
• Controlling Systems with Splunk Alert Scripts - George Starcher, Peak Hosting
• In Depth With Deployment Server - Dave Shpritz, Aplura
• Using Lesser Known Commands in Splunk Search Processing Language (SPL) - Kyle Smith,
The Hershey Company
• Keep the Junk out of Splunk - Dave Paper, Perfect Sense Digital
• Masters of IRC - panel talk on the Splunk Community Stage
Bonus Material
Deleted Scenes
Bloopers
Director’s Commentary
Bonus Material
Splunk Blog:
http://blogs.splunk.com/2014/06/03/generate-elliptical-curve-certkeys-for-
splunk/
!
Troubleshooting:
http://mikeberggren.com/post/28429473721/chain-check
Test connectivity with openssl s_client
OpenSSL has a built-in SSL client that you can use to do basic connectivity testing.
Works ‘just like TELNET’ but over SSL
No certificate verification by default, but you can get it to dump the presented certs so you can
check them by hand.
It will also dump TLS protocol version and negotiated cipher specification
The returned certs can be checked in plaintext by copypasting into a file and running
$ openssl x509 -text -noout -in xxxx.crt
Forwarder to LB Indexers - Outputs.conf -1
vi $SPLUNK_HOME/etc/system/local/outputs.conf
(or use an app)
!
[tcpout]
defaultGroup = myIndexers
!
[tcpout:myIndexers]
maxQueueSize = 128MB
useACK = true
autoLB = true
server = splunk-idx01.myorg.com:9998, splunk-idx02.myorg.com:9998
sslCertPath = $SPLUNK_HOME/etc/auth/myOrg/splunk-forwarder.pem
sslPassword = <REDACTED>
sslRootCAPath = $SPLUNK_HOME/etc/auth/myOrg/cacert.crt
Forwarder to LB Indexers - Outputs.conf -2
vi $SPLUNK_HOME/etc/system/local/outputs.conf
(or use an app)
!
[splunk-idx01.myorg.com]
sslVerifyServerCert = true
sslCommonNameToCheck = splunk-idx01.myorg.com
[splunk-idx02.myorg.com]
sslVerifyServerCert = true
sslCommonNameToCheck = splunk-idx02.myorg.com
File formats can and will trip you up
Different areas of Splunk use SSL key files / cert files formatted slightly differently