Skip to content

Conversation

sdesalas
Copy link
Member

@sdesalas sdesalas commented Oct 20, 2025

Summary

De-facto requirement of Security Detections, (and much of Kibana) that has not been documented properly.

# elasticsearch.yml

search.allow_expensive_queries=false    # <=== causes errors across Kibana 🤯

Errors go as far back as v8.18 (but likely much further), and not only affect Security app, but also many Server Management features such as Fleet, Saved Objects, Tags, etc.

For more info: elastic/kibana#237496 -> Section Risks that were found acceptable

We're documenting it under the correct location to make sure that users know about it. There is an internal slack thread for discussion.

Note also that this is documented as a requirement of the 'alerting' plugin that we're using under the hood.

image

Copy link

github-actions bot commented Oct 20, 2025

🔍 Preview links for changed docs

@sdesalas
Copy link
Member Author

Ready to review. Thanks! 😁 🙏

@sdesalas sdesalas changed the title Add requirement on 'search.allow_expensive_queries' to detections-requirements.md Add 'search.allow_expensive_queries' to detections-requirements.md Oct 20, 2025
Copy link
Contributor

@alaudazzi alaudazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sdesalas for the important observation and opening this documentation improvement! I left a small suggestion.

Let's defer to @nastasha-solomon for a final review and approval.

Copy link

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Copy link
Contributor

@nastasha-solomon nastasha-solomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some suggestions for your consideration and a few questions as well. Thanks!

Copy link
Contributor

@nastasha-solomon nastasha-solomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested changing the numbers to list bullets because these tasks don't need to be completed in a specific order. They just need to be completed in the same file (the elasticsearch.yml file).

* In [`elasticsearch.yml`](/deploy-manage/deploy/self-managed/configure-elasticsearch.md):
* Set the `xpack.security.enabled` setting to `true`. Refer to [General security settings](elasticsearch://reference/elasticsearch/configuration-reference/security-settings.md#general-security-settings) for more information.
* Remove the line `search.allow_expensive_queries=false` if you find it. The `search.allow_expensive_queries` setting must be left on its default value of `true` for key detection features like [alerting rules](https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts/alerting-setup#alerting-prerequisites) and rule exceptions to work.
Copy link
Contributor

@nastasha-solomon nastasha-solomon Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that the link is hardcoded in. I fixed the syntax below and pointed to an explanation of alerting rules instead. Also expanded the explanation around the setting a bit so users know when and when not to act.

Suggested change
* Remove the line `search.allow_expensive_queries=false` if you find it. The `search.allow_expensive_queries` setting must be left on its default value of `true` for key detection features like [alerting rules](https://www.elastic.co/docs/explore-analyze/alerts-cases/alerts/alerting-setup#alerting-prerequisites) and rule exceptions to work.
* If the `search.allow_expensive_queries` setting is set to `false`, remove it. If the setting is set to its default value of `true` or not included in the `elasticsearch.yml` file, you don't need to change it. When this setting is set to `true`, it allows key detection features, such as [alerting rules](../../../explore-analyze/alerts-cases/alerts/alerting-getting-started.md#_rules) and rule exceptions, to work.

@nastasha-solomon nastasha-solomon changed the title Add 'search.allow_expensive_queries' to detections-requirements.md [Security][9.x] Add 'search.allow_expensive_queries' to detections-requirements.md Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants