elastic / kibana

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

[Security Solution] `DetectionRulesClient` refactoring. Part 2 #184364

Open xcrzx opened 1 month ago

xcrzx commented 1 month ago

Epics: https://github.com/elastic/security-team/issues/1974 (internal), https://github.com/elastic/kibana/issues/174168 Follow-up to: https://github.com/elastic/kibana/issues/180128

Summary

We need to finalize the DetectionRulesClient (formerly known as RulesManagementClient) refactoring and address the remaining comments left after the initial PR: https://github.com/elastic/kibana/pull/182802.

PR 1 (merged)

PR 2 (merged)

PR 3 (merged)

PR 4 (merged)

PR 5 (merged)

High priority

Low priority

elasticmachine commented 1 month ago

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

elasticmachine commented 1 month ago

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

elasticmachine commented 1 month ago

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

xcrzx commented 1 month ago

@nikitaindik I also noticed that we don't provide correct APM spans inside our client. We need to wrap every client method in withSecuritySpan with a corresponding name. See how that's implemented in the prebuilt rule assets client:

https://github.com/elastic/kibana/blob/71ea578bcba8814decd109264b4322984e65ec92/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/rule_assets/prebuilt_rule_assets_client.ts#L127-L128

nikitaindik commented 1 month ago

Opened a PR that renames rulesManagementClient to detectionRulesClient.

nikitaindik commented 1 week ago

Hey @xcrzx! I've just changed the assignee to you since you are taking over the leftover work.