Elasticsearch - Secure communication Logstash & File-beat - Part 3
For logging pipeline, Filebeat will establish a secure connection to Logstash. This article explains how to setup SSL mutual authentication using self signed certificate.
Prerequisite
You should have docker and docker-compose installed in you machine. You may try Docker-Desktop in case you are using WINDOWS or MAC.
You need OpenSSL installed and configured in your machine.
Option1: You can install Git Bash in your machine and configure path in System environment variable.
Environment Variables -> path -> "C:\Program Files\Git\usr\bin"
Option2: You can use Cmder is a software package.
Add a custom domain in your host machine which points to localhost.
"host" File location - C:\Windows\System32\drivers\etc
#My custom domain
127.0.0.1 dev.experiment.com
#End of section
Creating Certificates
We will be using custom domain and self-signed certificates.
Create directory.
mkdir .\tls\certs
mkdir .\tls\private
openssl req -subj "/CN=dev.experiment.com/" -x509 -days 3650 -batch -nodes -newkey rsa:2048 -keyout private/logstash.key -out certs/logstash.crtopenssl req -subj '/CN=dev.experiment.com/' -x509 -days 3650 -batch -nodes -newkey rsa:2048 -keyout private/filebeat.key -out certs/filebeat.crtWe will configure these keys in both logstash and file-beat.


Comments
Post a Comment