# Kibana/Elasticsearch do not pop up dialog for Username and Password when using Custom Realm with Shield

**URL:** <https://discuss.elastic.co/t/kibana-elasticsearch-do-not-pop-up-dialog-for-username-and-password-when-using-custom-realm-with-shield/37887>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 23, 2015, 9:19pm UTC](https://discuss.elastic.co/t/kibana-elasticsearch-do-not-pop-up-dialog-for-username-and-password-when-using-custom-realm-with-shield/37887 "2015-12-23T21:19:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbommineni](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@rbommineni](https://discuss.elastic.co/u/rbommineni)\
**Post date:** [December 23, 2015, 9:19pm UTC](https://discuss.elastic.co/t/kibana-elasticsearch-do-not-pop-up-dialog-for-username-and-password-when-using-custom-realm-with-shield/37887/1 "2015-12-23T21:19:21Z")

</div>

Hi,

I'm trying to create a custom realm to authenticate users for Kibana and Elasticsearch using  
[https://github.com/elastic/shield-custom-realm-example](https://github.com/elastic/shield-custom-realm-example) and I've setup the configuration for my custom realm in elasticsearch.yml. But neither elasticsearch (localhost:9200) nor kibana (localhost:5601) prompt for a dialog box asking for username and password and throws this exception:

{"error":{"root\_cause":[{"type":"security\_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"crowd-challenge"}}],"type":"security\_exception","reason":"missing authentication token for REST request [/]","header":{"WWW-Authenticate":"crowd-challenge"}},"status":401}

It works fine with esusers realm though.

versions we are using:  
elasticsearch 2.1.0  
kibana 4.3.1  
shield 2.1.0

---

<div class="post-metadata">

**Author:** ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)\
**Post date:** [January 4, 2016, 1:11pm UTC](https://discuss.elastic.co/t/kibana-elasticsearch-do-not-pop-up-dialog-for-username-and-password-when-using-custom-realm-with-shield/37887/2 "2016-01-04T13:11:04Z")

</div>

Hi,

I believe that your custom realm is sending back the incorrect `WWW-Authenticate` header. It appears that it is sending a value of `crowd-challenge`, which a browser will not recognize. If you want the authentication dialog box, try sending `basic` as the value or one of the values.

---

<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:** [July 6, 2017, 1:47pm UTC](https://discuss.elastic.co/t/kibana-elasticsearch-do-not-pop-up-dialog-for-username-and-password-when-using-custom-realm-with-shield/37887/3 "2017-07-06T13:47:21Z")

</div>


