Kibana: add HTTPS – elastic stack 8.0 to access kibana

Articles before me :

I explained in detail how to install Elasticsearch And Kibana. In the above installation ,Elasticsearch Your visit is https Of , and Kibana Your visit is http Of . After I posted the second article above , A developer asked how to Kibana Have configuration https. You have to be Kibana Create server certificate and private key . Kibana On receiving from Web The server certificate and the corresponding private key are used when connecting to the browser .

First , Let’s follow the above article to install Elasticsearch And Kibana. then , We use the following command for Kibana Generate server certificate and private key :

./bin/elasticsearch-certutil csr -name kibana-server -dns, localhost

on top , The certificate we generated can only be used for And localhost Use . The above command will generate the following file :

$ ls
LICENSE.txt bin data logs
NOTICE.txt config modules
README.asciidoc lib plugins

We found one called The file of . We use the following command to decompress :

$ unzip
creating: kibana-server/
inflating: kibana-server/kibana-server.csr
inflating: kibana-server/kibana-server.key 

Let’s take the top one kibana-server.csr And kibana-server.key copy to Kibana Of config Under the table of contents , In this way Kibana config The files in the directory are like this :

$ pwd
$ ls
kibana-server.key node.options kibana-server.csr kibana.yml

We then use the following command to generate  kibana-server.crt file :

openssl x509 -req -in kibana-server.csr -signkey kibana-server.key -out kibana-server.crt

The above command will generate a new file  kibana-server.crt.

We are going to be in Kibana Configuration file for kibana.yml Add the following configuration :

server.ssl.certificate: config/kibana-server.crt
server.ssl.key: config/kibana-server.key
server.ssl.enabled: true

Let’s restart Kibana:

When we first landed Kibana when , Since it is a self signed certificate , So we need to break into thisisunsafe You can enter the above interface . So we’re done Kibana Of https Access configuration for . 

Read more here: Source link