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] Architecture design for prebuilt rules customization #125665

Closed
Tracked by #174166
banderror opened this issue Feb 15, 2022 · 6 comments
Closed
Tracked by #174166
Assignees
Labels
8.7 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area 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.7.0

Comments

@banderror
Copy link
Contributor

banderror commented Feb 15, 2022

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

Summary

Come up with an architecture design for the workflows of:

  • customizing prebuilt Elastic rules
  • upgrading prebuilt Elastic rules to new versions
  • resolving conflicts during the upgrade
  • rolling back customized prebuilt rules to their original versions

We need to find answers to some technical questions, including:

  • Where do we store original documents of prebuilt rules? What is the data model?
  • Where do we store user customizations to prebuilt rules? What is the data model?
  • How do we apply customizations to a prebuilt rule?
  • How do we roll back a customized rule to its original version?
  • How do we compare changes between an original version of a prebuilt rule, its new version from EPR, and the version customized by the user? How do we find conflicts between the user customizations and the new changes from Elastic? How do we allow the user to resolve these conflicts? Something like a git three-way merge?
  • Is the current rule versioning sufficient or needs to be reworked?
  • Do we need to modify any of our existing APIs (contracts, implementation)?
  • Do we need to introduce any new APIs?
  • Can we split the implementation into stages to iterate?
  • Can we hide the implementation under a feature switch to avoid long-living branches?
  • Do we need any support for these workflows from Alerting Framework or Kibana Core, now or in the future?
  • How would the design support rules sharing between spaces in the future?

We'd need a proposal (e.g. an architecture design document) providing answers to those questions and clarifying how it's all going to work. We should start opening tickets and/or RFCs where applicable for individual parts of the big problem.

Architecture Design

Architecture Design Document, status: done.

Follow-up work

Here are some tickets that you can track to follow the progress on implementing prebuilt rules customization:

Design:

Removing filesystem rules:

Rule versions and revisions:

Fixes for Fleet:

Fleet package with historical versions of prebuilt rules (support in the current application):

API for prebuilt rule upgrade and installation workflows:

@banderror banderror added Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team labels Feb 15, 2022
@elasticmachine
Copy link
Contributor

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

@banderror banderror added the 8.2 candidate considered, but not committed, for 8.2 release label Feb 15, 2022
@banderror banderror added 8.3 candidate and removed 8.2 candidate considered, but not committed, for 8.2 release labels Mar 7, 2022
@mbudge
Copy link

mbudge commented Apr 24, 2022

We have been waiting for this for a long time, as the team find it difficult to identify new pre-built rules to enabled then keep their clones in sync with regular updates pushed out by elastic.

Some of the customisation's we make are

  • Change rule name to add to custom rule ID prefix
  • Change index patterns so the rules work with cross-cluster search / remote data clusters
  • Add tags
  • Alter schedule and look-back time
  • Apply custom filtering
  • Set timestamp override to use event.ingested
  • Set Actions for when an alert is raised

@banderror
Copy link
Contributor Author

@mbudge Thank you so much for your feedback and for listing the customizations you usually make.

Could you give an example of this one: Change rule name to add to custom rule ID prefix?

@twanva
Copy link

twanva commented Aug 2, 2022

Hi,

I'm also interested in this feature, any updates?

@banderror
Copy link
Contributor Author

Hey @twanva, our team is working on it. At this point, you can look for updates in the related GH issues which you can find in the "Proposal" section of this issue's description. Do you have any specific questions or thoughts?

@banderror banderror added 8.6 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area and removed v8.4.0 8.5 candidate v8.5.0 labels Oct 5, 2022
@banderror banderror changed the title [Security Solution][Detections] Architecture design for prebuilt rules customization [Security Solution] Architecture design for prebuilt rules customization Oct 21, 2022
@banderror banderror added v8.7.0 and removed Feature:Rule Management Security Solution Detection Rule Management area labels Dec 29, 2022
@banderror
Copy link
Contributor Author

The architecture is done, for everyone curious: please read the Architecture Design Document and the updated description of this issue. We are working on the implementation and hoping to ship this feature in one of the future releases! 🚢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.7 candidate Feature:Prebuilt Detection Rules Security Solution Prebuilt Detection Rules area 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.7.0
Projects
None yet
Development

No branches or pull requests

5 participants