Kibana login without x-pack

I am new to Kibana. I have everything doing fine, but i would like to add a login page for authentication of users.

I already edited my kibana.yml with the elasticsearch username and password. But how do i get it to prompt me an authentication before signing into Kibana? It doesnt seem to work as it is.

Also afterwards, I would also want to put a 2-factor authentication. But is it possible to also have an open source 2fa and connect it to Kibana? I really need your help.

I use Kibana 7.2 and ES7.2

Thank you.

First thing, make sure you are using the Default distribution with at least a Basic license of Elasticsearch and Kibana. Security is not available in the OSS release. Based on the title of your post, I'm not sure that you are currently using the Default distribution (x-pack is required). https://www.elastic.co/subscriptions

There's a fantastic tutorial for getting started here. https://www.elastic.co/blog/getting-started-with-elasticsearch-security

Two-factor authentication is on our radar, but not supported yet. We are tracking this enhancement request here: https://github.com/elastic/kibana/issues/39414.