How to login automatically with request header

The gateway actively writes user information to the header, and I want to know how to log in directly through this header information.

For example:
Request Headers:
userID: admin
userName: admin

Hi, When the user accesses Kibana they are then forced to authenticate, and this information is "proxied" to Elasticsearch. If you were to install and enable X-Pack Security in Kibana, they'd be prompted with the Login screen at this point and allowed to login. Using the elasticsearch.customHeaders setting in the kibana.yml you can pass the same Basic Auth headers to Elasticsearch on every request. However, you'll have to disable X-Pack Security in Kibana for this option to work.
This solution doesn't require a reverse proxy; however, you will be forced to use Kibana as the same user, and disable X-Pack Security. Hope this helps. I have cc'd @Brandon_Kobel for more insights.


Is that so?

elasticsearch.customHeaders: {
    "userID": "userID",
    "userName": "userName",

Are there any examples?

This post gives you a very detailed reply: Kibana default basic auth

Hope it helps

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.