[Security Solutions] Detection Engine and Security Pages do not operate with runtime fields defined in Kibana Indexes #103587
Labels
8.2 candidate
considered, but not committed, for 8.2 release
8.3 candidate
bug
Fixes for quality problems that affect the customer experience
Feature:Runtime Fields
impact:medium
Addressing this issue will have a medium level of impact on the quality/strength of our product.
sdh-linked
Team:Detections and Resp
Security Detection Response Team
Team:Security Solution Platform
Security Solution Platform Team
Team:Threat Hunting
Security Solution Threat Hunting Team
Theme: alert_triage
Security Solution Alert Triage Theme
Describe the bug:
When you define a runtime mapping field in a Kibana index, the runtime field is there to be used for runtime-search-requests and is actually not directly in an Elastic mapping.
When you use Discover it knows to pull the runtime fields from the Kibana index and knows to attach the runtime mappings directly to the query.
However, the SecuritySolution pages and the Detection Engine both do not utilize this runtime mapping information from a Kibana Index and you will get inconsistent results between Discover, SecuritySolution pages, and the Detection Engine when you query the same Kibana Indexes.
Really, we should attach the runtime mappings to the queries we find from multiple indexes best we can/best effort and I do say best we can/best effort since SecuritySolution pages and detection engine can both utilize multiple Kibana indexes for their source index produces single response results. So you could end up with conflicts between runtime mappings between multiple Kibana index patterns just like you can with multiple Elasticsearch index patterns. However, in most cases I would imagine that you could merge the runtime fields in the Kibana index patterns push them down to the services and use them without conflicts.
As of right now, since we allow Discover to make it incredibly simple to add these runtime mapping fields directly in Discover to Kibana indexes (A Kibana Index could also be a signals index), we should fix this to operate as expected even if we ignore conflicts or choose one conflict of a runtime field over another for those mis-use cases.
Steps to reproduce:
Open dev tools and add a simple mapping
Add a single simple document to it:
Create a Kibana Index from the mapping:
Create a runtime mapping within Discover for it which emits a
host.name
as an example:Notice you get
host.name
in Discover:Open dev tools and confirm that Discover attaches the runtime field as a query mapping from the Kibana Index pattern:
Go to SecuritySolution and select the index as the data source but notice that it does not show up in the tables and also notice that it does not attach the runtime mapping as part of the query in dev tools:
If you go to the detections page, you can create a detections using
host.name
or*:*
and you will notice the same effect since we do not introspect and push down data such as runtime mappings from Kibana indexes as runtime query mappings.Expected behavior:
You get the same behavior and data from discover also in your detections results and in your SecuritySolution queries by using runtime mapping query fields from a Kibana Index.
Kibana version:
7.13.0
Elasticsearch version:
7.13.0
The text was updated successfully, but these errors were encountered: