# Kibana stuck in login loop

**URL:** <https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101>\
**Category:** Kibana\
**Created:** [August 24, 2020, 10:34am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101 "2020-08-24T10:34:53Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 10:34am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/1 "2020-08-24T10:34:54Z")

</div>

Hi  
I am using Kibana version 7.5.2 which is linked to my elasticsearch instance. I have created a dashboard of visualizations on Kibana and have embedded the dashboard in a web page that I make available to the users of my product. Since the last few days, I am seeing that the embedded Kibana dashboard asks for login credentials from users and upon entering those details, it redirects back to the login page. This happens only via the embedded dashboard. If I access the dashboard link on a different browser tab, I am able to see the dashboard. Deleting all the cookies and other site data did not make the issue go away but opening the same web page on another browser did work perfectly. What seems to be the issue here?

---

<div class="post-metadata">

**Author:** ![Sharry\_Stowell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharry_stowell/32/74397_2.png) [@Sharry\_Stowell](https://discuss.elastic.co/u/Sharry_Stowell)\
**Post date:** [August 24, 2020, 10:36am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/2 "2020-08-24T10:36:47Z")

</div>

I have the exact same issue: [CSP errors when using an Kibana iframe](https://discuss.elastic.co/t/csp-errors-when-using-an-kibana-iframe/246096)

Are you getting any CSP errors in console log?

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 11:01am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/3 "2020-08-24T11:01:51Z")

</div>

Hi  
My Kibana logs have just too convoluted information to make sense of. Using search on logs does not reveal any log messages that have the same phrase that you have posted in your post. I also checked the Kibana console and there were no logs there.

---

<div class="post-metadata">

**Author:** ![Sharry\_Stowell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharry_stowell/32/74397_2.png) [@Sharry\_Stowell](https://discuss.elastic.co/u/Sharry_Stowell)\
**Post date:** [August 24, 2020, 11:05am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/4 "2020-08-24T11:05:17Z")

</div>

In the browser (console) too when viewing the Kibana login page?

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 11:19am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/5 "2020-08-24T11:19:43Z")

</div>

Oh right. In my browser console, I do see a message same as the one mentioned in your post. Does the issue persist for you even if you use some other browser?

---

<div class="post-metadata">

**Author:** ![Sharry\_Stowell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sharry_stowell/32/74397_2.png) [@Sharry\_Stowell](https://discuss.elastic.co/u/Sharry_Stowell)\
**Post date:** [August 24, 2020, 11:36am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/6 "2020-08-24T11:36:53Z")

</div>

Same yep

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 11:41am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/7 "2020-08-24T11:41:56Z")

</div>

For me, this issue does not come when I use another browser. I have tried deleting the cookies/history of the one I am seeing the issue on but didnt work

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 11:53am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/8 "2020-08-24T11:53:06Z")

</div>

I am seeing this issue in just chrome and wonder if this is a Chrome bug where it is treating a link as a script. Thoughts?

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 24, 2020, 12:09pm UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/9 "2020-08-24T12:09:01Z")

</div>

I followed the link in the browser console log and found the following message which is left out of the Kibana web page.

> This Kibana installation has strict security requirements enabled that your current browser does not meet.
> // Since this is an unsafe inline script, this code will not run // in browsers that support content security policy(CSP). This is // intentional as we check for the existence of \_\_kbnCspNotEnforced\_\_ in // bootstrap.

It seems like the issue is with the browser although I am using the latest version of Google Chrome. So it seems that Chrome itself is incompatible to run Kibana as of now. But this needs verification by others and someone from [elastic.co](http://elastic.co).

---

<div class="post-metadata">

**Author:** ![wax207](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wax207/32/74449_2.png) [@wax207](https://discuss.elastic.co/u/wax207)\
**Post date:** [August 25, 2020, 6:55am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/10 "2020-08-25T06:55:23Z")

</div>

Seems to be a Bug on the latest Chrome Update.

[Chrome Release 84 Changes SameSite Cookie Behavior and Can Break Salesforce Integrations](https://help.salesforce.com/articleView?id=000351874&language=en_US&mode=1&type=1)

Kibana using cookie to implement login, however latest Chrome can not store non secure cookie.

Maybe best practices is enable HTTPS for kibana.

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [August 25, 2020, 8:19am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/11 "2020-08-25T08:19:30Z")

</div>

Hi @ayushr - could you just confirm exactly which version of Chrome you're using?

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 25, 2020, 8:26am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/12 "2020-08-25T08:26:06Z")

</div>

Hi. I am using Google Chrome Version 84.0.4147.135 (Official Build) (64-bit)

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [August 25, 2020, 8:52am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/13 "2020-08-25T08:52:48Z")

</div>

Thanks for confirming. I managed to reproduce this with 7.9 Kibana dashboard in Chrome 84.0.4147.135 on Mac OSX. Looking into this. Works correctly in Firefox

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 25, 2020, 9:32am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/14 "2020-08-25T09:32:15Z")

</div>

Great that issue could be reproduced. Thanks for your support. Looking forward to the issue being fixed.

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [August 25, 2020, 11:04am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/15 "2020-08-25T11:04:51Z")

</div>

The solution for this would be to set `sameSiteCookies: None` in `kibana.yml` and you'll need to use https, otherwise Chrome won't respect the setting. The only caveat is that this will work with Kibana 7.8.1 and above. I verified on 7.9 and works fine.

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 26, 2020, 7:21am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/16 "2020-08-26T07:21:33Z")

</div>

Hi. Is there any other way as in my org, I am using Kibana as a service which is installed and maintained by another team. Is there a solution which works for me only?

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [August 26, 2020, 7:37am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/17 "2020-08-26T07:37:01Z")

</div>

You can use another browser except Chrome. Even downgrading Chrome should work.

---

<div class="post-metadata">

**Author:** ![ayushr](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@ayushr](https://discuss.elastic.co/u/ayushr)\
**Post date:** [August 26, 2020, 9:00am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/18 "2020-08-26T09:00:35Z")

</div>

Cool. Thanks for all your help and providing the fix so quickly. @wax207 and @Sharry_Stowell, thanks a lot and hope this fixes issues you were seeing too.

---

<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:** [September 23, 2020, 9:00am UTC](https://discuss.elastic.co/t/kibana-stuck-in-login-loop/246101/19 "2020-09-23T09:00:48Z")

</div>

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