Hi ,
I have used x-pack in my ELK setup and i was able to achieve the secured communication. I will mention the steps that i have performed. Please tell me if i have followed it right.
step1:
i have installed x-pack plugin on elasticsearch using the below command,
elasticsearch-plugin.bat install x-pack
step2:
generated the certificates using the x-pack binaries certgen.bat
step3:
Add the certificate path in elasticsearch.yml ,kibana.yml and logstash.config as below
elasticsearch.yml
xpack.security.transport.ssl.enabled: true
xpack.security.http.ssl.enabled: true
xpack.security.audit.enabled: true
xpack.ssl.key: "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ControlNode/ControlNode.key"
xpack.ssl.certificate: "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ControlNode/ControlNode.crt"
xpack.ssl.certificate_authorities: "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ca/ca.crt"
kibana.yml
elasticsearch.url: "https://192.168.0.104:9200"
elasticsearch.username: "elastic"
elasticsearch.password: "changeme"
server.ssl.enabled: true
server.ssl.certificate: "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ControlNode/ControlNode.crt"
server.ssl.key: "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ControlNode/ControlNode.key"
elasticsearch.ssl.certificateAuthorities: [ "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ca/ca.crt" ]
logstash.config
output {
elasticsearch { hosts => ["192.168.0.104:9200"]
user => ["elastic"]
password => ["changeme"]
ssl => true
cacert => "E:/softwares/ELK/elasticsearch-5.4.0/elasticsearch-5.4.0/config/x-pack/newCert26June/ca/ca.crt"
retry_initial_interval => 5
retry_max_interval => 50
}
stdout { codec => rubydebug }
Upon performing the above steps, i was able to login to elasticsearch and kibana using https and also using cerdentials.
Please let me know if i have followed the steps properly and let me know i i am missing anything here.