Authentication with Kibana in HTML Iframe

Good Afternoon. Been trying to get Kibana Visualisation to load into an Iframe (using the link auto generated). This works however there is Kibana login prompt that occurs. I wanted to ask if there is anyway I could pass credentials to the Frame, or even before, so that when the frame loads it will auto log in. I have been searching the forum , and found some clues, like below.

I was able to get the Kibana server to respond with a cookie header by POSTing to /api/security/v1/login with a JSON request body of

{
    "password": "<YOURPASSWORD>",
    "username": "<YOURUSERNAME>"
}

The above returns a HTML code of 204 (no data I think). But the authentication cookie is still not set as when the page loads, it still asked for authentication. Any assistance would be appreciated.

Thank you

Hi!

This is something that is frequently posted on the forums here. A quick search might be helpful here:

https://discuss.elastic.co/search?q=iframe+authentication

Specifically these:

Thank you Lukas for your reply. Apologies I should have made my environment a little clear. Currently I am using HTML/Javascript with PHP. I try to send username and password to Kibana, however once I redirect it still presents a log in page. The request is being sent from the server (through PHP).
Is this because the request is coming from the server - and so authenticates, but then the client requests the page and so still requires authentication?

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