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] Consolidating Rule Management with Alerting Framework #133560

Open
2 of 8 tasks
banderror opened this issue Jun 3, 2022 · 2 comments
Open
2 of 8 tasks
Labels
epic Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@banderror
Copy link
Contributor

banderror commented Jun 3, 2022

Summary

Elastic is going to build a Kibana application for unified rules and alerts management, and @elastic/response-ops-ram team will be working on that in the future. This app will be showing Security, Observability, and Stack rules in a common table and allow to render some solution/domain-specific UI in it (for example, by clicking on a rule it could show a Rule Details flyout that could be a domain- or rule type-specific piece of UI).

On the other hand, in Security we want our Rules table to be consistent with the unified rules table in terms of UI/UX patterns and components used so that the user experience is not too much different for users when they work with rules in Security and this unified app. However, we still need to be able to present our domain-specific UIs and include our domain-specific logic into the Rules table in Security.

So the plan is to:

  • Start reusing components from the Alerting Framework and build our table on top of them. It won't be a "framework"-like approach where we'd be importing some generic rules table with logic and then customizing it by specifying props, injecting dependencies, etc. Instead, it would be a "library"-like approach where we'd be using lego blocks provided by the Framework, but we'd be combining them as we want on our side.
  • Start moving towards Alerting Framework API endpoints and deprecating our own Detections API endpoints if/where possible.
    • Primarily it's about reading/searching rules via the Alerting API - let's think about how we can do that first.
    • We can probably keep our own CRUD and actions endpoints - that's debatable.

How can we use Alerting API for reading rules

Right now it's not possible to just start reading rules via the Alerting API endpoints. The reason is that we have our domain-specific code in them:

  • Sidecar saved objects that we query, process, and include the processed info into the rules being returned
    • siem-detection-engine-rule-execution-info sidecar SO that we merge with some info from the rule SO and return in the rule as execution_summary property.
    • Legacy rule actions sidecar SOs (two SO types I think).
  • Transformation of the Rule data model that's returned by RulesClient into our Rule domain model that we return from our HTTP API endpoints.
    • The data model is closely tied to the persistence layer. It contains raw params object as it's stored in .kibana index. It lets the user know that there is some params object. It doesn't make sure that required params are there if they are not stored in _source, etc.
    • The domain model doesn't expose any details about persistence. It shows rule type-specific fields as rule.riskScore rather than rule.params.riskScore. It normalizes some fields where we need it (e.g. sets default values for missing params).
    • This decouples what we expose to the user from how we store it in Elasticsearch, gives us room for safe data migration and backward compatibility, etc.
  • Server-side on-read validation of the rules being returned. This gives us confidence that if we returned a rule, it's correct and valid and won't break our app on the client-side.
  • Most likely a lot of other domain-specific logic.

So to proceed, we'll need to:

  • get rid of our domain-specific code (e.g. sidecar SOs)
  • and/or move our domain-specific code to the Framework (e.g. transformation to the domain model)

Sub-tasks

Experiment with adding reusable components from Alerting to the Rules table in Security

Preview Give feedback

Get rid of our sidecar saved objects and remove all the related code (SO types, logic, etc)

Preview Give feedback

Migrate to Alerting CRUD endpoints

Preview Give feedback
@banderror banderror added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) 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 Jun 3, 2022
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

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

@banderror banderror added the epic label Jun 3, 2022
@banderror banderror changed the title [Security Solution][Detections] Consolidating Rule Management with Alerting Framework [Security Solution] Consolidating Rule Management with Alerting Framework Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

2 participants