Description :

Nous allons voir comment chiffrer les communications Splunk :

  • La réplication entre les indexers
  • La réplication entre les shearch head
  • Flux de management

Prérequis :

On partira sur la base de SHC et IDX cluster.

Important :
Bien avoir le splunk.secret et passwd sur toutes les machines Splunk Core/full install.

On va chiffrer les communications pour la réplication des IDX :

Sur chaque IDX créer le dossier de certificat :

1 $ mkdir -p /opt/splunk/etc/auth/my_cert/

Y copier les fichiers :
- wildcard_web.udmiot_with_key.pem - rootCA.pem

Toujours sur chaque IDX éditer le fichier server.conf et y ajouter la configuration TLS :

1 $ vi /opt/splunk/etc/apps/myappclusteridxcommon/local/server.conf
2 
3 [replication_port-ssl://9080]
4 disabled = false
5 rootCA = $SPLUNK_HOME/etc/auth/my_cert/rootCA.pem
6 serverCert = $SPLUNK_HOME/etc/auth/my_cert/wildcard_web.udmiot_with_key.pem

Prise en compte sur les IDX :

1 $ sudo systemctl restart Splunkd

On va chiffrer les communications pour la réplication des SHC :

Depuis de Deployer, créer l'app pour la réplication des SH :

1 $ mkdir -p /opt/splunk/etc/shcluster/apps/custom_replication_tls/local

Configuration de l'app :

1 $ vi /opt/splunk/etc/shcluster/apps/custom_replication_tls/local/server.conf
2 
3 [replication_port-ssl://9001]
4 disabled = false
5 rootCA = $SPLUNK_HOME/etc/auth/my_cert/rootCA.pem
6 serverCert = $SPLUNK_HOME/etc/auth/my_cert/wildcard_web.udmiot_with_key.pem
7 
8 [replication_port://9001]
9 disabled = true

On deploie sur le SHC depuis le deployer :

1 $ /opt/splunk/bin/splunk apply shcluster-bundle -target https://shc1.udmiot.lab:8089

Sécurisation du port de Management (8089) :

Pour le Cluster Master, Deployer, Searxh Head, Indexer.

Deployer et Cluster Master :

Ajouter le certificat wildcard_web.udmiot_with_key.pem dans /opt/splunk/etc/auth/my_cert/.

Création de l'app :

1 $ mkdir -p /opt/splunk/etc/apps/custom_my_cert_tls_mgmt_port/local/

Configuration de l'app :

1 $ vi /opt/splunk/etc/apps/custom_my_cert_tls_mgmt_port/local/server.conf
2 
3 [sslConfig]
4 enableSplunkdSSL = true
5 serverCert = $SPLUNK_HOME/etc/auth/my_cert/wildcard_web.udmiot_with_key.pem
6 sslRootCAPath = $SPLUNK_HOME/etc/auth/my_cert/rootCA.pem
7 sslVerifyServerCert = true
8 #sslAltNameToCheck = <SAN of splunk peers certificates>
9 requireClientCert = true

Config pour les SHC :

Depuis le Deployer faire un lien symbolique pour réutiliser l'app du Deployer :

1 $ cd /opt/splunk/etc/shcluster/apps/
2 
3 $ ln -s ../../apps/custom_my_cert_tls_mgmt_port/

On deploie sur le SHC depuis le deployer :

1 $ /opt/splunk/bin/splunk apply shcluster-bundle -target https://shc1.udmiot.lab:8089

Config des Indexers :

Sur le Cluster Master faire un lien symbolique pour réutiliser l'app du Cluster Master :

1 $ cd /opt/splunk/etc/master-apps
2 
3 $ ln -s ../apps/custom_my_cert_tls_mgmt_port/

Deployer sur les IDX :

1 $ /opt/splunk/bin/splunk apply cluster-bundle

Prise en compte sur les Cluster Master et Deployer :

1 $ sudo systemctl restart Splunkd