# Add IdentityServer4 for authentication

**URL:** <https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725>\
**Category:** Kibana\
**Tags:** elastic-stack-security\
**Created:** [February 17, 2019, 11:06am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725 "2019-02-17T11:06:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Behzad\_Rezaie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behzad_rezaie/32/48588_2.png) [@Behzad\_Rezaie](https://discuss.elastic.co/u/Behzad_Rezaie)\
**Post date:** [February 17, 2019, 11:06am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/1 "2019-02-17T11:06:28Z")

</div>

Hi pals,  
I am going to add IdentityServer4 to make the authentication for the Kibana (version 6.5.4) server ([http://localhost:5601](http://localhost:5601)). I did not find any tutorials regarding the issue on the Net.

Could you please help me with the issue?

Best,  
Behzad

---

<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:** [February 18, 2019, 7:28am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/2 "2019-02-18T07:28:59Z")

</div>

Hello,

Is [this](http://docs.identityserver.io/en/latest/) identityserver4? How are you planning to use it?

---

<div class="post-metadata">

**Author:** ![Behzad\_Rezaie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behzad_rezaie/32/48588_2.png) [@Behzad\_Rezaie](https://discuss.elastic.co/u/Behzad_Rezaie)\
**Post date:** [February 18, 2019, 8:35am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/3 "2019-02-18T08:35:04Z")

</div>

Dear Ioannis,

Yes, it is the IdentityServer4. I have set the kibana.yml as

searchguard.auth.type: "openid"  
searchguard.openid.connect\_url: "[http://someserver/.well-known/openid-configuration](http://someserver/.well-known/openid-configuration)"  
searchguard.openid.client\_id: "elastic-clinetid"  
searchguard.openid.client\_secret: "elk-secret"  
searchguard.openid.scope: "profile openid"

With such configuration, I can login through the identityserver, but the problem is that I receive the error "Authentication failed. Please provide a new token." in Kibana. How can I solve this? It seems the users and roles are not yet inserted into elastic. Could you please help me with the problem?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [February 18, 2019, 8:38am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/4 "2019-02-18T08:38:41Z")

</div>

You probably need to raise this with the searchguard devs, we don't know how it interacts with the Elastic Stack.

---

<div class="post-metadata">

**Author:** ![Behzad\_Rezaie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/behzad_rezaie/32/48588_2.png) [@Behzad\_Rezaie](https://discuss.elastic.co/u/Behzad_Rezaie)\
**Post date:** [February 19, 2019, 7:12am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/5 "2019-02-19T07:12:24Z")

</div>

Thanks, I asked my question in the searchgaurd forum.

---

<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:** [March 19, 2019, 7:12am UTC](https://discuss.elastic.co/t/add-identityserver4-for-authentication/168725/6 "2019-03-19T07:12:26Z")

</div>

Closed on March 19, 2019, 7:12am UTC

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