-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Security Solution] Add debug logging to endpoints that call Fleet APIs #230503
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] Add debug logging to endpoints that call Fleet APIs #230503
Conversation
f903b2f to
9894d72
Compare
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management) |
banderror
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikitaindik LGTM, just a couple minor comments 👍
...ction_engine/prebuilt_rules/api/bootstrap_prebuilt_rules/bootstrap_prebuilt_rules_handler.ts
Outdated
Show resolved
Hide resolved
..._solution/server/lib/detection_engine/prebuilt_rules/logic/perform_timelines_installation.ts
Outdated
Show resolved
Hide resolved
|
Thanks for reviewing, @banderror! I have addressed the feedback. Please review it again. |
banderror
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @nikitaindik ![]()
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint) (cherry picked from commit 48b2f79) # Conflicts: # x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/integrations/install_promotion_rules.ts
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint) (cherry picked from commit 48b2f79) # Conflicts: # x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/bootstrap_prebuilt_rules/bootstrap_prebuilt_rules_handler.ts
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint) (cherry picked from commit 48b2f79) # Conflicts: # x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/logic/integrations/install_promotion_rules.ts
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…eet APIs (#230503) (#231502) # Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)](#230503) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-08-12T18:30:06Z","message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v9.0.5","v8.18.5","v9.1.2","v8.19.2"],"title":"[Security Solution] Add debug logging to endpoints that call Fleet APIs","number":230503,"url":"https://github.com/elastic/kibana/pull/230503","mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230503","number":230503,"mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
…leet APIs (#230503) (#231512) # Backport This will backport the following commits from `main` to `8.19`: - [[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)](#230503) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-08-12T18:30:06Z","message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v9.0.5","v8.18.5","v9.1.2","v8.19.2"],"title":"[Security Solution] Add debug logging to endpoints that call Fleet APIs","number":230503,"url":"https://github.com/elastic/kibana/pull/230503","mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230503","number":230503,"mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231502","number":231502,"state":"OPEN"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…eet APIs (#230503) (#231511) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)](#230503) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-08-12T18:30:06Z","message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v9.0.5","v8.18.5","v9.1.2","v8.19.2"],"title":"[Security Solution] Add debug logging to endpoints that call Fleet APIs","number":230503,"url":"https://github.com/elastic/kibana/pull/230503","mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230503","number":230503,"mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231502","number":231502,"state":"OPEN"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…leet APIs (#230503) (#231513) # Backport This will backport the following commits from `main` to `8.18`: - [[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)](#230503) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"nikita.indik@elastic.co"},"sourceCommit":{"committedDate":"2025-08-12T18:30:06Z","message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","backport:version","v9.2.0","v9.0.5","v8.18.5","v9.1.2","v8.19.2"],"title":"[Security Solution] Add debug logging to endpoints that call Fleet APIs","number":230503,"url":"https://github.com/elastic/kibana/pull/230503","mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/230503","number":230503,"mergeCommit":{"message":"[Security Solution] Add debug logging to endpoints that call Fleet APIs (#230503)\n\n**Part of epic: https://github.com/elastic/kibana/issues/229688**\n**Is a follow-up to: https://github.com/elastic/kibana/pull/229957**\n\n## Summary \nThis PR adds logging to backend endpoints that call Fleet APIs. This\nwill assist us in debugging flaky tests. I aimed to balance log\ngranularity and readability.\n\n## Changes\nAdded logging to endpoints:\n- bootstrap prebuilt rules\n- perform prebuilt rule installation\n- import rules\n- get installed integrations\n- get all integrations\n- install prebuilt rules and timelines (legacy endpoint)","sha":"48b2f798eb91df39b437de73e9668cc34918133d"}},{"branch":"9.0","label":"v9.0.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/231502","number":231502,"state":"OPEN"},{"branch":"8.19","label":"v8.19.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint)
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint)
…Is (elastic#230503) **Part of epic: elastic#229688 **Is a follow-up to: elastic#229957 ## Summary This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability. ## Changes Added logging to endpoints: - bootstrap prebuilt rules - perform prebuilt rule installation - import rules - get installed integrations - get all integrations - install prebuilt rules and timelines (legacy endpoint)
Part of epic: #229688
Is a follow-up to: #229957
Summary
This PR adds logging to backend endpoints that call Fleet APIs. This will assist us in debugging flaky tests. I aimed to balance log granularity and readability.
Changes
Added logging to endpoints: