# Privileges to run Kibana rules manually

**URL:** https://discuss.elastic.co/t/privileges-to-run-kibana-rules-manually/340718
**Category:** Kibana
**Tags:** elastic-stack-alerting
**Created:** [August 14, 2023, 7:57am UTC](https://discuss.elastic.co/t/privileges-to-run-kibana-rules-manually/340718 "2023-08-14T07:57:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![apt-get\_install\_skil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/apt-get_install_skil/32/115156_2.png) [@apt-get\_install\_skil](https://discuss.elastic.co/u/apt-get_install_skil)
#### Post date: [August 14, 2023, 7:57am UTC](https://discuss.elastic.co/t/privileges-to-run-kibana-rules-manually/340718/1 "2023-08-14T07:57:16Z")

</div>

I've created a dedicated space for one of our development teams where they can create alert rules of type "Elasticsearch query" themselves. Therefore I also set up a role granting permissions for operating on those rules.  
However, it's not possible to manually run the rules from the overview page as shown in the screenshots below.

 ![image (1)](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6e4d04a371ec87495f34f2272a19488bd366a9dd.png)

 ![image (2)](https://us1.discourse-cdn.com/elastic/original/3X/3/4/34ca39d3fe34680b68a930663c7a74913cb38c7d.png)

 ![image (3)](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04a656370914e4c254d313d883ade486eafa96ea.png)

My first guess was that the manual run would create a background task that needed further privileges.  
But after some try-&-error where I ended up granting the role all space privileges and all cluster-/index-privileges, **I figured out that only granting the `superuser` role to the test users fixes this issue.**  
This can definitely not be the proper way. So is this a bug?

Kind regards

* * *

* * *

Stack version: 8.6.1

This is the newly set up role:

```auto
{
  "MY_ROLE": {
    "cluster": [],
    "indices": [],
    "applications": [
      {
        "application": "kibana-.kibana",
        "privileges": [
          "feature_stackAlerts.all",
          "feature_actions.read",
          "feature_discover.all",
          "feature_dashboard.all",
          "feature_visualize.all",
          "feature_apm.all",
          "feature_dev_tools.all",
          "feature_advancedSettings.read",
          "feature_indexPatterns.all",
          "feature_savedObjectsManagement.all"
        ],
        "resources": [
          "space:MY_SPACE"
        ]
      }
    ],
    "run_as": [],
    "metadata": {},
    "transient_metadata": {
      "enabled": true
    }
  }
}

```

Another, additional role grants the user the following permissions:

```auto
{
  "ANOTHER_ROLE": {
    "cluster": [
      "manage_pipeline"
    ],
    "indices": [
      {
        "names": [
          "logs-*"
        ],
        "privileges": [
          "view_index_metadata",
          "read"
        ],
        "allow_restricted_indices": false
      },
      {
        "names": [
          "logs-apm*",
          ".ml-anomalies*",
          "traces-apm*",
          "observability-annotations",
          "metrics-apm*"
        ],
        "privileges": [
          "view_index_metadata",
          "read"
        ],
        "allow_restricted_indices": false
      }
    ],
    
    "run_as": [],
    "metadata": {
      "terraform_managed": true
    },
    "transient_metadata": {
      "enabled": true
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![Patrick\_Mueller](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/patrick_mueller/32/109425_2.png) [@Patrick\_Mueller](https://discuss.elastic.co/u/Patrick_Mueller)
#### Post date: [August 15, 2023, 12:42pm UTC](https://discuss.elastic.co/t/privileges-to-run-kibana-rules-manually/340718/2 "2023-08-15T12:42:16Z")

</div>

I believe this is bug [[RAM] bug on \_run\_soon API by XavierM · Pull Request #151218 · elastic/kibana · GitHub](https://github.com/elastic/kibana/pull/151218) . Fixed in versions 8.6.3 and \>= 8.7.0

---

<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: [September 12, 2023, 12:42pm UTC](https://discuss.elastic.co/t/privileges-to-run-kibana-rules-manually/340718/3 "2023-09-12T12:42:17Z")

</div>

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