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] Integrate Prebuilt Rules Customization UI with the _perform upgrade API #199761

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maximpn
Copy link
Contributor

@maximpn maximpn commented Nov 12, 2024

Partially addresses: #171520

Summary

This PR integrates Prebuilt Rules Customization UI functionality with the /internal/detection_engine/prebuilt_rules/upgrade/_perform Prebuilt Rules Customization upgrade API.

Caution

This PR doesn't handle rule type changes. Prebuilt rule updates with rule type change consider having a NON SOLVABLE conflict and won't be upgraded neither individually nor in bulk. Addressing that task requires UI and functional changes and will be addressed in a separate PR.

Details

How to test

  • Clear Elasticsearch data
  • Run Elasticsearch and Kibana locally (do not open Kibana in a web browser)
  • Install an outdated version of the security_detection_engine Fleet package

curl -X POST --user elastic:changeme -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 2023-10-31" -d '{"force":true}' http://localhost:5601/kbn/api/fleet/epm/packages/security_detection_engine/8.14.1

- Install prebuilt rules
```bash
curl -X POST --user elastic:changeme  -H 'Content-Type: application/json' -H 'kbn-xsrf: 123' -H "elastic-api-version: 1" -d '{"mode":"ALL_RULES"}' http://localhost:5601/kbn/internal/detection_engine/prebuilt_rules/installation/_perform
  • Open Detection Rules (SIEM) Page -> Rule Updates
  • Check update functionality in a flyout
    • Pick a rule
    • Click on rule's name
    • Make changes to fields in incoming rule updates updates
    • Save field(s) changes
    • Press the Update button
  • Check table row rule update
    • Pick a rule
    • Click on rule's name
    • Make changes to fields in incoming rule updates updates
    • Save field(s) changes
    • Close the flyout
    • Press the Update rule button in the rule's table row
  • Check bulk rule update
    • Pick a few rules and for each of them do the next steps
    • Click on rule's name
    • Make changes to fields in incoming rule updates updates
    • Save field(s) changes
    • Close the flyout
    • After press the Update All button on the page
  • Check selected rules bulk update
    • Pick a few rules and for each of them do the next steps
    • Click on rule's name
    • Make changes to fields in incoming rule updates updates
    • Save field(s) changes
    • Close the flyout
    • After select the modified rule updates
    • Press the Update N selected rule(s) button on the page

@maximpn maximpn added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules backport:version Backport to applied version labels v8.17.0 labels Nov 12, 2024
@maximpn maximpn self-assigned this Nov 12, 2024
@maximpn maximpn force-pushed the integrate-ui-with-_perform-upgrade-api branch from 18bbcb7 to 2c6f94f Compare November 12, 2024 12:36
@maximpn maximpn changed the title [Security Solution] Integrate Prebuilt Rules Customization UI with the _perform API [Security Solution] Integrate Prebuilt Rules Customization UI with the _perform upgrade API Nov 12, 2024
@maximpn maximpn requested a review from xcrzx November 12, 2024 12:51
@maximpn maximpn marked this pull request as ready for review November 12, 2024 12:54
@maximpn maximpn requested a review from a team as a code owner November 12, 2024 12:54
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

cc @maximpn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants