Commit graph

46297 commits

Author SHA1 Message Date
Joe Reuter
231733429c
🌊 Fix "stream" field conflicting with stream.name (#211004)
Currently, streams logs with a `stream` field fail ingest because the
set processor tries to set a
```
"stream": {
  "name": "<name field>"
}
```

which doesn't work if `"stream": "abc"` is already in the document (some
shippers do this, e.g. docker or kubernetes)

Using a painless processor this problem can be avoided and you can have
`"stream"` and `"stream.name"`
2025-02-13 19:27:16 +01:00
Konrad Szwarc
f4365f6e89
[EDR Workflows] Workflow Insights - Change update api RBAC (#210637)
This PR addresses an issue where users with read privilege to insights
were unable to successfully complete a remediation path due to the
inability to mark an insight as remediated at the final step.

With this change, we adjust the required permissions for interacting
with the update API from writeWorkflowInsights to readWorkflowInsights.
The rationale behind this is that writeWorkflowInsights should signify
the ability to trigger new scans for insights, while
readWorkflowInsights should be sufficient for addressing found issues
without the option to generate new ones.


https://github.com/user-attachments/assets/8c1af654-d9e4-40d7-8718-1388677e8d46
2025-02-13 17:14:51 +01:00
Karen Grigoryan
4b4c5ce491
[Security Solution][Explore] Migrate from styled-components in shared (#210311)
Addresses #206436

- Replace styled-components with @emotion/react and @emotion/styled
across multiple components
- Remove `@kbn/ui-theme` instances
- Update test cases to use @emotion/jest matchers for toHaveStyleRule to
work properly
- Adjust styles to use `css` from `@emotion/react`
- Remove unused imports and updated snapshots


https://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7
2025-02-13 17:14:34 +01:00
Bharat Pasupula
cf0f338d87
[Automatic Import] Fix generated name for integration title (#210916)
## Summary

A bug was introduced with #210770 and this PR fixes that. The Package
name generated is validated.
2025-02-13 17:02:03 +01:00
Pablo Machado
fe96fe2dbc
[Security Solution] Update entity store copies (#210991)
## Summary

* Update `Initializing entity store`  to `Configuring Entity Store`
* Update `Your entity store is currently empty. Add information...` to
`Add information...`

<img width="400"
src="https://github.com/user-attachments/assets/f64bf5de-bb42-4675-a816-6202dca4bb80"/>
<img width="400"
src="https://github.com/user-attachments/assets/cf1ea4c0-416d-408a-a166-b85c3e57135a"/>
2025-02-13 16:42:09 +01:00
Paul Tavares
10e2d9e7e9
[Security Solution][Endpoint] Add new "Global Artifact Management" RBAC privilege in support of spaces (#210426)
## Summary

- Adds a new kibana feature privilege to the `Security > Endpoint`
grouping for "Manage Global Artifacts"
- new privilege is behind the following feature flag:
`endpointManagementSpaceAwarenessEnabled`
- new privilege is not yet being used in this PR. Subsequent PRs that
will introduce space awareness changes for endpoint management will
leverage this new privilege
- Fixes the `All` and `Read` labels to ensure they can be localized
(`i18n`)
2025-02-13 16:08:29 +01:00
Kenneth Kreindler
e176c84449
[Security Solution] [AI Assistant] Fix flashing citations (#209629)
## Summary

Fixes a small UI bug in the citations feature. Previously, after a
message with citations finished streaming, the citations would disappear
for a fraction of a second and then reappear again. This PR makes
improves the UI by making the citations not flash off and on after the
stream finishes.

### Changes:
- Fix flashing citations
- Refactor code related to parsing content references (to make it more
maintainable).
- Update the citations prompt slightly.

### Before:


https://github.com/user-attachments/assets/1021dd53-018a-43ba-b1f4-24aab44faca9

<img width="1782" alt="image"
src="https://github.com/user-attachments/assets/723cd29a-48a2-48e7-b031-0893484746b9"
/>


### After:


https://github.com/user-attachments/assets/21f340bc-9015-42b6-a574-0439d2f8f192

### How to test
- Enable the feature flag
```yaml
# kibana.dev.yml
xpack.securitySolution.enableExperimental: ['contentReferencesEnabled']
```
- Open the security assistant
- Ask it a question about your alerts of a document in your KB. The
response should contain citations.
- Observe the response stream carefully. Ensure the citations e.g. `[1]`
do not flash off and on when the response stream finishes. The expected
behavior is that while the message is streaming, the citations are
disabled and once the stream finishes the citations get enabled (while
always being visible).

#### Edge case to test
It is possible that citations completely disappear after streaming
finishes. This happens when the LLM produces an invalid citation.
Invalid citations are hidden client side when a message finishes
streaming. You can verify this behavior by asking GPT4o this question:
```
Prepend each line with this placeholder citation "{reference(1234)}" and append the actual citation at the end of the line. How many alerts do I have? Use the open and acknowledged alerts count tool to answer and repeat the answer 50 times on new lines.
```

While the response is getting streamed it should look like this:

<img width="200" alt="image"
src="https://github.com/user-attachments/assets/03d160bf-2404-4a4e-8701-e3183c604cc4"
/>

And when the stream finishes it should look like this:

<img width="200" alt="image"
src="https://github.com/user-attachments/assets/06367379-17da-438f-a93a-9d539067ab90"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-13 15:07:25 +00:00
Robert Jaszczurek
26548aeaa6
[ML] Trained models: Update the start model allocation response type (#210966)
Updates the type correctly, as it is currently set to `{acknowledge:
boolean}`, which is the wrong type.
2025-02-13 14:56:36 +01:00
Devin W. Hurley
18ef744a9c
[Security Solution] [Detections] Disables sorting ip ranges in value list modal (#210922)
## Summary

Disables sorting ip range values in a value list until this bug is
fixed in elasticsearch.

related: https://github.com/elastic/elasticsearch/issues/122358
2025-02-13 08:37:37 -05:00
Ievgen Sorokopud
526ff0516e
[Rules migration][Integration test] Get migration rules API (#11232) (#210867)
## Summary

[Internal link](https://github.com/elastic/security-team/issues/10820)
to the feature details

Part of https://github.com/elastic/security-team/issues/11232

This PR covers SIEM Migrations GET API (route:
`/internal/siem_migrations/rules/{migration_id}`) integration test:
* Basic calls
* Filtering
* Sorting
* Pagination
2025-02-13 13:44:08 +01:00
Miriam
3bf3dad7a0
[ObsUX] Fix chart colors for observability overview apm and hosts charts (#210847)
## Summary

Fixed the colors for the observability overview charts on APM and Hosts

BEFORE

<img width="1685" alt="image"
src="https://github.com/user-attachments/assets/ee68eec4-742c-44ab-bbb6-8890bee1c0bf"
/>

AFTER


![image](https://github.com/user-attachments/assets/2d8f8970-0938-4ccb-8679-533760fb3622)


> [!NOTE]  
> For some reason CPU chart on Hosts it's not showing, seems a bug, but
that's out of the scope of this issue

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-13 11:54:43 +00:00
Shahzad
159910d06f
[Synthetics] Refactor screenshot block route to not return 404 !! (#210656)
## Summary

Refactor screenshot block route to not return 404 !!

Route will return empty list instead of 404 for missing screenshot
blocks !!

This also updates to enable _inspect on route !!

### Testing
Screenshot still works as expected 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/9a2b887d-9091-4bff-97e6-3c0775e6f6bd"
/>
2025-02-13 12:11:13 +01:00
Shahzad
211165524f
[SLOs] Always show inspect slo button !! (#210734)
## Summary

 Always show inspect slo button !!

It's extremely useful when doing an investigation so i think it don't
makes sense to hide it behind settings.

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/b19fe5c8-2dd1-4817-81d2-6ce8864b3c27"
/>


<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/faa07522-5b52-4c56-961a-4ebc6d0fc759"
/>
2025-02-13 12:10:27 +01:00
Joe Reuter
25127500bb
🌊 Streams: Support classic streams without pipelines (#210223)
Unwired streams can come with or without a default ingest pipeline
defined. If there is a pipeline defined, it's clear where to plug in our
custom parsing logic.

However, so far we would bail out on streams without a configured ingest
pipeline. However, since there are good reasons to have data streams
without an ingest pipeline, we should support this case.

This PR makes sure we do:
* If the streams processing pipeline is the default pipeline itself
already, everything is fine
* If there is none yet, extend the user-managed index template to set
the default pipeline to the streams processing pipeline and roll over
the data stream to apply
2025-02-13 11:20:29 +01:00
Pablo Machado
c241772ecb
Delete 'critical services' count from Entity Analytics Dashboard header (#210827)
## Summary

This PR deletes the "Critical Services" component from the Entity
Analytics Dashboard header.
 
![Screenshot 2025-02-12 at 10 33
40](https://github.com/user-attachments/assets/07e57c40-e6c7-4c7f-9546-92274ad9ccf4)


The component was included with the service entity store, but Product
and QA consider it confusing and not very valuable to our users.


### How to test it?
* Start Kibana with security data
* Go to the security solution/entity analytics dashboard
* The component shouldn't be there
2025-02-13 07:14:55 -03:00
Tomasz Kajtoch
e5958a47f3
Upgrade EUI to v99.2.0-borealis.0 (#209690)
`99.1.0-borealis.0`  `99.2.0-borealis.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## [`v99.2.0`](https://github.com/elastic/eui/releases/v99.2.0)

- Changed `EuiFieldText` styles to prioritize `disabled` styling over
`readonly`. ([#8271](https://github.com/elastic/eui/pull/8271))
- Added `plugs` and `web` glyphs to `EuiIcon`
([#8285](https://github.com/elastic/eui/pull/8285))
- Update `title` on `EuiColorPalettePickerPaletteProps` to be optional
([#8289](https://github.com/elastic/eui/pull/8289))

**Bug fixes**

- Fixed an issue with EuiDataGrid with auto row height resulting in a
table of 0 height ([#8251](https://github.com/elastic/eui/pull/8251))
- Fixed `disabled` behavior of `EuiFieldText` to prevent input changes.
([#8271](https://github.com/elastic/eui/pull/8271))

**Borealis changes**

- [Visual Refresh] Provide hooks for color palette functions
([#8284](https://github.com/elastic/eui/pull/8284))
- [Visual Refresh] Make Borealis default theme in EUI
([#8288](https://github.com/elastic/eui/pull/8288))

---

As you can probably tell, there are plenty of updated tests and
snapshots this time around. They are the result of the following:

1. We've updated the default theme in `@elastic/eui` v99.2.0 to
Borealis, which led to kibana tests using `renderWithTheme`,
`mountWithTheme`, and other utility functions that wrap the tested
component in `<EuiThemeProvider>` to switch to the correct, new color
values. With this change, all tests should now use Borealis, regardless
of the testing framework or its configuration.
2. Because of the default theme change in EUI, some class name hash
fragments (e.g., `css-`**`wprskz`**`-euiButtonIcon-xs-empty-primary`)
regenerated.

Most Borealis-related changes in this PR are test env only and have no
impact on what users see when using Kibana.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-13 10:20:46 +01:00
Quynh Nguyen (Quinn)
e710f09d0c
[Fleet] Fix unattended Transforms in integration packages not automatically restarting after reauthorizing (#210217)
## Summary

This PR partially addresses an issue with
https://github.com/elastic/integrations/issues/12486 where the transform
doesn't "restart" immediately after reauthorizing. This is because for
unattended transform, calling `_start` will come back with 409 transform
already started error. So this PR tracks if the transform has
`settings.unattended: true`, if yes, stop the transform first before
starting.

Without this step, the transform will retry again and become healthy
again anyway but it takes longer for that retry to happen, so this PR
speeds up the process of retrying.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-12 23:49:58 -06:00
Bailey Cash
4d3cf33ffd
Add location, fix name badge links for Synthetics SLOs (#210695)
## Summary

- Implements #178138 
- Fixes a bug where clicking on the existing link to the monitor via the
name badge led failed to load any data.

## Release Notes
- Fixes a bug where clicking on the name badge for a synthetics monitor
on an SLO details page would lead to a page that failed to load monitor
details.
- Adds a working link to the location badge on synthetics SLOs that will
route the user to the monitors page with a filter applied that matches
the location of the origin SLO.

![Screenshot 2025-02-11 at 3 31
15 PM](https://github.com/user-attachments/assets/1df39069-fc42-4c33-a7e5-8395b2730f43)
![Screenshot 2025-02-11 at 3 31
34 PM](https://github.com/user-attachments/assets/f1b3180f-eb9c-4f3b-9ff6-66bd4d1f8d5b)
2025-02-12 21:08:13 +01:00
James Gowdy
36c764ebf7
[ML] AIOps Hiding saved query controls (#210556)
The AIOps pages in ML make use of the shared query bar component, but do
not support saved queries.
By having the load and save query options in the menu, it can give the
impression that these options are generally available but for some
reason cannot be used.
This PR adds a new optional flag which allows the load and save options
to be hidden from the menu.
The flag defaults to always showing the options.

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

**Before**

![image](https://github.com/user-attachments/assets/a26a73d0-63b4-47c1-bfa2-8579b08dfe24)

**After**

![image](https://github.com/user-attachments/assets/4fe6937e-3c7d-4d15-98da-fdf472fc21ee)
2025-02-12 19:52:30 +00:00
Marshall Main
9cad58719b
[Security Solution] Remove non-errors and user errors from console logs (#206973)
## Summary

This PR will drastically reduce the number of console logs from the
Detection Engine in the overview cluster. If your team is depending on
the `INFO`, `WARNING`, or `verification_exception` or `ml job missing`
`ERROR` logs in that cluster, please raise your concerns here.

Addresses https://github.com/elastic/kibana-team/issues/1395,
https://github.com/elastic/kibana-team/issues/1333

Historically Detection Rules have written an enormous amount of data to
the console logs. This was helpful in debugging years ago before we had
the event log, but now we generally don't use them much. The console
logs all still get scooped up and sent to the overview cluster though.
Every rule execution writes two or more status changes (first to
'running', then to the final status later on) and these go to the
console, the event log, and the rule SO. The end result is 76% of all
logs are coming from detection rules changing status, mostly successful
statuses. These provide little value on their own.

This PR restricts console logging from detection rules to only non-user
errors. User errors and execution statuses below the error level will be
logged in the console at the `debug` level. "Unexpected" errors like
search exceptions, timeouts, etc will still appear as errors in the
console logs. The general idea is that the logs from detection rules in
the console should represent some kind of unexpected system failure.

To implement this change, I updated the console logging logic in both
the security rule execution logger. User errors reported to the
framework will still create console error logs since they're logged at
the framework level.

## Testing
Create rules that run and generate warnings (e.g. missing index), user
errors (EQL verification exceptions), and non-user errors. An easy way
to create a non-user error at the moment is running a threshold rule
when at least one index searched maps `@timestamp` as a `keyword`
instead of `date`. The non user errors still show up in console logs as
errors. User errors and warnings only show up as debug logs and with
debug logging enabled in the Kibana config.
2025-02-12 13:22:31 -05:00
Brad White
eb204c0f28
skip flaky suite (#207427) 2025-02-12 11:22:27 -07:00
Alexi Doak
8bff766095
[ResponseOps] Updating TM metrics to handle when capacity estimation returns NaN (#207116)
Resolves https://github.com/elastic/kibana/issues/204467

## Summary

`assumedRequiredThroughputPerMinutePerKibana` is `NaN` when the
`capacityStats.runtime.value.load.p90` is undefined. This PR adds a
check to catch when the load.p90 is undefined, throw an error, and
ignore calculating the capacity estimation.


### 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
I was not able to reproduce this locally without changing the code, so
here is how I tested the code and I am definitely open to suggestions of
how to better test this.

1. Update the code to set `capacityStats.runtime.value.load.p90:
undefined`. I set it
[here](286c9e2ddb/x-pack/platform/plugins/shared/task_manager/server/monitoring/capacity_estimation.ts (L55)),
but there are other places upstream where you could set it to
`undefined`.
2. Start Kibana
3. Verify that you see the following log message:
```
 Task manager had an issue calculating capacity estimation. averageLoadPercentage: undefined
```
2025-02-12 10:16:35 -08:00
Pablo Machado
78a596b05f
[SecuritySolution] Make entity store description more generic (#209130)
## Summary

Make entity store description more generic.
Before:
"Store host and user entities observed in events."
"Monitor user and host risk scores, and track anomalies."


After:
"Store entities data observed in events."
"Monitor entities' risk scores, and track anomalies."


![Screenshot 2025-01-31 at 16 29
12](https://github.com/user-attachments/assets/6c7f20aa-e78b-46eb-bbf8-38d863c166bb)
![Screenshot 2025-01-31 at 16 29
31](https://github.com/user-attachments/assets/baca1a83-a1a2-48f7-b5cd-68c00c59caee)
![Screenshot 2025-01-31 at 16 29
47](https://github.com/user-attachments/assets/f7c433a2-85cd-4a22-8e73-14ebf851c047)





### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] 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-02-12 13:47:26 -03:00
Jesse Sant
62977e7069
[Security Solution] Cypress: Also cleanup proxy handler projects (#192213)
## Summary

Based on a request in [this
issue](https://github.com/elastic/security-team/issues/10341). The
Cypress cleanup task for serverless testing didn't include a command to
cleanup the project tested against when that project was created using
the proxy handler. This PR adds a second conditional method in the
cleanup task to cleanup projects with the proxy handler when it is in
use.


### Checklist
- [ ] Cypress tests run with proxy handler
- [x] Projects created during a cypress run with the proxy handler are
automatically cleaned up by the cypress cleanup task


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
Co-authored-by: dkirchan <55240027+dkirchan@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2025-02-12 17:33:53 +01:00
Mykola Harmash
22144405f7
[Obs Onboarding] Add E2E (Ensemble) test for OTel Host quickstart flow (#210022)
Partially resolves https://github.com/elastic/kibana/issues/207735
Required by https://github.com/elastic/ensemble/pull/465 🔒

This adds an E2E test for the OTel Host onboarding flow. The test is
ment to be run by [the Ensemble
workflow](https://github.com/elastic/ensemble/actions/workflows/nightly.yml)
🔒

## How to test locally

See README
`x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/README.md`
2025-02-12 17:24:24 +01:00
Marco Liberati
ab414b4eff
[Lens][Embeddable] Make sure to not serialize searchSessionId (#210765)
## Summary

This PR fixes a regression in the `serializeState` function used to pass
the embeddable attributes to the dashboard to save the panel. In the
refactor this function started to leak the `searchSessionId` in the
serialized state and even if not used after worse it could lead to
issues and in general it's a waste of disk space.


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

## Release notes
It fixes a regression for the serialized state for the Lens embeddable
saving attributes who should not be in the serialized state.
2025-02-12 16:59:47 +01:00
Marius Iversen
c380edd848
[Rule Migration] Resolve bug around ECS mapping node (#210608)
## Summary

This PR was initially to resolve more prompt improvements, but it will
be split into multiple PR's as it also includes a bugfix for ECS mapping
node logic, where ECS mapping node was not always part of the
translation flow.

Some minor prompt improvements are also included, an updated field
mapping for RAG rules (adding the query field) and filtering out metrics
integrations from the RAG for now.

Added telemetry metadata parameters to createModel together with
`maxRetries` as well.
2025-02-12 16:22:05 +01:00
Nathan Reese
d9d0b39272
[dashboard] remove DashboardContainerInput type (#210446)
Part of https://github.com/elastic/kibana/issues/204249

Clean up work from embeddable refactor. PR removes
`DashboardContainerInput` type, which is a duplicate of `DashboardState`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-12 08:16:48 -07:00
Maria Iriarte
c4ecd0d67c
[Lens] Add functional test case for heatmap x-axis label rotation (#208751)
## Summary

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


### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-02-12 16:13:29 +01:00
Agustina Nahir Ruidiaz
f92e50a4a1
[Security Solution] [EUI Refresh] styled component migration Dashboards (#208731)
## Summary

Addresses https://github.com/elastic/kibana/issues/206439
This PR migrates explore page from styled-components to @emotion/styled.
In the process I also convert the kbn/ui-theme json tokens to euiTheme
counterparts.


https://github.com/user-attachments/assets/6cdfbf15-9a77-488c-a0b9-42acc3fe1768

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
2025-02-12 16:05:27 +01:00
Dmitrii Shevchenko
376754afb4
[Security Solution] Fix prebuilt rules exclusion on bulk edit (#209992)
**Resolves: https://github.com/elastic/kibana/issues/209888**

## Summary

Resolves an issue when prebuilt rules were not excluded from bulk
operations when the license tier is not sufficient to customize prebuilt
rules.

See the attached issue for reproduction steps.

**Before**


https://github.com/user-attachments/assets/0f791c4d-f98c-4b97-867d-d8da566eb3a3

**After**


https://github.com/user-attachments/assets/8ed2a1e4-d298-4173-95ca-565e0c280c21
2025-02-12 16:04:13 +01:00
Ying Mao
5500eab90c
Fixes Failing test: Jest Integration Tests.x-pack/platform/plugins/shared/task_manager/server/integration_tests - unrecognized task types should be no workload aggregator errors when there are removed task types (#210399)
Resolves https://github.com/elastic/kibana/issues/208459

## Summary

The fix added in this
[PR](https://github.com/elastic/kibana/pull/206598) to call the
`mark_removed_tasks_as_unrecognized` tasks sometimes throws an error if
the task is in the middle of running. This PR adds a try/catch and a
retry to the `runSoon` call.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-12 09:30:38 -05:00
Julia Bardi
6c257ab50c
[Fleet] add index and task for fleet-synced-integrations (#209762)
## Summary

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

Create `fleet-synced-integrations` index in Fleet setup, added async
task that populates the index with a doc that includes remote ES output
data and installed integrations data.

ES change to add `kibana_system` privileges:
https://github.com/elastic/elasticsearch/pull/121753

To test locally:
- run elasticsearch from source to apply the privilege changes, so that
`kibana_system` can create the index.
```
yarn es source -E xpack.security.authc.api_key.enabled=true -E xpack.security.authc.token.enabled=true  --source-path=/Users/juliabardi/elasticsearch  -E path.data=/tmp/es-data -E xpack.ml.enabled=false
```
- enable the feature flag in `kibana.dev.yml`:
`xpack.fleet.enableExperimental: ['enableSyncIntegrationsOnRemote']`
- add a remote ES output with sync enabled
- install some integrations
- wait until Fleet setup and the task runs
- verify that the index is created and contains a doc with the expected
data

```
GET fleet-synced-integrations/_search

 "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "fleet-synced-integrations",
        "_id": "fleet-synced-integrations",
        "_score": 1,
        "_source": {
          "remote_es_hosts": [
            {
              "hosts": [
                "http://remote1:80"
              ],
              "name": "remote1",
              "sync_integrations": true
            }
          ],
          "integrations": [
            {
              "package_version": "1.64.1",
              "updated_at": "2025-02-05T11:03:02.226Z",
              "package_name": "system"
            }
          ]
        }
      }
    ]
```



### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-12 15:05:58 +01:00
James Gowdy
9fa8ec42a6
[ML] Making creation of data view during file upload optional (#210208)
Adds an option override to tell the file uploader not to create a data
view once ingest has finished.
This is currently not used but should be used in the near future when
creating lookup indices from the es|ql query bar.

The PR also contains some typing clean up to remove duplication.


**Before**

![image](https://github.com/user-attachments/assets/232e8c75-c021-4b5a-ac6a-f15ebb753799)

**After**

![image](https://github.com/user-attachments/assets/de583208-410f-4fbf-94f2-a84a8ac6b690)
2025-02-12 13:22:47 +00:00
Yngrid Coello
d34ee93dcf
[Logs] rename Explorer to Discover (#210772)
Closes https://github.com/elastic/kibana/issues/209240.
2025-02-12 14:18:24 +01:00
Konrad Szwarc
bc08247b7f
[EDR Workflows] Unskip uninstall_agent_from_host.cy.ts (#210348)
It seems the reason for skipping was a temporary hiccup that is no
longer occurring. Unskipping after verifying with the flaky test runner.

closes https://github.com/elastic/kibana/issues/183638
closes https://github.com/elastic/kibana/issues/207423

Flaky test runner (x50)
 `main`
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7857
 `9.0`
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7858
 `8.18`
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7859
 `8.17`
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7860
2025-02-12 14:02:00 +01:00
Stratoula Kalafateli
7683f01564
[ES|QL] Automate the retrieval of grouping functions (#210513)
## Summary

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

Automates the retrieval of grouping functions ( categorize and bucket )
for both the functions definitions and docs.

Buckets signatures are tricky so I overwrite them with our
implementation. Everything else is being retrieved by ES
2025-02-12 13:28:05 +01:00
Bharat Pasupula
9c87ded7d1
[Automatic Import] Fix package name validation (#210770)
## Release Note

Fix package name validation on Datastream page.

## Summary

Closes - #199893

If the package name starts with a number [ Only number , alphabet ,
underscore are allowed ] then some of the script processors in the
pipeline fail with dot annotation since the fields are formed like
`ctx.123_abc.something` which fails with `Illegal Argument Exception` in
script processor.

Hence the package name has additional validation on Data stream page to
restrict it to start with an alphabet or underscore instead.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-02-12 12:48:20 +01:00
Milton Hultgren
42f5b0ba17
[server-route-repository] Only validate zod schema effects in dev mode (#210412)
In https://github.com/elastic/kibana/pull/208166, we added a validation
step that verifies that all zod schemas:
a) Are built with supported types, meaning types that we can analyze for
if they are applied strictly (no excess keys)
b) Are built with any side effects (refine or transform, which may
impact the type reliability)

This doesn't impact the actual parameter validation, but is instead an
additional check on the schemas we're using.
For any violation found, we log a warning, this has the downside of
increasing our total log volume and is only really needed in development
mode.

Hence, in this PR, we're only logging these warnings if Kibana is
running in dev mode, and the PR updates all consuming plugins to pass
this context along.
2025-02-12 12:28:10 +01:00
Miriam
d6db8802da
[ObsUX][APM] Adjust timeseries charts colors (#210749)
## Summary

Because of the new order of colors within the list of data vis colors,
we need to alternate colors when loading them in sequence in the absence
of the definition of series colors overrides. This will avoid confusion
between charts that are very close in color.

For the same reasons, we might want to review and modify some of the
values ascribed to the specific ChartType in `get_timeseries_color.ts`

The bug with the charts being the same colors was introduced in this
[PR](https://github.com/elastic/kibana/pull/207070)

BEFORE


![image](https://github.com/user-attachments/assets/e8ba0797-0ae4-429c-8a43-a6688c3d1b12)

AFTER


![image](https://github.com/user-attachments/assets/bec05099-7c56-47ea-937a-34b85b953f89)


![image](https://github.com/user-attachments/assets/c38556ec-a8cf-4708-a557-de74ab268f6b)


![image](https://github.com/user-attachments/assets/e7f56647-be11-4453-9e49-9c0df607f728)
2025-02-12 11:24:01 +00:00
Ash
60918882ea
[SecuritySolution][Endpoint] Remove hardcoded agent version check for scan test (#210748)
## Summary

> [!NOTE]
> This PR is NOT unskipping the test to minimize conflicts during
backports.
> Manual backports maybe needed as some auto backports may fail as
`security_solution` folder has moved between `8.16` and `8.17`

Removes hardcoded agent version for test setup that was added before
8.15 GA.

refs
https://github.com/elastic/kibana/pull/189174#discussion_r1700257185
closes https://github.com/elastic/kibana/issues/210364

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-02-12 12:19:11 +01:00
Robert Oskamp
4bd80160b2
[kbn-scout] add test config category to reporting (#210167)
## Summary

This PR adds a test config category to the scout reporting. This allows
us to distinguish between UI and API FTR tests.
A new property `testConfigCategory` has been added to all FTR configs
that don't already inherit it from a higher level config.
2025-02-12 11:17:04 +01:00
Umberto Pepato
a74066d6f8
[ResponseOps][Alerts] Move the alerts table to a dedicated package (#207878)
## Summary

This PR turns the AlertsTable into a standalone component, making it
independent from the `TriggersActionsUI` plugin.

#### Removes the alerts table registry

All configuration is now managed through the AlertsTable component
props. Shared configurations are handled by giving consumers the ability
to directly provide alerts table wrapper components (see for example the
`renderAlertsTable` prop of `getCases`).

#### Moves the alerts table to dedicated package(s)

Following the feature-driven structure we're introducing for ResponseOps
(alerting) client-side packages:
- `@kbn/response-ops-alerts-table`
- `@kbn/response-ops-alerts-apis`
- `@kbn/response-ops-alerts-fields-browser`

#### Initial work on improving composition and organization

- Reorganizes the table code into a by-entity-type folder structure
(`components/`, `hooks/`, ...)
- Simplifies some components and breaks into smaller units when possible

## To verify

For consumers of the alerts table:
- Check that all your tables have the same behavior as before (columns,
sort, row actions, bulk actions, etc.)
- Check that your "shared" tables (i.e. cases alerts view in O11y and
Security) have the expected configuration and behavior

> [!WARNING]
> This PR moves a lot of files. Git might not always recognize the
correct delete/add file pairs. If you see weird diffs feel free to reach
out for help!

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

### Identify risks

| Risk | Description | Severity | Mitigation |
|---|---|---|---|
| Table misconfigurations | Some table configurations might slightly
differ from the previous AlertsTableRegistry-backed version | Low |
Quick fix |

## References

Closes #195180

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <xristosnasikas@gmail.com>
2025-02-12 11:07:55 +01:00
Shahzad
d8789819fd
[Synthetics] Fix flaky tests for default rules !! (#210595)
## Summary

Fix flaky tests for custom rule and step detail !!


## Changes

`custom_status_alert.journey.ts
`

Rule name filling was flaky so sometimes it was keeping the default name
value, so i have removed it to simplify and keep default rule name
always which is "Synthetics monitor status rule"

`step_details.journey.ts
`

Monitor wasn't being created due to a bad request on browser monitor
payload, which was causing this test to fail, monitor absence was
causing test to fail.
2025-02-12 10:39:07 +01:00
Ievgen Sorokopud
652385cf80
[SIEM migrations] ES|QL editor: Broken suggestions menu (#11535) (#210603)
## Summary

These changes fix the issue with the shifted suggestion menu of the
ES|QL editor integrated inside the flyout.

This is just a workaround and we will need to remove this once the issue
is fixed by EUI team. Here is the ticket to track:
https://github.com/elastic/eui/issues/8269

**More details regarding the fix**:
Slack conversation: [internal
link](https://elastic.slack.com/archives/C7QC1JV6F/p1736501365531779)

### Screenshots

**Before the fix**

<img width="1653" alt="Screenshot 2025-02-11 at 15 51 42"
src="https://github.com/user-attachments/assets/4925a706-0c31-4730-b37f-acf3bbd0447c"
/>

**After the fix**

<img width="1651" alt="Screenshot 2025-02-11 at 15 52 19"
src="https://github.com/user-attachments/assets/475d45d2-cb42-4a46-ae5c-6e8cef874b40"
/>
2025-02-12 10:04:40 +01:00
Sid
45d9fa01fe
[Session Index] Attach alias to index when index name changes (#210176)
Closes https://github.com/elastic/kibana/issues/210179

## Summary

While attempting to attach an alias to the session index, we were using
`.kibana_security_session_1` as the index name. However, the session
index, if upgraded using the Upgrade assistant gets renamed to
`.kibana_security_session_1-reindexed-for-9` and
`.kibana_security_session_1` is set as an alias pointing to this index.
When we try to reattach the alias using this as the index name, ES
throws an error. This doesn't affect Kibana functionality but it
increases the number of errors thrown in the logs.

**This PR corrects this issue by attaching the alias to the index only
when alias isn't already present. We now only assign the alias if not
present - and not during creation of the index as it is created with the
alias in it's settings.**

### Release note
Fixes the assignment of the Session index alias by only attaching it if
not already present.

## How to test

To see the error in the logs, you'll need at least 7.x and 8.x checked
out locally. Once done, run bootstrap.

#### Step 1: On 7.17
- Start ES with `yarn es snapshot --license trial -E
path.data=/tmp/esdata`
- Start Kibana and login with elastic user
- You can check the contents of Kibana session index:

```
GET .kibana_security_session_1/_search
{
  "query": {
    "match_all": {}
  }
}
```
Should return a single document
- You can now shut kibana and ES


#### Step 2: on 8.x
- Make a backup of the esdata above `cp -r /tmp/esdata /tmp/esdatabkp`
- Start ES as above `yarn es snapshot --license trial -E
path.data=/tmp/esdata`
- Start kibana and login
- Navigate to Upgrade assistant. You should see at least 2 System
indices that require migration (Security and Kibana)
- Start the migrate index process (Step 2 in the UA interface)
- Once done, trigger a local restart of kibana either by restarting
using the start script or just triggering a file save on any file in
your IDE
- You should start seeing the error described above in 100ms increments
till it reaches 10000ms and then it's every 10 seconds
- Navigate to Dev tools and run
```
GET .kibana_security_session/_alias
```
You should see the index as 
```
.kibana_security_session_reindexed-for-9 {
    aliases: {
        // aliases of the index including kibana_security_session_1
    }
}
```

#### Verify the fix
To verify, we have a couple of options - either clone the PR and go
through the same steps as Step 2 above but for 9.0. The easier option is
replace the code of function `attachAliasToIndex` in `session_index.ts`
in 8.x with the changes in this PR. This should restart your kibana
server and you will no longer see the error in the logs.


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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-12 08:00:21 +01:00
Julian Gernun
0897d08786
[Response Ops][Cases] Cases with empty string assignees throwing error (#209973)
## Summary
Closes https://github.com/elastic/kibana/issues/209950

Testing steps in referenced issue

## Release note
Fix error message in cases list if case assignee is an empty string
2025-02-12 07:06:44 +01:00
Samiul Monir
19fa1b828c
Make ES models visible in the Inference Flyout (#210699)
## Summary

This PR adds a url/link to the `model_id` field description for
Elasticsearch providers only. This is our own models and the decision
was to make the models visible in the flyout.


https://github.com/user-attachments/assets/eee3c716-dbce-4ae1-b73b-2dceaedb8225




### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-02-11 23:48:04 -05:00
Philippe Oberti
5f50c8a37d
[Security Solution][Expandable flyout] remove unused state property on flyoutPanelProps (#210697)
## Summary

While working on improving the history feature of the expandable flyout
package, I realized that we've kept a `state` property on. our
`flyoutPanelProps` interface that has been unused since the flyout got
released. This property was intended to be used for some scenario we had
imagined, but over the last couple of years of using the expandable
flyout, it was never needed.
This PR makes a very small cleanup to remove that `state` property. We
can add it back on day if a need arises.

### 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-02-11 23:34:01 +01:00
Candace Park
eac85d4d99
[Defend Workflows][Eui Visual Refresh] Removed transparentize usage in responder (#208457)
## Summary

- [x] Removed use of color calculating function `transparentize()` 
- [x] Begin removal of JSON tokens when possible in favor of colors
tokens

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-11 23:28:46 +01:00