kibana icon indicating copy to clipboard operation
kibana copied to clipboard

[Security Solution] Fix rule filters on the Rule Details page

Open banderror opened this issue 1 year ago • 6 comments

Fixes: https://github.com/elastic/kibana/issues/141458 Fixes: https://github.com/elastic/kibana/issues/176866

Summary

Fixes the bugs above by changing the Filters component:

  • from using lower-level components like FilterBadgeGroup and custom rendering
  • to using a higher-level FilterItems component that's used inside a larger component QueryBar (see the first screenshot below) on the Rule Creation / Editing pages

Note that for some reason the end result still does not fully equal to how filters look on the Rule Creation / Editing pages, where there are fewer warnings. It's hard to say which rendering is the right one.

Screenshots

How filters look on the Rule Creation / Editing pages:

Screenshot 2024-02-15 at 21 25 00

Rule Details page BEFORE the fix:

Screenshot 2024-02-15 at 21 23 46 Screenshot 2024-02-15 at 21 24 02 Screenshot 2024-02-15 at 21 24 18

Rule Details page AFTER the fix 1 (filters use non-existing fields and show warnings):

Screenshot 2024-02-15 at 21 28 46

Rule Details page AFTER the fix 2 (filters use existing fields and look normal):

Screenshot 2024-02-15 at 21 37 45

Checklist

For maintainers

banderror avatar Feb 15 '24 20:02 banderror

/ci

banderror avatar Feb 15 '24 21:02 banderror

/ci

banderror avatar Feb 15 '24 21:02 banderror

Pinging @elastic/security-detections-response (Team:Detections and Resp)

elasticmachine avatar Feb 16 '24 09:02 elasticmachine

Pinging @elastic/security-solution (Team: SecuritySolution)

elasticmachine avatar Feb 16 '24 09:02 elasticmachine

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

elasticmachine avatar Feb 16 '24 09:02 elasticmachine

@maximpn I addressed your comments and enabled auto-merge. Feel free to check it one more time if you're interested. We can push any other improvements separately. Thank you!

banderror avatar Feb 19 '24 20:02 banderror

:green_heart: Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5002 5003 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.6MB 11.6MB -1.1KB

History

  • :yellow_heart: Build #194108 was flaky fb67b07cfc84b0413c756ff98750622382492aa3
  • :broken_heart: Build #194009 failed 9541ff3210ed02da70772c383489def4ed0ca989
  • :broken_heart: Build #193952 failed 00eacc08009c53c29d73485d02ba2e9099c69dc8
  • :broken_heart: Build #193950 failed df0d9dab8a5f7c622e6548922f9d5c4daaa44c70

To update your PR or re-run it, just comment with: @elasticmachine merge upstream

cc @banderror

kibana-ci avatar Feb 19 '24 21:02 kibana-ci

💔 Some backports could not be created

Status Branch Result
8.12 Backport failed because of merge conflicts
8.13

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 177081

Questions ?

Please refer to the Backport tool documentation

kibanamachine avatar Feb 19 '24 21:02 kibanamachine

💚 All backports created successfully

Status Branch Result
8.12

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

banderror avatar Feb 20 '24 10:02 banderror

This PR didn't landed on time to be included on v8.12.2. Updating the labels.

mistic avatar Feb 22 '24 17:02 mistic

Hi @banderror ,

In 8.11.1 there is bug with "NOT" filter, I am using "AND" inside the filter. Can you check that it's fixed?

and filter

Thank you :)

shayfeld avatar Mar 17 '24 11:03 shayfeld

@shayfeld That one is tracked in https://github.com/elastic/kibana/issues/176866, it's been fixed by this PR and the fix will be released in 8.13.0

banderror avatar Mar 18 '24 09:03 banderror

@banderror are you sure? it's regular filter not custom label.

shayfeld avatar Mar 18 '24 16:03 shayfeld

@shayfeld Yes, the negation ("NOT") now works correctly for both regular filters and filters with custom labels. Here's an example from the latest 8.13.0 prerelease version:

Rule Creation page:

Screenshot 2024-03-18 at 18 34 18

Rule Details page:

Screenshot 2024-03-18 at 18 35 41

There's an issue with that Warnings on the Details page, but that's a different one. I'll probably open a dedicated ticket for it.

banderror avatar Mar 18 '24 17:03 banderror

Follow-up issue: https://github.com/elastic/kibana/issues/178908

banderror avatar Mar 18 '24 20:03 banderror