Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Solution] Disable filter cellActions for unmapped fields on Alerts table #154714

Open
semd opened this issue Apr 11, 2023 · 9 comments
Open
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Cell Actions Security Solution Cell Actions feature needs-input Team:Threat Hunting Security Solution Threat Hunting Team

Comments

@semd
Copy link
Contributor

semd commented Apr 11, 2023

Summary

bug: https://github.com/elastic/sdh-security-team/issues/549
epic: #144943

Filter actions are not working properly on the Alerts page for fields that are not mapped in the alert's index.

This problem was not been introduced by the cell-actions package, it was carried with the migration from SecuritySolution hoverActions. A fix for the cell-actions package would be the following.

Fix description

This fix will need to be done after we adopt FieldSpec (#150347 (comment)) for the field type of the actions, we'll be able to check the isMapped flag in the action's isCompatible function to decide if the FilterIn/Out actions should be displayed or hide.

To define the value of the isMapped prop we'll have to do a lookup of the indexes array of the field in the browserFields data, and check if the alert's index is present.


Update
The bug happens when a field is not mapped on the alert's index but it is mapped on another index in the security data view.
The sorcerer API returns that the field is mapped but fails when we search on the Alerts index.

@semd semd added bug Fixes for quality problems that affect the customer experience Team:Threat Hunting Security Solution Threat Hunting Team Team:Threat Hunting:Explore Feature:Cell Actions Security Solution Cell Actions feature labels Apr 11, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-threat-hunting (Team:Threat Hunting)

@machadoum
Copy link
Member

auto-closed by mistake

@machadoum machadoum reopened this Jun 23, 2023
@machadoum
Copy link
Member

The team discussed this bug, and we think that it isn't a CellActions bug but a data view/sorcerer + Alerts table bug.

The bug happens when a field is not mapped on the alert's index but it is mapped on another index in the security data view.
The sorcerer API returns that the field is mapped but fails when we search on the Alerts index.

It happens because the alerts table uses a security data view but only searches on the alert's index. So the root problem is how Dataview is configured for the Alerts table.

This bug isn't something exclusive to CellActions. For example, if the user tries to sort a column that is not mapped on the Alert index, an error happens, and after a refresh, the alerts table doesn't show up anymore.

Jul-03-2023.11-51-45.mov

@stefnestor
Copy link
Contributor

stefnestor commented Sep 15, 2023

Related: #136351 , #166168 , #144943

@yctercero yctercero removed their assignment Sep 18, 2023
@machadoum machadoum removed their assignment Oct 19, 2023
@stephmilovic stephmilovic added the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Dec 5, 2023
@stephmilovic stephmilovic removed the impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. label Dec 18, 2023
@111andre111
Copy link

111andre111 commented Dec 20, 2023

Probably another related issue: #170167 #171059

@111andre111
Copy link

111andre111 commented Dec 20, 2023

related: #171059

@semd semd assigned semd and unassigned semd Mar 5, 2024
@semd semd added Team:Detection Engine Security Solution Detection Engine Area and removed Team:Threat Hunting:Explore labels Mar 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-engine (Team:Detection Engine)

@lgestc lgestc self-assigned this Apr 15, 2024
@lgestc lgestc added this to the 8.14 milestone Apr 15, 2024
@michaelolo24 michaelolo24 modified the milestones: 8.14, 8.15 Apr 23, 2024
@lgestc
Copy link
Contributor

lgestc commented Apr 24, 2024

After looking at this for a few days, I an conviced that the data view selected in the sourcerer does not impact the pattern list used to retrieve the browser fields for the alerts table.

New data view created
image

After forcing the data view to be the new one in security solution codebase, I am still getting over 2k fields:
image

Regardless of the new dataViewId passed in here: /home/luke/projects/kibana/src/plugins/data_views/common/data_views/data_views.ts ->

the title (aka. the index pattern string) here:
image

remains the same, which results in all the security solution fields rendered as compatible with the alerts table view.

After the pattern is explitly set to .alerts-security.alerts-default, the field count looks correctly:
image

Draft pr where I set the pattern explicitly when the dataViewId is alerts:
#181540

@lgestc
Copy link
Contributor

lgestc commented May 16, 2024

on hold until the we refactor data view selection

@PhilippeOberti PhilippeOberti removed this from the 8.15 milestone Aug 5, 2024
@yctercero yctercero removed the Team:Detection Engine Security Solution Detection Engine Area label Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Cell Actions Security Solution Cell Actions feature needs-input Team:Threat Hunting Security Solution Threat Hunting Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants