# Kibana OIDC with Cognito: authError after login

**URL:** <https://forum.opensearch.org/t/kibana-oidc-with-cognito-autherror-after-login/2638>\
**Category:** Security\
**Created:** [April 22, 2020, 4:25pm UTC](https://forum.opensearch.org/t/kibana-oidc-with-cognito-autherror-after-login/2638 "2020-04-22T16:25:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lgauthier](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lgauthier](https://forum.opensearch.org/u/lgauthier)\
**Post date:** [April 22, 2020, 4:25pm UTC](https://forum.opensearch.org/t/kibana-oidc-with-cognito-autherror-after-login/2638/1 "2020-04-22T16:25:44Z")

</div>

I am trying to get a Kibana running on my localhost to use AWS/Cognito (OIDC) for authentication. I am connecting to an AWS ElasticSearch cluster. The AWS managed Kibana is setup and works with the Cognito User Pool but we need to use our own Kibana service with plugins etc.

Things appear to work OK. I get redirected to Cognito for login credentials and Cognito redirects to [http://localhost:5601/auth/openid/login](http://localhost:5601/auth/openid/login) after authentication. Kibana seems to want to load but I eventaully always end up here with a blank screen:

[http://localhost:5601/customerror?type=authError#?\_g=()](http://localhost:5601/customerror?type=authError#?_g=())

If I look at the source code for the page, I see this:

> 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.  
> window. **kbnCspNotEnforced** = true;

My theory for the moment is that things are not working because my localhost is not using SSL.

Anybody can confirm that or point to some other explanantion/solution?

---

<div class="post-metadata">

**Author:** ![lgauthier](https://avatars.discourse-cdn.com/v4/letter/l/bc8723/32.png) [@lgauthier](https://forum.opensearch.org/u/lgauthier)\
**Post date:** [April 22, 2020, 9:43pm UTC](https://forum.opensearch.org/t/kibana-oidc-with-cognito-autherror-after-login/2638/2 "2020-04-22T21:43:15Z")

</div>

Well, I tested with [https://localhost:5601](https://localhost:5601) (self signed certificate) and it did not fix the problem. Still exactly same result.

---

<div class="post-metadata">

**Author:** ![saqi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/saqi/32/767_2.png) [@saqi](https://forum.opensearch.org/u/saqi)\
**Post date:** [August 27, 2020, 3:29pm UTC](https://forum.opensearch.org/t/kibana-oidc-with-cognito-autherror-after-login/2638/3 "2020-08-27T15:29:55Z")

</div>

did you figure this out?
