elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.69k stars 8.12k forks source link

[Security Solution] Consolidating Rule Management with Alerting Framework #133560

Open banderror opened 2 years ago

banderror commented 2 years ago

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:

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:

So to proceed, we'll need to:

Sub-tasks

### Experiment with adding reusable components from Alerting to the Rules table in Security
- [x] Build a POC for adding UI for snoozing rules to the Rules table ([PR](https://github.com/elastic/kibana/pull/137430)) 
### Get rid of our sidecar saved objects and remove all the related code (SO types, logic, etc)
- [x] Rule execution info sidecar SO https://github.com/elastic/kibana/issues/130966
- [ ] Legacy rule action sidecar SOs https://github.com/elastic/kibana/issues/146288
### Migrate to Alerting CRUD endpoints
- [ ] Research and find out what other domain-specific logic we have in our Security endpoints.
- [ ] Add support for on-read transform (normalization) function to rule types in the Alerting Framework.
- [ ] Add support for on-read validation function to rule types in the Alerting Framework.
- [ ] Decouple rule creation/editing UI from actions creation/editing UI. Create or edit actions from a separate page. Reuse the existing Alerting Framework's UI and API for creating and editing actions. Create a new set of dedicated endpoints in the Alerting API for managing actions, if needed. Stop exposing rule actions from the Detections API.
- [ ] Stop exposing exception lists from the rule via the non-exceptions related Detections API endpoints, such as rules CRUD endpoints.
elasticmachine commented 2 years ago

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

elasticmachine commented 2 years ago

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