# SESSION\_EXPIRED while login kibana

**URL:** <https://discuss.elastic.co/t/session-expired-while-login-kibana/147511>\
**Category:** Kibana\
**Created:** [September 6, 2018, 7:23am UTC](https://discuss.elastic.co/t/session-expired-while-login-kibana/147511 "2018-09-06T07:23:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [September 7, 2018, 11:17am UTC](https://discuss.elastic.co/t/session-expired-while-login-kibana/147511/2 "2018-09-07T11:17:42Z")

</div>

As I've also mentioned [in other topics you've opened](https://discuss.elastic.co/t/elasticsearch-saml-integration-while-using-http-redirect/139658/29):

> [@Elasticsearch SAML integration while using HTTP-Redirect](https://discuss.elastic.co/t/elasticsearch-saml-integration-while-using-http-redirect/139658/29):
>
> You can easily copy the actual text by using the `</>` buttons.

Please take the time to do this, it makes your post so much easier to consume and that means you have better chances of getting a response.

This is unrelated to your issue, but you only need one  
`elasticsearch.url: "https://10.8.160.XXX:9200"`  
in your configuration.

In order to make sure that SAML Authentication succeeds when using a load balancer in front of Kibana, you need to ensure that:

- Your X Kibana instances need to use the same [`xpack.security.encryptionKey`](https://www.elastic.co/guide/en/kibana/current/using-kibana-with-security.html). This is unrelated to SAML and would be required even if you used basic authentication for Kibana. It is required so that all Kibana instances can verify the authentication cookie that one of them generates after successful authentication, in case the user gets to a different Kibana instance (due to LB configuration) while they have an active session.

- You need to setup your LB with a certain session affinity. The details of how to do that are specific to you LB, but you need to configure it in such a way so that both the

---

_[View the full topic](https://discuss.elastic.co/t/session-expired-while-login-kibana/147511)._
