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
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:
User stories
Prebuilt rule customization workflow:
Prebuilt rule upgrade workflow:
Prebuilt rule export/import workflow:
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_sourceto the API schema #180122rule_sourcefield together withimmutable#180141DetectionRulesClientrefactoring. Part 2 #184364rule_sourceandimmutablefields #180140Rule customization, API changes
ruleSource.isCustomizedin API endpoint handlers #180145ruleSource.isCustomizedin bulk edit API #187706rule_sourcefield required inRuleResponse#180270Rule upgrade, API changes
POST /prebuilt_rules/upgrade/_reviewAPI endpoint even if they haven't been updated by Elastic in the target version #180154POST /upgrade/_reviewAPI endpoint's contract and functionality #180153/upgrade/_reviewupgrade workflow #180393MissingVersionsymbol in theThreeWayDiffobject with a boolean #188277POST /upgrade/_performAPI endpoint's contract and functionality #166376/upgrade/_performendpoint upgrade workflow #186544exceptions_list,authorandlicensefrom Diffable Rule #196213Rule upgrade, diff algorithms
concurrent_searchesanditems_per_searchfields diff algorithms #188061Fleet package with prebuilt rules
Changes hidden behind the feature flag
These are changes that will need to be hidden behind the
prebuiltRulesCustomizationEnabledfeature flag.Rule customization, UI changes
prebuiltRulesCustomizationEnabled#180130Rule upgrade, UI changes
Rule export and import, API and UI changes
Licensing
Before release
Bugs
Testing
Documentation
rule_sourceproperty for rules in the API schema (DRAFT) security-docs#5063Release
prebuiltRulesCustomizationEnabledfeature flag #180272