Commit graph

46731 commits

Author SHA1 Message Date
Efe Gürkan YALAMAN
01a4ff72e7
[Synonyms] Update Synonyms Text and Enable (#215618)
## Summary

Text in various places updated.
Added some telemetry that was decided.
Small visual changes on empty prompt page.
Added a new example in a collapsible accordion.
Also enables the synonyms plugin by default.

<img width="1637" alt="Screenshot 2025-03-24 at 10 36 26"
src="https://github.com/user-attachments/assets/b02ef4a7-a18f-44b5-a845-d2566102e8ea"
/>
<img width="1627" alt="Screenshot 2025-03-24 at 10 36 40"
src="https://github.com/user-attachments/assets/f7ea1c5e-d82e-497a-b215-5eab7190f041"
/>
<img width="1634" alt="Screenshot 2025-03-24 at 10 36 52"
src="https://github.com/user-attachments/assets/d410bcc1-c075-4b5a-bcb7-11f97c64ffb9"
/>
<img width="825" alt="Screenshot 2025-03-24 at 10 37 00"
src="https://github.com/user-attachments/assets/8a9e7567-5dbd-4238-8f8b-297b78a4dcac"
/>




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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-25 00:30:55 +01:00
James Gowdy
51ab081e94
[ML] Fixing permission to view ML nodes (#215503)
When setting the `canViewMlNodes`, we were assuming a serverless
environment based on whether all ML features (ad, dfa, nlp) were
enabled. When this was originally implemented no serverless project had
all three features enabled.
Since then the security project has
[changed](https://github.com/elastic/kibana/pull/175358) to include all
three features.

This PR add an explicit check for serverless and disables
`canViewMlNodes` if it is true.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-24 23:07:02 +02:00
Marshall Main
58190211b8
[Security Solution][Detection Engine] Remove experimentalFeatures, bulkCreateFactory, enrichEvents factory (#214856)
## Summary

Another follow up to https://github.com/elastic/kibana/pull/212694

- Removes `alertWithSuppression` from `sharedParams` since it's already
available on `services`
- Updates the type of `services` throughout DE executor logic to
properly represent that it has `alertWithSuppression`
- Removes `experimentalFeatures` as a param from functions that no
longer need it
- Converts `bulkCreate` from a factory to a const function
- Converts `enrichAlerts` from a factory to a const function - but
enrichment logic is still passed to the persistence functions as a
function. Now it's just one layer of factories instead of two.
- Renames types related to `enrichAlerts` to match the function
names/responsibilities better

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-24 16:08:45 -04:00
Pablo Machado
6cdbeb9537
[SecuritySolution] Fix host details flyout left panel tabs (#215672)
## Summary

Fix Unable to switch between Risk Contributions and Insights on host
details flyout.


**Pre Conditions**
1. Alerts should be available on Kibana.
2. Entity Risk Score must be enabled.

**Steps**
1. Navigate to a page where the flyout is available.
3. For any Entity, open details flyout
4. Expand Details flyout (left panel).
5. Observe that the user cannot switch between `Risk Contributions` and
`Insights` tabs.

**Expected Result**
The user should be able to switch between `Risk Contributions` and
`Insights` tabs.

**Screen Recording**


https://github.com/user-attachments/assets/3aae6291-5b5b-49a4-83c2-ac657e4e9524


### 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-03-24 14:47:15 -05:00
Georgii Gorbachev
a9106c6990
[Security Solution] Rework test plan for importing prebuilt rules (#213434)
**Epic:** https://github.com/elastic/kibana/issues/174168
**Partially addresses:**
https://github.com/elastic/kibana/issues/202079,
https://github.com/elastic/kibana/issues/210358

## Summary

We started to rework and introduce functional changes to our existing
test plans for prebuilt rule customization, upgrade, and export/import
workflows.

Specifically, this PR:

- Restructures the test plan, introduces a more fine-grained list of
sections.
- Rewrites almost all the existing scenarios. In most cases it boils
down to splitting a scenario into 2+ more specific scenarios, where each
describes _exactly_ what happens in the GIVEN and THEN sections. This is
very important, as it:
- makes these scenarios ready to be implemented right away: 1 scenario =
1 test to write
  - helps with ensuring that we covered edge cases
- Adds new scenarios for handling missing base versions according to
[#210358](https://github.com/elastic/kibana/issues/210358).
- Adds a placeholder section for licensing scenarios according to
[#11502](https://github.com/elastic/security-team/issues/11502).
- Removes scenarios for the `overwrite` request parameter - this is
common importing logic which is not related to prebuilt rules.
- Addresses my own comments from [this
review](https://github.com/elastic/kibana/pull/206893#pullrequestreview-2633863218).

The new test plan should be in line with the changes discussed in
https://github.com/elastic/kibana/issues/210358.
2025-03-24 19:00:36 +00:00
Brad White
31aa294124
Storybook 8 Upgrade Follow Up (#214684)
## Summary

These Stories were missed in [Upgrade to Storybook 8
(#195148)](https://github.com/elastic/kibana/pull/195148) and should be
migrated to the same format as other stories for consistency and to make
future migrations easier. They technically work in SB8, I forgot to run
the migration script again later on while working on the original PR.

The changes have already been backported to #214680 and #214681
2025-03-24 20:28:19 +02:00
Kevin Delemme
80c782d863
chore(slo): colocate state to avoid react re-rendering (#215558) 2025-03-24 14:25:02 -04:00
Agustina Nahir Ruidiaz
f723aa25d9
[Security Solution] Adding video links to the onboarding cards selector (#215215)
## Summary

This PR adds the provided onboarding videos to the corresponding
thumbnail cards in the onboarding experience.
https://github.com/elastic/kibana/issues/215212
The videos have been placed as follows:


https://github.com/user-attachments/assets/38254883-6a7d-46ac-bac7-df1334d66e3f


`Rules Card`

[Video 1](https://videos.elastic.co/watch/2q7LSLrsC8qEFQUNHFu9zf)
[Video 2](https://videos.elastic.co/watch/jpy1CcpBuowsA4a8t7gNDE)

`Alerts Card`

[Video 1](https://videos.elastic.co/watch/Qgt9SCJqLmMN7P289ffSo4)
[Video 2](https://videos.elastic.co/watch/nXC8MSkzDBWajoXWJ3QeQp)
[Video 3](https://videos.elastic.co/watch/VSvxJeSQzrFN9K6hdeLz58)
[Video 4](https://videos.elastic.co/watch/evxFZ8dqfjH6SGPtRriyE6)

`Dashboards Card`

[Video 1](https://videos.elastic.co/watch/5UvJBpzFVoEfpDLnjzTbfn)
[Video 2](https://videos.elastic.co/watch/SpKecbJxeYWzXVpGvgxMah)

### Checklist

Check the PR satisfies following conditions. 

- [x] UI Layout: Verify that the added videos do not break the existing
layout or cause issues.

Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
2025-03-24 20:23:49 +02:00
Tiago Costa
dea190c0ef
skip flaky suite (#203898) 2025-03-24 17:45:49 +00:00
Drew Tate
19f6a20e27
[ES|QL] Remove command signatures (#215541)
## Summary

Part of https://github.com/elastic/kibana/issues/195418

This removes the final deprecated property from the command definitions:
the signature.

Most of the work was moving validation logic out of the generic paths
into command-specific validation methods. This exercise confirmed the
fact that many of the properties on the command signatures were added to
support something in one or two commands and did not apply to the vast
majority. Now, it is clearer what code applies to what commands.


### 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: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-24 19:05:17 +02:00
Gerard Soldevila
18a138bb2c
Fix deprecations API tests (#215484)
## Summary

Addresses https://github.com/elastic/kibana/issues/215216

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-24 18:49:42 +02:00
Sergi Massaneda
2c98a2244f
[Security Solution] Enable SIEM migrations in serverless (#214708)
## Summary

Enables the SIEM Migrations feature in serverless. The experimental flag
will be cleaned later.


> [!NOTE]
To release this feature as planned (Friday 28th March 2025), this PR
needs to merge between Monday **24** and Thursday **27**


### Screenshot


![siem_migrations](https://github.com/user-attachments/assets/e20e2dc9-77cb-4460-8da7-c5a83909d378)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-24 17:17:28 +01:00
Sergi Romeu
7512aa30fa
[A11y][APM] Add aria-label to "Try our new inventory" button (#215633)
## Summary

Fixes #210253

This PR adds an `aria-label` with the same content as the tooltip to
solve the "Button must have a discernible text" A11y critical issue.

## How to test
1. Download the [axe
devtools](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd)
2. Enable ECO feature flag
3. Go into service inventory and run the scanner from axe devtools
4. You should see a critical error
5. Checkout this branch
6. Error should be solved

---------

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
2025-03-24 18:12:15 +02:00
Viduni Wickramarachchi
1c738f6e13
[Obs AI Assistant] Update EIS Elastic LLM naming (#215659)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/236

## Summary

1. Renames name of model in model settings in search playground from
`Elastic LLM (AI Connector)` to `Elastic LLM`.

<img width="1616" alt="image"
src="https://github.com/user-attachments/assets/0be2ac02-1fcf-4167-b06e-de2e5af2f529"
/>

2. Renames the description of the Elastic LLM in the stack connector
flyout to `Use the Elastic LLM for your chat and RAG usecases.`

<img width="1620" alt="image"
src="https://github.com/user-attachments/assets/15ad52de-c916-4653-bf06-ccf4adeff170"
/>

### 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-03-24 21:41:19 +05:30
Julia Bardi
33db17768f
[Fleet] Use fleet error in cspm plugin (#215625)
## Summary

Closes https://github.com/elastic/ingest-dev/issues/5266

Changed Error to FleetError in CSPM so that the error response code is
400 instead of 500.
500 is not appropriate, it triggers alerts in our serverless SLOs.

<img width="1777" alt="image"
src="https://github.com/user-attachments/assets/b9b0e8cf-db54-427a-bc45-db0b806a150f"
/>
2025-03-24 17:05:38 +01:00
Florian Lehner
7c4af051b2
[Profiling] Add FrameType and color for Go (#215697)
## Summary

OTel Semantic Conventions
[defines](https://github.com/open-telemetry/semantic-conventions/pull/2003)
a type for Go and OTel eBPF profiler is about to start with pushing Go
frames (either with
https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/409
or
https://github.com/open-telemetry/opentelemetry-ebpf-profiler/pull/408)

FYI: @elastic/ingest-otel-data 

### 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)~~
not relevant
- [ ]
~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~~ not
relevant
- [ ] ~~[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~~ not relevant
- [ ] ~~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)~~
not relevant
- [ ] ~~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.~~
not relevant
- [ ] ~~[Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed~~ not relevant
- [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)
- `release_note:skip`

Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
2025-03-24 16:05:07 +01:00
Edgar Santos
a66dbcb8c9
[Security Solution] Update rules dashboard to include rule gaps histogram (#214694)
## Summary
This PR adds a rule gaps histogram that shows users how many rules had
gaps at any given time. They will also be able to see how many gaps have
been filled and how many are being filled.
See the images below which show what the dashboard looks like today, and
what it looks like after these changes.

## How was this tested?
I ran a script to create 100 rules with gaps, then I made the changes in
the dashboard JSON file and called the `POST
/internal/detection_engine/health/_setup` endpoint to apply them in my
local version of Kibana.

### Before

![before_dashboard](https://github.com/user-attachments/assets/12c61404-20fd-4a6c-a888-7efd7cf535ff)

### After

![after_dashboard](https://github.com/user-attachments/assets/7d3829f9-cbd4-423f-98db-0ee792f25699)
2025-03-24 15:58:55 +01:00
Charlotte Alexandra Wilson
19d2776b18
Entity Analytics Dashboard refresh button breaks risk score tables: refetchEnginestatus Fix (#215472)
## Summary

This PR fixes the issue where clicking the refresh button, the risk
score panel throws errors, and the table displays no data.
The root cause was that the `refetchAll` callback did not include
`refetchEngineStatus`, which is responsible for refreshing the risk
engine status. As a result, the risk engine status
`hasEngineBeenInstalled` could become stale, leading to incorrect
behavior.

### Reproduce bug
(as per [#12017](https://github.com/elastic/security-team/issues/12017))

**Preconditions** 

Kibana started with user and host data
Alerts created
Enable risk engine
To Reproduce

**Steps to reproduce the behavior:**

Open the page and press refresh
Expected behavior
All panels should refresh

### Screenshots: Fixed Version
The bug appeared only on the static time options - "Today" and "This
Week". Fixed for both, confirmed working for the other options.



https://github.com/user-attachments/assets/bf2866cf-4e16-466f-8686-0c1b0bf5e7cb
2025-03-24 14:51:37 +00:00
Nikita Indik
2929f2857d
[Security Solution] Update prebuilt rule customization test plans to reflect licensing changes (#215008)
**Partially addresses: https://github.com/elastic/kibana/issues/202068**
**Related PR with licensing checks implementation:
https://github.com/elastic/kibana/pull/206079**

## Summary
This PR updates the Prebuilt Rule Customization test plan to reflect
[recent changes](https://github.com/elastic/kibana/pull/206079) related
to licensing.

Changes to rule upgrade scenarios will be handled in a separate PR.
2025-03-24 14:50:34 +00:00
Justin Kambic
74f87d99bc
[Synthetics] Only return 404 if screenshot_ref is truly not present (#215241)
## Summary

Right now we return a 404 anytime that the data we're looking for on the
`screenshot_ref` route is not satisfactory. We do an io-ts check on the
data before returning. It's possible that that data will fail the check,
and we'd return a 404 anyway. This isn't a very accurate reflection of
what's happening on the server, and could indicate a problem with the
user's data.

Instead, we first check if the data returned from Elasticsearch is
`null`, and if it is we return a 404. Otherwise, we compute the type
check like normal and return the result. In the case where the data
fails the type check, we instead return a 500 and include the malformed
data in the server response.

Co-authored-by: Faisal Kanout <faisal.kanout@elastic.co>
2025-03-24 10:50:18 -04:00
Andreana Malama
a3fe0cd460
[Lens] Fix inline dimension button label (#215476)
## Summary

Fix for #209696. 

<img width="368" alt="Screenshot 2025-03-21 at 1 49 14 PM"
src="https://github.com/user-attachments/assets/69052665-a194-459b-9c2a-835f4230a99b"
/>
<img width="381" alt="Screenshot 2025-03-21 at 1 49 53 PM"
src="https://github.com/user-attachments/assets/7cf6b7eb-4d1e-40fc-a28f-597634441eb1"
/>

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2025-03-24 16:35:47 +02:00
Miriam
a55e3253e7
[ObsUX][A11y] Add area label to comparison drop down (#215664)
Closes https://github.com/elastic/kibana/issues/210254

Before

<img width="1494" alt="Screenshot 2025-03-24 at 10 51 01"
src="https://github.com/user-attachments/assets/872ca24d-8087-4261-bdf0-19107b13d01a"
/>

After

<img width="1494" alt="Screenshot 2025-03-24 at 10 49 51"
src="https://github.com/user-attachments/assets/6d840f70-41b3-4891-ab91-cf99f3c6a93e"
/>
2025-03-24 13:59:22 +00:00
Aleh Zasypkin
6bbc4b67a5
fix(security): topologically sort composable feature privileges before composing actions (#211035)
## Summary

This PR changes the privilege's actions merging logic for the composable
and deprecated Kibana features. The change makes it possible to have any
number of composable and deprecated features chained by `replaceBy`,
`composedOf`, or a combination of the two.

Under the hood, the privileges factory sorts all deprecated and
composable privileges using Kahn's algorithm for topological sorting,
similar to what is used to sort Kibana plugin dependencies. This allows
us to not only detect cyclical dependencies but also sort privileges in
the proper order depending on their dependency chain.

The use cases addressed by this change are best illustrated by the
`actions should respect composedOf when specified with replaceBy at the
privilege` test in `privileges.test.ts`.
2025-03-24 15:09:36 +02:00
Sergi Romeu
2654b8c702
[A11y][APM] Add aria-label to popover service in service overview (#215640)
## Summary

Fixes #210258

This PR adds an `aria-label` with the same content as the title to solve
the "Button must have a discernible text" A11y critical issue.

## How to test
1. Download the [axe
devtools](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd)
2. Go into a service overview and run the scanner from axe devtools
3. You should see a critical error
4. Checkout this branch
5. Error should be solved
2025-03-24 13:54:30 +01:00
Sergi Romeu
6665dd377a
[A11y][APM] Add aria-label to latency selector in service overview (#215644)
## Summary

Fixes #210270

This PR adds an `aria-label` to solve the "Element missing an accessible
name" A11y critical issue.

## How to test
1. Download the [axe
devtools](https://chromewebstore.google.com/detail/axe-devtools-web-accessib/lhdoppojpmngadmnindnejefpokejbdd)
2. Go into a service overview and run the scanner from axe devtools
3. You should see a critical error
4. Checkout this branch
5. Error should be solved
2025-03-24 13:54:17 +01:00
Tre
af5b6e3d0a
[SKIP ON MKI] dev_tools/search_profiler (#215661)
## Summary

see details: https://github.com/elastic/kibana/issues/215660
2025-03-24 14:51:12 +02:00
Mykola Harmash
007caa1b55
[Oblt Onboarding][K8S OTel] Use helm upgrade --install (#215160)
Closes #215134

Using `helm upgrade --install` lets the user run the helm command
multiple times to, for example, upgrade to the new version after a stack
release.

![CleanShot 2025-03-19 at 13 48
39@2x](https://github.com/user-attachments/assets/196c8d6d-1046-44d3-8d44-c300fa0418af)

## How to test

1. Run Kibana and navigate to the K8S OTel onboarding flow
2. Execute snippets provided by the flow
3. Copy only the `helm upgrade --install ...` part of the second snippet
and execute it again
4. Make sure the command succeeds

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2025-03-24 14:20:45 +02:00
Viduni Wickramarachchi
505405df5c
[Obs AI Assistant] Fix page height of the AI Assistant app in solution views (#215646)
Closes https://github.com/elastic/kibana/issues/215637

## Summary

In solution views the AI Assistant page doesn't take up the full
viewport height because a hardcoded value is used.
This PR fixes this issue by using `kbn/eui` variables instead.

Before:

<img width="1619" alt="image"
src="https://github.com/user-attachments/assets/5c94c325-1a15-49da-b162-beb15431a732"
/>

After:

<img width="1621" alt="image"
src="https://github.com/user-attachments/assets/88e0610e-cbfb-4266-a0fa-c19f031bbb93"
/>


### 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-03-24 17:46:46 +05:30
Tim Rühsen
25067aeb4b
[profiling] Add color for Executable flamegraph nodes (#215552)
Adds a type and color for `Executable` flamegraph nodes.

The new type will be used by [this
change](https://github.com/elastic/elasticsearch/pull/119115) in the ES
profiling plugin (the required code change from grouping by process name
to grouping by executable name needs tbd).
2025-03-24 08:56:46 -03:00
Robert Jaszczurek
ab780500f6
[ML] Anomaly Explorer: Fix Anomalies Table pagination (#214714)
Includes a fix for https://github.com/elastic/kibana/issues/213424 and a
follow up to
https://github.com/elastic/kibana/pull/203224#discussion_r1875926261

* Rewrites anomalies_table in typescript
* Decouples anomalies table state into an individual service
* Fixes an issue where anomalies table pagination wouldn't reset to 0
after changing significant properties of the view, causing the table
data to refetch
2025-03-24 12:39:23 +01:00
Dzmitry Lemechko
4dc27ba4aa
[scout] Remove perf stats validation for Discover (#215130)
## Summary

With #212397 we added 2 tests for Discover app (loading `/app/discover`)
to track:
- js bundles loaded on page
- perf metrics like CPU time, Layout time and Script time fetched with
CDP Performance Domain API

While the first test for bundles _didn't report any failures_, second
test to validate Perf metrics fails periodically:


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34729#0195a4de-6cd5-4d1e-be11-5d02be6de2b0
```
Error: CPU time (seconds) usage during page navigation should not exceed 1.5 seconds

expect(received).toBeLessThan(expected)

Expected: < 1.5
Received:   1.591343
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34877
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.601434
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34899
```
Error: Total layout computation time should not exceed 0.06 second

expect(received).toBeLessThan(expected)

Expected: < 0.06
Received:   0.061723
```


https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34912#0195adb8-4536-42b7-ab4d-524535fdad9a
```
Error: Additional time spent executing JS scripts should not exceed 0.5 second

expect(received).toBeLessThan(expected)

Expected: < 0.5
Received:   0.561259
```

It was worth an experiment, but due to flakiness we decided to keep only
bundles limits validation for now and see if it is stable in the long
run.

If Data-Discovery team has interest in collecting Perf metrics without
strict validation in PRs, we can discuss the options. Alternatively we
can wait for Scout GA and you can deep dive into your own performance
testing with Playwright/CDP.
2025-03-22 20:31:54 +02:00
Sid
960caf9e2f
[Platform security] Replace SCSS with CSS in JS (Part 1 - Spaces plugin) (#214798)
## Summary

Part of https://github.com/elastic/kibana/issues/211652

Removed most SASS files from the Spaces plugin. (Full checklist on
parent issue)

Remaining file: 

`x-pack/platform/plugins/shared/spaces/public/space_selector/space_selector.scss`
This file requires a custom mixin that we'll need to migrate once this
PR: https://github.com/elastic/kibana/pull/214729/files lands. It
introduces a `cssUtils` file to ensure consistency in Kibana specific
mixins.

### How to test
Testing visual regression isn't super straightforward here. For my local
testing, i started two instances of Kibana (main and this branch)

On main:

- Start es:
```
yarn es snapshot --license=trial -E http.port=9400
```

- Start kibana with the following config (CLI or kibana.dev.yml)
``` 
server.port: 5602
elasticsearch.hosts: ["http://localhost:9400"]
```
Once started, in a private browsing window, you should have access to
Kibana on main on `localhost:5602`

On this PR:
Start ES and Kibana normally (Kibana should be available on
localhost:5601)

This PR contains changes to the following parts of the Spaces plugin:
- Copy Saved Objects to Space flyout
- Share Saved Objects to Space flyout
- Space selector screen
- Space editing screen
- Space selector drop down menu in Nav Bar

Ideally, you should see no visual regression between the two versions. 


## Screenshots

| Component | Main | PR |
|--------|--------|--------|
| Space Edit | <img width="300" alt="space_edit_main"
src="https://github.com/user-attachments/assets/786feeb7-5047-443c-bb63-41e90e31a82b"
/> | <img width="300" alt="space_edit_pr"
src="https://github.com/user-attachments/assets/975cc096-25d7-4bd5-804d-f82f65a908bf"
/> |
| Space selector nav bar | <img width="300"
alt="space_selector_nav_bar_main"
src="https://github.com/user-attachments/assets/c6c05d28-3dfa-43c2-9586-b66a24f990d6"
/> | <img width="317" alt="Screenshot 2025-03-20 at 09 11 50"
src="https://github.com/user-attachments/assets/277d3094-640b-4604-adc7-5c8465aeb21c"
/> |
| Share to space | <img width="300" alt="share_to_space_main"
src="https://github.com/user-attachments/assets/5782a314-66f7-4780-bcfb-b0a85cece035"
/> | <img width="300" alt="share_to_space_pr"
src="https://github.com/user-attachments/assets/73a48305-7fa7-4637-9856-60461cbad770"
/> |
| Copy to Space flyout | <img width="300" alt="copy_to_space_pr"
src="https://github.com/user-attachments/assets/54342ca2-b2e1-4844-a66f-fae512ff8910"
/> | <img width="300" alt="copy_to_space_main"
src="https://github.com/user-attachments/assets/a629f12a-75c4-4ba6-a7cf-cdeca1310ef3"
/> |
| Copy to Space confirmation | <img width="300"
alt="copy_to_space_confirmed_main"
src="https://github.com/user-attachments/assets/78f93d73-e789-487f-94c1-eebcef7ce183"
/> | <img width="300" alt="copy_to_space_confirmed_pr"
src="https://github.com/user-attachments/assets/2020e71a-88b4-4107-9b05-ae90bf7d39f1"
/> |
| Space selector | <img width="300" alt="Space_selector_before"
src="https://github.com/user-attachments/assets/b8ed7269-e6f6-4bc0-bb24-1c53ac451083"
/> | <img width="300" alt="Space_selector_after"
src="https://github.com/user-attachments/assets/770d2141-8642-483f-b72c-bce6d5ebd282"
/> |

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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] The risk of inexact conversion: verifying this PR requires manual
checks to ensure that the conversion has not created any regressions in
the style.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-22 01:38:47 +01:00
Alexi Doak
1dd1ec5870
[ResponseOps] Adding back recovered alert optimization for the task state (#215344)
## Summary

I refactored the flapping code on ON week in PR
https://github.com/elastic/kibana/pull/213825 , and I removed an
optimization for removing recovered alerts from the task state that we
don't need to track for flapping. This PR adds it back.


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

### To verify
1. Create an rule let it be active for a little and then let it recover.
2. Verify that once the flapping array doesn't have any `true` values
changes
2025-03-22 02:21:16 +02:00
Kevin Delemme
f5424e0c51
feat(slo): add saved query (#215566)
Resolves https://github.com/elastic/kibana/issues/214478

## Summary

Add options to save query and load saved query to the various
QueryBuilder used in the SLO form.



https://github.com/user-attachments/assets/dbc614a9-add1-4781-b577-e5abc2b8ea24
2025-03-21 19:45:53 -04:00
Marta Bondyra
42e57990cf
[Lens] fix drag and drop failing test (#215439)
## Summary

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

For some reason this PR https://github.com/elastic/kibana/pull/213928
didn't catch that the changes make the test fail. This PR fixes it.
After this, we'll be able to backport the original PR.
(The pattern of using `data-attr-field` is already used in Discover so I
think it's a good opportunity to align)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
2025-03-21 18:21:35 -05:00
Andrew Macri
d52c5ed85c
[Security Solution] [Attack discovery] Prompt updates (#215578)
## [Security Solution] [Attack discovery] Prompt updates

This PR contains updates to the following Attack discovery prompts:

- `attackDiscoveryPrompt`
- `continuePrompt`
- `refinePrompt`

Thank you @mgarzon for these improvements!
2025-03-21 17:06:37 -06:00
Nick Peihl
f123b5096a
[Dashboard] Composable content management transforms (#213831) 2025-03-21 18:04:39 -04:00
Philippe Oberti
d46bd47d7b
[AI4DSOC] Alert summary dataview (#215265)
## Summary

This PR continues and finalizes the pre-work done in
https://github.com/elastic/kibana/pull/214889. Once this PR is merged,
the actual alert summary page content implementation will begin. We need
a dataView to be created before being able to fetch any data. The
`wrapper.tsx` component creates a dataView.
- While the dataView is being created, a loading skeleton mimicking the
future layout of the alert summary page is rendered.
- If the dataView fails to be correctly created (meaning if it comes
back undefined or without an id) we show an error message.
- If the dataView is correctly created, we continue to the alert summary
page (currently just a div)


https://github.com/user-attachments/assets/f1c8f63e-30a0-4186-94b6-f18a18a89218

![Screenshot 2025-03-20 at 12 09
02 AM](https://github.com/user-attachments/assets/8ad6055b-1788-4372-afc1-af33e75cb29a)

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

### Notes

You'll need to either have some AI for SOC integrations installed, or
more easily you can change the `alert_summary.tsx` line 38 from `if
(installedPackages.length === 0) {` to `if (installedPackages.length >
0) {` to force the wrapper component to render.

### 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
2025-03-21 14:25:00 -05:00
Ania Kowalska
d7d690c44b
[Discover] SCSS to Emotions migration part 2/4 (#214729) 2025-03-21 19:46:40 +02:00
jennypavlova
42a66131c5
[APM] Fix: Add missing user_agent version field and show it on the trace summary (#215403)
Closes #215229 

## Summary

This PR adds the `USER_AGENT_VERSION` missing field to the
`optionalFields` query fields

## Testing

- Find a trace with user agent version (on the edge oblt we have it for
`elastic-co-frontend` for example)
- Go to the transaction tab (in case of `elastic-co-frontend` click on
`/blog/:id`)
If the user agent version is available it should be visible in the trace
summary:

<img width="1155" alt="image"
src="https://github.com/user-attachments/assets/75b7e331-44d0-4d1c-8060-815c269e23c9"
/>
2025-03-21 18:33:01 +01:00
Ying Mao
5e4981f18f
Fixes Failing test: X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/telemetry/alerting_and_actions_telemetry·ts - alerting api integration security and spaces enabled - Group 2 Alerting and Actions Telemetry test telemetry should retrieve telemetry data in the expected format (#214868)
Resolves https://github.com/elastic/kibana/issues/202564

## Summary

The test is testing for the number of alerts generated assuming the AAD
rule runs 3 times (2 alerts per run). It looks like sometimes, the rule
only runs twice before the telemetry is collected so this updates the
test to verify the number of alerts based on the number of times the
rule ran.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-21 13:26:09 -04:00
Ahmad Bamieh
f83612f4e0
[Core][UA] Forward-port 8.18 changes into main (#214996)
## Summary

We've done a lot of UA changes against 8.18 and 8.x but we did not port
them to `main`. The reason we did not do the active development against
`main` is because UA is disabled on main and we need those features in
8.last not on `9.0` initially. This port is to keep the codebase
consistent and to be able to use these new UA features in the future
post `9.0`.

Any issues that that are caused from this port we should wrap them in a
config and disabled them on main and enable this new flag on `8.x`.

What is being ported?
- [x] Upgrade assistant plugin
(`x-pack/platform/plugins/private/upgrade_assistant`)
- [x] Integration test changes
(`x-pack/test/upgrade_assistant_integration`)
- [x] new UA doc links
(`src/platform/packages/shared/kbn-doc-links/src/get_doc_links.ts`)
- [x] localization files sync
(`x-pack/platform/plugins/private/translations/translations/*.json`)
- [x] Unfreeze is no longer supported after `8.x`. So removed it from
data streams readonly migration step and throw an error for regular
indices migration.

Closes https://github.com/elastic/kibana/issues/210490

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-21 18:46:46 +02:00
Philippe Oberti
11a512e735
[AI4DSOC] Alert summary landing page (#215246)
## Summary

This PR continues the work done in
https://github.com/elastic/kibana/pull/214889 and implements the landing
page for the new alert summary page. This landing page should only be
visible by users if none of the AI for SOC integrations have been
installed (more info in [the previous
PR](https://github.com/elastic/kibana/pull/214889)).

The landing page consist of 2 main sections:
- the top section with a title and an image
- the bottom section where we list the top 2 AI for SOC integrations -
Splunk and GoogleSecOps - which are clickable and will redirect the
users to the respective integration detail pages, as well as a `View all
integrations` button which will redirect the users to the integrations
page.

![Screenshot 2025-03-19 at 3 37
46 PM](https://github.com/user-attachments/assets/311bb9b9-1bd3-4c7a-bcb9-f929d459aa70)


https://github.com/user-attachments/assets/0d15a65d-7f2e-4e2d-9919-896f5532f08c

Link to mocks:
https://www.figma.com/design/DYs7j4GQdAhg7aWTLI4R69/AI4DSOC?node-id=4408-128249&t=GaxMP8OEZ9Qsjl0R-0

### Notes

- The current image is only temporary and acts as a placeholder while
the UIUX team is creating a gif or video (no ETA on when it will be
available).
- The integration links are subject to change in the future, but that
work is handled by a different team and as not being completed yet

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

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

Contributes to https://github.com/elastic/security-team/issues/11979
2025-03-21 11:42:08 -05:00
Elena Shostak
2160dd1d95
Unauthorized route migration for routes owned by kibana-management (#214782)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-21 17:37:07 +01:00
Julia Bardi
04cc68a2cb
[Fleet] update disabled inputs (#215512)
## Summary

Closes https://github.com/elastic/kibana/issues/215411

Disable `aws-s3` and `streaming` as an input type for agentless

<img width="2540" alt="image"
src="https://github.com/user-attachments/assets/9ee96838-919c-4be3-851b-51afad6b6e06"
/>
<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/a6f702cf-6885-4512-ae04-7074cbfa0a40"
/>
2025-03-21 18:19:37 +02:00
Gergő Ábrahám
a3f6c179b2
[EDR Workflows] Enable skipped defend workflows management cypress tests - response console processes (#215467)
## Summary

this PR unskips and fixes defend workflows cypress tests

flaky runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8073
- 50/50 ESS cypress 
- serverless  - lot of serverless tests failed because of metering
cypress test, but not because of processes test

> [!note]
> flaky runner was performed together with metering cypress test (see
https://github.com/elastic/kibana/issues/187083), which is indeed flaky,
so it's removed from this PR


- closes: https://github.com/elastic/kibana/issues/170371
- closes: https://github.com/elastic/kibana/issues/170370
- needs to be backported to 8.18, 8.x, 9.0

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-03-21 17:06:09 +02:00
Efe Gürkan YALAMAN
62f8027c57
[Query Rules]Query rules UI plugin (#215029)
## Summary

Adds Query Rules UI Plugin. It is disabled and pretty much empty as we
want to split the implementation in multiple parts and enable the
feature once implementation is done.

It is disabled for Security.
It is disabled for Observability.
It is enabled but behind a feature flag for Search while it is not
useful to enable it with partial implementations.


### 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
- [ ] [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)
2025-03-21 15:19:25 +01:00
Rodney Norris
5b504f8f2a
[Search][Playground] Query mode support for running search (#214482)
## Summary

Updated the Search Playground Query View to allow running the query and
seeing the JSON response.

### Screenshots
Empty State

![image](https://github.com/user-attachments/assets/1edb1ad8-5b5d-4069-a96f-4fbb0f9212b4)

With Query Response:

![image](https://github.com/user-attachments/assets/8fe7b1c5-70b3-4b24-91e5-f948d91d83d0)


### 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
- [ ] [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-03-21 08:59:51 -05:00
Jeramy Soucy
605651259e
[FIPS] Skip basic license cases list view test for FIPS pipeline (#215182)
## Summary

Skips the basic license cases list view test since it is expecting the
cases list to not to be present for a basic/essentials tier license, but
the FIPS pipeline always runs with a platinum license override.
2025-03-21 15:57:44 +02:00
Julia Bardi
dc5144d303
[Fleet] Sync custom assets to remote clusters (#215279)
## Summary

Relates https://github.com/elastic/kibana/issues/206244

Adding `custom_assets` to `fleet-synced-integrations` index, including
all component templates and ingest pipelines that has suffix `@custom`
and belong to a package.

In a follow up pr will add logic to read and install the custom assets
on the remote cluster.

To verify:
- enable feature flag `enableSyncIntegrationsOnRemote`
- add a remote es output with `sync_integrations` enabled
```
xpack.fleet.outputs:
  - name: 'Preconfiged remote output'
    type: 'remote_elasticsearch'
    id: 'remote-output2'
    hosts: ["http://192.168.64.1:9200"]
    sync_integrations: true
    kibana_url: "http://localhost:5601"
    secrets:
      service_token: token
      kibana_api_key: key
```
- visit Fleet UI to let setup run that creates
`fleet-synced-integrations` index
- add system integration and create a custom component template and
ingest pipeline
- wait 5m for the async task to run
- verify that the `fleet-synced-integrations` index contains the custom
assets populated
- delete one of the assets or uninstall the package
- wait 5m for the task to run again
- verify that the assets are marked with `is_deleted:true` and has a
`deleted_at` field set

```
GET fleet-synced-integrations/_search

{
        "_index": "fleet-synced-integrations",
        "_id": "fleet-synced-integrations",
        "_score": 1,
        "_source": {
          "remote_es_hosts": [
            {
              "hosts": [
                "http://192.168.64.1:9200"
              ],
              "name": "Preconfiged remote output",
              "sync_integrations": true
            }
          ],
          "integrations": [
            {
              "package_version": "1.67.3",
              "updated_at": "2025-03-20T07:17:55.143Z",
              "package_name": "system"
            }
          ],
          "custom_assets": {
            "component_template:logs-system.auth@custom": {
              "type": "component_template",
              "name": "logs-system.auth@custom",
              "package_name": "system",
              "package_version": "1.67.3",
              "is_deleted": false,
              "template": {
                "mappings": {
                  "properties": {
                    "new_field": {
                      "type": "text"
                    }
                  }
                }
              }
            },
            "ingest_pipeline:logs-system.auth@custom": {
              "pipeline": {
                "processors": [
                  {
                    "user_agent": {
                      "field": "user_agent"
                    }
                  }
                ],
                "version": 1
              },
              "package_version": "1.67.3",
              "is_deleted": false,
              "name": "logs-system.auth@custom",
              "package_name": "system",
              "type": "ingest_pipeline"
            }
          },
          "custom_assets_error": {}
        }
      }
```

<img width="1296" alt="image"
src="https://github.com/user-attachments/assets/35503453-ab4a-4649-a889-27dd188e3d55"
/>


### 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
2025-03-21 14:44:01 +01:00