# Can a passport strategy be used for kibana?

**URL:** <https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086>\
**Category:** Kibana\
**Created:** [March 21, 2018, 11:39pm UTC](https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086 "2018-03-21T23:39:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahrtr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahrtr/32/29551_2.png) [@ahrtr](https://discuss.elastic.co/u/ahrtr)\
**Post date:** [March 21, 2018, 11:39pm UTC](https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086/1 "2018-03-21T23:39:20Z")

</div>

Hi, I am trying to implement a kibana plugin to protect kibana. The logic is simple, when a user tries to access kibana, and he/she hasn't authenticated, then the page will be redirected to a login page, and then redirected back to kibana home page once authenticated.

Is it possible to use a passport strategy to authenticate kibana users? AFAIK, passport strategy applies to express web framework only, while kibana uses hapi. Is it correct? Any suggestions or comments? Thanks.

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [March 22, 2018, 4:51pm UTC](https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086/2 "2018-03-22T16:51:52Z")

</div>

Kibana uses hapi.js

Have you seen x-pack and the [security](https://www.elastic.co/guide/en/x-pack/current/xpack-security.html) features it provides? I would caution against home solutions since they may not have an upgrade path as Kibana changes from version to version.

---

<div class="post-metadata">

**Author:** ![ahrtr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahrtr/32/29551_2.png) [@ahrtr](https://discuss.elastic.co/u/ahrtr)\
**Post date:** [April 4, 2018, 8:31am UTC](https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086/3 "2018-04-04T08:31:32Z")

</div>

Thanks for the response.

I know x-pack, but it isn't free, so I am not going to use it for now.

---

<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:** [May 2, 2018, 8:31am UTC](https://discuss.elastic.co/t/can-a-passport-strategy-be-used-for-kibana/125086/4 "2018-05-02T08:31:51Z")

</div>

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