# Kibana 5.1.1/ES 5.1.1 - Console can not get any search result

**URL:** <https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606>\
**Category:** Kibana\
**Created:** [January 24, 2017, 9:49am UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606 "2017-01-24T09:49:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zzzxf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zzzxf/32/28207_2.png) [@Zzzxf](https://discuss.elastic.co/u/Zzzxf)\
**Post date:** [January 24, 2017, 9:49am UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/1 "2017-01-24T09:49:33Z")

</div>

ES works with Basic Authentication.  
In the Kibana config file: kibana.yml  
\> elasticsearch.username: "xxxxxx"

> ```
> elasticsearch.password: "yyyyyy"
> elasticsearch.customHeaders: {Authorization: "Basic [REDACTED]"}
> 
> ```

Now, In addition to Console, the functions are working properly！  
Look at es cluster log when Console request：

> internalDispatchRequest path:/gravity.process.201701/\_search, method:GET, headers:{"content-length":"0","x-forwarded-proto":"http","Connection":"close","x-forwarded-port":"56110","Host":"x.x.x.x","x-forwarded-for":"x.x.x.x"}, params:{}, content:, credentials:,  
> The header of the request which es node gets dosen't contains any Authorization info.

When some other requests such as '/.kibana/config/\_search' execute(request from Kibana itself, not console), it logs that:

> internalDispatchRequest path:/.kibana/config/\_search, method:POST, headers:{"**Authorization":"Basic [REDACTED]**","Connection":"keep-alive","content-type":"application/json","Host":"x.x.x.x:8080","Content-Length":"77"}, params:{}, content:{"size":1000,"sort":[{"buildNum":{"order":"desc","unmapped\_type":"string"}}]}, credentials:,  
> Howerver, the the header contains Authorization info.

Who can help me...🙂

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [January 24, 2017, 8:59pm UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/2 "2017-01-24T20:59:59Z")

</div>

You shouldn't need to specify both a username and password AND an Authorization header. Was setting elasticsearch.username/elasticsearch.password not working for you?

Also, note that the header you posed is simply base64 encoded, which effectively means it's just plaintext. As such, it's pretty easy to get your real username and password out of there by simply base64 decoding it.

---

<div class="post-metadata">

**Author:** ![Zzzxf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zzzxf/32/28207_2.png) [@Zzzxf](https://discuss.elastic.co/u/Zzzxf)\
**Post date:** [January 25, 2017, 3:59am UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/3 "2017-01-25T03:59:59Z")

</div>

> _Also, note that the header you posed is simply base64 encoded, which effectively means it's just plaintext. As such, it's pretty easy to get your real username and password out of there by simply base64 decoding it._

Yes, But if I just specify username and password , the Kibana can startup, Howerver, I can't get any data from es until configuring the customHeader.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [January 25, 2017, 8:51pm UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/4 "2017-01-25T20:51:28Z")

</div>

I meant that as, what you posted was not a secret, anyone could have come along and grabbed your info from that. That's why an admin updated the post as well.

So using Kibana and Elasticsearch don't work simply by specifying the elasticsearch.username/password? How are you putting basic auth on the ES side? Using X-Pack, or something you rolled on your own?

If you are using X-Pack, things will just work. If you have rolled your own, maybe something isn't configured correctly. The username and password should be used to create and send the Authorization automatically.

---

<div class="post-metadata">

**Author:** ![Zzzxf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zzzxf/32/28207_2.png) [@Zzzxf](https://discuss.elastic.co/u/Zzzxf)\
**Post date:** [February 14, 2017, 4:40am UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/5 "2017-02-14T04:40:34Z")

</div>

ok! i use X-Pack and a permission plugin we developed both, then i disabled the security setting of X-Pack, it does work! Thank you very much.

---

<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 14, 2017, 4:40am UTC](https://discuss.elastic.co/t/kibana-5-1-1-es-5-1-1-console-can-not-get-any-search-result/72606/6 "2017-03-14T04:40:36Z")

</div>

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