-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Discuss] [Security Solution] [Alerting] HTTP route RFC for unified rule management #95060
Comments
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
The initial implementation of import/export for the alerting framework will be done via the saved object management UI, so I'm not sure it will exactly meet your needs in this iteration. We are addressing the need for importing/exporting rules and connectors in order to support the deprecation of legacy multi-tenancy, so the expected workflow will be that a user will use the saved object management UI or the saved object import/export routes/APIs. In the next step, we would expect to provide routes/APIs in the alerting framework for import/export that provide an RBAC layer on top of the saved objects API but there is no issue open for that right now. |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Just for reference, these are our current endpoints and route handlers:
I think one thing to note is that our routes are not simple wrappers around
So the big question imho is how are we going to separate responsibilities and design the final framework (whatever it is). Is it going to be only Alerting, or Alerting + ETL on top, or Alerting + unified Detection Engine, or... ? That said, if/when this is more clarified, would be definitely good to consolidate HTTP APIs for rules, but at this point it seems like too early to make any decisions on routes. Maybe it would be worth going through all our routes and figure out all the generic (alerting) and specific (detections) parts. Another idea is let's start with adding some missing APIs to alerting (methods to I think bulk CRUD methods would be a good thing to add because of 2 reasons:
Lastly, I was thinking about leveraging |
Addressing the immediate ask of bulk rule actions:
Agree with @banderror that there is a lot of security specific functionality in the security routes outside of purely calling the alerts client so providing these bulk actions will not immediately remove the need for the security routes since there are additional. Out of the additional actions that are performed before and after calling the alerts client, do we know which ones might be needed by observability as well? That might help guide the alerting framework as to what might belong in the alert client. |
Are you suggesting that the rules with
Is this route requested because security creates a separate rule for notifications instead of including the actions as part of rule creation? What would be the requirements of this new route? |
I believe this omission is intentional - this is an API we consider internal, open to change and hence not on the public docs. The Platform leads are in the process of formalising clearer guidance around the distinction between internal/external apis and what manner of documentation we should provide for each. Hopefully this'll be clearer once we finish that work 😄 . (cc @kobelb ) |
I thought this was in reference to the find rule status route inside security solutions and whether this should be lifted up into the alerting framework? |
Oh, sorry, probably my bad. 😬 |
@oatkiller assigning this to you to start grooming/planning for this ticket. |
Introduction
RFC to define the needs of the security solution for a unified rule management API. Not sure if something like this exists elsewhere but figured I'd throw this together.
Security routes to be added to alerting framework
We make use of bulk actions #53144 such as bulk create, bulk update (bulk enable essentially), bulk delete.. so we need some new routes to handle these operations. These routes also require creating additional apis on the alerts client to enable bulk operations on the saved objects which currently (as of 7.12 I believe) have all of these operations available except for bulk delete.
We also need import export
but it looks like @ymao1 has been working away at that which is great :) #94151 and #94152Privileges and index bootstrap routes are used for establishing the .siem-signals index which will be the unified alerting index. I think Garrett is handling this though but if anyone has additional comments those would be welcome.
Prepackaged rules route - Not sure how this will look in 7.13 after this lands
Find rules status route is undocumented but maybe should be documented? Also do we want this in the security solution routes or in alerting? My feeling is it belongs in the security solution but I could see utility in having it be available for other solutions too. This could also exist in the
get framework health
route from alerting.We also need a route for updating tags but I'm not sure if tags are security-specific so this route could remain in the security solution.
Lastly, new routes for adding actions and enabling / disabling our pre-built rules (tagged with
__immutable__
) Also add validation to prevent updating immutable rules too.Route validation
Currently alerting is utilizing kbn config for route validation. If possible, it would be great if the rule management api and the solutions utilized the same validation library. My suggestion would be to introduce io-ts in the newer apis like import / export, bulk etc. and then gradually update the other routes to utilize it as well.
Open questions
We currently merge the rule status saved object with the rule data in our "find_rules" route. Hopefully this status saved object will be removed in 7.13 and be replaced with events in the event log plugin. Regardless, the
_find
route returns the rule with some current status information merged into the response. Either we copy this functionality over into the_find
route of alerting or we tell the UI to query the rule health / rule status api. The easier option is to have the same functionality as currently exists in the security solution route.Related issues from alerting: #90375, #90381, #90379
The text was updated successfully, but these errors were encountered: