# Kibana - Authentication Error

**URL:** <https://forum.search-guard.com/t/kibana-authentication-error/2009>\
**Category:** Search Guard\
**Created:** [November 12, 2020, 5:03pm UTC](https://forum.search-guard.com/t/kibana-authentication-error/2009 "2020-11-12T17:03:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bridgesgs](https://avatars.discourse-cdn.com/v4/letter/b/58956e/32.png) [@bridgesgs](https://forum.search-guard.com/u/bridgesgs)\
**Post date:** [November 12, 2020, 5:03pm UTC](https://forum.search-guard.com/t/kibana-authentication-error/2009/1 "2020-11-12T17:03:06Z")

</div>

Hello,

I am trying to get Kibana with Searchguard going on a single-node cluster in Kubernetes. I am using OSS images for Elastic and Kibana. Trying to use Searchguard for credential management. Any help would be greatly appreciated.

**Versions**  
elastic-oss: 7.4.0  
kibana-oss: 7.4.0

**Describe the issue:**  
Elasticsearch seems to be working/initializing as expected (index gets created, etc…), however, Kibana is throwing an ‘Authentication Exception’ which results in an ‘Out of Sync’ error.

**Configuration:**  
Using demo configuration just to get things up and running.

# elasticsearch.yml

searchguard.enterprise\_modules\_enabled: false

# Enabling use of demo certificates

searchguard.allow\_unsafe\_democertificates: true

# Configuring Transport Layer TLS

searchguard.allow\_default\_init\_sgindex: true  
searchguard.ssl.transport.enforce\_hostname\_verification: false  
searchguard.ssl.transport.pemcert\_filepath: esnode.pem  
searchguard.ssl.transport.pemkey\_filepath: esnode-key.pem  
searchguard.ssl.transport.pemtrustedcas\_filepath: root-ca.pem

# Configuring REST Layer TLS

searchguard.ssl.http.enabled: false  
searchguard.ssl.http.pemcert\_filepath: esnode.pem  
searchguard.ssl.http.pemkey\_filepath: esnode-key.pem  
searchguard.ssl.http.pemtrustedcas\_filepath: root-ca.pem

# Additional configuration

name: searchguard.authcz.admin\_dn: CN=kirk,OU=client,O=client,L=test, C=de  
searchguard.enable\_snapshot\_restore\_privilege: true  
searchguard.restapi.roles\_enabled: SGS\_ALL\_ACCESS  
cluster.routing.allocation.disk.threshold\_enabled: false  
name: node.max\_local\_storage\_nodes: 3

# kibana.yml

elasticsearch.hosts: [https://elasticsearch:9200](https://elasticsearch:9200)  
elasticsearch.username: kibanaserver  
elasticsearch.password: kibanaserver  
elasticsearch.ssl.verificationMode: none  
xpack.security.enabled: false

**Kibana Logs**  
{“type”:“error”,“@timestamp”:“2020-11-12T16:00:19Z”,“tags”:[“warning”,“process”],“pid”:6,“level”:“error”,“error”:{“message”:“Authentication Exception :: {"path":"/\_searchguard/kibanainfo","query":{},"statusCode":401,"response":"Unauthorized","wwwAuthenticateDirective":"Basic realm=\"Search Guard\""}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4929:19)\n at IncomingMessage.emit (events.js:194:15)\n at endReadableNT (\_stream\_readable.js:1103:12)\n at process.\_tickCallback (internal/process/next\_tick.js:63:19)”,“name”:“UnhandledPromiseRejectionWarning”,“stack”:“UnhandledPromiseRejectionWarning: Authentication Exception :: {"path":"/\_searchguard/kibanainfo","query":{},"statusCode":401,"response":"Unauthorized","wwwAuthenticateDirective":"Basic realm=\"Search Guard\""}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4929:19)\n at IncomingMessage.emit (events.js:194:15)\n at endReadableNT (\_stream\_readable.js:1103:12)\n at process.\_tickCallback (internal/process/next\_tick.js:63:19)\n at emitWarning (internal/process/promises.js:81:15)\n at emitPromiseRejectionWarnings (internal/process/promises.js:120:9)\n at process.\_tickCallback (internal/process/next\_tick.js:69:34)”},“message”:“Authentication Exception :: {"path":"/\_searchguard/kibanainfo","query":{},"statusCode":401,"response":"Unauthorized","wwwAuthenticateDirective":"Basic realm=\"Search Guard\""}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4929:19)\n at IncomingMessage.emit (events.js:194:15)\n at endReadableNT (\_stream\_readable.js:1103:12)\n at process.\_tickCallback (internal/process/next\_tick.js:63:19)”}

{“type”:“error”,“@timestamp”:“2020-11-12T16:00:19Z”,“tags”:[“warning”,“process”],“pid”:6,“level”:“error”,“error”:{“message”:“Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)”,“name”:“UnhandledPromiseRejectionWarning”,“stack”:“Authentication Exception :: {"path":"/\_searchguard/kibanainfo","query":{},"statusCode":401,"response":"Unauthorized","wwwAuthenticateDirective":"Basic realm=\"Search Guard\""}\n at respond (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:349:15)\n at checkRespForFailure (/usr/share/kibana/node\_modules/elasticsearch/src/lib/transport.js:306:7)\n at HttpConnector. (/usr/share/kibana/node\_modules/elasticsearch/src/lib/connectors/http.js:173:7)\n at IncomingMessage.wrapper (/usr/share/kibana/node\_modules/elasticsearch/node\_modules/lodash/lodash.js:4929:19)\n at IncomingMessage.emit (events.js:194:15)\n at endReadableNT (\_stream\_readable.js:1103:12)\n at process.\_tickCallback (internal/process/next\_tick.js:63:19)”},“message”:“Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)”}  
{“type”:“log”,“@timestamp”:“2020-11-12T16:00:19Z”,“tags”:[“status”,“plugin:elasticsearch@7.4.0”,“error”],“pid”:6,“state”:“red”,“message”:“Status changed from yellow to red - Authentication Exception”,“prevState”:“yellow”,“prevMsg”:“Waiting for Elasticsearch”}

---

<div class="post-metadata">

**Author:** ![srgbnd](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/srgbnd/32/506_2.png) [@srgbnd](https://forum.search-guard.com/u/srgbnd)\
**Post date:** [November 12, 2020, 5:32pm UTC](https://forum.search-guard.com/t/kibana-authentication-error/2009/2 "2020-11-12T17:32:41Z")

</div>

It looks like you want to configure SG and have users in its internal database. But you have no authentication type specified in Kibana. Configure basic authentication [Kibana Basic Auth | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/kibana-authentication-http-basic) Also, I would advise you to play with the demo first [Demo Installer | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/demo-installer) Then read the main concepts [Main concepts | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/main-concepts) and the first steps [Adding users | Security for Elasticsearch | Search Guard](https://docs.search-guard.com/latest/first-steps-user-configuration)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/system/32/1870_2.png) [@system](https://forum.search-guard.com/u/system)\
**Post date:** [December 3, 2020, 5:32pm UTC](https://forum.search-guard.com/t/kibana-authentication-error/2009/3 "2020-12-03T17:32:43Z")

</div>

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