Securing Elasticsearch¶
Hint - TLS encryption
For security reasons, we strongly recommend configuring the TLS encryption.
Caution - Minimal Security
The TLS encryption of Elasticsearch requires database protection by user and password. Therefore you must have activated the Minimal Security of Elastic Stack.
Configuring the TLS Encryption¶
The TLS encryption of Elasticsearch secures the data transfer from the servers to Elasticsearch via Filebeat and the communication between Kibana and the Elasticsearch database.
The SEAL Elastic Stack installation includes a self-signed TLS certificate. Replace this certificate by your own certificate to secure the connection to Kibana.
-
Get your own TLS certificate:
-
cert.pem
-
key.pem
-
-
On the management server, copy your TLS certificate to the following directory:
C:\ProgramData\SEAL Systems\config\seal-elasticsearch
Hint - only own directory
The internal security module of Elasticsearch only allows the reading of files in its own configuration directory.
-
In an editor, open the
elasticsearch.yml
configuration file:C:\ProgramData\SEAL Systems\config\seal-elasticsearch\elasticsearch.yml
-
Add the following lines:
xpack.security.http.ssl.enabled: true xpack.security.http.ssl.key: "${ProgramData}/SEAL Systems/config/seal-elasticsearch/key.pem" xpack.security.http.ssl.certificate: "${ProgramData}/SEAL Systems/config/seal-elasticsearch/cert.pem"
-
Save the file and exit.
-
Restart Elasticsearch:
start-service seal-elasticsearch
-
Copy the
ca.pem
certificate to the following directory:C:\ProgramData\SEAL Systems\config\tls-external
If Kibana is installed on a different server than the management server, you have to repeat this step on this server.
-
In an editor, open the
kibana.yml
configuration file:C:\ProgramData\SEAL Systems\config\kibana.yml
-
Activate the following lines and specify the server:
elasticsearch.hosts: [ "https://<management-server>:9200" ] elasticsearch.ssl.certificateAuthorities: [ "${ProgramData}/SEAL Systems/config/tls-external/ca.pem" ]
with
: FQDN of the Server, on which Elasticserch is installed. -
Save the file and exit.
-
Restart Kibana:
start-service seal-kibana
-
In an editor, open the
filebeat.yml
configuration file:C:\ProgramData\SEAL Systems\config\filebeat.yml
-
In the following line, change the URL to the Elasticsearch Server from
http://
tohttps://
:output: elasticsearch: hosts: # - http://localhost:9200 - "https://localhost:9200"
all Filebeat installations
Repeat this step on all servers, on which Filebeat is installed.
-
Filebeat uses Windows system certificates. If the CA certificate has been imported into the Windows system certificate store or has been distributed to all servers, skip this step.
Otherwise
-
Copy the
ca.pem
certificate into the corresponding directory:C:\ProgramData\SEAL Systems\config\tls-external\
-
Add the path to th
output: elasticsearch: ssl.certificate_authorities: ["C:\\ProgramData\\SEAL Systems\\config\\tls-external\\ca.pem"]
all Filebeat installations
Repeat this step on all servers, on which Filebeat is installed.
-
-
Save the file and exit.
-
Restart Filebeat:
start-service seal-filebeat