Commit graph

84939 commits

Author SHA1 Message Date
Ryan Keairns
60eb4eb89d
Merge branch 'main' into rk/obs-app-menu-cleanup 2025-03-24 07:22:57 -07:00
Stratoula Kalafateli
935fc0f758
[ES|QL] Removes highlighting from script as it is being provided by ES docs already (#215631)
## Summary

This PR https://github.com/elastic/elasticsearch/pull/125251 adds
highlighting for the code blocks so it is not needed to be added on the
kibana side. This PR removes it.

I didnt run the script because it will remove the highlighting. It will
run next Monday with @craigtaverner 's PR being merged
2025-03-24 15:17:12 +01: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
Gerard Soldevila
366a0da35c
Fix plugin-list script (#215648)
## Summary

A [recent PR](https://github.com/elastic/kibana/pull/212558/files) (3
weeks ago) migrated docs under `/docs` folder, from `.asciidoc` to
`.md`.

Unfortunately, some of these docs (well, at least one) were generated
automatically using a script:

`node scripts/build_plugin_list_docs.js` was updating the
`docs/developer/plugin-list.asciidoc`

As a result of the migration:

The CI pipeline step fails, and the list of plugins is no longer
updated.
Besides:
* The https://www.elastic.co/guide/en/kibana/current/plugin-list.html is
currently broken.
* This page is (or should be) built from
https://github.com/elastic/kibana/blob/main/docs/extend/plugin-list.md,
which is also broken.

They are broken cause some plugins' descriptions use the pipe `|`
character, which breaks the Markdown layout.

This PR updates the logic that generates the plugin-list, switching from
`.asciidoc` to `.md`, and escaping `\n` and `|` characters to allow for
better descriptions.
2025-03-24 15:53:17 +02: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
Kibana Machine
56cc617bb1
[ES|QL] Update grammars (#215621)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-03-24 13:35:17 +01: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
Alex Szabo
415d672d31
[ci] Flaky test runner respect labels (#215167)
## Summary
Extracts `collectEnvFromLabels` to a separate module, so it can be used
in the flaky test runner. With this, the label `ci:use-chrome-beta` will
be passed along to the flaky test runner, allowing for flaky testing on
chrome beta.

Other labels we treat as modifiers for PR behavior through setting env
variables should also be added to this set of mapping.
2025-03-24 12:01:06 +01:00
Stratoula Kalafateli
574e2580c6
[ES|QL] Fixes the visibility of the datepicker (#214728)
## Summary

Fixes the visibility of the timepicker on the dashboard

<img width="720" alt="image"
src="https://github.com/user-attachments/assets/9fd40aa4-b334-4854-8b01-e106fd2e1f11"
/>

and the position in case the editor doesnt have a lot of space. in that
scenario we move the timepicker to the right

<img width="759" alt="image"
src="https://github.com/user-attachments/assets/7a8dbccf-ae42-452a-9046-4308a2a783bb"
/>
2025-03-24 10:50:53 +01:00
Kibana Machine
eed0a195a2
[ES|QL] Update function metadata (#215622)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-03-24 10:33:04 +01:00
elastic-renovate-prod[bot]
f81572e462
Update dependency elastic-apm-node to ^4.11.2 (main) (#214940)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[elastic-apm-node](https://redirect.github.com/elastic/apm-agent-nodejs)
| dependencies | patch | [`^4.11.1` ->
`^4.11.2`](https://renovatebot.com/diffs/npm/elastic-apm-node/4.11.1/4.11.2)
|

---

### Release Notes

<details>
<summary>elastic/apm-agent-nodejs (elastic-apm-node)</summary>

###
[`v4.11.2`](https://redirect.github.com/elastic/apm-agent-nodejs/releases/tag/v4.11.2)

[Compare
Source](https://redirect.github.com/elastic/apm-agent-nodejs/compare/v4.11.1...v4.11.2)

For more information, please see the
[changelog](https://www.elastic.co/guide/en/apm/agent/nodejs/current/release-notes-4.x.html#release-notes-4.11.2).

##### Elastic APM Node.js agent layer ARNs

|Region|ARN|
|------|---|

|af-south-1|arn:aws:lambda:af-south-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-east-1|arn:aws:lambda:ap-east-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-northeast-1|arn:aws:lambda:ap-northeast-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-northeast-2|arn:aws:lambda:ap-northeast-2:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-northeast-3|arn:aws:lambda:ap-northeast-3:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-south-1|arn:aws:lambda:ap-south-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-southeast-1|arn:aws:lambda:ap-southeast-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-southeast-2|arn:aws:lambda:ap-southeast-2:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ap-southeast-3|arn:aws:lambda:ap-southeast-3:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|ca-central-1|arn:aws:lambda:ca-central-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-central-1|arn:aws:lambda:eu-central-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-north-1|arn:aws:lambda:eu-north-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-south-1|arn:aws:lambda:eu-south-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-west-1|arn:aws:lambda:eu-west-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-west-2|arn:aws:lambda:eu-west-2:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|eu-west-3|arn:aws:lambda:eu-west-3:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|me-south-1|arn:aws:lambda:me-south-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|sa-east-1|arn:aws:lambda:sa-east-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|us-east-1|arn:aws:lambda:us-east-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|us-east-2|arn:aws:lambda:us-east-2:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|us-west-1|arn:aws:lambda:us-west-1:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

|us-west-2|arn:aws:lambda:us-west-2:267093732750:layer:elastic-apm-node-ver-4-11-2:1|

</details>

---

### Configuration

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

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

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

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

---

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

---

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

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-24 10:55:26 +02:00
Sergi Romeu
965a69d9fb
[Storybook] Use native theme switcher (#215443)
## Summary

Closes #213294

This PR replaces the custom theme switcher in favor of the native
toolbar customization SB has integrated.

Also removed `@storybook/icons` which was only used in the theme
switcher component.

## How to test
1. Run `yarn storybook <plugin>`
2. You should be able to change between themes on the toolbar.
2025-03-24 10:54:15 +02:00
Stratoula Kalafateli
17ecc6a9f1
[ES|QL] Attempt to fix the code scan report problem (#215278)
## Summary

Closes https://github.com/elastic/kibana-team/issues/1568
2025-03-24 09:46:06 +01:00
Kibana Machine
9fd3771061
[api-docs] 2025-03-24 Daily api_docs build (#215623)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1021
2025-03-24 08:14:34 +02:00
Jesus Wahrman
04772fcc45
Register resident set size and limit bytes metrics in APM (#215458)
## Summary

Resolves https://github.com/elastic/kibana-team/issues/1565

Register resident set size and limit bytes metrics in APM.

<img width="1614" alt="image"
src="https://github.com/user-attachments/assets/d5f1caf5-da4f-4acd-a63f-2b5256a91307"
/>


### 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
- [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-23 23:22:30 +02:00
Kibana Machine
b876e79ae7
[api-docs] 2025-03-23 Daily api_docs build (#215605)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1020
2025-03-23 08:11:58 +02: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
Kibana Machine
5c05fb9ad7
[api-docs] 2025-03-22 Daily api_docs build (#215602)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1019
2025-03-22 08:16:47 +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
Lisa Cawley
bce77d761a
[DOCS] Removes Serverless API x-beta overlay (#215587) 2025-03-22 02:30:25 +02: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
Kaarina Tungseth
9bbfb7e7af
Updates navigation titles and descriptions for release notes (#215422)
## Summary

Updates the navigation titles, adds short descriptions, and removes
release dates.
2025-03-21 16:56:16 +00: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
Alex Szabo
621aa5e782
Revert "Upgrade axios 1.8.3 in buildkite (#215203)" (#215530)
This reverts commit d8f6bd694b.

## Summary

Since this upgrade, we're getting 404 on failed test annotation.
Reverting this while we figure out what's causing it.
2025-03-21 17:09:02 +01: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
Paulina Shakirova
a95d84d6ff
[a11y] Dashboard Details page missing aria-label (#215292)
## Summary

Replace EuiTooltip with EuiCallout to fix an a11y issue:
Title and Description fields are missing accessible label on Dashboard details
page
2025-03-21 15:39:53 +02:00
Sebastián Zaffarano
9cf3bea759
[Security Solution][Telemetry] Add ingest pipelines stats task (#213435)
## Summary

Add a new telemetry task to the security solution plugin to collect
ingest pipeline stats. The new task runs once a day, calls the
`_nodes/stats/ingest` API, and sends an EBT event with the following
information:

```js
export interface NodeIngestPipelinesStats {
  name: string;
  totals: Totals;
  pipelines: Pipeline[];
}

export interface Pipeline {
  name: string;
  totals: Totals;
  processors: Processor[];
}

export interface Processor {
  name: string;
  totals: Totals;
}

export interface Totals {
  count: number;
  time_in_millis: number;
  current: number;
  failed: number;
}
```

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2025-03-21 14:38:58 +01:00
Matthew Kime
f77e29f582
[Search Profiler] Index field no longer resets on query edit (#215420)
## Summary

Previously, editing the query would reset the index field to `_all`.
This was due to using `useState` instead of `useRef` to store the query
value.

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

How to test
1. Go to search profiler
2. Enter an index name, anything but `_all` - which is already there
3. Edit the query
4. Did the index value remain unchanged? Good! Its fixed!

ALSO - need to test to make sure this works with content in the url.
2025-03-21 15:29:33 +02:00
Ash
bcf0d10df2
[SecuritySolution][Endpoint] Re-enable endpoint permissions functional tests (#215446)
## Summary

Unskips the skipped FTR test.
closes https://github.com/elastic/kibana/issues/191243

### Flaky runner
- only the permission tests -
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8071
x 100 (all green)
- all tests in the group -
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8072
x 100 ( all green)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

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

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

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-03-21 14:10:53 +01:00