-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Description
Describe the bug:
Local storage and the Reset Fields button are not working as expected for the Security > Alerts view. As a result:
- The fields selected by a user in the
Security > Alertsview are always (unexpectedly) reset to the defaults when a browser tab is closed and re-opened, because local storage is not working as-expected - The only way to reset the
Security > Alertsview to the default set of columns is to close and re-open the browser tab, becauseReset Fieldsis not working as-expected
Noted while desk testing the (unrelated) fix for #110043 in #110464
Kibana/Elasticsearch Stack version:
7.15 BC3
Steps to reproduce:
To Reproduce:
-
Close all browser tabs connected to the Kibana instance you're using for testitng
-
Use your browser's cache management to delete both
cookiesandlocal storagerelated to your Kibana instance (note: this may belocalhostif you're running Kibana locally) -
Open a new browser tab and navigate to the root of your Kibana instance, e.g. http://localhost:5601, and ensure there is no URL query state in the address bar
-
Navigate to the
Security > Alertspage
Expected results:
- Per the screenshot below, the following default columns are displayed
@timestampRuleSeverityRisk ScoreReasonhost.nameuser.nameprocess.namefile.namesource.ipdestination.ip
Above: the default columns in the Security Solution Alerts table
- Open the browser's dev tools (
Inspectthe page in Chrome), and navigate to the dev tools tab that displays local storage (e.g. theApplicationtab in Chrome), as shown in the screenshot below:
Above: The initial state of local storage, as viewed in the Application tab of Chrome dev tools
- Click the
Fieldsbutton in the Alerts table to display the Fields browser modal
Expected result
- The Fields browser is displayed
-
Click the
cloudcategory in the Fields browser to select it -
Click the
View all clouds fieldsbutton
Expected result:
- All the fields in the
cloudcategory are selected, as shown in the screenshot below:
Above: all fields in the cloud category are selected
- Click
Closeto close the Fields browser
Expected results:
- The alerts table displays the
@timestampfield, followed by all thecloudfields, as shown in the screenshot below:
Above: all cloud fields in the alerts table
- Once again, examine the dev tools tab (
Applicationin Chrome) that displays local storage, as shown in the screenshot below for the persisted state of the columns:
Expected results:
- To ensure the state of perisisted columns is maintained after the browser tab is closed and re-opened, a local storage key named
timelineshas been created in local storage, as shown in the screenshot below (taken from an eariler version of Kibana,7.12in this example, because this functionality is not working as expected in the7.14release):
- The
Valueof thetimelineslocal storage key includes persistence for all ofcloudfields added to theSecurity > Alertstable, as shown in the following JSON snippit (from a7.12instance):
{
"detections-page":{
"id":"detections-page",
"activeTab":"query",
"prevActiveTab":"query",
"columns":[
{
"category":"base",
"columnHeaderType":"not-filtered",
"description":"Date/time when the event originated. This is the date/time extracted from the event, typically representing when the event was generated by the source. If the event source has no original timestamp, this value is typically populated by the first time the event was received by the pipeline. Required field for all events.",
"example":"2016-05-23T08:05:34.853Z",
"id":"@timestamp",
"type":"date",
"aggregatable":true,
"width":190
},
{
"category":"cloud",
"columnHeaderType":"not-filtered",
"description":"The cloud account or organization id used to identify different entities in a multi-tenant environment. Examples: AWS account id, Google Cloud ORG Id, or other unique identifier.",
"example":"666777888999",
"id":"cloud.account.id",
"type":"string",
"aggregatable":true,
"width":180
},
{
"category":"cloud",
"columnHeaderType":"not-filtered",
"description":"Availability zone in which this host is running.",
"example":"us-east-1c",
"id":"cloud.availability_zone",
"type":"string",
"aggregatable":true,
"width":180
},
// ...
}
],
// ...
}
}
Above: in 7.12, the value of the timelines key includes persistence of the cloud fields that were added to the Alerts table
Actual results:
- The
timelineskey was NOT created in local storage - The
cloudfields are NOT persisted as JSON for the alerts page (under the missingtimelineslocal storage key)
-
Close the browser tab displaying Kibana
-
Once again, open a new browser tab and navigate to root Kibana, e.g. http://localhost:5601, ensuring there is no URL state in the address bar
-
Once again, navigate to the
Security > Alertspage
Expected result
- The alerts table displays the
@timestampfield and all the fields from thecloudcategory, because the fields were read from local storage (as seen in the7.12release used in this example)
Actual result
- The alerts table does NOT display the
cloudfields. Instead, it (incorrectly) displays the default columns as noted in step 4, because the persisted column configuration was not read from local storage
- Once again, click the
Fieldsbutton
Expected result
- The Fields browser is displayed
-
Once again, click the
cloudcategory -
Once again, click the
View all cloud fieldsbutton
Expected result:
- All the fields in the
cloudcategory are selected
- Click
Closeto close the Fields browser
Expected results:
- The alerts table displays the
@timestampfield, followed by all thecloudfields
- Now, (one last time), click the
Fieldsbutton in the Alerts table to display the Fields browser modal
Expected result
- The Fields browser is displayed
- Click the
Reset Fieldsbutton
Expected result
-
The Fields browser is closed
-
The following default columns are displayed
@timestampRuleSeverityRisk ScoreReasonhost.nameuser.nameprocess.namefile.namesource.ipdestination.ip
Actual results
-
The Fields browser is closed
-
Instead of restoring the expected default columns (including
Reason), a different column set that includesmessage,event.category,event.action... is displayed, per the following screenshot:
Above: The alerts table is reset to non-default fields (e.g. there's no Reason field)
Other observations / notes
-
After performing similar steps to the ones described above, the
Host > Eventsview does create the expectedtimelineskey in local storage -
The Local storage of selected columns and
Reset fieldsfunctionality should be verified in the following views:Alertstable on the Detections pageAlertstable on the Rule Details pageEventsandExternal alertstables on the Host Details pageEventsandExternal alertstables on the Host PageExternal alertson the Network page





