# Not able to authenticate Kibana via jwt

**URL:** https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226
**Category:** Kibana
**Created:** [May 12, 2020, 12:47pm UTC](https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226 "2020-05-12T12:47:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kibana-rocks](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kibana-rocks](https://discuss.elastic.co/u/kibana-rocks)
#### Post date: [May 12, 2020, 12:47pm UTC](https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226/1 "2020-05-12T12:47:09Z")

</div>

Hi,

we have requirement from our application on pivoting to Kibana, we should directly land to dashboard tab without any login screen. To achieve this we are using **jwt kibana authentication**.  
We have added the below nginx settings:

_location ~ ^/(analytics|app|plugins|built\_assets|bundles|ui|translations|api/console|api/interpreter|api/v1|api/saved\_objects|node\_modules) {_\*  
**rewrite ^/analytics(.\*) /$1 break;**  
**proxy\_pass https://[host ip]:5601;**  
\*\* }\*\*

from our code we are passing '/app/kibana' via nginx it will redirect to kibana directly.

We are able to reach kibana but data is not loading. We are getting the below error.

 ![kibana-issue](https://us1.discourse-cdn.com/elastic/original/3X/b/5/b566c02fb4d9c26a58cdaf500047ad7efb7bcb2f.png)

But if i will pass the port( 5601) in url it works fine. Data is loaded successfully.  
Can we get some help here?

---

<div class="post-metadata">

### Author: ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)
#### Post date: [May 12, 2020, 8:30pm UTC](https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226/2 "2020-05-12T20:30:09Z")

</div>

this seems to be because of the CSP rules, where the IP used by the user, is different from the one used by Kibana.

Try setting the `server.host` configuration in the `config/kibana.yml` ([https://www.elastic.co/guide/en/kibana/current/settings.html](https://www.elastic.co/guide/en/kibana/current/settings.html)) to the actual IP or domain that users use to visit the application.

---

<div class="post-metadata">

### Author: ![kibana-rocks](https://avatars.discourse-cdn.com/v4/letter/k/b19c9b/32.png) [@kibana-rocks](https://discuss.elastic.co/u/kibana-rocks)
#### Post date: [May 13, 2020, 6:21am UTC](https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226/3 "2020-05-13T06:21:18Z")

</div>

I tried adding this property in kibana.yml. But now i am not able to pivot from my application to kibana (my application and kibana is at same ip)

Is there a way to disable csrf token in kibana?

---

<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: [June 10, 2020, 6:21am UTC](https://discuss.elastic.co/t/not-able-to-authenticate-kibana-via-jwt/232226/4 "2020-06-10T06:21:30Z")

</div>

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