Commit graph

1172 commits

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

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

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




### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

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

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

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

---------

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

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


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

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

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

**Screen Recording**


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


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-03-24 14:47:15 -05:00
Georgii Gorbachev
a9106c6990
[Security Solution] Rework test plan for importing prebuilt rules (#213434)
**Epic:** https://github.com/elastic/kibana/issues/174168
**Partially addresses:**
https://github.com/elastic/kibana/issues/202079,
https://github.com/elastic/kibana/issues/210358

## Summary

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

Specifically, this PR:

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

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

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

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

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


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


`Rules Card`

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

`Alerts Card`

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

`Dashboards Card`

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

### Checklist

Check the PR satisfies following conditions. 

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

Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
2025-03-24 20:23:49 +02:00
Sergi Romeu
7512aa30fa
[A11y][APM] Add aria-label to "Try our new inventory" button (#215633)
## Summary

Fixes #210253

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

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

---------

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

## Summary

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

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

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

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

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-03-24 21:41:19 +05:30
Julia Bardi
33db17768f
[Fleet] Use fleet error in cspm plugin (#215625)
## Summary

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

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

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

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

FYI: @elastic/ingest-otel-data 

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

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

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

### Before

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

### After

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

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

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

**Preconditions** 

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

**Steps to reproduce the behavior:**

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

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



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

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

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

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

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

Co-authored-by: Faisal Kanout <faisal.kanout@elastic.co>
2025-03-24 10:50:18 -04:00
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
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
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
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
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
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
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
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
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
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
Konrad Szwarc
f09945bb1b
[EDR Workflows] Unskip management Jest tests (#215324)
8.17 PR - https://github.com/elastic/kibana/pull/215474
Part of https://github.com/elastic/security-team/issues/12176

Unskiped: 
### `use_list_artifact.test.tsx`
Path
`.../plugins/security_solution/public/management/hooks/artifacts/use_list_artifact.test.tsx`
Closes https://github.com/elastic/kibana/issues/196724
Commit 438553a1d1
Reason for unskipping: Couldn't recreate failure locally. Increased
timeout from 1000 to 5000 ms.


### `actions_log_users_filter.test.tsx`
Path
`.../plugins/security_solution/public/management/components/endpoint_response_actions_list/components/actions_log_users_filter.test.tsx`
Closes https://github.com/elastic/kibana/issues/193554
https://github.com/elastic/kibana/issues/193092
Commit ca7b971683
de03fd5448
fb3910e738
Reason for unskipping: wrapped expects in waitFor since they are
awaiting for state change. Increased the delay between keystrokes when
typing. Increased the timeout of tests since locally they are bordering
5s executions.

### `bad_argument.test.tsx`
Path
`.../plugins/security_solution/public/management/components/console/components/bad_argument.test.tsx`
Closes https://github.com/elastic/kibana/issues/193093
Commit 6959cd2e3f
Reason for unskipping: wrapped expects in waitFor since they are
awaiting for state change. Increased timeout to 10s.

### `use_get_endpoint_details.test.ts`
Path
`.../plugins/security_solution/public/management/hooks/endpoint/use_get_endpoint_details.test.ts`
Closes https://github.com/elastic/kibana/issues/192435
Commit 3ba10029b6
Reason for unskipping: increased timeout of waitFor for
renderReactQueryHook to 5s since locally it was bordering 3 seconds
2025-03-21 13:26:30 +01:00
Gloria Hornero
d5a0501fb8
initial @kbn/scout-security plugin (#210433)
## Summary

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

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-03-21 12:59:30 +02:00
Abhishek Bhatia
dbe28b9f94
[Security Solution][Risk Score] Use Risk Engine SavedObject intead of localStorage on the Risk Score web page (#215304)
## Summary

The PR updates the implementation to fetch data from the Risk Engine
Saved Object instead of storing and reusing it from LocalStorage.

This change ensures that settings are applied globally rather than being
limited to the browser’s LocalStorage. Since the Saved Object holds the
most up-to-date information, it is now used to update the "Date" and the
toggle for "including closed alerts for risk scoring" across all web
browsers.


### Normal and Incognito Mode : 



https://github.com/user-attachments/assets/7638c88b-ff9e-4d42-9944-e55b53e33518


### Default space vs custom space : 



https://github.com/user-attachments/assets/46bb35c7-3cd9-4b97-9f1c-90ec4ef1241a


## Testing Steps

### Verify Initial Values
1. Open the Entity Risk Score web page where the settings are applied.
2. Ensure that the date picker and toggle for "including closed alerts"
reflect the values stored in the Risk Engine Saved Object rather than
LocalStorage.
3. Modify and Save changes,
   - Change the date range in the date picker.
   - Toggle the "Include Closed Alerts" switch.

### Page Refresh Test
- Refresh the page and confirm that the modified values persist, fetched
correctly from the Risk Engine Saved Object.

### Cross-Browser Test
- Open the same web page in a different browser or incognito mode.
- Verify that the settings are consistent and correctly loaded from the
Risk Engine Saved
  Object.

### Expected Outcome
The settings should persist after a page refresh or across different
browsers.
The latest values should always be pulled from the Risk Engine Saved
Object.


### 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
- [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 14:19:24 +05:30
Umberto Pepato
7d65957683
[ResponseOps][SecuritySolution][Alerts] Fix cases service missing in detection engine alerts table (#215111)
## Summary

Provides the Cases service to the detection engine alerts table. The
missing services caused the cases actions to disappear from the bulk
actions menu.

## Verification steps

1. Create Security rules that fire alerts
2. Visit the Security > Alerts page
3. Select one or more alert rows from the table
4. Open the `Selected X alerts` bulk action menu
5. Check that the cases bulk actions are available

## Release Notes

Fixes a regression that caused the cases actions to disappear from the
detections engine alerts table bulk actions menu.

### 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] 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 00:57:30 +02:00
Bryce Buchanan
522f83fd25
Adds 'page reload' screen reader warning (#214822)
## Summary

Resolves https://github.com/elastic/kibana/issues/195037

Adds 'page reload' screen reader warning to metadata filter button on
the infrastructure host detail fly-out.


https://private-user-images.githubusercontent.com/75274611/420462482-a32e59f8-e04d-40a7-90af-1d039d4b4e67.mov?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDIyMjk5OTQsIm5iZiI6MTc0MjIyOTY5NCwicGF0aCI6Ii83NTI3NDYxMS80MjA0NjI0ODItYTMyZTU5ZjgtZTA0ZC00MGE3LTkwYWYtMWQwMzlkNGI0ZTY3Lm1vdj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzE3VDE2NDEzNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTliMjQyMmMzOWNkNDA1Y2JiZmE2MzY2YmY4N2ZmMzEwNDcxYzA1NmM2NWMzMDFhNGU3MTQ0Y2ZjZGViZDUxMjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.GbLcX-q0dpVHSicv7T25cvyUqem6sYFYj8D_AjrvRVE

### 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)
2025-03-20 21:42:47 +02:00
Philippe Oberti
3605a331b9
[AI4DSOC] Alert summary page routing and initialization (#214889)
## Summary

This PR is the setting the foundations for the AI for SOC Alert summary
page. It has very little UI, instead it focuses on the following:
- add routing for the `alert_summary` page
- fetches the integrations, filters them to only keep the ones related
to AI for SOC, then decides what to render depending on if some AI for
SOC packages have been installed or not

The PR also makes a small change to the `SecurityRoutePageWrapper`
component, to allow us to redirect to the Security Solution HomePage
instead of the NoPrivilegesPage. While this might not be a long term
solution, it is the easiest path forward. In the future, AI for SOC will
most likely be its own plugin (leaving outside of Security Solution)
hence this will not be needed anymore.

Here's the basic behavior of the Alert summary page:
- The `Landing page` will be shown if none of the hardcoded AI for SOC
packages are installed (these values are hardcoded as we currently do
not have a way to filter integrations for the AI for SOC ones only):
  - splunk // doesnt yet exist
  - google_secops
  - microsoft_sentinel
  - sentinel_one
  - crowdstrike
- The `Wrapper` component will only be shown if you have at least one of
the above AI for SOC packages installed.

### Very limited UI added in this PR

| Loading integrations | No installed packages | Some installed packages
|
| ------------- | ------------- | ------------- |
| ![Screenshot 2025-03-17 at 6 58
45 PM](https://github.com/user-attachments/assets/68089c33-fa40-4201-8b51-3e7236d50d5a)
| ![Screenshot 2025-03-17 at 6 59
15 PM](https://github.com/user-attachments/assets/e7e5af2d-bdab-4bef-881e-bb5e512c3545)
| ![Screenshot 2025-03-17 at 6 59
40 PM](https://github.com/user-attachments/assets/61b346bb-799f-4a0b-95cb-e3092ea58d37)
|

### Notes

We need to remove the section at the top of the page that currently
shows the `Add integrations` button. A follow PR will take care of that.
[This](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/public/app/home/index.tsx#L54)
is where that bar is being added. We will have to find a way to not show
that for the AI for SOC tier.

## 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' },
  ]
```

The Alert summary navigation will NOT be shown for the following
Serverless users: `viewer`, `t1_analyst`.
and `t2_analyst`. For those, the navigation entry is not present, and
navigating to the url directly will automatically re-route to the
Security home page.

Currently, retrieving the integrations (via the `fleet/epm/packages`
endpoint) is also unauthorized for the following users: `editor`,
`t3_analyst`, `threat_intelligence_analyst`, `rule_author`,
`soc_manager` and `detections_admin`.

This means that the only users that can be currently used to test this
PR are:
- `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

Will help close https://github.com/elastic/security-team/issues/11954 as
well as https://github.com/elastic/security-team/issues/11979.
2025-03-20 13:42:36 -05:00
Sergi Massaneda
108716dce8
[Security Solution] Siem migration copy changes (#215220)
## Summary

Last-minute copy changes

<img width="788" alt="task"
src="https://github.com/user-attachments/assets/839b4d9c-67f6-43b9-a62e-4f1f974215ca"
/>
2025-03-20 20:02:57 +02:00
Justin Kambic
21cafda9e9
[Synthetics] Remove all notions of uptime from the Synthetics README file (#215183)
## Summary

Some of the text in the Synthetics README is 6+ years old, which is
older than Synthetics itself. We need to try to keep these instructions
up to date a bit more as they are intended to be useful to inexperienced
contributors.
2025-03-20 13:23:16 -04:00
Sergi Romeu
8193e56970
[APM] remove unnecessary field service.environment from top dependency spans endpoint (#215321)
## Summary

Fixes #215106

This PR removes `service.environment` as a required field for
`getTopDependencySpans` endpoint.
It was not used at all, so it can be safely removed without adapting the
UI.
2025-03-20 16:31:36 +01:00
Ryland Herrick
07acd2480a
[Detection Engine] Rule Data View select uses Data View name for display (#214495)
## Summary

Supersedes #190936, and also addresses
https://github.com/elastic/kibana/issues/137823. This mainly just
rebases the changes introduced there to the latest `main`. I also
noticed that it originally had some unit tests, so I resurrected those
as well. ~~I modified the copy as well, so nota bene @ARWNightingale~~
After some discussion, we determined that an explicit UI note about this
behavior was unnecessary.


## Screenshots

<kbd>
<img width="979" alt="Screenshot 2025-03-13 at 5 24 42 PM"
src="https://github.com/user-attachments/assets/69da29bf-5504-461e-b797-d016adcd4b59"
/></kbd>

<kbd><img width="1052" alt="Screenshot 2025-03-18 at 4 37 58 PM"
src="https://github.com/user-attachments/assets/8ee5e55e-2413-4936-aa87-7dadb3d7cbb1"
/></kbd>




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

---------

Co-authored-by: Yara Tercero <yara.tercero@elastic.co>
2025-03-20 10:01:26 -05:00
Pablo Machado
42183d6039
[SecuritySolution] Fix Data view refresh does not support the indexPattern parameter (#215151)
## Summary

When the data view refresh API or task was executed, it was overwriting
the engine's additional `indexPattern`.

This PR updates the code to support `indexPattern` and ensures the user
has privileges for all indices.

I extracted the merge function to add deduplicate logic.

### How to reproduce it?
* Create an entity store using the indexPatterns param
* Call refresh dataview API (`POST
kbn:api/entity_store/engines/apply_dataview_indices`)
* It will apply the dataview and ignore the indexPatterns param

After the fix, we should be able to update the indexPatterns param, and
the task that refreshes the index pattern should pick up the change
properly.


### 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-20 15:41:54 +01:00
Sander Philipse
9b6d1aa35d
[Search] Fix code examples (#215286)
## Summary

This fixes a couple small bugs in some of our Curl examples.


### 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-03-20 14:46:10 +01:00
Gergő Ábrahám
c90716092b
[EDR Workflows] Enable endpoint data reduction banner feature flag for serverless (#215131)
## Summary

enables feature flag `eventCollectionDataReductionBannerEnabled` for
serverless, to be synced with 8.18/9.0 release


<img width="1170" alt="image"
src="https://github.com/user-attachments/assets/b1b88a66-dbfe-463e-a36a-e9328658a3bb"
/>
2025-03-20 14:41:16 +01:00
Nick Clark
9b9a12e9ae
Update SLO custom metric bundle (#215082) 2025-03-20 08:12:05 -04:00
Shahzad
0dad68dce7
[Synthetics] Retries journeys on failures !! (#215264)
## Summary

Retries journeys on failures !!
2025-03-20 11:53:55 +01:00
Gerard Soldevila
adb4bdf8d8
SKA: Extract list of Kibana solutions into a dedicated package (#213353)
## Summary

The intent is to have a centralised place to store the list of Kibana
solutions and serverless project types.
To that end, this PR creates a `@kbn/projects-solutions-groups` package.
It also adds the new solution type `'chat'`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-20 10:20:07 +01:00
Abhishek Bhatia
a3f89ec2c2
[Security Solution][Risk Score]Code changes for limiting the transformID length to 36 characters (#213405)
## Summary

The code changes in this PR ensure that the transform ID is limited to
36 characters when creating or updating the transform for risk-score.

This adjustment aligns with ES constraint on transform ID length.


## Test Steps

1. Create a new namespace with a very long name. Ex :
`namespace_that_stretches_farther_than_the_universe_and_beyond_like_buzz`
🚀
2. Enable the Risk Score in the new namespace. It should successfully
get enabled.
3. Check the transform that was created (using dev tools)

```
GET _transform/risk_score_latest_transform_*?filter_path=transforms.id,transforms._meta.space_id
```

Output 


![image](https://github.com/user-attachments/assets/3b5d5e67-cddf-4c6a-b8ff-675517c123b2)

### 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] 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] 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: Mark Hopkin <mark.hopkin@elastic.co>
2025-03-20 11:23:55 +05:30
Jared Burgett
64743b3a82
Added more request validation to entity store enablement (#212657)
# Purpose

This change introduces new validations that ensure no loss of data is
possible if a user accidentally sets the Security Entity Store enrich
policy execution interval to a value that “doesn’t play nicely” with the
lookback period value.

The specific logic (greater than or equal to half the value) was chosen
to not only ensure no loss of data, but also provide extra resiliency in
case of a failed enrich policy execution.

(Note that this is not considered a breaking change, as the parameters
are not yet available on any version of Elastic, including Serverless.)

# How to test

1. Load appropriate entity log data to your Kibana instance (for
example, using the
[security-documents-generator](https://github.com/elastic/security-documents-generator))
2. Navigate to the Developer console
3. Attempt to enable the Entity Store via the /enable or /init routes
(examples below), and pass in values that are expected to error. For
example, “lookbackPeriod”: “24h” and “enrichPolicyExecutionInterval”:
“24h” should fail, because of the validation logic
4. Expect results similar to those shown below, specifically a 400
error, or else a success message

<img width="1902" alt="Screenshot 2025-02-27 at 12 57 45 AM"
src="https://github.com/user-attachments/assets/a7f4b0fb-9899-4e00-a0ae-d172245bd506"
/>
<img width="1909" alt="Screenshot 2025-02-27 at 12 58 06 AM"
src="https://github.com/user-attachments/assets/372acde2-9d7b-4c75-8596-af8374088f79"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-20 01:31:31 +02:00
Alexander Wert
81f69713f3
Enable editing central config for EDOT Agents / SDKs (#211468)
## Summary
Enables central configuration for EDOT Agents / SDKs while keeping it
disabled for other OTel Agents.

**EDOT JAVA agent**
<img width="2124" alt="Screenshot 2025-03-17 at 09 26 37"
src="https://github.com/user-attachments/assets/fcff661c-6655-444d-bc09-39b70c835b82"
/>

**EDOT Nodejs Agent**
<img width="1264" alt="Screenshot 2025-03-18 at 13 08 12"
src="https://github.com/user-attachments/assets/97cdd03b-b6cd-494f-bd7e-a9b3fc4976b4"
/>

---------

Signed-off-by: Alexander Wert <alexander.wert@elastic.co>
Co-authored-by: jackshirazi <jacks@fasterj.com>
Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-19 16:06:08 -03:00
Maryam Saeidi
cc9494ccb0
[Custom threshold] Use createLazy instead of create when initializing searchSource (#213904)
## Summary

In this PR, we use a similar approach as was introduced in the ES Query
rule in this [PR](https://github.com/elastic/kibana/pull/183694) for the
custom threshold rule to reduce the field_caps traffic using createLazy.
(Thanks @mikecote for pointing this out!)

||Screenshot|
|---|---|
|Create (796
ms)|![image](https://github.com/user-attachments/assets/2df8f864-bbc5-44e4-af43-7ae70f5dd2c3)|
|CreateLazy (321
ms)|![image](https://github.com/user-attachments/assets/cd9a6e51-af7e-411a-ab2e-5d7a2efd3ce5)|

### 🧪 How to test
- Enable APM locally
```
elastic.apm.active: true
elastic.apm.transactionSampleRate: 1.0
elastic.apm.environment: username
```
- Create a custom threshold rule and check its execution in
[traces](https://kibana-cloud-apm.elastic.dev/app/apm/traces?rangeFrom=now-15m&rangeTo=now)
filtered for your `username` as the environment. There should be one
with your rule name:
<img
src="https://github.com/user-attachments/assets/59274acc-3edf-4de7-8870-3b175af73523"
width=500 />
    
The timing for `_field_caps` would be more if you replace the
`createLazy` with the `create` function.
2025-03-19 17:23:26 +01:00