Commit graph

1413 commits

Author SHA1 Message Date
Konrad Szwarc
a2b70a0d45
[EDR Workflows][Insights][UI] Rename Endpoint Insights to Automatic Troubleshooting in Permissions (#216977)
Docs update request -
https://github.com/elastic/docs-content/issues/1015

This PR updates the Permissions flyout to rename Endpoint Insights to
Automatic Troubleshooting. The change ensures the title and description
align with the current feature name.

![Screenshot 2025-04-03 at 11 12
12](https://github.com/user-attachments/assets/a9f5b63b-a10f-49eb-b2ab-d550ef2f7ddf)
2025-04-16 16:58:32 +02:00
Kevin Qualters
c277812ffe
[Security Solution] Fix redux action being fired because of unused react-router value (#217055)
## Summary

This pr fixes a bug with the RouteCapture component, used at a high
level in the security solution component tree, to reflect url changes
into redux. The code previously used the full result of
'react-router-dom' 's useLocation hook as the payload, which contains 4
parameters, pathname, search, hash that we make use of, and a 4th that
was added sometime later by the library that is essentially a random id
generated every time the hook is called, called key. We have never used
this, and it was being inadvertently copied into the redux state, and
also causing some other actions or hooks based listeners to run I think
as well.

Below is the contrived example of going from the home page to an empty
alerts page, and you can see 4 actions in the after, and 5 in the
before, with 1 updating only the key. May reduce more unneeded actions
with more going on in the page, but exactly how many is not known.
Before:

![image](https://github.com/user-attachments/assets/93cc2c5a-56e4-4764-8791-c41879fd5b45)


After:

![image](https://github.com/user-attachments/assets/ebd75055-4e17-497b-bed2-a5fd58c5c92f)


### Checklist

- [ ] [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-04-16 10:13:44 -04:00
Agustina Nahir Ruidiaz
f00f83715c
[Security Solution][Onboarding] Adding telemetry to video selectors (#217280)
## Summary

New event created for the video selectors inside rules, dashboards and
alerts cards.

```
export interface OnboardingHubSelectorCardClickedParams {
  originStepId: string;
  selectorId: string;
}
```

To verify:

Add these lines to kibana.dev.yml

```
logging.browser.root.level: debug
telemetry.optIn: true
```

1. In the onboarding hub, expand the rules card
2. It should log `Report event "Onboarding Hub Step Selector Clicked"`.


https://github.com/user-attachments/assets/c1b1084e-4917-4412-93ed-984a74b6b6b4


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-16 15:42:30 +02:00
Sergi Massaneda
937dbba41e
[Security Solution] Allow disabling experimental features via config (#217363)
## Summary

This PR adds support for disabling experimental features using the
existing `xpack.securitySolution.enableExperimental` configuration.

This solves the problem of not being able to disable a feature by config
once the feature has been enabled by default.

### The Challenge 

When we start developing a feature under an experimental flag we always
follow the same steps:

1 - Create the experimental flag disabled by default + enable it via
config for testing
2 - Implement the feature
3 - Enable the experimental flag by default when we want to release the
feature.
4 - Deployments can disable the feature via config (as a safety
measure).
5 - Remove the experimental flag after some time.

We start by creating the flag disabled by default while we implement it.
In `experimental_features.ts`:
```ts
export const allowedExperimentalValues = Object.freeze({
  myFeatureEnabled: false,
  [...]
```
And enable it via config with:
```yml
xpack.securitySolution.enableExperimental:
  - myFeatureEnabled
```

Once the implementation is done and the experimental flag can be enabled
by default, we have to do a trick:
Since the `xpack.securitySolution.enableExperimental` config can only
turn flags to _true_, instead of setting `myFeatureEnabled: true`, what
we have to do is rename the flag to `myFeatureDisabled` and keep the
value as _false_:

```ts
export const allowedExperimentalValues = Object.freeze({
  myFeatureDisabled: false,
  [...]
```
Then we also need to do a code refactor to update all the places in the
code where the flag was checked: `if (myFeatureEnabled)` -> `if
(!myFeatureDisabled)`

This way, we have the option of disabling the feature via config (in
case something goes wrong):
```yml
xpack.securitySolution.enableExperimental:
  - myFeatureDisabled
```

### A solution

This PR introduces the possibility to turn a flag to _false_ using the
same `xpack.securitySolution.enableExperimental` config. This was
preferable to introducing a new config since this one is already
whitelisted in Cloud UI, can be easily overritten in deployments, and
also because people are used to it.

With these changes, the first two steps would be the same, with the
difference that we won't need to have the _Enabled_ or _Disabled_ word
at the end of the flag name. It could be just the feature name, in
`experimental_features.ts`:
```ts
export const allowedExperimentalValues = Object.freeze({
  myFeature: false,
  [...]
```

And when we need to enable the feature by default, we can just turn it
to `true`:
```ts
export const allowedExperimentalValues = Object.freeze({
  myFeature: true,
  [...]
```
No tedious refactor or confusing naming would be required. 

Then, in case we need to disable the feature in a production deployment
for some reason, we could just do this via config :
```yml
xpack.securitySolution.enableExperimental:
  - disable:myFeature
```

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-16 14:09:28 +02:00
Mykola Harmash
fc686f8a6d
[Oblt Onboarding] Remove Custom Logs flow (#216053)
Closes https://github.com/elastic/kibana/issues/208025

This change deleted the "Stream log files" onboarding flow which is now
replaced by the Auto Detect flow.

| Before | After |
| --- | --- |
| ![CleanShot 2025-03-27 at 14 55
55@2x](https://github.com/user-attachments/assets/46a90769-8b3d-495f-b600-9a8f24964761)
| ![CleanShot 2025-03-27 at 14 56
28@2x](https://github.com/user-attachments/assets/e800cab8-cfd2-48e8-8d1a-8a41c037d532)
|


Changes made:
* Deleted UI components responsible for rendering the Custom Logs flow
* Deleted the definition for a custom card in the onboarding search
results
* Deleted API endpoints and supporting files used only by the Custom
Logs flow
* `/internal/observability_onboarding/logs/setup/environment` endpoint
was still used by the OTel Host flow, so it was moved to a dedicated
OTel route and pathname changed to
`/internal/observability_onboarding/otel_host/setup`
* Functionality of the `/internal/observability_onboarding/otel/api_key`
endpoint was merged into the above mentioned OTel route, so UI has to
make a single API request to get all the necessary information from the
server
* Deleted Scout UI tests for the Custom Logs flow
* Deleted API integration tests for the deleted endpoints
* API tests that we previously testing
`/internal/observability_onboarding/logs/flow` were converted to test
`/internal/observability_onboarding/flow'` used by the Auto Detect flow

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-16 11:01:18 +02:00
Kenneth Kreindler
1d430d4d35
[Security solution] [Ai Assistant] ES|QL generation with self healing (#213726) 2025-04-16 09:12:49 +01:00
Francesco Fagnani
ec88cca373
[Synthetics] Added drilldown to synthetics stats overview embeddable (#217688)
This PR closes #208066 by adding drilldowns to the synthetics stats
overview embeddable.



https://github.com/user-attachments/assets/fe8d9eb0-ecdc-449d-93af-7d165c541d46
2025-04-16 09:52:16 +02:00
Saikat Sarkar
398123d22c
[Playground chat] UX cleanup for EIS on by default (#217410)
## Summary

This PR involves changes in the UX for playground setup page and
Palyground Chat. Following items have been addressed.

- [x] Convert LLM Connected button to a label that is not interactive
- [x] Rename that label to "Elastic LLM Connected" if EIS is connected,
otherwise "LLM Connected"
- [x] Split the main panel into two panel: one for connecting to an LLM,
one for adding data
- [x] Add unit tests

# Before 
![Screenshot 2025-04-09 at 4 48
35 PM](https://github.com/user-attachments/assets/a632bc94-eeea-4403-bbd3-f7bfcc0deae2)
![Screenshot 2025-04-09 at 4 49
37 PM](https://github.com/user-attachments/assets/fb667ff6-6efc-470b-bb55-5b63bf33f61a)



# After
![Screenshot 2025-04-14 at 5 43
20 PM](https://github.com/user-attachments/assets/d9da3bd9-b7b5-490d-9b7c-d4783e3a4d3b)

![Screenshot 2025-04-09 at 4 40
24 PM](https://github.com/user-attachments/assets/ab0a9fac-d8e0-4f64-a7d5-588c2990a015)


### 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>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2025-04-15 19:04:00 -05:00
jennypavlova
7c9a3ee1f2
[APM][OTel] EDOT error summary fix (#217885)
## Summary

This PR fixes the issue with the error summary missing items using edot.
It includes e2e tests with synthtrace for both edot and otel services.

TODO 

- [x] Test with serverless (waiting for the PR to be deployed)
Tested on serverless works as expected: 

<img width="2560" alt="image"
src="https://github.com/user-attachments/assets/8dd7962e-7d66-482d-97fb-0b08882bd04f"
/>
2025-04-15 21:44:11 +02:00
Shahzad
83f3d614cc
[Custom threshold rule] Allow group for ip type fields !! (#216062)
Allow group by for ip fields !!

---------

Co-authored-by: Faisal Kanout <faisal.kanout@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-15 20:15:02 +02:00
christineweng
a4a11bb46f
[Security Solution][Alert flyout] Edit highlighted fields in overview tab (#216740)
## Summary

This PR allows user to edit highlighted fields in alert flyout, under
`Investigations`. The modal shows default highlighted fields that are
defined by Elastic, and allow user to edit custom highlighted fields.

Currently this feature is behind feature flag
`editHighlightedFieldsEnabled` (not enabled by default).



https://github.com/user-attachments/assets/35b3d09e-5e21-42ea-80e9-e8c0753985c9



#### Disabled when:

<details>
<summary>User does not have security privilege</summary>


![image](https://github.com/user-attachments/assets/69ba7bc7-2d9b-4a2c-ae8e-e9c14f396a31)

</details>

<details>
<summary>Prebuilt rule w/o enterprise license (showing upsell)</summary>


![image](https://github.com/user-attachments/assets/a9c38e20-85b2-4082-af5e-a8707b2098cb)

</details>

#### Do not show the button when:
<details>
<summary>Not an alert </summary>


![image](https://github.com/user-attachments/assets/b5e9afde-f0d0-4a88-aaed-7481ba586850)

</details>

<details>
<summary>rule preview</summary>


![image](https://github.com/user-attachments/assets/283d7a83-50b2-48ab-af2d-11692501c205)

</details>

### 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
- [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)
2025-04-15 12:18:35 -05:00
Ievgen Sorokopud
34df5e3328
[Attack Discovery][Scheduling] Fix the attack discovery alert type (#218025)
## Summary

This is a fix for the incorrectly generated attack discovery alert
schema type due to the limitation of the generation tool.
2025-04-15 18:18:33 +02:00
Drew Tate
9b4403b7dc
[ES|QL] remove worker (#218006)
## Summary

Fix https://github.com/elastic/kibana/issues/217923

Investigations in https://github.com/elastic/kibana/issues/217368 showed
that there was basically no performance impact to passing the AST across
a thread boundary. But we also didn't detect a pressing reason to remove
the worker.

Since then, however, we noticed another cost associated with the worker:
it's a hefty Javascript file, even in production builds. In addition, we
are doing parsing on the main thread _and_ the worker, so the
`kbn-esql-ast` package is actually being loaded and parsed twice by the
browser, once for the main thread and once for the worker.

This PR removes our worker. Our parsing associated with validation and
autocomplete will still be done asynchronously, but on the main thread.

I do not see any regression in perceived performance.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-04-15 10:18:07 -06:00
Francesco Fagnani
f693e7218e
[Synthetics] Sync global parameters is called in the endpoints to add, edit or delete global params (#216197)
This PR closes #215668.

The global parameters are synched in the endpoints where they are
created, edited or deleted.

---------

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-04-15 16:53:14 +02:00
Kibana Machine
7b629a9908 skip failing test suite (#207773) 2025-04-15 16:38:12 +02:00
Ievgen Sorokopud
10943319b2
[Attack Discovery][Scheduling] UI: "Attack Discovery Scheduling" management (#12007) (#217917)
## Summary

Main ticket ([Internal
link](https://github.com/elastic/security-team/issues/12007))

These changes add the attack discovery schedules management table.


https://github.com/user-attachments/assets/619ad1d6-d919-4a8d-b743-6a73fbfbf318

## Key changes

* UI side API handlers
* Create schedule workflow
* Schedules table
* Enable schedule from the table
* Disable schedule from the table
* Delete schedule from the table
* Pagination and sorting in find schedules API

## NOTES

The feature is hidden behind the feature flag (in `kibana.dev.yml`):

```
feature_flags.overrides:
  securitySolution.assistantAttackDiscoverySchedulingEnabled: true
```
2025-04-15 15:06:06 +02:00
Marshall Main
dee4dfbe59
[Security Solution][Detection Engine] Split search request building from search (#216887)
## Summary

This PR better separates the request building logic in the detection
engine from query building logic, removes outdated error checking logic,
updates the `singleSearchAfter` `search` call to no longer use the
legacy `meta: true` param, and improves search response type inference.
2025-04-15 08:19:34 -04:00
Maxim Palenov
87f8274f41
[Security Solution] Suppress prebuilt rule SO duplicates in review install endpoint (#218123)
## Summary

This PR makes sure a buggy `security_detection_engine` package doesn't affect a preview installation endpoint. Older security detection rules package versions contain saved object rule duplicates affecting the endpoint.

Having `security_detection_engine` v`8.17.1` package installed `/internal/detection_engine/prebuilt_rules/status` and `/internal/detection_engine/prebuilt_rules/installation/_review` endpoints return a different number of rules available to install.

## Details

Older `security_detection_engine` package versions contain rule saved objects duplicates representing the latest version. For example, `8.17.1` version has a rule `Microsoft 365 User Restricted from Sending Email` with `rule_id` = `0136b315-b566-482f-866c-1d8e2477ba16` and the latest version `206`. Since a package may contain multiple historical rule versions it sticks to the following format `<rule_id>_<version>` where `<rule_id>` is the unique rule's UUID and `<version>` it's version. Some older package versions omit `<version>` for the latest rule version. `Microsoft 365 User Restricted from Sending Email` rule mentioned above has two equal assets corresponding to the latest version with the only difference in the saved object id `0136b315-b566-482f-866c-1d8e2477ba16` and `0136b315-b566-482f-866c-1d8e2477ba16_206`.

Prebuilt rules preview endpoint was designed to handle `<rule_id>_<version>` format only. Consequently, it improperly handles older prebuilt rules package version.

This bug manifested in https://github.com/elastic/kibana/pull/217544 where `security_detection_engine` version has been bumped to `8.18.1`. It resulted in a failed integration test. Further investigation has shown that the test installs an older package version `8.17.1` to assert prebuilt rules upgrade workflow works correctly.

The fix is implemented in `PrebuiltRuleAssetsClient.fetchAssetsByVersion()` by using `Map` to deduplicate prebuilt rule assets.
2025-04-15 13:45:08 +02:00
Dzmitry Lemechko
edf8d6d975
[kbn/response-ops-alerts-table] set data-test-subj for EuiDataGrid based on loading status (#217230)
## Summary

Follow-up to #217153

### Problem Description
In UI tests, there was no reliable way to determine when the Alerts
table content had fully loaded before interacting with it. This could
lead to flaky tests where interactions occurred before the data was
available (rows are not present yet), causing failures or inconsistent
results (checking for row with specific content to exist)


![image](https://github.com/user-attachments/assets/6580f134-0bf2-48b8-8cc9-b6d476f4e932)

Quite often we see tests waiting for global indicator (spinner in the
top left corner) to be hidden as a condition for page loading is
complete. This is quite unreliable approach and testing tools have no
consistent built-in solution: FTR, Cypress or even Playwright - network
idle wait is officially marked as
[discouraged](https://playwright.dev/docs/api/class-page)).
We need to help testing tool to interact with UI components in ready
state only.


### Solution
To address this issue, I modified a `data-test-subj` property in the
`<EuiDataGrid>` component. The property dynamically switches between
`alertsTableIsLoading` when data is still loading and
`alertsTableIsLoaded `once the content is available. This allows UI
tests to wait for precisely `alertsTableIsLoaded` to be in in the DOM
before interacting with the table, ensuring more reliable and stable
test execution.


Passed 10/10
<img width="538" alt="image"
src="https://github.com/user-attachments/assets/e44bae5f-4094-4ed2-89f3-74a52cb2be53"
/>
2025-04-15 13:05:49 +02:00
Carlos Crespo
5423655975
[Infra] Check ML permissions before requesting ML data (#218069)
fixes [#189213](https://github.com/elastic/kibana/issues/189213)

## Summary

Checks whether the user has permission to ML before triggering requests
to fetch ML data


### How to test

- Create a user whose role doesn't have permission to ML, but has
permission to O11y apps
- Run `node scripts/synthtrace infra_hosts_with_apm_hosts --live
--clean`
 - Navigate to Inventory Infrastructure / Hosts View

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-15 12:02:51 +02:00
Rômulo Farias
b1ffcf3060
Add 'Generic' Entity Engine Definition (#211232)
## Summary

Introduce a new Entity Engine Definition called Generic. The larger
context on why we are introducing a new entity definition is described
on this [private github
issue](https://github.com/elastic/security-team/issues/11857).

The tldr; is that we would like to have an entity store with all the
entities described by the [entity ecs
field](https://github.com/elastic/security-team/issues/11857). The
decision to call `generic` entity definition comes from the fact that
any entity can be described with the `entity` field - user, host,
service, database, queue, subscription and so on. Therefore it makes
sense to have the concept called `generic` entity, meanwhile the
existent entity definitions will be called concrete entities, because
they describe a very concrete type of entity (currently user, host,
service).

Other changes included on this PR:

- Don't override `entity.name` with `entity.id`, only set if no value is
found
- Migrate the usage of `entity.type` as the entity definition type to
`entity.EngineMetadata.Type`
- Changes touching Entity Analytics code around
`getRiskEngineEntityTypes` and `getAssetCriticalityEntityTypes`. There
was a somewhat unnecessary and duplicated logic in these functions which
essentially described the concrete entity definitions to be used by
entity analytics flows. A new function called
`getEntityAnalyticsEntityTypes` was introduced which unifies this logic
and returns the entity types that Entity Analytics care about.


Video of a scroll through the entities processed by the generic entity
store, source of the data is cloudbeat asset management integration.



https://github.com/user-attachments/assets/450afd05-dee0-4449-aaec-2cd69645d6ec

#### How to test:

- In Advanced Settings (`/app/management/kibana/settings`), enable
`securitySolution:enableAssetInventory`

<img width="883" alt="image"
src="https://github.com/user-attachments/assets/c342abb2-efb3-40a8-b945-d9558f085f34"
/>

- In Entity Store management (`/security/entity_analytics_entity_store`)
enable entity store
<img width="1251" alt="image"
src="https://github.com/user-attachments/assets/41f709e1-0aea-47dc-9c98-ffaebf18fdb1"
/>

- Verify Generic Engine Status
<img width="1203" alt="image"
src="https://github.com/user-attachments/assets/d26b764a-4695-436e-85f7-e3ed7df5a3be"
/>

- Ingest documents with `entity.id` and `entity.*` fields. Personally I
run `cloudbeat` asset discovery locally

- Verify ingested documents in
`.entities.v1.latest.security_generic_default`

<img width="1496" alt="image"
src="https://github.com/user-attachments/assets/88286cb9-38c1-4f9d-83a7-57ba33811c60"
/>

--

**OBS: Also test enabling the store without the uiSetting enabled, so
you can make sure that it doesn't enable**

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

- [x] I see risk on performance, given the amount of aggregations the
generated transform does
- tested, although we see a higher spike in CPU than before, it's behind
a feature flag and it's going to be used in controlled data sets (entity
centric logs that contain `entity.id` field) we decided it's good enough
to go.
- [ ] Enablement/disablement of entity store in a different uiSetting
configuration.
- [ ] Enable entity store with `securitySolution:enableAssetInventory`
disabled. Then enable `securitySolution:enableAssetInventory` ==> No
generic entity definition installed. You can manually install it in the
EntityStore status page
- [ ] Enable entity store with `securitySolution:enableAssetInventory`
enabled. Then disable `securitySolution:enableAssetInventory` definition
==> hanging assets of generic entity store that can be deleted manually

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-15 11:50:15 +02:00
Rickyanto Ang
6d688deebb
[Cloud Security] Update Misconfiguration Flyout UI to Match Security Solution Flyouts (#216938)
## Summary
This PR Updates the UI for Misconfiguration Findings Flyout. It now
follows the UI looks of Security Solution flyouts


https://github.com/user-attachments/assets/7443101f-2238-403b-a672-5bbd1e6827cd

---------

Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
2025-04-14 14:17:57 -07:00
Philippe Oberti
e09548eff6
[AI4DSOC] Alert summary alert actions in table and flyout (#217696)
## Summary

This PR adds some alert actions to the AI for SOC alert summary page:
- table row action via a more actions icon button, to allow users to add
the alert to a new case, an existing case, or to apply tags to the
current alert
- a take action in the footer of the flyout, to allow the user to
perform the same actions

Table row actions:


https://github.com/user-attachments/assets/a5991ec0-a1c1-4c8f-821a-5adedd3d68a7

Flyout footer actions:


https://github.com/user-attachments/assets/f5d853d3-8b5e-47f8-ba30-33cdf440651b

### Notes

The code is extremely similar between the 2 components added in this PR.
The difference between the 2 is the type of button that is used to open
the popover.
I debated 2 others approaches, but was not happy with either:
- create a hook that would return the items and panels for cases and
tags, then use that hook to limit the amount of duplicated code in both
components. I decided against this as I hate having hooks that return
components (in this case `EuiContextMenuItems`...
- create a shared component that would do the logic and have some props
to conditionally decide how the button is being displayed. Here also, I
decided against this approach because I feel like components that allow
these sort of UI customization quickly end up hard to maintain, because
we want to change the text, then the color of the button, then the type
of icon...

If you feel strongly about the choice I made here, let me know and I'll
reconsider the approach! 😄

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63)
to `r.name === p.name` to make sure there will be matches between
integrations and rules

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

https://github.com/elastic/security-team/issues/11973
2025-04-14 14:42:29 -05:00
Dmitrii Shevchenko
9f5425f061
[Security Solution] Fix prebuilt rules force upgrade on Endpoint policy creation (#217959)
**Resolves: https://github.com/elastic/security-team/issues/7216**

## Summary

This PR updates the Endpoint policy callback to:  

- **Install only the Elastic Defend rule if it's missing**, without
upgrading it to the latest version. Previously, the rule was both
installed and updated whenever an Endpoint policy was created, which
conflicted with rule customization. Automatic upgrades could erase
existing user customizations.

- **Avoid triggering the installation or upgrade of any other prebuilt
rules** as part of this flow. The Endpoint package policy creation
callback
([source](f7d8bc3c25/x-pack/solutions/security/plugins/security_solution/server/fleet_integration/fleet_integration.ts (L181-L187)))
previously installed and upgraded **all** prebuilt detection rules to
their target versions whenever an Endpoint policy was created.

This logic relied on the legacy rule upgrade method, which has a known
issue that causes all configured rule actions and exceptions to be lost.
By removing the upgrade logic, this PR eliminates that incorrect
behavior.
2025-04-14 19:22:38 +02:00
Artem Shelkovnikov
5ee5b35cf9
[WorkChat] Change index selector to a ComboBox for the "Index Source" integration (#216998)
## Closes https://github.com/elastic/search-team/issues/9656

## Summary

This PR adds changes the input that allows user enter the index when
configuring a WorkChat integration with "Index Source".

The video is better than a thousand words:

Before:


https://github.com/user-attachments/assets/0e175c55-fb54-436b-9b87-7831d8d2db2f

After:


https://github.com/user-attachments/assets/54f13122-55c0-4c3f-a25a-d68f080cd30c

### 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-14 18:15:54 +02:00
Marco Vettorello
a9c9354382
[Charts] Use chartTheme hook everywhere (#217370)
## Summary

This PR fixes the existing usage of the chart themes by using the
provided `useElasticChartsTheme` hook that is color mode aware and theme
adaptive (borealis/amsterdam)

Some charts where using just the Light theme version or the legacy (aka
amsterdam theme), and I've applied the hook to pick up the correct
theme.

TO REVIEWERS: Please pull down the PR and check if the actual changed
charts looks correct with the new theme configuration.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2025-04-14 18:09:15 +02:00
Alejandro Fernández Haro
4cd9376422
[Config stripUnknowns] Skip compatible mode when running in CI (#217536) 2025-04-14 17:52:51 +02:00
Shahzad
760106eb86
[Observability] Related alerts based on scoring !! (#215673)
## Summary

Copying most of https://github.com/elastic/kibana/pull/214017 !!

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

### Implementation
We are now using response ops alerts table with custom score querying
based on tags/groups matches and Jaccard similarity on documents !!


<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/b3a69280-c05d-4100-be6a-2c8dadcc051d"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dominique Clarke <dominique.clarke@elastic.co>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
2025-04-14 11:35:40 -04:00
Miriam
26d9f5f7d0
[ObsUX][A11y] Fix focus for popover in details flyout (#218095)
Closes https://github.com/elastic/kibana/issues/212633

## Summary

Fixed navigation by keeping focus on Popover opener element

### How to test
Observability -> Infrastructure -> Infrastructure inventory page.
1. Navigate to any square below All button.
2. Press Enter.
3. Navigate to infographic for Host IP.
4. Press Enter.
5. Press Esc.

Expected result: Navigation continues to next element when Tab key is
pressed.

BEFORE 


https://github.com/user-attachments/assets/e9ee6ff6-895d-408f-b165-0f8edd4eb197

AFTER


https://github.com/user-attachments/assets/b01e6955-b659-4d9a-abcf-1ece48adc161
2025-04-14 15:15:25 +01:00
Cauê Marcondes
5d96f36e54
[APM]Handle ELASTIC_PROFILER_STACK_TRACE_IDS for apm-profiler integration (#217020)
Depends on https://github.com/elastic/elasticsearch/pull/125608

# Summary

`ELASTIC_PROFILER_STACK_TRACE_IDS` is introduced for OTel based data
streams. The same information is stored in
`TRANSACTION_PROFILER_STACK_TRACE_IDS` in the classic APM data streams.

Prior to this PR apm<->profiling integration did not work for OTel SDKs.
This PR adds handling for the new field name.

<img width="1159" alt="Screenshot 2025-04-03 at 10 05 28"
src="https://github.com/user-attachments/assets/ce3ad092-d4f4-4a16-843e-923c72938fe1"
/>

<img width="1772" alt="Screenshot 2025-04-03 at 10 05 40"
src="https://github.com/user-attachments/assets/8b2682fe-6f2e-49a4-9995-d83997a05f02"
/>

---------

Co-authored-by: Greg Kalapos <gergo@kalapos.net>
2025-04-14 15:17:08 +02:00
Luke Gmys
49ffc02272
[Security Solution] Render default security solution data view with managed label (#216961)
## Summary

Discover Data View picker has the ability to indicate whether or not the
DV is "managed", meaning - owned by the app,
where modifications done by the user are preceeded with a warning (when
changing the index pattern).

This PR filters some of the data views we know should be managed
(currently the default security one), and passes them to the Data View
Picker in a way that renders the following label next to the data view
in the dropdown:

<img width="1134" alt="Screenshot 2025-04-03 at 09 42 42"
src="https://github.com/user-attachments/assets/825dd98b-b54b-4ba5-9f2c-014ad35357be"
/>

## Testing
Add the following feature flag to your configuration:

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

### 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-04-14 14:38:41 +02:00
Anton Dosov
ef0322d8d0
[jest] @emotion/babel-preset-css-prop (#216489)
## Summary

Partially address https://github.com/elastic/kibana/issues/216459

This PR adds `@emotion/babel-preset-css-prop` to jest config to improve
jest and emotion integration. There are some tradeoffs: this is a better
setup for emotion + testing library, but there are some seemingly
regressions for enzyme. We think these are right tradeoffs to make,
since we optimize for emotion+testing library.

### Main upsides are 😄 

#### 🟢 Fixes snapshots with css prop

`You have tried to stringify object returned from \`css\` function. It
isn't supposed to be used directly (e.g. as value of the \`className\`
prop), but rather handed to emotion so it can handle it (e.g. as value
of \`css\` prop).` is replaced with proper emotion css classname.

![Screenshot 2025-04-04 at 14 57
52](https://github.com/user-attachments/assets/f4a746d6-2451-4703-ab39-57be7171b10b)

#### 🟢 We will be able to use jest style matchers for emotion
`toHaveStyleRule`

https://emotion.sh/docs/@emotion/jest#tohavestylerule

_they can be used locally now, but we plan to follow up with global
extend_

###  Considerations 🫤  

#### 🟡 jsx doesn't work inside jest.mock function 

Example: 

```
jest.mock('./components/alert_header_title', () => ({
    > 27 |   AlertHeaderTitle: jest.fn().mockReturnValue(<div></div>), 
         |                                                                           ^
      28 | }));
```

Fails with an error. `can't read jsx of undefined`. 

This is because babel compiles this into: 

```
import { jsx as ___EmotionJSX } from '@emotion/react'

jest.mock('./components/alert_header_title', () => ({
    > 27 |   AlertHeaderTitle: jest.fn().mockReturnValue(___EmotionJSX.jsx(….)), 
         |                                                                                   ^
      28 | }));
```

And, apparently, due to how jest imports work, __EmotionJSX is not yet
in the scope.

The applied workaround is to rewrite to: 

```
jest.mock('./components/alert_header_title', () => ({
  AlertHeaderTitle: jest.fn(() => <div></div>), 
     }));
```


#### 🟡 euiTheme needs to be available when euiTheme is accessed inside
`css` function

Example: 

```
DashboardGrid removes panel when removed from container
    TypeError: Cannot read properties of undefined (reading 'size')
      42 |     margin: '-2px',
      43 |     position: 'absolute',
    > 44 |     width: euiTheme.size.l,
```

The fix was to wrap failing tests with `<EuiProvider/>` 

### Drawbacks 😢 

Mostly related to Enzyme 

#### 🔴  Enzyme shallow snapshot no longer include `css` prop 

Since `css` prop is compiled away there are bunch of snapshots that
looks like a regression:

Example:

![Screenshot 2025-04-04 at 15 50
16](https://github.com/user-attachments/assets/61c1d027-1e8a-48e6-a242-1fa53f8ec9b7)

This is unfortunate. We've tried `@emotion/jest/enzyme-serializer` but
it didn't work (likely because enzyme ecosystem no longer supported?)
If it is important that the snapshot captures css, we recommend to use
mount or rtl

#### 🔴 Asserting against `css` prop with shallow render also doesn't
work

Possible solution is to use 

```
import { matchers } from '@emotion/jest';
expect.extend(matchers);
```

(We plan to add these matches globally in a follow up)

and 

```
 expect(button).toHaveStyleRule('background-color', '#FFFFFF');
```



#### 🔴 Some shallow Enzyme tests `find()` breaks because of code
transformations of emotion

Example:

```
const component = shallow(
      <MetricVisValue />
)

component.find('button') // fails because instead of <button/> there is <EmotionInternalCss/> element now 

```

Solutions:
- Use full mount or react testing library 
- Or target by data-test-subj

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
2025-04-14 14:29:47 +02:00
Francesco Fagnani
89e385ec96
[Synthetics] Enable KQL filter for TLS rules (#216973)
This PR follows #215110 by enabling the KQL filter for TLS alerting
rules and closes #214346.
2025-04-14 14:24:31 +02:00
Pablo Machado
47090f198e
[SecuritySolution] Bootstrap Initial Privileges User Monitoring Onboarding Workflow (#217180)
## Summary

Bootstrap the initial page structure for Privileges User Monitoring
Onboarding Workflow

### What's included
* Create Entity Analytics Page
* Create Privileged User Monitoring Page
* Add the pages to the SecuritySolution and the global menu
* Hide the page when the experimental flag is disabled
`privilegeMonitoringEnabled`

### What's not included
* The content of the Entity Analytics and Privileged User Monitoring
pages

### Answered Questions
* The path `entity_analytics` has already been taken. I chose
`entity_analytics_landing`
* Should the link show up on the global EA page? Yes
* Navigation Menu for ESS? Good for now
* Which permission/capabilities are required? Same as risk engine

### How to test it?
* You only need to run Kibana and check if the navigation item is in the
menu
* The page should show up on the global nav
* The page should show up on the global search bar

* Visibility constraints
  * It should be hidden when `privilegeMonitoringEnabled` is not enabled
* It should be visible when the user has access to the entity analytics
feature
  * It should be visible for platinum users


### 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] 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-04-14 13:26:11 +02:00
Meghan Murphy
c2f34954fb
[M1 Salesforce] add search and get tools (#217258)
## Summary

This PR adds the integration's 'search' and 'get' tools as part of the
Workchat architecture.

Also added some refactoring for building queries :) 


### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jedr Blaszyk <jedrazb@gmail.com>
2025-04-11 16:41:47 -04:00
Tiago Vila Verde
1bf39845da
[Entity Analytics][Privilege Monitoring] Engine initialization API (#215663)
## Summary 

This PR introduces the first building blocks for the [Entity Analytics
Privileged
Monitoring](https://github.com/elastic/security-team/issues/9971).
We follow the approach used in the Entity Store and add a new "Engine",
which consists of the following components:
* Public API
  * INIT and HEALTH routes
* Kibana task 
* Privilege Monitoring Data Client
* Engine Saved Object
* API key manager
* Related storage indices
* Feature Flag: `privilegeMonitoringEnabled` set to `false` by default.
* API integration test configuration
  * only tests that the health endpoint is available
* Auditing and Telemetry 


## Testing steps

1. Make sure to add `privilegeMonitoringEnabled` to your
`kibana.dev.yaml`
2. In devtools, ensure the API is working with `GET
kbn:/api/entity_analytics/monitoring/privileges/health`
3. Start the engine with: `POST
kbn:/api/entity_analytics/monitoring/engine/init`
4. Look for `DEBUG` logs mentioning the
`entity_analytics:monitoring:privileges:engine` task

---------

Co-authored-by: CAWilson94 <charlotte.wilson@elastic.co>
Co-authored-by: Charlotte Alexandra Wilson <CAWilson94@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-11 13:25:24 +02:00
Pierre Gayvallet
cb5ae3a483
[workchat] correctly persist failing tool calls (#217936)
## Summary

- Fix a bug that was causing failing tool invocations to not being
persisted to the conversation history, corrupting the conversation for
following rounds.
- Optimize the researcher's prompts (leading to ~50% latency cut, mostly
on the summarization step)
2025-04-11 11:26:24 +02:00
Sergi Romeu
429a9db67d
[APM][Cypress] Attempt to fix mobile transactions test (#217648)
## Summary

Closes #207040
2025-04-11 10:28:49 +02:00
Pierre Gayvallet
d9d9fba3d6
[workchat] add tracing configuration (#217825)
## Summary

Allow enabling langsmith tracing via kibana config file

### Example

```yaml
xpack.workchatApp.tracing.langsmith:
  enabled: true
  apiKey: {API-KEY}
  project: {project-name}
```
2025-04-11 08:11:27 +02:00
Rodney Norris
0f79990912
refactor(search_playground): prep for saved playgrounds (#217251)
## Summary

Renaming types and files as well as moving providers around to make
implmentating saved playground routes more straightforward. Naming
updates to reduce future confusion from generic names that didn't fit
when there are multiple providers etc.
2025-04-11 01:20:09 +02:00
José Luis González
3485e52340
[Search][Query Rules] Rule sets filtering search (#217477)
## Summary

Search filtering over the query rulesets table:

![CleanShot 2025-04-09 at 10 25
00@2x](https://github.com/user-attachments/assets/78be7842-f892-454d-a01e-50dee27bdf18)

[Jira ticket](https://elasticco.atlassian.net/browse/SEARCH-928)


### 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
- [ ] 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-04-11 00:09:00 +02:00
Tiago Costa
4408a0c536
skip flaky suite (#214053) 2025-04-10 21:29:29 +01:00
Nick Peihl
72d18d8b99
[Dashboards] Replace contentClient with getContentClient on DashboardStart server api (#217586)
## Summary

Changes the DashboardStart server api to provide a getContentClient
function.

In https://github.com/elastic/kibana/pull/214788, we set the
`contentClient` returned from the content management register method
after start lifecycle of all plugins. This means the `contentClient`
returned from the `DashboardStart` contract was undefined. This PR
changes the start contract to provide a getContentClient function
instead.

Only one consumer was using the contentClient from DashboardStart and
this PR also updates that consumer.
2025-04-10 14:52:38 -04:00
Lisa Cawley
e00f013b62
[DOCS] Add minimal synthetic APIs (#214518)
Co-authored-by: Colleen McGinnis <colleen.j.mcginnis@gmail.com>
2025-04-10 19:26:49 +02:00
Milosz Marcinkowski
23cbaa6d55
[APM][UI] Sort environment dropdown alphabetically (#217710)
Closes #217814

### Summary

Sort environment list alphabetically.

|Before|After|
|-|-|
|<img width="1724" alt="Screenshot 2025-04-10 at 12 01 15"
src="https://github.com/user-attachments/assets/53f0b66d-146a-45d9-b4e3-25bde350a263"
/>|<img width="1722" alt="Screenshot 2025-04-10 at 11 58 27"
src="https://github.com/user-attachments/assets/91315d23-801c-4a16-8688-c43d60c389c8"
/>|
2025-04-10 17:38:20 +02:00
Philippe Oberti
5080c5facb
Alerty summary table flyout setup (#217421)
## Summary

This PR is a follow up of [this previous
one](https://github.com/elastic/kibana/pull/216744) which was adding the
foundation for the alerts table on the AI for SOC alert summary page.
It focuses on adding the necessary boilerplate code for the alert
summary flyout implementation:
- add the row action cell component that displays the open flyout icon
as well as the logic to open the flyout
- add the boilerplate files for the new `ai_for_soc` panel
- make necessary changes to a few components within the
`document_details` folder that will be used in both flyouts
- implement the header for the flyout
- make sure the flyout history works with this new panel


https://github.com/user-attachments/assets/738268f5-795f-40c4-90d5-6b14f7d4de36

The alerts page alert details flyout remains unchanged, except for the
severity value at the very top, which is now displayed as an `EuiBadge`
instead of an `EuiHealth`. This guarantees consistency with the design
of the new AI for SOC flyout:
![Screenshot 2025-04-10 at 9 38
59 AM](https://github.com/user-attachments/assets/4b83280e-8cdb-4a01-8bc5-0fda3f735645)

## Notes

Follow PRs will tackle custom column titles, cell renderers, row
actions... for the table (wip
[here](https://github.com/elastic/kibana/pull/217124)).

Mocks for reference:
https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=3284-69401&p=f&m=dev

## How to test

This needs to be ran in Serverless:
- `yarn es serverless --projectType security`
- `yarn serverless-security --no-base-path`

You also need to enable the AI for SOC tier, by adding the following to
your `serverless.security.dev.yaml` file:
```
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```

Use one of these Serverless users:
- `platform_engineer`
- `endpoint_operations_analyst`
- `endpoint_policy_manager`
- `admin`
- `system_indices_superuser`

Then:
- generate data: `yarn test:generate:serverless-dev`
- create 4 catch all rules, each with a name of a AI for SOC integration
(`google_secops`, `microsoft_sentinel`,, `sentinel_one` and
`crowdstrike`) => to do that you'll need to temporary comment the
`serverless.security.dev.yaml` config changes as the rules page is not
accessible in AI for SOC.
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_fetch_integrations.ts#L73)
to `installedPackages: availablePackages` to force having some packages
installed
- change [this
line](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/detections/hooks/alert_summary/use_integrations.ts#L63)
to `r.name === p.name` to make sure there will be matches between
integrations and rules

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

https://github.com/elastic/security-team/issues/11973
2025-04-10 10:15:44 -05:00
Viduni Wickramarachchi
368d4bf5c5
[Obs AI Assistant] Fix navigating to the search connectors page (#217749)
Closes https://github.com/elastic/kibana/issues/217748

## Summary

### Problem

Clicking on connectors in the Search connectors tab in the AI Assistant
settings navigates the user to a blank page.


https://github.com/user-attachments/assets/e369e539-cf75-4ea4-8cd0-343dbfbf9a33

This happens because `enterprise_search` URLs are deprecated and it's
renamed to `elasticsearch`.
Related to https://github.com/elastic/kibana/pull/202838

List of changed URLs -
https://github.com/elastic/search-team/issues/7961#issuecomment-2433029797

### Solution

Replace the URL path from `enterpriseSearch` to `elasticsearch`

After the fix:


https://github.com/user-attachments/assets/5ebad872-9a87-46b0-ad2f-83a8ff6e017e


### Checklist

- [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)
2025-04-10 10:27:54 -04:00
Pierre Gayvallet
bc1124118c
[workchat] implement m1 chat design (#217465)
## Summary

Implements the m1 design for the chat page and components

*Note: only covers the parts that are functionally present in the app
atm*

### Design demo


https://github.com/user-attachments/assets/16f64a51-16ad-45c5-9d4b-77c31598427a

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-10 16:05:15 +02:00
Viduni Wickramarachchi
c2596a1f61
[Obs AI Assistant] Remove semantic text feature flag (#217750)
Closes https://github.com/elastic/kibana/issues/206827

## Summary

Semantic text was updated to a new format with
https://github.com/elastic/dev/issues/2936 to act like a normal text
field. This was under a feature flag, therefore we had to enforce the
new format by setting the feature flag
`index.mapping.semantic_text.use_legacy_format` to `false`.

With the merge of https://github.com/elastic/elasticsearch/pull/120813
the new semantic format is now the default behaviour. Therefore, this PR
removes the feature flag in our code.

## Querying the KB after removing the feature flag


https://github.com/user-attachments/assets/8f91bd5a-033a-47ec-9bed-3e2bdfe85627


### Checklist

- [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)
2025-04-10 10:00:43 -04:00
Joe Reuter
de059eb516
🌊 Streams: Add experimental badge to nav entry (#217819)
This PR adds the experimental badge to the nav entry for streams (if
enabled)

<img width="343" alt="Screenshot 2025-04-10 at 12 47 22"
src="https://github.com/user-attachments/assets/765e0dd2-6ebd-4516-b024-ec207fcea43f"
/>

We also render a tech preview badge in the classic observability sub
nav:
<img width="224" alt="Screenshot 2025-04-10 at 12 52 04"
src="https://github.com/user-attachments/assets/c51210c0-056e-4ead-97ee-891e3fb6851f"
/>

Important to note: we don't render a badge in the classic main nav since
it's not supported there:
<img width="257" alt="Screenshot 2025-04-10 at 12 52 29"
src="https://github.com/user-attachments/assets/5a1fb3c8-88dd-49c9-bade-82965f367e46"
/>
2025-04-10 15:10:53 +02:00