Implement functionality to add observables, procedures and custom fields to alerts for TheHive#207255
Conversation
|
A documentation preview will be available soon. Request a new doc build by commenting
If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here. |
|
Pinging @elastic/response-ops (Team:ResponseOps) |
|
Pinging @elastic/response-ops-cases (Feature:Cases) |
|
Shouldn't this also be reviewed by someone in security? I thought we do not own this connector |
|
|
||
| useEffect(() => { | ||
| if (!xJson && inputTargetValue) { | ||
| if ((!xJson && inputTargetValue) || (xJson && inputTargetValue && inputTargetValue !== xJson)) { |
There was a problem hiding this comment.
This is a bit hard to understand, isn't it the same as:
| if ((!xJson && inputTargetValue) || (xJson && inputTargetValue && inputTargetValue !== xJson)) { | |
| if (inputTargetValue && (!xJson || xJson !== inputTargetValue)) { |
There was a problem hiding this comment.
Instead of changing this useEffect what about using the key prop in JsonEditorWithMessageVariables component?
For example:
<JsonEditorWithMessageVariables key={subActionsParams.template} />
There was a problem hiding this comment.
I don't quite understand. Are you suggesting creating a new key prop? Regardless, we still need to change xJson (the internal state) to ensure it works properly.
| severity: schema.nullable(schema.number({ defaultValue: TheHiveSeverity.MEDIUM })), | ||
| tlp: schema.nullable(schema.number({ defaultValue: TheHiveTLP.AMBER })), | ||
| tags: schema.nullable(schema.arrayOf(schema.string())), | ||
| template: schema.number(), |
There was a problem hiding this comment.
This should be optional (nullable); otherwise, it may break rules with TheHive configured.
There was a problem hiding this comment.
Also, I think it is better to have keys (strings) instead of numbers. For users, using the API directly would make it easier to figure out which template they can use.
| }, | ||
| ]; | ||
|
|
||
| export const bodyOptions = [ |
There was a problem hiding this comment.
If it is only used for tests better to be moved to the test files or to a mock.ts file. Same for testBodyOptions.
There was a problem hiding this comment.
Ok, I saw they are being used for the component. Better to use a record with key-value pairs. It is very hard to understand what each value means and how it is being used.
|
|
||
| useEffect(() => { | ||
| if (!xJson && inputTargetValue) { | ||
| if ((!xJson && inputTargetValue) || (xJson && inputTargetValue && inputTargetValue !== xJson)) { |
There was a problem hiding this comment.
Instead of changing this useEffect what about using the key prop in JsonEditorWithMessageVariables component?
For example:
<JsonEditorWithMessageVariables key={subActionsParams.template} />
| connectorUsageCollector: ConnectorUsageCollector | ||
| ) { | ||
| const { body, template, ...restOfAlert } = alert; | ||
| const bodyJson = JSON.parse(body ?? '{}'); |
There was a problem hiding this comment.
Better to move the logic on a function outside of the component and use a try/catch in case of an error.
| } as unknown as ExecutorSubActionCreateAlertParams), | ||
| [actionParams.subActionParams] | ||
| ); | ||
| const isTest = useMemo(() => executionMode === ActionConnectorMode.Test, [executionMode]); |
There was a problem hiding this comment.
nit: we can remove the useMemo.
| { | ||
| ...alert, | ||
| body: isTest | ||
| ? testBodyOptions[parseInt(e.target.value, 10)] |
There was a problem hiding this comment.
Why do we provide different values in test mode?
There was a problem hiding this comment.
Because we are using a Mustache template in the body textarea.
So, we are providing testBodyOption to ensure the test page functions correctly.
There was a problem hiding this comment.
Is it a product decision, or does TheHive throw an error if you send mustache variables instead of proper observable values?
There was a problem hiding this comment.
Yes, it will throw an error.
| RED = 4, | ||
| } | ||
| export enum TheHiveTemplate { | ||
| BUILD_YOUR_OWN = 'Build Your Own', |
There was a problem hiding this comment.
Does this mean users must put Build Your Own when using the API? If yes, I think it is better for the keys to be:
build-your-owncompromised-user-account-investigationmalicious-file-analysissuspicious-network-activity
Maybe using an object instead of an enum would be easier to handle.
There was a problem hiding this comment.
No, its not necessary to provide template field in request body while using the API.
| source: schema.string(), | ||
| sourceRef: schema.string(), | ||
| severity: schema.nullable(schema.number({ defaultValue: TheHiveSeverity.MEDIUM })), | ||
| isRuleSeverity: schema.boolean(), |
There was a problem hiding this comment.
| isRuleSeverity: schema.boolean(), | |
| isRuleSeverity: schema.nullable(schema.boolean({ defaultValue: false })), |
| ({ | ||
| tlp: 2, | ||
| severity: 2, | ||
| isRuleSeverity: true, |
There was a problem hiding this comment.
The value can be null. Better to remove it from here.
| }} | ||
| /> | ||
| </EuiFormRow> | ||
| {!isTest && isRuleSeverity && ( |
There was a problem hiding this comment.
| {!isTest && isRuleSeverity && ( | |
| {!isTest && Boolean(isRuleSeverity) && ( |
| <EuiFormRow fullWidth> | ||
| <EuiSwitch | ||
| label={translations.IS_RULE_SEVERITY_LABEL} | ||
| checked={isRuleSeverity} |
There was a problem hiding this comment.
| checked={isRuleSeverity} | |
| checked={Boolean(isRuleSeverity)} |
| /> | ||
| </EuiFormRow> | ||
| )} | ||
| {!isRuleSeverity && ( |
There was a problem hiding this comment.
| {!isRuleSeverity && ( | |
| {!iBoolean(isRuleSeverity) && ( |
| const logger = loggingSystemMock.createLogger(); | ||
|
|
||
| describe('TheHive - renderParameterTemplates', () => { | ||
| it('should rendered subActionParams with variables', () => { |
There was a problem hiding this comment.
Let's add a test where isRuleSeverity: false.
cnasikas
left a comment
There was a problem hiding this comment.
Thanks for addressing our feedback. Code review only as the testing done by Security solution. LGTM! Could you please add an integration test in x-pack/platform/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/thehive.ts in your upcoming PR where you unhide the fields in the UI?
Yes, we'll add. |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
|
|
Starting backport for target branches: 8.19 https://github.com/elastic/kibana/actions/runs/15759950221 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…lds to alerts for TheHive (elastic#207255) ## Summary - Added a toggle to retain the severity from the rule. When enabled, alerts generated from the rule will inherit its severity; otherwise, users must manually select a severity level from the dropdown. - Added a template selection menu with predefined basic templates. These templates come with preset configurations, including observables and procedures, which automatically populate the Body field upon selection. Users also have the option to modify an existing template or create a custom one using the `Custom Template` option. ## Screenshots   ### Checklist - [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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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 - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 884e51a) # Conflicts: # docs/reference/connectors-kibana/thehive-action-type.md
…tom fields to alerts for TheHive (#207255) (#224591) # Backport This will backport the following commits from `main` to `8.19`: - [Implement functionality to add observables, procedures and custom fields to alerts for TheHive (#207255)](#207255) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brijesh Khunt","email":"123942796+brijesh-elastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-19T14:12:59Z","message":"Implement functionality to add observables, procedures and custom fields to alerts for TheHive (#207255)\n\n## Summary\n\n- Added a toggle to retain the severity from the rule. When enabled,\nalerts generated from the rule will inherit its severity; otherwise,\nusers must manually select a severity level from the dropdown.\n\n- Added a template selection menu with predefined basic templates. These\ntemplates come with preset configurations, including observables and\nprocedures, which automatically populate the Body field upon selection.\nUsers also have the option to modify an existing template or create a\ncustom one using the `Custom Template` option.\n\n## Screenshots\n\n\n\n\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"884e51ae492c7fd8d5e855fab27947d119bb2b5b","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:ResponseOps","Feature:Cases","Feature:Actions/ConnectorTypes","backport:version","v9.1.0","v8.19.0"],"title":"Implement functionality to add observables, procedures and custom fields to alerts for TheHive","number":207255,"url":"https://github.com/elastic/kibana/pull/207255","mergeCommit":{"message":"Implement functionality to add observables, procedures and custom fields to alerts for TheHive (#207255)\n\n## Summary\n\n- Added a toggle to retain the severity from the rule. When enabled,\nalerts generated from the rule will inherit its severity; otherwise,\nusers must manually select a severity level from the dropdown.\n\n- Added a template selection menu with predefined basic templates. These\ntemplates come with preset configurations, including observables and\nprocedures, which automatically populate the Body field upon selection.\nUsers also have the option to modify an existing template or create a\ncustom one using the `Custom Template` option.\n\n## Screenshots\n\n\n\n\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"884e51ae492c7fd8d5e855fab27947d119bb2b5b"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207255","number":207255,"mergeCommit":{"message":"Implement functionality to add observables, procedures and custom fields to alerts for TheHive (#207255)\n\n## Summary\n\n- Added a toggle to retain the severity from the rule. When enabled,\nalerts generated from the rule will inherit its severity; otherwise,\nusers must manually select a severity level from the dropdown.\n\n- Added a template selection menu with predefined basic templates. These\ntemplates come with preset configurations, including observables and\nprocedures, which automatically populate the Body field upon selection.\nUsers also have the option to modify an existing template or create a\ncustom one using the `Custom Template` option.\n\n## Screenshots\n\n\n\n\n\n### Checklist\n\n- [x] Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [x] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"884e51ae492c7fd8d5e855fab27947d119bb2b5b"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brijesh Khunt <123942796+brijesh-elastic@users.noreply.github.com>
… UI (#224669) ## Summary - This PR unhides rule severity toggle and body jsoneditor in UI. (kept hidden in PR : #207255 ) - Add functional test related to `createAlert` subaction. - Remove unused variables from `translations.ts`. - Remove the custom template description from documentation. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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 - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
… UI (elastic#224669) ## Summary - This PR unhides rule severity toggle and body jsoneditor in UI. (kept hidden in PR : elastic#207255 ) - Add functional test related to `createAlert` subaction. - Remove unused variables from `translations.ts`. - Remove the custom template description from documentation. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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 - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit de031df)
…itor in UI (#224669) (#225023) # Backport This will backport the following commits from `main` to `8.19`: - [[Connector][TheHive] Show rule severity toggle and body jsoneditor in UI (#224669)](#224669) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brijesh Khunt","email":"123942796+brijesh-elastic@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-24T08:53:46Z","message":"[Connector][TheHive] Show rule severity toggle and body jsoneditor in UI (#224669)\n\n## Summary\n\n- This PR unhides rule severity toggle and body jsoneditor in UI. (kept\nhidden in PR : #207255 )\n- Add functional test related to `createAlert` subaction.\n- Remove unused variables from `translations.ts`.\n- Remove the custom template description from documentation. \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\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"de031df3f60e0cc3e231091e1f918f4f391b6c48","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0"],"title":"[Connector][TheHive] Show rule severity toggle and body jsoneditor in UI","number":224669,"url":"https://github.com/elastic/kibana/pull/224669","mergeCommit":{"message":"[Connector][TheHive] Show rule severity toggle and body jsoneditor in UI (#224669)\n\n## Summary\n\n- This PR unhides rule severity toggle and body jsoneditor in UI. (kept\nhidden in PR : #207255 )\n- Add functional test related to `createAlert` subaction.\n- Remove unused variables from `translations.ts`.\n- Remove the custom template description from documentation. \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\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"de031df3f60e0cc3e231091e1f918f4f391b6c48"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/224669","number":224669,"mergeCommit":{"message":"[Connector][TheHive] Show rule severity toggle and body jsoneditor in UI (#224669)\n\n## Summary\n\n- This PR unhides rule severity toggle and body jsoneditor in UI. (kept\nhidden in PR : #207255 )\n- Add functional test related to `createAlert` subaction.\n- Remove unused variables from `translations.ts`.\n- Remove the custom template description from documentation. \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\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n- [x]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials\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- [x] If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n- [x] This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.\n- [ ] [Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed\n- [ ] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"de031df3f60e0cc3e231091e1f918f4f391b6c48"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brijesh Khunt <123942796+brijesh-elastic@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…lds to alerts for TheHive (elastic#207255) ## Summary - Added a toggle to retain the severity from the rule. When enabled, alerts generated from the rule will inherit its severity; otherwise, users must manually select a severity level from the dropdown. - Added a template selection menu with predefined basic templates. These templates come with preset configurations, including observables and procedures, which automatically populate the Body field upon selection. Users also have the option to modify an existing template or create a custom one using the `Custom Template` option. ## Screenshots   ### Checklist - [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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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 - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
… UI (elastic#224669) ## Summary - This PR unhides rule severity toggle and body jsoneditor in UI. (kept hidden in PR : elastic#207255 ) - Add functional test related to `createAlert` subaction. - Remove unused variables from `translations.ts`. - Remove the custom template description from documentation. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [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 - [x] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Added a toggle to retain the severity from the rule. When enabled, alerts generated from the rule will inherit its severity; otherwise, users must manually select a severity level from the dropdown.
Added a textarea field for the body, in which users can add observables and procedures using Mustache templates.
Screenshots
Checklist
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelines