[Security Solution] The useEffect
that cleans removed runtime fields prevents unmapped fields from being added as columns in timelines / Host > Events and Alerts
#132489
Labels
bug
Fixes for quality problems that affect the customer experience
fixed
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Team:Threat Hunting:Explore
Team:Threat Hunting
Security Solution Threat Hunting Team
[Security Solution] The
useEffect
that cleans removed runtime fields prevents unmapped fields from being added as columns in timelines / Host > Events and AlertsThe
useEffect
that cleans removed runtime fields prevents unmapped fields from being added as columns to timelines.There is a similar
useEffect
inx-pack/plugins/timelines/public/components/t_grid/body/index.tsx
here that sometimes prevents unmapped fields from being added to the Host > Events and Alerts tables, but this behavior is not always reproducible. (The reproduction steps below will note this. The unexpected behavior is always reproducible in timeline, per the last reproduction step.)The
useEffect
s linked above immediately dispatch an uexpectedREMOVE_COLUMN
column action when an unmapped field is added as a column. This effectively prevents unmapped fields from being added to the tables, because columns are immediately (automatically) removed.Kibana/Elasticsearch Stack version:
8.0.0
Steps to reproduce:
Navigate to Kibana Dev Tools
Execute the following query to delete any existing
logs-ti_non_ecs_test
indexlogs-ti_non_ecs_test
index via by executing the following query:Note that query above:
test_field_1
test_unsortable_has_no_mapping
.Console
tab:as illustrated by the screenshot below:
Expected result
appears in the console, per the example in the screenshot (above).
POST
queries below such that:✅ the
@timestamp
in the first query below uses the new datetime string created in the previous step, e.g."2022-05-18T23:54:27.943Z"
✅ the
@timestamp
in the second query below uses the new datetime string, one second later, to ensure the events have unique timestamps, e.g."2022-05-18T23:54:28.943Z"
Note that the sample events in the queries above:
host.name: "foozle"
entry, to ensure the events show up in the Host > Events table (in later steps).test_field_1
test_unsortable_has_no_mapping
In Kibana Dev Tools, execute the two queries above to index the documents
In the Security Solution, navigate to the Hosts > Events table
Enter the KQL query:
in the search bar
Expected result
Click the
View details
action for an event to display theEvent details
flyoutIn the flyout, hover next to the
test_field_1
field and click the...
buttonClick the
Toggle test_field_1 column in table
action from the popoverExpected result
test_field_1
column is added to the Host > Events tableOnce again In the flyout, hover next to the
test_unsortable_has_no_mapping
column and click the...
buttonClick the
Toggle test_unsortable_has_no_mapping column in table
action from the popover, as shown in the screenshot below:Expected result
test_unsortable_has_no_mapping
is added to the Host > Events tableActual result
test_unsortable_has_no_mapping
is NOT added to the Host > Events tableClose the
Event details
panelIn the Host > Events table, click the
Investigate in timeline
action for an eventExpected result
In Timeline, click the
View details
action to view theEvent details
(in Timeline)In Timeline's
Event details
flyout, hover next to thetest_field_1
field and click the...
buttonClick the
Toggle test_field_1 column in table
action from the popoverExpected result
test_field_1
column is added to the timelineOnce again In Timeline's
Event details
flyout, hover next to thetest_unsortable_has_no_mapping
column and click the...
buttonClick the
Toggle test_unsortable_has_no_mapping column in table
action from the popoverExpected results
test_unsortable_has_no_mapping
is added to the timelineUPSERT_COLUMN
action being dispatched, per the example below:Actual results
test_unsortable_has_no_mapping
is NOT added to the timelineUPSERT_COLUMN
action being dispatched, the Redux dev tools also show an unexpectedREMOVE_COLUMN
action being dispatched, per the example below:Additional notes
When the
useEffect
that cleans removed runtime fields for timeline is commented-out, the unmapped fieldtest_unsortable_has_no_mapping
is added to the table as expected, and the unexpectedREMOVE_COLUMN
column action is NOT dispatchedThe text was updated successfully, but these errors were encountered: