# Login to kibana via API

**URL:** https://discuss.elastic.co/t/login-to-kibana-via-api/120101
**Category:** Kibana
**Created:** [February 16, 2018, 6:15am UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101 "2018-02-16T06:15:00Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)
#### Post date: [February 16, 2018, 6:15am UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101/1 "2018-02-16T06:15:00Z")

</div>

Hi

I have embedded kibana dashboards in my website by using iframe, now the issue is user has to login 2 times to see his/her data in kibana . one is to website and other is to kibana , i dont want to disable security from kibana because i have to show user-specific data , now my requirement is when user comes to my website and login , automatically he has to login to kibana also from backend side by using any API call's.

i have tried bellow one but no luck

> GET /api/security/v1/login  
> {  
> "username" : "jon",  
> "password" : "\*\*\*\*\*"  
> }

Please help me

---

<div class="post-metadata">

### Author: ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)
#### Post date: [February 16, 2018, 6:30pm UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101/2 "2018-02-16T18:30:02Z")

</div>

Looks like this has been discussed in detail here: [Auto-authenticate Kibana 5.3 dashboard embedded in iframe](https://discuss.elastic.co/t/auto-authenticate-kibana-5-3-dashboard-embedded-in-iframe/85059/6)

---

<div class="post-metadata">

### Author: ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)
#### Post date: [February 17, 2018, 1:57am UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101/3 "2018-02-17T01:57:06Z")

</div>

Hi @lukas

Thanks for your reply....

I don't think that I can run kibana using bin/kibana , because I have configured kibana in docker , and it is running as container

---

<div class="post-metadata">

### Author: ![jarpy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarpy/32/51290_2.png) [@jarpy](https://discuss.elastic.co/u/jarpy)
#### Post date: [March 4, 2018, 1:45am UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101/4 "2018-03-04T01:45:56Z")

</div>

That's a long thread above, but were you considering configuring `server.cors`?

If you need to configure Kibana inside the container, I recommend the _bind-mounted configuration_ approach, as documented here:

[https://www.elastic.co/guide/en/kibana/current/\_configuring\_kibana\_on\_docker.html#docker-bind-mount-config](https://www.elastic.co/guide/en/kibana/current/_configuring_kibana_on_docker.html#docker-bind-mount-config)

The default configuration in our image is this:

> <https://github.com/elastic/kibana-docker/blob/master/build/kibana/config/kibana-x-pack.yml>

so you may want to copy that file and then modify it to suit you needs, before bind-mounting it into your container.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 1, 2018, 1:46am UTC](https://discuss.elastic.co/t/login-to-kibana-via-api/120101/5 "2018-04-01T01:46:00Z")

</div>

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