[Security Solution] Allow users to edit related_integrations field for custom rules#178295
Merged
maximpn merged 56 commits intoelastic:mainfrom May 2, 2024
Merged
[Security Solution] Allow users to edit related_integrations field for custom rules#178295maximpn merged 56 commits intoelastic:mainfrom
maximpn merged 56 commits intoelastic:mainfrom
Conversation
42c3e83 to
f2c8c8b
Compare
bdd588a to
e4a9f86
Compare
41a03b5 to
166e94f
Compare
596bc6b to
1763ca1
Compare
Contributor
|
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
7f08e43 to
82acefe
Compare
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Canvas Sharable Runtime
Page load bundle
History
To update your PR or re-run it, just comment with: cc @maximpn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #173595
Summary
This PR adds an ability to add and edit custom rule's related integrations. Functionality is necessary to start working on Prebuilt Rule Customization Epic Milestone 3.
Details
Rule's related integrations represent optional dependencies on Elastic integrations to ingest data. Currently prebuilt rule's related integrations are shown on rule details page. This information contains integration's name, installation status and a version mismatch warning when related integration's version dependency doesn't match with an installed integration's version. A subset of Semver is used to specify version dependency. Elastic prebuilt rules use only caret syntax like
^1.2.3.To make it possible to add and edit related integrations for custom rules the following has been done
/internal/detection_engine/fleet/integrations/allhas been added. It returns the full list of available integrations containing title, latest available version and installed version if available. This is necessary to display an options list where users can pick a desired integration. Since some Elastic Prebuilt rules depend not only on integrations fromsecuritycategory this endpoint returns all available integrations (not only related to Security Solution).Related Integrationsform controlsRelated Integrationsform controlscreate/patch/update/export/importwith related integrationsIntegration installation status
Integration installation status has been adjusted. There are following statuses shown
Enabledfor installed and enabled integrations. Enabled integrations are detected by checking Elastic Agent policies for presence of such an integration. It's not guaranteed the policy is picked by agents and data is being ingested.Disabledfor installed and disabled integrations. An agent policy containing such an integration isn't found.Not installedfor not installed integrations./internal/detection_engine/fleet/integrations/allresult it's considered as unknown.Version dependency
Semver allows a wide range of version range declaration. Such flexibility will complicate constructing of an integration link on rule details page. Since Elastic Prebuilt rules use only caret version dependency like
^1.2.3related integration's version dependency is limited to a subset of semver semantic. The following is supported1.2.3~1.2.3^1.2.3Misc
/internal/detection_engine/fleet/integrations/installedendpoint hasn't been removed. We need to make sure it's not needed anymore.Flaky test runner results
Screenshots