Skip to content

Implement functionality to add observables, procedures and custom fields to alerts for TheHive#207255

Merged
semd merged 29 commits intoelastic:mainfrom
brijesh-elastic:thehive_enhancement
Jun 19, 2025
Merged

Implement functionality to add observables, procedures and custom fields to alerts for TheHive#207255
semd merged 29 commits intoelastic:mainfrom
brijesh-elastic:thehive_enhancement

Conversation

@brijesh-elastic
Copy link
Contributor

@brijesh-elastic brijesh-elastic commented Jan 20, 2025

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

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • 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 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

@brijesh-elastic brijesh-elastic requested a review from a team as a code owner January 20, 2025 18:53
@github-actions
Copy link
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

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.

@kcreddy kcreddy added the Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// label Jan 21, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@kcreddy kcreddy added Feature:Cases Cases feature Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework labels Jan 21, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

@jcger
Copy link
Contributor

jcger commented Jan 27, 2025

Shouldn't this also be reviewed by someone in security? I thought we do not own this connector

@adcoelho adcoelho requested a review from semd January 27, 2025 15:38

useEffect(() => {
if (!xJson && inputTargetValue) {
if ((!xJson && inputTargetValue) || (xJson && inputTargetValue && inputTargetValue !== xJson)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a bit hard to understand, isn't it the same as:

Suggested change
if ((!xJson && inputTargetValue) || (xJson && inputTargetValue && inputTargetValue !== xJson)) {
if (inputTargetValue && (!xJson || xJson !== inputTargetValue)) {

Copy link
Member

Choose a reason for hiding this comment

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

Instead of changing this useEffect what about using the key prop in JsonEditorWithMessageVariables component?

For example:

<JsonEditorWithMessageVariables key={subActionsParams.template} />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

@semd semd left a comment

Choose a reason for hiding this comment

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

LGTM

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(),
Copy link
Member

Choose a reason for hiding this comment

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

This should be optional (nullable); otherwise, it may break rules with TheHive configured.

Copy link
Member

Choose a reason for hiding this comment

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

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 = [
Copy link
Member

Choose a reason for hiding this comment

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

If it is only used for tests better to be moved to the test files or to a mock.ts file. Same for testBodyOptions.

Copy link
Member

Choose a reason for hiding this comment

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

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)) {
Copy link
Member

Choose a reason for hiding this comment

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

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 ?? '{}');
Copy link
Member

@cnasikas cnasikas Jan 27, 2025

Choose a reason for hiding this comment

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

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]);
Copy link
Member

Choose a reason for hiding this comment

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

nit: we can remove the useMemo.

{
...alert,
body: isTest
? testBodyOptions[parseInt(e.target.value, 10)]
Copy link
Member

Choose a reason for hiding this comment

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

Why do we provide different values in test mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we are using a Mustache template in the body textarea.
So, we are providing testBodyOption to ensure the test page functions correctly.

Copy link
Member

Choose a reason for hiding this comment

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

Is it a product decision, or does TheHive throw an error if you send mustache variables instead of proper observable values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will throw an error.

@semd semd requested review from semd and removed request for semd January 27, 2025 16:02
RED = 4,
}
export enum TheHiveTemplate {
BUILD_YOUR_OWN = 'Build Your Own',
Copy link
Member

Choose a reason for hiding this comment

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

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-own
  • compromised-user-account-investigation
  • malicious-file-analysis
  • suspicious-network-activity

Maybe using an object instead of an enum would be easier to handle.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, its not necessary to provide template field in request body while using the API.

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

LGTM! My only concerns are a) that the isRuleSeverity is required (it should be nullable`) and b) we do not hide the rule severity toggle for the serverless release. I provided suggestions to aid you. After these changes we can merge.

source: schema.string(),
sourceRef: schema.string(),
severity: schema.nullable(schema.number({ defaultValue: TheHiveSeverity.MEDIUM })),
isRuleSeverity: schema.boolean(),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
isRuleSeverity: schema.boolean(),
isRuleSeverity: schema.nullable(schema.boolean({ defaultValue: false })),

({
tlp: 2,
severity: 2,
isRuleSeverity: true,
Copy link
Member

Choose a reason for hiding this comment

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

The value can be null. Better to remove it from here.

}}
/>
</EuiFormRow>
{!isTest && isRuleSeverity && (
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{!isTest && isRuleSeverity && (
{!isTest && Boolean(isRuleSeverity) && (

<EuiFormRow fullWidth>
<EuiSwitch
label={translations.IS_RULE_SEVERITY_LABEL}
checked={isRuleSeverity}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
checked={isRuleSeverity}
checked={Boolean(isRuleSeverity)}

/>
</EuiFormRow>
)}
{!isRuleSeverity && (
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{!isRuleSeverity && (
{!iBoolean(isRuleSeverity) && (

const logger = loggingSystemMock.createLogger();

describe('TheHive - renderParameterTemplates', () => {
it('should rendered subActionParams with variables', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a test where isRuleSeverity: false.

@brijesh-elastic brijesh-elastic requested a review from cnasikas June 18, 2025 13:32
@brijesh-elastic
Copy link
Contributor Author

Discussed with @cnasikas and @semd, decided to remove custom templates feature for this release.

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

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?

@brijesh-elastic
Copy link
Contributor Author

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.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #38 / core route timeouts idle socket should timeout if payload sending has too long of an idle period

Metrics [docs]

Async chunks

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

id before after diff
stackConnectors 624.9KB 627.8KB +2.9KB

History

@semd semd dismissed pmuellr’s stale review June 19, 2025 13:45

Already addressed

@semd semd merged commit 884e51a into elastic:main Jun 19, 2025
10 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/15759950221

@semd
Copy link
Contributor

semd commented Jun 19, 2025

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

semd pushed a commit to semd/kibana that referenced this pull request Jun 19, 2025
…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
![image
(35)](https://github.com/user-attachments/assets/d7a7b6c8-ae27-4ef4-8396-6625ddbd960c)
![image
(36)](https://github.com/user-attachments/assets/85314883-a2aa-4a9c-b1e3-ebdd9a5c3e29)

### 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
semd added a commit that referenced this pull request Jun 19, 2025
…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![image\n(35)](https://github.com/user-attachments/assets/d7a7b6c8-ae27-4ef4-8396-6625ddbd960c)\n![image\n(36)](https://github.com/user-attachments/assets/85314883-a2aa-4a9c-b1e3-ebdd9a5c3e29)\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![image\n(35)](https://github.com/user-attachments/assets/d7a7b6c8-ae27-4ef4-8396-6625ddbd960c)\n![image\n(36)](https://github.com/user-attachments/assets/85314883-a2aa-4a9c-b1e3-ebdd9a5c3e29)\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![image\n(35)](https://github.com/user-attachments/assets/d7a7b6c8-ae27-4ef4-8396-6625ddbd960c)\n![image\n(36)](https://github.com/user-attachments/assets/85314883-a2aa-4a9c-b1e3-ebdd9a5c3e29)\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>
cnasikas pushed a commit that referenced this pull request Jun 24, 2025
… 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>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 24, 2025
… 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)
kibanamachine added a commit that referenced this pull request Jun 24, 2025
…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>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request Jun 25, 2025
…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
![image
(35)](https://github.com/user-attachments/assets/d7a7b6c8-ae27-4ef4-8396-6625ddbd960c)
![image
(36)](https://github.com/user-attachments/assets/85314883-a2aa-4a9c-b1e3-ebdd9a5c3e29)



### 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>
akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request Jun 25, 2025
… 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>
florent-leborgne added a commit to florent-leborgne/kibana that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Actions/ConnectorTypes Issues related to specific Connector Types on the Actions Framework Feature:Cases Cases feature release_note:enhancement Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.