Skip to content

[Security Solution] Users can Customize Prebuilt Detection Rules: Milestone 3 #174168

@banderror

Description

@banderror

Epic: https://github.com/elastic/security-team/issues/1974 (internal)
Milestones: <<>>

Status: Done.

Summary

Milestone 3: Add support for customizing prebuilt rules. Extend the rule upgrade workflow with full support for 3-way diffs and conflict resolution. Allow users to:

  • Edit and customize prebuilt rules
  • Export and import prebuilt rules, including customized ones
  • Upgrade prebuilt rules while keeping the user customizations whenever possible

User stories

Prebuilt rule customization workflow:

  • User can edit a single prebuilt rule
    • User can click "edit" button for prebuilt rules and customize (almost) any field on the Rule Editing page, just like it's possible to do with custom rules
    • User can't edit the Author and License fields
  • User can bulk edit multiple prebuilt rules via bulk actions
  • User can see if the rule is customized on the Rule Details page
  • User can see which rules are customized on the Rule Management page

Prebuilt rule upgrade workflow:

  • User can upgrade a single prebuilt rule to its latest version with previewing the incoming updates
    • User can preview updates from Elastic, for each rule field that has an update from Elastic
    • User can preview their customizations, for each rule field that was customized
    • User can compare their customizations with updates from Elastic and see if there are any conflicts between them, per each rule field
    • User can manually resolve conflicts between their customizations and updates from Elastic, per each rule field
    • User can edit the final field values before submitting the update
    • User can upgrade a rule if its type has been changed by Elastic in the latest version, but can only accept the incoming changes
  • User can upgrade a single prebuilt rule to its latest version without previewing the incoming updates
  • User can bulk upgrade multiple prebuilt rules to their latest versions

Prebuilt rule export/import workflow:

  • User can export a single prebuilt rule
    • Pages: Rule Details, Rule Management
    • It can be a prebuilt non-customized or prebuilt customized rule
  • User can bulk export multiple prebuilt rules via bulk actions
    • Pages: Rule Management
    • We support exporting prebuilt non-customized, prebuilt customized, and custom rules in any combination
  • User can bulk import multiple prebuilt rules
    • Pages: Rule Management
    • We support importing prebuilt non-customized, prebuilt customized, and custom rules - in any combination

Useful info

Design

Technical design

UI/UX design

Preparatory changes

Preparatory changes is something we can work on before starting to hide functionality behind a feature flag. This will reduce the overall complexity introduced by feature toggling.

Missing UI for editing certain rule fields

Missing UI for editing certain rule fields (docs)

Schema-related changes

Rule customization, API changes

Rule upgrade, API changes

Rule upgrade, diff algorithms

Fleet package with prebuilt rules

Changes hidden behind the feature flag

These are changes that will need to be hidden behind the prebuiltRulesCustomizationEnabled feature flag.

Rule customization, UI changes

Rule upgrade, UI changes

Rule export and import, API and UI changes

Licensing

Before release

Bugs

Testing

Documentation

Release

Metadata

Metadata

Type

No fields configured for Epic.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions