I am trying to develop a new kibana plugin to protect kibana. The logic is simple, if the user has already authenticated, then the user can see the kibana home page, otherwise, the page will be redirected to my login page. Basically it's working well so far.
Currently I access the kibana using URL "http://IP_ADDRESS:5601", but I'd like to enable HTTPS, so that the URL should be "https://IP_ADDRESS:5601". How can I configure the self-signed certificate/key/CA to kibana to enable the HTTPS?
Note that the elasticsearch cluster will not be visible/accessible from internet, and only the kibana server can be accessed from internet, so I only need to protect the kibana server. Of course, there are a couple of candidate solutions. For example, I can start a nginx server, and configure the self-signed certs/key/CA to the nginx, and then make the nginx to redirect requests to the backend kibana. But I am still curious how to enable HTTPS on kibana directly.
Please kindly let me know if I miss anything.
Thanks.