Commit graph

87501 commits

Author SHA1 Message Date
Pablo Machado
5363883a8d
[SecuritySolution] Create PrivMon index import flow (#224822)
Depends on https://github.com/elastic/kibana/pull/221610

This PR adds the import index workflow to privileged user monitoring and
API changes required to support it.

### API Enhancements

* **New API for privilege monitoring index creation**: Added a new API
endpoint (`PUT /api/entity_analytics/monitoring/privileges/indices`) to
create indices for privilege monitoring with support for `standard` and
`lookup` modes. This includes the implementation of request and response
schemas (`create_indidex.gen.ts`, `create_indidex.schema.yaml`).
[[1]](diffhunk://#diff-68329bb90dea945f343e1637990d5d05bc159e0aa2511ef1e45d37ed1a6cda51R1-R41)
[[2]](diffhunk://#diff-e979499654a27b3c1930d63c5b1002113c1c3f53f84ce27a4d75a5c492717a96R1-R42)
* **Updated privilege monitoring health response**: Modified the health
response schema to include a `status` field and an optional `error`
object for detailed error handling
(`privilege_monitoring/health.gen.ts`,
`privilege_monitoring/health.schema.yaml`).
[[1]](diffhunk://#diff-00f39a3e65a336eaddf7d3203d1370d910f5ecd2062b6cc21d9c06922c12884eR19-R28)
[[2]](diffhunk://#diff-83afa72b7a1fc48f3cc063e9fb855190d3525228bc0488fb8b871e112b90e961L22-R33)

### Frontend Integration

* **Introduce the create index modal that opens when the create index
button is clicked.
* **Onboarding modal improvements**: Updated the `AddDataSourcePanel`
component to handle index creation more robustly by passing callbacks to
the modal (`add_data_source.tsx`).
* **Error handling in UI**: Enhanced the `PrivilegedUserMonitoring`
component to display error callouts when privilege monitoring data fails
to load (`privileged_user_monitoring/index.tsx`).
[[1]](diffhunk://#diff-273ad32c97dcf15c6c6054fd7c5516d587132674578d25986b235cd174c75789R22-R26)
[[2]](diffhunk://#diff-273ad32c97dcf15c6c6054fd7c5516d587132674578d25986b235cd174c75789R38-R51)

### How to test it?
* Go to the priv mon page with an empty cluster
* Click on the data source by the index button
* Search for available indices, it should return indices with
`user.name.keyword` fields
* Click 'create index' and create a new index 
* Choose the created index and click 'Add privileged users'
* You should be redirected to the dashboard (The API is currently not
working)




### 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)
- [ ]
[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
- [ ] 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)
- [ ] 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
- [x] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-24 10:09:06 +01:00
Bailey Cash
7da827e8d9
[Incident management] Callout for alerts that triggered around the same time (#223473)
## Summary

Implements #213020
Partially implements filter bar seen with #213015


This PR adds a callout on the alert details page to encourage users to
visit the related alerts page when at least one alert was triggered
within 30 minutes of the current alert. If no alerts were triggered, the
message remains without a call to action.


https://github.com/user-attachments/assets/23b2d3e9-353b-45e1-a007-d188db5617fc



## Testing

The related alert query usually find alerts that were raised within a
day of each other. To find alerts that were raised within a few minutes,
try creating an SLO with a chosen groupBy field that will easily violate
a burn rate rule. Alerts should be triggered for each instance within
seconds. Once the filter is executed, these alerts should appear without
alerts that were triggered earlier in the day.
2025-06-24 11:03:20 +02:00
Maxim Palenov
a3e4c2e770
[Security Solution] Rectify prebuilt rules export test plan (#222796)
**Addresses:** https://github.com/elastic/kibana/issues/202079

## Summary

This PR aligns prebuilt rules export test plan with the rest test plans. It doesn't include functional changes.
2025-06-24 10:58:08 +02:00
Brijesh Khunt
de031df3f6
[Connector][TheHive] Show rule severity toggle and body jsoneditor in 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>
2025-06-24 11:53:46 +03:00
Brijesh Khunt
d34c993226
[Connector][XSOAR] Enable XSOAR connector in the UI (#224845)
## Summary

This PR removes the `hideInUI` flag for XSOAR connector.

### 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.
- [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)
2025-06-24 11:53:34 +03:00
Dzmitry Lemechko
539007f65a
[ska] create platform shared package for Cypress test helpers (#224361)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR adds `kbn/cypress-test-helper` as platform shared package to
replace invalid imports from private `security-solution` plugin in
platform shared plugin `osquery`.

The reason is that we are **currently blocked with x-pack relocation due
to circular dependency**, e.g. in
https://github.com/elastic/kibana/pull/223897

```

info starting [tsc] > node_modules/typescript/bin/tsc -b tsconfig.refs.json --pretty
--
  | 2025-06-13 13:17:30 UTC | proc [tsc] error TS6202: Project references may not form a circular graph. Cycle detected: /opt/buildkite-agent/builds/bk-agent-prod-gcp-1749820368903967112/elastic/kibana-pull-request/kibana/tsconfig.refs.json
  | 2025-06-13 13:17:30 UTC | proc [tsc] /opt/buildkite-agent/builds/bk-agent-prod-gcp-1749820368903967112/elastic/kibana-pull-request/kibana/x-pack/platform/plugins/shared/osquery/cypress/tsconfig.type_check.json
  | 2025-06-13 13:17:30 UTC | proc [tsc] /opt/buildkite-agent/builds/bk-agent-prod-gcp-1749820368903967112/elastic/kibana-pull-request/kibana/x-pack/test_serverless/tsconfig.type_check.json
  | 2025-06-13 13:17:30 UTC | proc [tsc] /opt/buildkite-agent/builds/bk-agent-prod-gcp-1749820368903967112/elastic/kibana-pull-request/kibana/x-pack/solutions/security/test/tsconfig.type_check.json
  | 2025-06-13 13:17:30 UTC | proc [tsc] /opt/buildkite-agent/builds/bk-agent-prod-gcp-1749820368903967112/elastic/kibana-pull-request/kibana/x-pack/test/security_solution_endpoint/tsconfig.type_check.json
```

**Important:**
This PR focuses only on replacing test helpers imports from
`@kbn/security-solution-plugin` and `@kbn/test-suites-xpack` in
`osquery` plugin, no code cleanup and updates in other plugins / test
packages.
We expect code owners to update other imports / refactor package to
avoid code duplication

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-06-24 10:51:12 +02:00
Panagiota Mitsopoulou
1c359dc1d8
add label to SLO settings switch (#224842)
Fixes https://github.com/elastic/kibana/issues/222561

The label for the switch on the SLO settings page was missing. I added
`label` and `ariaLabel` and here's the result:

<img width="500" alt="Screenshot 2025-06-23 at 13 45 44"
src="https://github.com/user-attachments/assets/ce1978cb-e063-4013-9a5d-741cdabb365a"
/>

## How to test
In order to test open Voice Over (Cmd + F5) and then use `Tab` button to
move to the `Use all remote clusters` switch.
2025-06-24 11:49:32 +03:00
Abdul Wahab Zahid
5a6f844c01
[Dataset Quality] Fix ES Promotion forward compatibility test failures for ES 9.0 (#224786)
The PR skips test suites for ES 9.0.* which were failing when these
tests ran in Kibana 8.19 branch against ES 9.0.* in forward
compatibility runs.
2025-06-24 10:39:44 +02:00
Pablo Machado
85ba63638b
[SecuritySolution][PrivMon] Rewrite dashboard queries to use FORK (#223212)
## Summary


### What is included?
* Improves the auth dashboard to display system events
* Add data view index patterns as visualisations index
* Move ESQL query generation to a shared folder
* Parse ESQL query and validate if fields exist in the dataview
* Rewrite the ESQL query if a FORK command has missing fields
* Add a visualisation warning message when there is no valid FORK branch

![Screenshot 2025-06-20 at 07 22
47](https://github.com/user-attachments/assets/3ff85561-33b6-4f40-8037-4e983d6e4057)


### Pros
* To be able to render parts of the query depending on whether indices
or fields exist in the cluster
* The queries become much easier to read, maintain and fix

### Cons
* We need to test the performance
* FORK is in tech preview
* The commands we can use in a fork are limited to “WHERE, LIMIT, SORT,
EVAL, STATS, DISSECT”

### How to test it?
* Open the dashboard without privmon data, some of the visualisations
should display the warning message
* Add privmon data, the visualisation should display the data
(https://github.com/elastic/security-documents-generator/pull/163)
* Check if the visualisation displays the correct data.
* To test if the FORK rewrite logic is working, I update the queries on
my local environment to use a non-existent field and update the page.


### 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] [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
- [ ] 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)
2025-06-24 10:39:03 +02:00
Stratoula Kalafateli
0404a6d965
[ES|QL] Functions definitions updates (#224993)
## Summary

I had to run it manually due to this ES change
https://github.com/elastic/elasticsearch/pull/129839
2025-06-24 10:24:52 +02:00
Jean-Louis Leysens
726908a913
[Http] Prevent the internal HttpService being used in tests outside Core (#223238)
## Summary

Objective: avoid exposing the entire API surface area of `HttpService`
(and it's internal preboot/setup/start contracts) to test code outside
core.

* Refactor the `createHttpService -> createInternalHttpService` mock
test helper moved to scoped folder
`./src/core/server/integration_tests/utilities`
* Create an "integration test ready" version of the original
`createHttpService` for plugins to use from
`@kbn/core-http-server-mocks`
* Clean up some types
* Refactor the 2 plugin test usages of the internal `HttpService`

### Notes

* We have been exposing this surface area already in
`src/core/packages/http/server-mocks/src/http_service.mock.ts`. But it
seems to not have a adoption outside Core code... I wonder if we need a
concept of `mock-internal`?
* I don't think this is a **massive** issue, I just happened to realise
this when [messing
around](https://github.com/elastic/kibana/pull/222956) with an
`HttpService` related refactor. Would be nice to not leak more
information about internal code than necessary (it's clearly too late
for that, but maybe we can improve the situation for HttpService a bit).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-24 10:09:16 +02:00
Maryam Saeidi
970cad1f18
[UI Errors] Change errorType label to error_type (#224668)
## Summary

When checking the Overview cluster, I noticed that we previously had
`labels.error_type` in APM. In this PR, I changed the label that I've
added in the following PRs for fatal react errors and toast errors to
use `labels.error_type` instead of `labels.errorType` for consistency.

- Toast error: https://github.com/elastic/kibana/pull/217948
- Fatal react error: https://github.com/elastic/kibana/pull/218846
2025-06-24 10:03:38 +02:00
Luke Gmys
3cc4fb702d
[Security Solution][Sourcerer] Fix cell actions for DV manager (#224812)
## Summary

Prior to this change, with data view manager feature flag enabled, we
would only see the "expand" cell action in the alerts. Now,
all the actions should be visible. This was because cell actions
rendering was unintentinally omitted in the initial batch of changes
that added data view sourcing from the new store / hooks.

fixes https://github.com/elastic/security-team/issues/12853

### Testing

```
xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']
```

then navigate to alerts page, hovering on timeline cell for example
should render full set of hover actions.

### 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
2025-06-24 09:53:08 +02:00
Luke Gmys
ba6b874181
[Security Solution][Sourcerer] Fix timeline filters for DV manager (#224834)
## Summary

Filters we applied but no listed in the timeline, again - some mismatch
in how the data view object was passed around.

## Testing

Set the feature flag:

```
xpack.securitySolution.enableExperimental: ['newDataViewPickerEnabled']
```
Then, adding a filter via cell action should render the correct pill in
the top level filters pane.


### Checklist

Check the PR satisfies following conditions. 
- [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
2025-06-24 09:52:23 +02:00
Robert Stelmach
36cbbb9bf8
[Dataset Quality] Indicate if failure store isn't enabled for data stream (#221644)
Added a tooltip and a link with documentation for Failed docs column
when dataset does not have failure store enabled.



https://github.com/user-attachments/assets/be65db9a-15c8-4087-b175-752b2fabab6e




For now it awaits for the documentation PR to be merged :
https://github.com/elastic/docs-content/pull/1368

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
2025-06-24 09:49:36 +02:00
José Luis González
853c4bde73
[Search][Query Rules UI] Empty state assets rendering based on colorMode (#224853)
## Summary

Providing different assets for rendering proper composition for Dark and
Light modes:

Light mode:

![CleanShot 2025-06-23 at 13 12
04@2x](https://github.com/user-attachments/assets/adaabe3b-a723-4f48-b0ef-fedbbfb315c4)

Dark mode:

![CleanShot 2025-06-23 at 13 11
44@2x](https://github.com/user-attachments/assets/052578a3-6def-4e31-8705-157a559d68a8)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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)
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-06-24 09:31:32 +02:00
Sonia Sanz Vivas
ff10d70e0f
Fix problem with validation (#224961)
## Summary
Recently, an alarm was fired in the Kibana Serverless Slack Channel due
a problem with Data Usage. Issue explanation:

> Kibana's data_usage plugin allows collecting misc stats about Kibana
usage.
> The browser side performs requests to /internal/api/data_usage/*,
providing stats related to the user interaction with the UI.
> Recently, in an internal customer project, on production, one of these
requests (POST /internal/api/data_usage/metrics) contained a payload
that was deemed invalid by the server-side validation logic.
> 
> The handler on that endpoint logged an error message.
> This error message was spotted by a Rule.
> Consequently, the rule fired an alert in our Slack channel.
> 
> We shouldn't have invalid payloads coming from browser side, so unless
someone intentionally tampered with the HTTP request, this indicates a
bug in our browser-side logic.
> Customer Impact: This was an isolated error on an internal project,
but other folks within Elastic have spotted the same error message in
their projects. Due to that error, we might be missing a few data_usage
metrics.

The issue was caused because the plugin validation was waiting for an
array for the data property, but the payload from the API was returning
`null`. The validation was incorrect in the Kibana side since only
[name](https://github.com/elastic/autoops-services/blob/master/monitoring/service/specs/serverless_project_metrics_api.yaml#L189)
is mandatory.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-24 09:24:38 +02:00
Antonio
e566fec14b
[ResponseOps] Cases analytics index (#223405)
This PR is for a feature branch that is being merged into main.

The relevant PRs are:
- https://github.com/elastic/kibana/pull/219211
- https://github.com/elastic/kibana/pull/222820
- https://github.com/elastic/kibana/pull/223241
- https://github.com/elastic/kibana/pull/224388
- https://github.com/elastic/kibana/pull/224682

## Summary

This PR adds 4 new indexes with case analytics data, which are created
when the cases plugin starts.

  - `.internal.cases`
  - `.internal.cases-comments`
  - `.internal.cases-attachments`
  - `.internal.cases-activity`

After the indexes are created, a backfill task for each of them is
scheduled to run 1 minute after creation. This task populates the
indexes with relevant data from `.kibana_alerting_cases`.

A second type of task is registered, the index synchronization task.
Four of these tasks, one for each index, are scheduled to run every 5
minutes. The synchronization tasks populated the indexes with data from
`.kibana_alerting_cases` that was created or updated in the last five
minutes.

## How to test

You might want to start Kibana with `--verbose` to see relevant index
messages in the console.

Alternatively(what I normally do), is go to `analytics_index.ts`,
`backfill_task_runner.ts`, and `synchronization_task_runner.ts`, and
change the `logDebug` function to call `this.logger.info` instead. This
way, you will have less spam in the console.

Every log message starts with the index name between square brackets, so
you can look for `[.internal.cases-` and follow what is happening.

1. You should have some existing case data, so before anything else,
please create some activity, attachments, etc.
2. Add `xpack.cases.analytics.index.enabled: true` to `kibana.dev.yml`
and restart Kibana.
3. Check out [this
branch](https://github.com/elastic/elasticsearch/pull/129414) from the
ES project.
4. Start Elastic Search with `yarn es source`. This will use the above
version of Elasticsearch.
5. Wait a bit for the indexes to be created and populated(backfilled).
6. Using the dev tools:
    - Confirm the indexes exist.
- Check the index mapping. Does it match the one in the code? Is the
`_meta` field correct?
-
`x-pack/platform/plugins/shared/cases/server/cases_analytics/******_index/mappings.ts`
    - Check that the painless scripts match the code.
-
`x-pack/platform/plugins/shared/cases/server/cases_analytics/******_index/painless_scripts.ts`
- Confirm your existing case data is in the indexes. (See **Queries**
section below.)
7. Play around with cases. Some examples:
    - Create a case
    - Change status/severity
    - Attach alerts
    - Add files
    - Change category/tags
    - Add comments
    - etc
8. Go to the dev tools again and confirm all this shows up in the
relevant indexes. (See **Queries** section below.)

## Queries

In addition to the ones, below I have a few more. Things like reindexing
with specific scripts or fetching relevant data from
`.kibana_alerting_cases`. Ping me if you want those queries.

### Checking index content
```
GET /.internal.cases/_search
GET /.internal.cases-comments/_search
GET /.internal.cases-attachments/_search
GET /.internal.cases-activity/_search
```

### Checking index mappings
```
GET /.internal.cases
GET /.internal.cases-comments
GET /.internal.cases-attachments
GET /.internal.cases-activity
```

### Fetching the painless scripts
```
GET /_scripts/cai_cases_script_1
GET /_scripts/cai_attachments_script_1
GET /_scripts/cai_comments_script_1
GET /_scripts/cai_activity_script_1
```

### Emptying the indexes

It is sometimes useful for testing.
```
POST /.internal.cases/_delete_by_query
POST /.internal.cases-comments/_delete_by_query
POST /.internal.cases-attachments/_delete_by_query
POST /.internal.cases-activity/_delete_by_query
```

### Deleting the indexes

It is sometimes useful for testing.
```
DELETE /.internal.cases
DELETE /.internal.cases-comments
DELETE /.internal.cases-attachments
DELETE /.internal.cases-activity
```

## Release notes

Four dedicated case analytics indexes were created, allowing users to
build dashboards and metrics over case data. These indexes are created
on Kibana startup and updated periodically with cases, comments,
attachments, and activity data.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2025-06-24 08:46:32 +02:00
Julia Bardi
c989634a81
[Fleet] Update query in delete unenrolled agents task (#224808)
## Summary

Issue reported by users that some unenrolled agents on the UI are not
being deleted by the background task.
The cause turned out to be a discrepancy in how unenrolled agents are
determined on the UI versus the background task.

The UI shows agents as unenrolled if `active:false` field matches (logic
[here](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/server/services/agents/build_status_runtime_field.ts#L115-L119))

The delete unenrolled agents task also queried on the existence of
`unenrolled_at` field.
It seems some agents don't have this field set, those should be deleted
too.
2025-06-24 08:43:39 +02:00
Ignacio Rivas
0176ea941b
[Index Management] Remove doc link from failure store configuration modal (#224941) 2025-06-24 08:26:10 +02:00
Kibana Machine
8771e7f18b
[api-docs] 2025-06-24 Daily api_docs build (#224989)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1113
2025-06-24 07:10:32 +01:00
Alberto Blázquez
9b5cf91062
[Cloud Security] [Graph Vis] Implement UI enhancements (#222830)
## Summary

Closes:
- https://github.com/elastic/kibana/issues/222367

Enhance graph visualization UI with latest Figma update.

### Screenshots

<details><summary>Popover</summary>
<img width="370" alt="Screenshot 2025-06-12 at 10 21 50"
src="https://github.com/user-attachments/assets/8060860e-5b93-4d71-b330-1920afb75c6a"
/>
</details> 

<details><summary>Controls</summary>
<img width="63" alt="Screenshot 2025-06-11 at 17 36 27"
src="https://github.com/user-attachments/assets/78b93528-1821-4d77-9536-eb88fd68e3dc"
/>
</details>

<details><summary>Edges - new color, default to solid stroke, no start
marker</summary>
<img width="1078" alt="Screenshot 2025-06-12 at 17 22 25"
src="https://github.com/user-attachments/assets/53b46adb-2b79-4c65-ba48-9c74826f2fb0"
/>
</details>

### Videos

#### Snap nodes to 10px grid


https://github.com/user-attachments/assets/fc732784-1e3b-4277-9bf3-d7a6c9b43f88

#### Zoom / Fit to view transition


https://github.com/user-attachments/assets/8a7627c0-7c00-4321-a05c-ea9fa1910002

### Definition of done

- [x] Update popover container
- [x] Update popover action icons
- [x] Update popover action texts
- [x] Update fit-to-view icons
- [x] Update relationship arrow colors
- [x] Check if we can increase the current nodes limit - increased to
300
- [x] Snap to Grid: Enable nodes to snap by 10px
- [x] Implement smooth zoom and fit-to-view transitions (200ms duration)
- [x] Remove edge's start marker
- [x] Remove failure representation according to `event.outcome`

### How to test - In Kibana

1. Add this line to your `kibana.dev.yml`:

    ```yml
    uiSettings.overrides.securitySolution:enableGraphVisualization: true
    ```

2. Then, run these 2 commands while running Kibana with `yarn start
--no-base-path`. This is for setting up the local env with data.

    ```bash
node scripts/es_archiver load
x-pack/solutions/security/test/cloud_security_posture_functional/es_archives/logs_gcp_audit
--es-url http://elastic:changeme@localhost:9200 --kibana-url
http://elastic:changeme@localhost:5601
    ```

    ```bash
node scripts/es_archiver load
x-pack/solutions/security/test/cloud_security_posture_functional/es_archives/security_alerts
--es-url http://elastic:changeme@localhost:9200 --kibana-url
http://elastic:changeme@localhost:5601
    ```

3. Finally in Kibana, go to Alerts and update the date-picker to include
data from a year ago. Then check one of the alerts details opening the
right-side flyout and find the "Graph preview" section in it.

### How to test - In Storybook

1. Run in terminal:

    ```bash
    yarn storybook cloud_security_posture_graph
    ```

2. Open [http://localhost:9001/](http://localhost:9001/).

### 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)
- [ ]
[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
- [ ] 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
- [x] 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)

### Identify risks

No risk, feature is gated under the
`securitySolution:enableGraphVisualization` UI setting.

---------

Co-authored-by: Kfir Peled <61654899+kfirpeled@users.noreply.github.com>
Co-authored-by: Kfir Peled <kfir.peled@elastic.co>
2025-06-24 07:46:38 +03:00
Ahmad Bamieh
1d6a439448
[i18n] Integrate 9.0.2 Translations (#224788)
Integrating latest translations extracted from main branch.
Skipping backports from main to target branches since the `i18n_check`
might trim unused translations that are still used in different
branches. Integration script is ran against each target branch
separately.
2025-06-24 03:00:18 +01:00
Jatin Kathuria
fbec7db5b0
[Security Solution] Discover Security Profile Changes + Event timeline redirection (#204756)
## Summary

This PR customized Discover's Security Root Profile with 3 new changes.
\

With this change Discover's Security profile ceases to be
`experimental`. Below are the changes listed one in this profile.

>[!Note]
> This change also removes the Flyout changes that were added for
security solution to the Discover's security profile.


### Row Indicators.

Adds row indicators based on Alert or an event as shown in the
screenshot below. Note the highlights on the left of the row.

`Yellow` for Alerts.
`Gray` for Events.


![image](https://github.com/user-attachments/assets/697bafe9-3c45-4926-9b00-4bf6453e70eb)

### Default list of Columns.

Adds the list of default columns that should appear when security
profile is activated.


![image](https://github.com/user-attachments/assets/71647f3e-37da-4fab-b350-baa567b7e9bd)

### Explore in Security Flyout.

As shown the demo below, this action explores and event or an alert in
security solution as shown in the screenshot below.




https://github.com/user-attachments/assets/4c228bb1-60af-433b-8e8f-1a5d4d049985









### 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/packages/kbn-i18n/README.md)
- [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

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2025-06-24 01:39:29 +01:00
Gonçalo Rica Pais da Silva
1c2995447f
[Discover][APM] Fix Duration widget & Trace summary for unprocessed OTEL spans (#224697)
## Summary

This PR fixes some code paths/requests for calculating Duration
histograms and Trace summaries to account for unprocessed OTEL data. It
isn't the nicest way of doing things, because deep in APM, there is of
course an assumption that data is being dealt with in ECS format.
Probably longer term, this should be refactored, but this at least adds
in support for unprocessed OTEL for the duration widget.

![Screenshot 2025-06-20 at 15-31-29 Discover -
Elastic](https://github.com/user-attachments/assets/2ffc4769-bc87-42e4-ae38-409bf320cf85)

Related to #221521

## How to test

* Add the following to your `kibana.dev.yml` file:
```yaml
discover.experimental.enabledProfiles:
  - observability-traces-data-source-profile
  - observability-traces-transaction-document-profile
  - observability-traces-span-document-profile
```
* Set up a source of unprocessed OTEL data to feed into ES (Open
telemetry demo, etc)
* Set your space to Observability mode, and go to Discover.
* Query for `traces-*` and open any record for the document viewer
* The Span Overview waterfall should show the duration histogram that
match the document's formatted duration in the Table/JSON tabs, as well
as the trace summary information (trace id & span name)

---------

Co-authored-by: Milosz Marcinkowski <38698566+miloszmarcinkowski@users.noreply.github.com>
2025-06-23 21:28:54 -03:00
Steph Milovic
63134aa8eb
[Security solution] Add github label for evals for prompt changes (#224488) 2025-06-23 17:25:05 -06:00
Lisa Cawley
f0b862f113
Update codeowners for oas_docs (#224325) 2025-06-23 23:56:31 +01:00
Davis McPhee
21a288a097
[Data Discovery] Remove SO client usages (#224495)
## Summary

While checking out our remaining browser SO client usages, I realized it
would be _really_ easy to get rid of them. This PR does that.

Resolves #224357.

### Checklist

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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)
- [ ] 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-23 19:51:27 -03:00
Michel Losier
b929ec2efc
Catch remote synced integration status non-http errors (#224942)
Closes: https://github.com/elastic/kibana/issues/220954
`fleet/remote_synced_integrations/<output-id>/remote_status` includes
non-http request errors in the error field of the status response for
improved client handling.
2025-06-23 15:41:26 -07:00
Tiago Costa
5d24786f68
skip flaky suite (#222257) 2025-06-23 22:55:58 +01:00
Tiago Costa
daa036f0d5
skip flaky suite (#224780) 2025-06-23 22:51:21 +01:00
Edgar Santos
e585c2223d
Add UI for bulk fill gaps (#224585)
## Summary

This draft PR adds the UI to bulk gap filling gaps. This action can be
triggered from the "rules management" table as well as from the gaps
table in the "execution results" tab for any rule.

# How to test
Make sure your `kibana.dev.yaml` contains the following feature flags:
`storeGapsInEventLogEnabled` and `bulkFillRuleGapsEnabled`.

You can just paste this string in the file:
```
xpack.securitySolution.enableExperimental: [ 'storeGapsInEventLogEnabled', 'bulkFillRuleGapsEnabled' ]
```
## Bulk gap filling from the "rules management" table
1. Generate 100 rules, each with 1000 gaps using [this
tool](https://github.com/elastic/security-documents-generator).
`yarn start rules --rules 100 -g 1000 -c -i"5m"`
2. Navigate to the rules management table at
`/app/security/rules/management`
3. Select some rules, click on "Bulk actions" and then on "Fill gaps"

![image](https://github.com/user-attachments/assets/f5d9bcb6-9139-43cb-b023-f1f63a9b8b7a)
4. Select the time window and click on "Run"

![image](https://github.com/user-attachments/assets/0269d00a-2750-4b2d-975e-0ebfbac27e16)
5. You should see a confirmation toast showing that 3 rules were
successfully scheduled

![image](https://github.com/user-attachments/assets/9800c9e2-3c3e-4b87-96e4-17c84f1b024a)
6. Click on any of the rules for which you just executed a gaps fill and
check its gaps by going to "Execution results" and scrolling down to the
"Gaps" table. You can see that the gaps covering the time range you
selected are marked as "in progress"

![image](https://github.com/user-attachments/assets/850dea1c-12cc-46c5-8675-d11445218c24)

If you select one or more rules that are disabled, you should see this
modal:

![image](https://github.com/user-attachments/assets/4a820b92-a9f0-4529-93ee-1fbaf7552888)


## Bulk filling from a rule gaps table
1. From the "rules management" table, click on any rule that has gaps.
2. Click on the "execution results" tab
3. Scroll down to the gaps table, you should see a "Fill all gaps"
button.
4. Click on it and select the time range.

![image](https://github.com/user-attachments/assets/375b0677-9b49-43e4-8820-5186c9343891)
5. If you select a big time range, you should see a toast indicating
that the scheduling is in progress after 5 seconds (you can hit this
case by generating 10000 gaps for 1 rule)

![image](https://github.com/user-attachments/assets/6d6345d9-fbc6-4c14-9c2d-04f40941fd17)

6. You should see a success toast once it is done

![image](https://github.com/user-attachments/assets/089ec2b9-daa5-44df-bfc0-84c69e2f6eec)

---------

Co-authored-by: Khristinin Nikita <nikita.khristinin@elastic.co>
2025-06-23 23:00:17 +02:00
Ersin Erdal
59f635c9c8
Use fixed dates to test getNextRunAt (#223574)
Fixes: #220501
2025-06-23 21:41:20 +02:00
Justin Kambic
69a57a7f9f
[Rule Details] Update tooltip copy for Investigation Guide/Related Dashboards (#224142)
## Summary

Resolves #221426.

Adds tooltip content for the Related Dashboards and Investigation Guide
fields on the Details segment of the rule create/edit flow.

<img width="1039" alt="image"
src="https://github.com/user-attachments/assets/6f812ebc-7a4c-42d5-ae20-c557665a7f17"
/>


## Testing this PR

Hover over the info tips on the form row for the Investigation Guide and
Related Dashboard fields.

Ensure that they work and you can view the copy.

### Technical Writer Feedback

The tooltips for these two fields are the main area we'd like additional
feedback/refinement. If you have thoughts, please leave a review:

- [Investigation
guide](https://github.com/elastic/kibana/pull/224142/files#diff-f61636ed67a25004232d29347e88ca18b9ef0c8551dab5e192c64b524c6f077eR326)
- [Related
dashboards](https://github.com/elastic/kibana/pull/224142/files#diff-f61636ed67a25004232d29347e88ca18b9ef0c8551dab5e192c64b524c6f077eR117)

For additional context:

- Investigation guide: at the moment it is a basic text field that
allows users to include links and other information related to their
rule to help with diagnosing/managing alerts.
- Related dashboards: the user may choose to associate existing
dashboards with their rule. These dashboards are likewise then shown on
alerts that are subsequently triggered by the rule.
2025-06-23 20:39:05 +01:00
Justin Kambic
dd2e7cb5f2
[Alert Details] Add investigation guide empty state (#223974)
## Summary

Resolves #222051.

This PR makes a richer empty state UX for the Investigation Guide
feature we added to the Alert Details page.

Before, when a rule did not have an investigation guide, the tab on the
alert details page dedicated to the feature was disabled. Now, the tab
is always enabled. When an investigation guide is present on a rule, a
badge will display to indicate the tab contains content.

If the user clicks into the tab when the rule does not have an
investigation guide, they will see an empty state with a call to action
to create a guide. If the user decides to click the empty state button,
it will open the Rule Edit flyout. I have added additional functionality
that allows the flyout to take an `initialStep` prop, so we pre-set the
flyout to the `Details` step which contains the text field the user can
use to create their guide.

The copy, iconography, and layout of the tab heading are all in draft
state pending some design feedback. I will also add some tests to the
code that I have added.


![20250613162001](https://github.com/user-attachments/assets/5310e371-ebcb-4d42-acbc-86816817e042)

## Reviewing this PR

_Note to technical writers:_ You can see the copy added for the empty
state
[here](https://github.com/elastic/kibana/pull/223974/files#diff-71b439414e4974e2decb0f25c136f52ccea4b49ebe393af68dfc5fd184d56e1cR37).

Here's a screenshot as well:

<img width="375" alt="image"
src="https://github.com/user-attachments/assets/491d87ac-b473-484e-82cd-45a1bd197c61"
/>

### Technical review

1. Create a rule that will generate alerts; _do not_ define an
Investigation Guide for it
1. Trigger an alert, and go to the details page
1. You should see the Investigation guide tab is available, whereas on
`main` it would be disabled
1. Open the Investigation Guide tab, you should see the empty state with
its CTA
1. Click this button, the rule flyout should open in Edit mode, and the
Details step should be pre-selected
1. Define an investigation guide, this can be any text. Save the rule.
1. Once you have saved the rule you should see the rule data update in
the page. The empty state will be gone and the investigation guide you
defined will be there instead.
2025-06-23 20:19:17 +01:00
Justin Kambic
78b2013468
[Synthetics] Replace EuiErrorBoundary with KibanaErrorBoundary (#224317)
## Summary 🌷 

Resolves https://github.com/elastic/observability-dev/issues/4568

### Test Now flyout

Checked this by throwing an error within the flyout:

<img width="1584" alt="image"
src="https://github.com/user-attachments/assets/d8cfe96e-8b1b-4c28-819e-82411b5f20af"
/>

### Monitor detail flyout

In the case of this flyout, IMO, we should not use an error boundary. We
are receiving an error that has been caught and placed into the plugin's
Redux store, and then selecting that as part of the render procedure of
this component. Thus, we should display it using `EuiCallout`, which is
the recommended course per [the
docs](https://eui.elastic.co/docs/patterns/error-messages/error-banners/).

Example implementation below:

_note:_ all the copy here is placeholder and we should run it by our
tech writers.

<img width="607" alt="image"
src="https://github.com/user-attachments/assets/ef60258e-e50e-4fa7-adc5-b77469ddc0fb"
/>

We should not use an error boundary, as they are there specifically to
handle unforeseen errors that we can't account for at development time.
In this case, we have already caught the error and persisted it in app
state, so I don't think it's appropriate to display it in an error
boundary as the runtime is still progressing and is not broken.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-23 15:13:58 -04:00
Bena Kansara
4553774d5a
[Observabililty] [Alert details] Fix active tab when opening new alert from Related alerts tab (#224287)
Fixes tab selection issue when user opens alert details page from
"Related alerts" tab. In this case, "Overview" tab should be selected by
default. In other cases, tab Id passed from URL should be used otherwise
default to "Overview".
2025-06-23 19:48:04 +01:00
Eyo O. Eyo
fd4e551340
[Intercept] Setup intervals for intercept in Kibana offerings (#221743)
## Summary

- Adds configuration for the product intercept in `oblt`, `es` and
`security` serverless offerings, alongsides stateful offering too. The
configuration provided sets the intercept to display every 90days, this
is configurable through the config `xpack.product_intercept.interval`.
The intercept can also be turned off through the config
`xpack.product_intercept.enabled`
- Also tweaks prompter timer implementation to accommodate inherent
[issue with long timer
delays](https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#maximum_delay_value)
in the browser
- Adjusts the signature of the `registerIntercept` method, such that a
deferred value to be evaluated when the intercept is to be displayed is
passed. This unlocks the ability to have consumers provide dynamically
imported modules that provide the config for the intercept, see
0e07892217
for an example.

### How to test

- Add the following config to your `kibana.dev.yml` file;
	```yml
	xpack.product_intercept.enabled: true
# we set the interval to 30s so the wait long period to display the
intercept is bearable
	xpack.product_intercept.interval: '30s'
	```
- Start kibana in stateful, and serverless mode, in either scenario you
should be presented the product intercept, with the intercept
specifically stating the current product the user is interacting with.
See below for an example of observability solution;
	


https://github.com/user-attachments/assets/6ca6baf2-58d3-4002-ac94-ec6e9a0902ae


<!--
### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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)
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-23 20:45:31 +02:00
Melissa Alvarez
15ee621d10
[ML] Inference endpoints UI: adds tech preview badge for preconfigured ELSER endpoint (#223299)
## Summary

Fixes https://github.com/elastic/kibana/issues/223263
Adds tech preview badge to preconfigured ELSER endpoint


![image](https://github.com/user-attachments/assets/ea5db905-62c2-4310-99d5-68cef7d384a8)


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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)
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-23 11:59:55 -06:00
Alejandro Fernández Haro
474f8480b7
[Docs] Replace @private with @internal (#224835) 2025-06-23 19:59:17 +02:00
Joe Reuter
a8be04b16a
🌊 Streams: Enrichment view table sorting (#222813)
Based on https://github.com/elastic/kibana/pull/222416

Adds sorting to the enrichment table:

<img width="520" alt="Screenshot 2025-06-05 at 15 11 35"
src="https://github.com/user-attachments/assets/ad852ec1-cd0e-4bb9-acd6-a7bf4ddc2984"
/>

<img width="180" alt="Screenshot 2025-06-05 at 15 11 46"
src="https://github.com/user-attachments/assets/00dcbf75-230b-40d7-9c4e-789c89690391"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-23 18:48:10 +01:00
Joey F. Poon
1e68671675
[Security Solution] endpoint list filter space awareness (#224579)
## Summary

Updates the endpoint list page's filter bar to be space aware. This
change makes it so that the field value suggestions will only suggest
values within the current space.
![Screenshot 2025-06-19 at 10 33
25 PM](https://github.com/user-attachments/assets/87995785-9f36-42d6-95b0-d55b3b736436)


### Checklist

- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-23 18:43:33 +01:00
Ying Mao
e1b02be28b
[Response Ops][Alerting] Adding dangerouslyCreateAlertsInAllSpaces rule type option for alert creation (#224507)
Resolves https://github.com/elastic/kibana/issues/222104

## Summary

Adds optional flag when registering a rule type for "dangerously
creating alerts in all spaces". If a rule type opts into this flag,
alerts created during rule execution will persist the `kibana.space_ids`
field as `"*"` instead of the space ID of the rule. Note that we store
`kibana.space_ids` as a string array, so the final alert document will
have

```
'kibana.space_ids': ['*']
```

This PR just adds the flag and updates the code to respect the flag. It
does not opt any rule types into using it. You can look at the
functional tests to see example test rule types that use it.

Because the streams rule type that we expect to be the first user of
this flag uses the `persistenceRuleTypeWrapper` in the rule registry for
writing alerts, we also had to update the rule registry code.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-23 13:41:27 -04:00
Ying Mao
3af496d11a
[Response Ops][Actions] Using fake request to create scoped client for ConnectorTokenClient unsecured actions usage. (#223447)
## Summary

Addresses a bug with the `ConnectorTokenClient` when using the
`UnsecuredActionClient` to execute actions directly (vs enqueuing a task
for execution). We previous pass in an internal saved objects repository
(that doesn't require a user request) to the `ConnectorTokenClient` when
using the `UnsecuredActionsClient` but this does not create the
`connector_token` saved object correctly so the next time it's read, we
get a `Failed to decrypt attribute` error.

This only occurs when using the `sendAttachmentEmail` with the MS
Exchange connector function added in this PR:
https://github.com/elastic/kibana/pull/219164. It does not affect the
other email service methods.

## To Verify

1. Ask me for MS Exchange credentials
2. Add this to your Kibana config:

```
xpack.actions.preconfigured:
  test-exchange-email:
    name: preconfigured-exchange-email
    actionTypeId: .email
    config:
      service: exchange_server
      clientId: <clientId>
      tenantId: <tenantId>
      from: <from>
    secrets:
      clientSecret: <secret>
notifications.connectors.default.email: test-exchange-email
```
3. Make this change to the code so Kibana sends 2 emails when it starts
up:

```
--- a/x-pack/platform/plugins/shared/notifications/server/plugin.ts
+++ b/x-pack/platform/plugins/shared/notifications/server/plugin.ts
@@ -40,6 +40,27 @@ export class NotificationsPlugin
   public start(_core: CoreStart, plugins: NotificationsServerStartDependencies) {
     const emailStartContract = this.emailServiceProvider.start(plugins);

+    const emailService = emailStartContract.getEmailService();
+    emailService
+      .sendAttachmentEmail({
+        to: ['<email>'],
+        subject: 'yo',
+        message: 'i am here',
+        attachments: [],
+        spaceId: 'default',
+      })
+      .then(() => {
+        new Promise((resolve) => setTimeout(resolve, 5000)).then(() => {
+          emailService.sendAttachmentEmail({
+            to: ['<email>'],
+            subject: 'yo',
+            message: 'i am here again',
+            attachments: [],
+            spaceId: 'default',
+          });
+        });
+      });
+
     return {
```

4. Verify there are no decryption errors for the `connector_token` SO
logged and that the emails are sent successfully.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-23 13:31:34 -04:00
Mason Herron
c868136f48
Add bulk migrations UI (#224334)
## Summary

Closes https://github.com/elastic/kibana/issues/217619 
Closes https://github.com/elastic/ingest-dev/issues/5695

Adds 'Migrate X Agents' option to the bulk actions on the agents table

- Reuses the existing migrateAgentFlyout component with some adjustments
for single vs bulk agents
- Added a panel to show if the user selects some protected or
fleet-server agents alerting them that they will not be able to migrate
those agents and they will be omitted.
- Added conditional rendering of the `replace token` switch, as per the
requirements, its only allowed for single agent migrations.
- Also adds feature flag gate to UI (API gate was added in
https://github.com/elastic/kibana/pull/224143)




https://github.com/user-attachments/assets/7f50168a-a388-4274-b8c8-aa0ce38591ed





### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] 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)
- [ ] 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)

### Identify risks

N/A

# Release Note

- Added the ability to migrate bulk agents to another cluster via the
bulk actions menu of the agent list table (experimental).

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Colleen McGinnis <colleen.j.mcginnis@gmail.com>
2025-06-23 18:29:35 +01:00
James Gowdy
fddf9f45d9
[ML] Hiding node allocation warning on serverless (#224406)
Adding flags `showNodeInfo` and `showLicenseInfo` to `/internal/ml/info`
This is then used to hide the autoscale text in the ML awaiting node
warning which is shared from the ML plugin and used by other teams.

Fixes https://github.com/elastic/kibana/issues/224389
Related to https://github.com/elastic/kibana/pull/222341
2025-06-23 18:27:37 +01:00
Christos Nasikas
f30335ac3d
[ResponseOps][Cases] Populate total alerts and comments in the cases saved objects (#223992)
## Summary

This is a farewell PR to Cases. Probably my last PR to the cases
codebase. It was quite a journey, and I learned a lot. I hope the best
for the feature of Cases.

## Decisions

Just before Cases was forbidden to do migrations, we did a last
migration to all cases to persist `total_alerts: -1` and
`total_comments: -1`. We did that so that in the future, when we would
want to populate the fields, we would know which cases have their fields
populated and which do not. In this PR, due to time constraints and
criticality of the feature, I took the following decisions:

- Cases return from their APIs the total comments and alerts of each
case. They do that by doing an aggregation, getting the counts, and
merging them with the response. I did not change that behavior. In
following PRs, it can be optimized and fetch the stats only for cases
that do not yet have their stats populated (cases with -1 in the counts)
- When a case is created, the counts are zero.
- When a comment or alert is added, I do an aggregation to get the stats
(total alerts and comments) of the current case, and then update the
counters with the number of the newly created attachments. The case is
updated without version checks. In race conditions, where an attachment
is being added before updating the case, the numbers could be off. This
is a deliberate choice. It can be fixed later with retries and version
concurrency control.
- The case service will continue to not return the `total_alerts` and
`total_comments`.
- The case service will accept the `total_alerts` and `total_comments`
attributes to be able to set them.

Fixes: https://github.com/elastic/kibana/issues/217636

cc @michaelolo24 

### 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
2025-06-23 19:56:01 +03:00
elastic-renovate-prod[bot]
0c419c97ac
Update dependency @elastic/charts to v70.1.0 (main) (#224805)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@elastic/charts](https://redirect.github.com/elastic/elastic-charts)
| dependencies | minor | [`70.0.1` ->
`70.1.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/70.0.1/70.1.0)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v70.1.0`](https://redirect.github.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#7010-2025-06-23)

[Compare
Source](https://redirect.github.com/elastic/elastic-charts/compare/v70.0.1...v70.1.0)

##### Bug Fixes

- **flame_chart:** fix font size to occupy available space
([#&#8203;2671](https://redirect.github.com/elastic/elastic-charts/issues/2671))
([2b5d962](2b5d962d89))
- **heatmap:** update tooltip visibility logic to handle empty tooltip
info
([#&#8203;2661](https://redirect.github.com/elastic/elastic-charts/issues/2661))
([ff5ff27](ff5ff27a96))

##### Features

- **interactions:** add modifier keys pressed information available in
the `onElementClick` and `onBrushEnd` listeners
([#&#8203;2647](https://redirect.github.com/elastic/elastic-charts/issues/2647))
([d632df0](d632df093e))

####
[70.0.1](https://redirect.github.com/elastic/elastic-charts/compare/v70.0.0...v70.0.1)
(2025-05-02)

##### Bug Fixes

- **colors:** use borealis colors as default
([#&#8203;2643](https://redirect.github.com/elastic/elastic-charts/issues/2643))
([b728661](b7286613b2))
- Update aria-labelledby for Sparkline svg to not use spaces
([#&#8203;2654](https://redirect.github.com/elastic/elastic-charts/issues/2654))
([19349f3](19349f3a95))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-06-23 18:53:42 +02:00
elastic-renovate-prod[bot]
1770086aeb
Update dependency papaparse to ^5.5.3 (main) (#206182)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [papaparse](https://www.papaparse.com/)
([source](https://redirect.github.com/mholt/PapaParse)) | dependencies |
patch | [`^5.5.2` ->
`^5.5.3`](https://renovatebot.com/diffs/npm/papaparse/5.5.2/5.5.3) |

---

### Release Notes

<details>
<summary>mholt/PapaParse (papaparse)</summary>

###
[`v5.5.3`](e3c7b2628c...a4f8b0f1e3)

[Compare
Source](e3c7b2628c...a4f8b0f1e3)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOiBTZWN1cml0eVNvbHV0aW9uIiwiYmFja3BvcnQ6YWxsLW9wZW4iLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2025-06-23 12:51:12 -04:00
Quynh Nguyen (Quinn)
56a0fa2176
[Inference] Add Bedrock Converse API support for InferenceChatModel and Security AI Assistant (#220273)
Part of https://github.com/elastic/kibana/issues/206710. This PR
addresses https://github.com/elastic/kibana/issues/219161 by adding a
new subAction connector to support Amazon Bedrock's Converse and
ConverseStream API. In addition:
- It hooks up the InferenceChatModel to the Security AI assistant, when
the feature flag `securitySolution.inferenceChatModelEnabled` is enabled
- It also updates the types relating to Bedrock adapter to use types
exported from `@aws-sdk/client-bedrock-runtime`

#### Tracing with AWS Bedrock's Claude Sonnet 3.5:
-
https://smith.langchain.com/public/846c8176-8e17-475b-8cc4-723975da8fb8/r
-
https://smith.langchain.com/public/9d538926-5372-4d50-a6e0-2299556e61aa/r
-
https://smith.langchain.com/public/aea7753f-36ea-477b-aa9b-42809c9f4b4a/r

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-23 17:23:27 +01:00