Skip to content

[Security Solution] Allow users to edit required_fields field for custom rules#180682

Merged
nikitaindik merged 73 commits intoelastic:mainfrom
nikitaindik:editable-required-fields
May 17, 2024
Merged

[Security Solution] Allow users to edit required_fields field for custom rules#180682
nikitaindik merged 73 commits intoelastic:mainfrom
nikitaindik:editable-required-fields

Conversation

@nikitaindik
Copy link
Copy Markdown
Contributor

@nikitaindik nikitaindik commented Apr 12, 2024

Resolves: #173594
Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5915

Summary

This PR adds an ability to add and edit custom rule's required fields. "Required fields" is an optional field that shows the user which Elasticsearch fields are needed for the rule to run properly. The values in "required fields" don't affect rule execution in any way. It's purely documentational, similar to "setup guide" and "investigation guide". This functionality is added to both rule creation and rule editing screens. It's available for all rule types except ML.

Scherm­afbeelding 2024-05-07 om 12 28 50

Details

The basic flow goes like this: first you specify your index patterns (or a data view), then you can set required fields for these index patterns. Once a user adds a required field and chooses its name, he can then choose its type from the dropdown. The first available type for the field name selected automatically. User can also add their own custom names and types.

Warnings

If a field that is not present in the selected index pattern, you will see a warning message.
This can happen in the following cases:

  • You have specified an index pattern, selected a required field from this index pattern, and then removed this index pattern.
  • The index doesn't yet exist. For example, you have installed a prebuilt rule but the data for it hasn't been ingested yet, so there's no index yet.
  • The index was removed.
  • The mappings for the index were changed and the field is no longer present.

In any of these cases, you'll see a general warning message above the form section. And then also a more specific warning message next to the field that is causing the issue.

ESQL and ML rules

Here's how available dropdown options are determined for different rule types:

For all rule types except ESQL and ML, we take the index patterns specified by the user and fetch their mappings. Then we use these fields and types to populate the dropdowns.

For ESQL rules we parse index patterns out of the query since there's no explicit index pattern form field. We then fetch the mappings for these index patterns and use them to populate the dropdowns.

For ML rules, we don't show "required fields" at all. ML rules are a special case.

  1. The concept of "required fields" is sort of handled during creation of the ML job itself, where the user specifies the fields that are required for the job to run.
  2. In the ML rule creation/editing interface, we don't display the index patterns a rule operates on. So, even if we allowed specifying required fields, the user would need to check the ML job details to see the index patterns the job uses.
  3. The ML job dropdown includes both existing and not-yet-created jobs. We can't get index patterns for jobs that don't exist yet, so we can't fill the dropdowns with fields and types.

Screenshots

screen1_ screen2_

@nikitaindik nikitaindik self-assigned this Apr 12, 2024
@nikitaindik nikitaindik added enhancement New value added to drive a business result Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. release_note:feature Makes this part of the condensed release notes Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team v8.14.0 labels Apr 12, 2024
@banderror banderror added Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Edit Security Solution Detection Rule Editing workflow and removed Feature:Rule Management Security Solution Detection Rule Management area labels Apr 13, 2024
@banderror banderror changed the title [Security Solution] DRAFT: Editable required fields [Security Solution] Allow users to edit required_fields field for custom rules Apr 13, 2024
@banderror banderror added v8.15.0 and removed v8.14.0 labels Apr 16, 2024
@banderror
Copy link
Copy Markdown
Contributor

@nikitaindik Can you give an update on the progress on this PR? Is anything blocking you from completing the test coverage and opening it for review?

@nikitaindik nikitaindik force-pushed the editable-required-fields branch 2 times, most recently from f32c820 to d47d40b Compare April 22, 2024 07:43
@nikitaindik
Copy link
Copy Markdown
Contributor Author

@banderror Sorry for the late reply. My plan is to wrap up the tests and open the PR for review today.

@nikitaindik nikitaindik force-pushed the editable-required-fields branch from d47d40b to 20c1645 Compare April 22, 2024 21:50
@nikitaindik
Copy link
Copy Markdown
Contributor Author

/ci

@nikitaindik nikitaindik force-pushed the editable-required-fields branch from 20c1645 to 8017f66 Compare April 23, 2024 06:22
@nikitaindik
Copy link
Copy Markdown
Contributor Author

/ci

@nikitaindik nikitaindik marked this pull request as ready for review April 23, 2024 06:55
@nikitaindik nikitaindik requested review from a team as code owners April 23, 2024 06:55
@jpdjere
Copy link
Copy Markdown
Contributor

jpdjere commented May 16, 2024

Exploratory testing

Tested and working as expected:

  • UI to add required fields works as expected, no noticeable bugs ✅
  • Fields appearing as options -with their expected types- when indexing documents into a single index that matches the selected index pattern ✅
  • Fields appearing as options when indexing documents into a multiple indices that match the selected index pattern(s) ✅
  • Fields appearing as options when selecting a Data View that contains the same indices from the previous point as before ✅
  • Warning displayed when:
    • You have specified an index pattern, selected a required field from this index pattern, and then removed this index pattern. ✅ (warning doesn't appear until another index pattern or data view is selected, but it's acceptable)
    • The index doesn't yet exist. For example, you have installed a prebuilt rule but the data for it hasn't been ingested yet, so there's no index yet. ✅
    • The index was removed. ✅
    • The mappings for the index were changed and the field is no longer present.
  • Different types of fields appear with correct icons in Rules Details ✅
  • Different types of fields appear with correct icons in Discover ✅
  • Creating a rule with required fields via API and editing required field via API is correctly reflected in new UI ✅

<EuiText style={{ width: POPOVER_WIDTH }} size="s">
<FormattedMessage
id="xpack.securitySolution.detectionEngine.ruleDescription.requiredFields.fieldRequiredFieldsHelpText"
defaultMessage="Choose the fields and data types needed for this rule to function. You can select the fields available in the rule's {source} index patterns or data view."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nikitaindik Here's some revised popover text, after our chat about custom fields. I also wanted to make it clearer that this is just informational — the user isn't actually configuring the rule's logic to require these fields, they're basically just documenting how the rule works.

Suggested change
defaultMessage="Choose the fields and data types needed for this rule to function. You can select the fields available in the rule's {source} index patterns or data view."
defaultMessage="Create an informational list of fields and data types this rule needs to function. Select fields in the rule's {source} index patterns or data view, or type in custom fields."

@nikitaindik nikitaindik enabled auto-merge (squash) May 17, 2024 09:51
@kibana-ci
Copy link
Copy Markdown

kibana-ci commented May 17, 2024

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5482 5492 +10

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lists 142.0KB 142.1KB +48.0B
securitySolution 15.1MB 15.1MB +13.4KB
total +13.4KB

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5405 +5405
total size - 8.8MB +8.8MB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 409.6KB 409.6KB +48.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 522 521 -1

Total ESLint disabled count

id before after diff
securitySolution 604 603 -1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @nikitaindik

@nikitaindik nikitaindik merged commit 6eeffd3 into elastic:main May 17, 2024
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label May 17, 2024
dplumlee added a commit that referenced this pull request Apr 18, 2025
…rule editing pages (#217254)

## Summary

Fixes #183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in #180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 18, 2025
…rule editing pages (elastic#217254)

## Summary

Fixes elastic#183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in elastic#180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 1b6376e)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 18, 2025
…rule editing pages (elastic#217254)

## Summary

Fixes elastic#183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in elastic#180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 1b6376e)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 18, 2025
…rule editing pages (elastic#217254)

## Summary

Fixes elastic#183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in elastic#180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 1b6376e)
kibanamachine added a commit that referenced this pull request Apr 18, 2025
…ce on rule editing pages (#217254) (#218671)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Fixes related integrations render performance on
rule editing pages
(#217254)](#217254)

<!--- 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-04-18T18:47:20Z","message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Security
Solution] Fixes related integrations render performance on rule editing
pages","number":217254,"url":"https://github.com/elastic/kibana/pull/217254","mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217254","number":217254,"mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Apr 18, 2025
…nce on rule editing pages (#217254) (#218670)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution] Fixes related integrations render performance on
rule editing pages
(#217254)](#217254)

<!--- 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-04-18T18:47:20Z","message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Security
Solution] Fixes related integrations render performance on rule editing
pages","number":217254,"url":"https://github.com/elastic/kibana/pull/217254","mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217254","number":217254,"mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Apr 18, 2025
…nce on rule editing pages (#217254) (#218669)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Solution] Fixes related integrations render performance on
rule editing pages
(#217254)](#217254)

<!--- 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-04-18T18:47:20Z","message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:fix","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[Security
Solution] Fixes related integrations render performance on rule editing
pages","number":217254,"url":"https://github.com/elastic/kibana/pull/217254","mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217254","number":217254,"mergeCommit":{"message":"[Security
Solution] Fixes related integrations render performance on rule editing
pages (#217254)\n\n## Summary\n\nFixes
https://github.com/elastic/kibana/issues/183607\n\nAdds logic to fix the
re-render performance issues caused by the related\nintegrations
component on the rule edit and creation pages. This copies\na strategy
used in #180682 to fix\na similar
issue with required fields. Related integrations component now\ndoesn't
re-render when there are updates to components that don't
affect\nit.\n\n#### React Profile while typing in query field
component\n![Screenshot 2025-04-04 at 8
12\n38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)\n\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] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"1b6376e9c9e09edb5b0e790bdccc7d14bd5801ca"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Davis Plumlee <56367316+dplumlee@users.noreply.github.com>
davismcphee pushed a commit to davismcphee/kibana that referenced this pull request Apr 22, 2025
…rule editing pages (elastic#217254)

## Summary

Fixes elastic#183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in elastic#180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…rule editing pages (elastic#217254)

## Summary

Fixes elastic#183607

Adds logic to fix the re-render performance issues caused by the related
integrations component on the rule edit and creation pages. This copies
a strategy used in elastic#180682 to fix
a similar issue with required fields. Related integrations component now
doesn't re-render when there are updates to components that don't affect
it.

#### React Profile while typing in query field component
![Screenshot 2025-04-04 at 8 12
38 PM](https://github.com/user-attachments/assets/9d3edcaa-4856-42df-9e6d-59bcc4785b5d)



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-security Create a Security Serverless Project enhancement New value added to drive a business result Feature:Rule Creation Security Solution Detection Rule Creation workflow Feature:Rule Edit Security Solution Detection Rule Editing workflow release_note:feature Makes this part of the condensed release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.15.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Security Solution] Allow users to edit required_fields field for custom rules