Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.0] [Security Solution] Add UI incentivizers to upgrade prebuilt ru…
…les (#211862) (#213234) # Backport This will backport the following commits from `main` to `9.0`: - [[Security Solution] Add UI incentivizers to upgrade prebuilt rules (#211862)](#211862) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Davis Plumlee","email":"56367316+dplumlee@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-03-05T12:14:31Z","message":"[Security Solution] Add UI incentivizers to upgrade prebuilt rules (#211862)\n\n## Summary\n\nPartially addresses https://github.com/elastic/kibana/issues/210358\n\nAdds all callouts and logic to incentivize users to upgrade their rules asap. These include:\n\n- [x] Showing a callout on the Rule Management page\n- [x] Showing a callout on the Rule Details page\n - [x] Letting users open the Rule Upgrade flyout from the Rule Details page\n- [x] Showing a callout on the Rule Editing page\n- [x] Showing a callout in the Rule Upgrade flyout if rule has missing base version\n\nThis PR also adds related updates to the rule diff algorithms in order to facilitate an easier upgrade experience when rules have missing base versions. These include:\n\n- [x] When the rule has a missing base version and is NOT marked as customized:\n - [x] We should return all the target fields from the diff algorithm as NO_CONFLICT\n- [x] When the rule has a missing base version and is marked as customized:\n - [x] We should attempt to merge all non-functional mergeable fields (any field that doesn't have consequences with how the rule runs e.g. tags) and return them as `SOLVABLE_CONFLICT`.\n - **NOTE**: When base versions are missing and the rule is customized, we attempt to merge all mergable, non-functional rule fields. These include all fields covered by the scalar diff array (`tags`, `references`, `new_terms_fields`, `threat_index`). We typically also consider multi-line string fields as mergeable but without three versions of the string, we are currently unable to merge the strings together, so we just return target version.\n - [x] We should pick the target version for all functional mergeable fields (e.g. `index`) and non-mergeable fields and return them as `SOLVABLE_CONFLICT`.\n\n\n### Screenshots\n\n\n**Callout on Rule details page w/ flyout button**\n\n\n---\n\n**Upgrade flyout now accessible from rule details page**\n\n\n---\n\n**Callout on rule editing page**\n\n\n---\n\n**Dismissible callout on rule management page**\n\n\n---\n\n**Callout in rule upgrade flyout when rule has missing base version**\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [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","sha":"461787bea6a48cc2c55514843adedc9ca5bb5032","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","impact:high","v9.0.0","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Prebuilt Detection Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security Solution] Add UI incentivizers to upgrade prebuilt rules","number":211862,"url":"https://github.com/elastic/kibana/pull/211862","mergeCommit":{"message":"[Security Solution] Add UI incentivizers to upgrade prebuilt rules (#211862)\n\n## Summary\n\nPartially addresses https://github.com/elastic/kibana/issues/210358\n\nAdds all callouts and logic to incentivize users to upgrade their rules asap. These include:\n\n- [x] Showing a callout on the Rule Management page\n- [x] Showing a callout on the Rule Details page\n - [x] Letting users open the Rule Upgrade flyout from the Rule Details page\n- [x] Showing a callout on the Rule Editing page\n- [x] Showing a callout in the Rule Upgrade flyout if rule has missing base version\n\nThis PR also adds related updates to the rule diff algorithms in order to facilitate an easier upgrade experience when rules have missing base versions. These include:\n\n- [x] When the rule has a missing base version and is NOT marked as customized:\n - [x] We should return all the target fields from the diff algorithm as NO_CONFLICT\n- [x] When the rule has a missing base version and is marked as customized:\n - [x] We should attempt to merge all non-functional mergeable fields (any field that doesn't have consequences with how the rule runs e.g. tags) and return them as `SOLVABLE_CONFLICT`.\n - **NOTE**: When base versions are missing and the rule is customized, we attempt to merge all mergable, non-functional rule fields. These include all fields covered by the scalar diff array (`tags`, `references`, `new_terms_fields`, `threat_index`). We typically also consider multi-line string fields as mergeable but without three versions of the string, we are currently unable to merge the strings together, so we just return target version.\n - [x] We should pick the target version for all functional mergeable fields (e.g. `index`) and non-mergeable fields and return them as `SOLVABLE_CONFLICT`.\n\n\n### Screenshots\n\n\n**Callout on Rule details page w/ flyout button**\n\n\n---\n\n**Upgrade flyout now accessible from rule details page**\n\n\n---\n\n**Callout on rule editing page**\n\n\n---\n\n**Dismissible callout on rule management page**\n\n\n---\n\n**Callout in rule upgrade flyout when rule has missing base version**\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [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","sha":"461787bea6a48cc2c55514843adedc9ca5bb5032"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211862","number":211862,"mergeCommit":{"message":"[Security Solution] Add UI incentivizers to upgrade prebuilt rules (#211862)\n\n## Summary\n\nPartially addresses https://github.com/elastic/kibana/issues/210358\n\nAdds all callouts and logic to incentivize users to upgrade their rules asap. These include:\n\n- [x] Showing a callout on the Rule Management page\n- [x] Showing a callout on the Rule Details page\n - [x] Letting users open the Rule Upgrade flyout from the Rule Details page\n- [x] Showing a callout on the Rule Editing page\n- [x] Showing a callout in the Rule Upgrade flyout if rule has missing base version\n\nThis PR also adds related updates to the rule diff algorithms in order to facilitate an easier upgrade experience when rules have missing base versions. These include:\n\n- [x] When the rule has a missing base version and is NOT marked as customized:\n - [x] We should return all the target fields from the diff algorithm as NO_CONFLICT\n- [x] When the rule has a missing base version and is marked as customized:\n - [x] We should attempt to merge all non-functional mergeable fields (any field that doesn't have consequences with how the rule runs e.g. tags) and return them as `SOLVABLE_CONFLICT`.\n - **NOTE**: When base versions are missing and the rule is customized, we attempt to merge all mergable, non-functional rule fields. These include all fields covered by the scalar diff array (`tags`, `references`, `new_terms_fields`, `threat_index`). We typically also consider multi-line string fields as mergeable but without three versions of the string, we are currently unable to merge the strings together, so we just return target version.\n - [x] We should pick the target version for all functional mergeable fields (e.g. `index`) and non-mergeable fields and return them as `SOLVABLE_CONFLICT`.\n\n\n### Screenshots\n\n\n**Callout on Rule details page w/ flyout button**\n\n\n---\n\n**Upgrade flyout now accessible from rule details page**\n\n\n---\n\n**Callout on rule editing page**\n\n\n---\n\n**Dismissible callout on rule management page**\n\n\n---\n\n**Callout in rule upgrade flyout when rule has missing base version**\n\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [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","sha":"461787bea6a48cc2c55514843adedc9ca5bb5032"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information