kibana/packages/core/saved-objects
Juan Pablo Djeredjian 6cc9855495
[Security Solution] Write and read Rule Execution Logs from rule instead of saved object (#147035)
**Addresses:** https://github.com/elastic/kibana/issues/130966
**Based on:** https://github.com/elastic/kibana/issues/135127

## Summary

This PR deprecates the Sidecar SO of type `siem-detection-engine-rule-execution-info` in favour of storing Rule Execution Logging data within the rule itself, making use of the work previously done in the Alerting Framework:
- https://github.com/elastic/kibana/pull/140882
- https://github.com/elastic/kibana/pull/147278

Work done:
- **Pass execution statuses and metrics from rule executors to the Framework:** through the use of `RuleMonitoringService` and `RuleResultService` from within the rule execution log client for executor. `x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts`
- **Fetch execution statuses and metrics from rules themselves instead of the sidecar `siem-detection-engine-rule-execution-info` saved objects**: through the use of the new function `createRuleExecutionSummary` in `x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/create_rule_execution_summary.ts`, which extracts last execution information from the rule itself.
- **Remove the siem-detection-engine-rule-execution-info saved objects type from the codebase. Mark it as deleted in Kibana Core:** added `siem-detection-engine-rule-execution-info` to `packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/unused_types.ts`; and got rid of the related Saved Object client.
- **Make sure to keep backward compatibility in the Detection API endpoints and rule execution events we write into the Event Log**: API compatibility is maintained. No breaking changes.


### Checklist

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2023-01-27 16:35:47 +01:00
..
core-saved-objects-api-browser [Saved Objects] Fix deprecated Browser SO types (#149195) 2023-01-19 05:23:31 -07:00
core-saved-objects-api-server [Saved Objects] Import SO types from server rather than common to avoid deprecation (#149289) 2023-01-25 05:38:05 -07:00
core-saved-objects-api-server-internal [Saved Objects] Import SO types from server rather than common to avoid deprecation (#149289) 2023-01-25 05:38:05 -07:00
core-saved-objects-api-server-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-base-server-internal [Saved Objects] Provide ability to remove SO type from global SO HTTP API without hiding from the client (#149166) 2023-01-23 15:04:24 -07:00
core-saved-objects-base-server-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-browser [Saved Objects] Browser-side client deprecation notice (#148979) 2023-01-18 04:03:23 -07:00
core-saved-objects-browser-internal [Saved Objects] Browser-side client deprecation notice (#148979) 2023-01-18 04:03:23 -07:00
core-saved-objects-browser-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-common [Saved Objects] Import SO types from server rather than common to avoid deprecation (#149289) 2023-01-25 05:38:05 -07:00
core-saved-objects-import-export-server-internal [Saved Objects] Import SO types from server rather than common to avoid deprecation (#149289) 2023-01-25 05:38:05 -07:00
core-saved-objects-import-export-server-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-migration-server-internal [Security Solution] Write and read Rule Execution Logs from rule instead of saved object (#147035) 2023-01-27 16:35:47 +01:00
core-saved-objects-migration-server-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-server Replace ecs package with ecs-typescript generated code (#148804) 2023-01-26 07:10:32 +01:00
core-saved-objects-server-internal [Saved Objects] Import SO types from server rather than common to avoid deprecation (#149289) 2023-01-25 05:38:05 -07:00
core-saved-objects-server-mocks Flags core mocks packages as devOnly (#149466) 2023-01-26 08:46:06 -07:00
core-saved-objects-utils-server chore(NA): upgrades uuid to v9.0.0 (#149135) 2023-01-19 19:48:07 +00:00