# Error Messages handling In Kibana UI

**URL:** https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959
**Category:** Search Guard
**Created:** [September 11, 2020, 5:07am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959 "2020-09-11T05:07:54Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 11, 2020, 5:07am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/1 "2020-09-11T05:07:54Z")

</div>

**Elasticsearch version: elasticsearch-oss-7.0.1**

**Kibana version (if relevant): kibana-oss-7.0.1**

**Describe the issue:**  
When an unauthenticated user logs in to view the indices, Kibana prompts the Message saying No Permission.  
After that, the correct index selected, still the error message visible. We have to click explicitly ‘ok’ to cancel the error prompt.

**Steps to reproduce:**

1. Deploy elk 7.0.1 chart with some users having limited permissions.
2. Login with admin user and create some index patterns.
3. Log in with unauthenticated user which have limited permissions and try to view the indices, Kibana prompt the Message saying No Permission.
4. Now use the correct index for which user has permissions the error message is still there.

**Expected behavior:**  
When we select the correct index the error message should disappear.

**Screenshots (if relevant):**

 ![no_permission_issue](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/9893567dbb6b6626051fcc3fbb769606cefa105a.png)

---

<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: [September 11, 2020, 5:41am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/2 "2020-09-11T05:41:30Z")

</div>

This happens because the user tries to read some index(es) that he has no permission to read. In some cases, Kibana uses a wildcard as an index name if no index name is given. Search Guard can be run in `do not fail on forbidden` mode. With this mode enabled Search Guard filters all indices from a query a user does not have access to. Thus not security exception is raised. You can enable it in the following way.

**sg\_config.yml**

```auto
sg_config:
  dynamic:
    do_not_fail_on_forbidden: true

```

> **[Installing the Plugin](https://docs.search-guard.com/latest/kibana-plugin-installation#configuring-elasticsearch-enable-do-not-fail-on-forbidden)**
>
> How to install the Search Guard Kibana plugin which adds authentication, multi-tenancy and the configuration UI.

If there is a permission error, usually the corresponding Elasticsearch error is more useful. Could you please look at the Elasticsearch log, find the related error, and paste it here?

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 21, 2020, 5:05am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/3 "2020-09-21T05:05:28Z")

</div>

Hi @srgbnd  
Thanks for the response.  
I have tried do\_not\_fail\_on\_forbidden: true parameter under sg\_cofig. Now when an unauthenticated user logs in to view the indices, Kibana prompts the Message saying “Internal Server Error”.  
If we click on the index for which user have permission the prompt is still there. That prompt remains until we click explicitly on “ok” button. **The prompt should be disappear if we select the correct index for which user have permssion.**  
The only different which I see in client logs are with do\_not\_fail\_on\_forbidden parameter there are no logs coming for “Internal Server Error”. Without that parameter, we can see “no permission” logs in client pod.  
Our expectation is the prompt for no permission should disappear when we select the correct index .

Thanks,  
Prashant

---

<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: [September 21, 2020, 9:31am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/4 "2020-09-21T09:31:56Z")

</div>

Hi. Today I tested this locally.  
There is no Internal Server Error if a user has search permissions for the selected index pattern.

 ![Screenshot 2020-09-21 at 11.13.23](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/806ea6b5db4e747ef9ba162f350e3273d4836494.png)

There is the error if the user doesn’t have the search permissions.

 ![Screenshot 2020-09-21 at 11.15.22](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/c6355fd28261c90d68ef6329377d1b36605984c6.png)

If the user clicks Ok to close the error callout and switches back to the index he has permissions for, there is no error. If the “correct” index pattern is preferred, the user navigate to other pages and goes back to the Discover page and there is no error.

 ![Screenshot 2020-09-21 at 11.16.10](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/a1e933ce0c6ebb17e387824381809907ec639995.png)

Do you have the same behaviour? If yes, it is expected. This error is the Kibana error, we don’t control this error. It disappears after the timeout you see in the right (270s) or after the user clicks the Ok button.  
 ![Screenshot 2020-09-21 at 11.23.13](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/b5502e892bad29901b6a592587e0466501965696.png)

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 22, 2020, 6:46am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/5 "2020-09-22T06:46:09Z")

</div>

Thanks @srgbnd

Yes, we have the same behavior as above.

---

<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: [September 22, 2020, 8:40am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/6 "2020-09-22T08:40:24Z")

</div>

In the newest Kibana/SG versions. We have clear messages if the user has no permission to search indices behind an index pattern.

The user switches to the index pattern he has no permission to search.

 ![Screenshot 2020-09-22 at 10.25.22](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/e98771cf9c577ce535c29985e210f25aea215f3e.png)

The user clicks the “See the full error” button.

 ![Screenshot 2020-09-22 at 10.24.29](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/f304e9259d8791e9bd4e4ecc4b54064932f7f179.png)

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 22, 2020, 8:49am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/7 "2020-09-22T08:49:41Z")

</div>

Hi @srgbnd  
One doubt in newest Kibana/SG versions. After doing this “The user switches to the index pattern he has no permission to search” if user select the correct index(for which he has permission). That error prompt still be there ?

---

<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: [September 22, 2020, 8:51am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/8 "2020-09-22T08:51:42Z")

</div>

There is no error on the page if the user switches to the “correct” index pattern.

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 22, 2020, 8:53am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/9 "2020-09-22T08:53:16Z")

</div>

The error prompt should automatically disappear once we select the correct index,right ?

---

<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: [September 22, 2020, 9:00am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/10 "2020-09-22T09:00:38Z")

</div>

If there was an error, Kibana pops the related error toast. There is one toast per error. If the user has the error already and switches to the “correct” index pattern the toast doesn’t disappear immediately. It either disappears after a timeout or when the user closes it. There is no other error on the page.

 ![Screenshot 2020-09-22 at 10.55.00](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/b9eeb5a9f808dc78ace4cdc0061016a4806d9a2b.jpeg)

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 22, 2020, 9:39am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/11 "2020-09-22T09:39:34Z")

</div>

ok @srgbnd  
Thanks a lot.

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 22, 2020, 10:21am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/12 "2020-09-22T10:21:47Z")

</div>

Hi @srgbnd  
On what parameter this “timeout” decided? Because in older kibana/SG version it shows for 300s and in newer version there is no timeout coming.

---

<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: [September 22, 2020, 12:33pm UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/13 "2020-09-22T12:33:57Z")

</div>

Currently, all toasts in the Kibana global toast list has the timeout (toastLifeTimeMs) set to [Infinity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity). [https://github.com/elastic/kibana/blob/7.9/src/core/public/notifications/toasts/global\_toast\_list.tsx#L72](https://github.com/elastic/kibana/blob/7.9/src/core/public/notifications/toasts/global_toast_list.tsx#L72)

> It either disappears after a timeout …

So, I have to take this back. Practically the toast is there until the user closes it.

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 24, 2020, 6:08am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/14 "2020-09-24T06:08:15Z")

</div>

Previoulsy the value is set to 6000Ms. [kibana/global\_toast\_list.tsx at 7.1 · elastic/kibana · GitHub](https://github.com/elastic/kibana/blob/7.1/src/core/public/notifications/toasts/global_toast_list.tsx)

but the time comes up on error prompt is 300s. In that case both time should be same ?  
So the parameter “toastLifeTimeMs” is for timeout or for some another purpose ?

---

<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: [September 24, 2020, 7:24am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/15 "2020-09-24T07:24:24Z")

</div>

The red message at the top of the page which is saying Internal Server Error in v7.0 is not in the EuiGlobalToastList. The toast list is a completely different UI component. It always looked this way [Elastic UI](https://elastic.github.io/eui/#/display/toast)

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 24, 2020, 8:17am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/16 "2020-09-24T08:17:54Z")

</div>

Is there any way to configure error prompt timeout(which is by default 300s) in older version of kibana ?

---

<div class="post-metadata">

### Author: ![prashant407](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@prashant407](https://forum.search-guard.com/u/prashant407)
#### Post date: [September 24, 2020, 8:32am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/17 "2020-09-24T08:32:41Z")

</div>

Practically the toast is there until the user closes it:- I have validated it even there was no countdown time but after some the error prompt disappears itself.

---

<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: [September 24, 2020, 8:32am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/18 "2020-09-24T08:32:47Z")

</div>

You can configure Kibana only via kibana.yml. I don’t see any option to set the error timeout [Configure Kibana | Kibana Guide [7.16] | Elastic](https://www.elastic.co/guide/en/kibana/7.x/settings.html)

---

<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: [October 15, 2020, 8:33am UTC](https://forum.search-guard.com/t/error-messages-handling-in-kibana-ui/1959/19 "2020-10-15T08:33:05Z")

</div>

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