Commit graph

1464 commits

Author SHA1 Message Date
Jared Burgett
cfa2fb4aa8
Fixed entity-store enablement for API key saved object storage (#213516)
When enabling the entity store with a non-superuser with all required
credentials, it returns the following errors:

![Screenshot 2025-03-06 at 11 07
02](https://github.com/user-attachments/assets/01b8fe73-5c7a-44aa-9b04-2c7e16a9d656)

To fix it, we need to disable security for the saved object client.

While this change sounds scary (exclude security??) there are three
reasons I believe this is the appropriate fix:
* [It's what rules management/alerting/detections does for creating
their hidden/encrypted saved objects.
](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/alerting/server/rules_client_factory.ts#L140)I
view that as the canonical example for doing this kind of work.
* Even with this change, we actually still require the user to have
Saved Object Management capabilities, both in the UI (as a privilege
check) and in the init/enable routes, upstream of where we create the
saved object. You can try this out yourself, the init route will fail
without that privilege.
* We only use that particular Saved Object client in that particular
spot, not throughout the rest of our Saved Object usages.

### How to reproduce it
* On main branch
* With an empty cluster
* Generate data with doc generator
* Login with 'elastic' user and create a test role and user with
following credentials:
* cluster, all
* indices, all
* Kibana, all spaces, all
* Open an anonymous tab and login with the test user
* Enable the entity store with the test user

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-07 12:25:20 +01:00
Sergi Massaneda
2cdd20c497
[Security Solution][SIEM migrations] Add timeouts and surface execution errors (#212799)
## Summary

Implements controls to have more visibility over the errors, especially
in the initialization phase (populate ELSER indices)

### Changes
- Added timeout to the initialization phase (20 minutes).
- Added concurrency control for initialization tasks, only the first
concurrent migration will trigger it, and the rest will await it.
- Added proper error handling for the ES bulk index operations of
integrations and prebuilt rules ELSER indices.
- Added timeout for individual agent invocations (3 minutes)
- Added `migrationsLastError` server state to store the errors (not
ideal, this should be moved to the migration index when we implement it)
for now it's fine.
- Added the `last_error` in the _/stats_ API response.
- The UI displays the `last_error` if it's defined.

### Screenshots

Onboarding error:

![error_onboarding](https://github.com/user-attachments/assets/268633fe-94b1-40e6-9270-8d0f6b59923e)

Rules page error:

![error_rules_page](https://github.com/user-attachments/assets/e2c2ddc7-2668-4452-bf5c-b40132860e27)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-07 12:00:57 +01:00
Tomasz Ciecierski
81db1a127a
[AI_SOC] Add tier/add-on configuration (#213425) 2025-03-07 11:46:42 +01:00
Khristinin Nikita
b0ad5424b2
Use search after for finding gaps (#211040)
## Use search after for finding gaps

Issue: https://github.com/elastic/security-team/issues/11860

To be able process more than 10.000 gaps per rule in one update cycle we
need to implement search after loop for all gaps.

For the API I keep from and size method, as it's much for client to use.

<img width="1250" alt="Screenshot 2025-02-17 at 15 25 27"
src="https://github.com/user-attachments/assets/806b2245-8aad-4960-84f4-d2a2818a4a12"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-07 10:23:37 +01:00
Charlotte Alexandra Wilson
c03b8bc661
Criticality badge medium impact bug / typo fixed (#213456)
## Summary

This PR fixes the colour on medium impact showing on asset criticality
badges across alerts table.


### Reproduce Bug
1. Kibana latest version 
2. Generate entity store data 
3. navigate to alerts page, with alerts generated 
4. Look at host criticality and user criticality columns
5. Observe that, the badges for these columns are transparent. Hover
over to see details.

### Screenshot: Bug


![image](https://github.com/user-attachments/assets/79796b92-18e8-4f58-b781-f82c0aeea463)


### Testing Fix 
Same steps as above, but with this PR, observe that the badged for
medium impact now have the relevent colouring enabled.

### Screenshots: Fix in Place

Host Criticality, Dark Theme             |  User Criticality, Dark Theme
:-------------------------:|:-------------------------:

!![image](https://github.com/user-attachments/assets/34ae6647-8333-4dd6-a3e7-24389ce4f3ea)
|
![image](https://github.com/user-attachments/assets/63045bdb-52a6-433b-b941-8c04e6242768)

Host Criticality, Light Theme | User Criticality, Light Theme
:-------------------------:|:-------------------------:

!![image](https://github.com/user-attachments/assets/8a1e6410-c565-4fc1-9829-bb4144f08cc8)
|
![image](https://github.com/user-attachments/assets/e8af0152-bfa3-4296-88ba-25fdf2624f38)
2025-03-07 08:31:54 +00:00
Viduni Wickramarachchi
6bb27b0400
[Obs AI Assistant] Improve error handling in the evaluation framework (#212991)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/196

## Summary

This PR implements the follows:
- Slightly increase the backoff delay for `429` errors
- Improve `convertMessagesForInference` to surface errors related to
function calls
- Improve the KB retrieval scenario criteria

### 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-06 19:59:44 -05:00
Paulo Silva
3fdb04d294
[Asset Inventory] Initializing onboarding screen (#213302)
## Summary

It closes https://github.com/elastic/kibana/issues/210714

This PR adds the Initializing screen shown during the initialization
step of the Asset Inventory onboarding.

## Recording


https://github.com/user-attachments/assets/01631884-60bb-417c-9f36-3b37ca8de4a4
2025-03-06 14:13:08 -08:00
Michael Olorunnisola
4abf1a151e
[Bug][Security Solution] - Reliably persist dataview selections for timeline (#211343)
resolves https://github.com/elastic/kibana/issues/198944

## Summary

Currently, the redux store can become out of sync with the state in the
UI, leading to the selected dataview not being preserved in the store,
and thereby not being saved when the timeline is saved. This PR sets the
selected dataview and patterns at the point of saving to ensure that
they are set and not overriden.

For additional background, see referenced issues.
2025-03-06 16:09:22 -05:00
Davis McPhee
ccae358d37
[Discover] Replace DiscoverInternalStateContainer with Redux based InternalStateStore (#208784)
## Summary

This PR replaces Discover's current `DiscoverInternalStateContainer`
(based on Kibana's custom `ReduxLikeStateContainer`) with an actual
Redux store using Redux Toolkit. It's the first step toward migrating
all of Discover's state management to Redux as part of the Discover tabs
project.

Part of #210160.
Resolves #213304.

### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 17:08:58 -04:00
Steph Milovic
5b8fd8f5c7
[Security AI Assistant] Bedrock prompt updates (#213160) 2025-03-06 12:58:26 -07:00
Dmitrii Shevchenko
87e7cd94d1
[Security Solution] Account for missing base rule versions in is_customized calculation (#213250)
**Partially addresses: https://github.com/elastic/kibana/issues/210358**

## Summary

### Editing of prebuilt rules with missing base versions

**When the base version** of a currently installed prebuilt rule **is missing** among the `security-rule` asset saved objects, and the user edits this rule:

- We should mark the rule as customized, only if the new rule settings are different from the current rule settings.
  - For example, adding a new tag should mark the rule as customized. Then, if the user removes this tag, the rule should remain to be marked as customized. This matches the current behavior.
  - However, if the user saves the rule without making any changes to it, it should keep its `is_customized` field as is. This is different from the current behavior.

### Importing of prebuilt rules with missing base versions

**When the base version** of a prebuilt rule that is being imported **is missing** among the `security-rule` asset saved objects, and the user imports this rule:

- If this rule is not installed, it should be created with `is_customized` field set to `false`.
- If this rule is already installed, it should be updated.
  - Its `is_customized` field should be set to `true` if the rule from the import payload is not equal to the installed rule.
  - Its `is_customized` field should be be kept unchanged (`false` or `true`) if the rule from the import payload is equal to the installed rule.
2025-03-06 19:22:17 +01:00
Bailey Cash
34fa3135a2
[Obs-UX-Mgmt] Split Up SLO Details from Overview (#212826)
## Summary 

In an effort to make SLI charts more quickly visible on the SLO overview
page, remove SLO details that do not give users valuable insight into
key metrics and add them to a new tab. Retain some of the SLO details
above the tabs like SLI value, tags, and description (see figma for the
inspiration)


https://www.figma.com/design/91R0OtRZHy5xvaE8dGStBo/SLO%2FSLI-assets?node-id=4601-59103&t=K1vI6qtXbb48XPgr-1

<img width="1474" alt="Screenshot 2025-02-28 at 4 53 05 PM"
src="https://github.com/user-attachments/assets/3fdbe766-4047-45b5-a986-3a029c09bd1f"
/>

![Screenshot 2025-03-06 at 9 54
37 AM](https://github.com/user-attachments/assets/c3ab0bc7-5187-42d4-bf29-48865dd759e2)


## Release Notes

SLO overview should give users a clear, immediate picture into key
objective data. Previously, the user would have had to scroll past
static data that describes the SLO definition before seeing valuable
information about their SLIs. This static data has been moved to a
separate tab, making charts more easily accessible.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-06 12:43:57 -05:00
Maxim Palenov
f2077dbb31
[Security Solution] Allow bulk upgrade rules with solvable conflicts (#213285)
**Partially addresses:** https://github.com/elastic/kibana/issues/210358

## Summary
 
This PR implements functionality allowing users to bulk upgrade rules with solvable conflicts.

## Details

The main focus of this PR is to allow users to bulk upgrade rules with solvable conflicts. To achieve that the following was done

- `upgrade/_perform` dry run functionality was extended to take into account rule upgrade specifiers with resolved value
- `upgrade/_perform`'s `on_conflict` param was extended with `UPGRADE_SOLVABLE` to allow bulk upgrading rules with solvable conflicts
- UI logic updated accordingly to display rule upgrade modal when users have to make a choice to upgrade only rules without conflicts or upgrade also rules with solvable conflicts
- conflict state badges were added to the rule upgrade table

It includes changes from https://github.com/elastic/kibana/pull/213027 with some modifications.

## Screenshots

<img width="1723" alt="Screenshot 2025-03-06 at 12 13 04" src="https://github.com/user-attachments/assets/b786e813-268d-49a2-80cc-81fa95d14e85" />
<img width="1724" alt="Screenshot 2025-03-06 at 12 13 30" src="https://github.com/user-attachments/assets/e5e38bd9-78a3-4026-a7ea-892bd7153938" />
<img width="1723" alt="Screenshot 2025-03-06 at 12 13 51" src="https://github.com/user-attachments/assets/d58872c3-f197-49ad-b4f3-5f45fb1efac2" />
<img width="1723" alt="Screenshot 2025-03-06 at 12 14 04" src="https://github.com/user-attachments/assets/667a6ab2-2fdb-430d-9589-1c4a6e5cdc8b" />
<img width="1722" alt="Screenshot 2025-03-06 at 12 14 17" src="https://github.com/user-attachments/assets/07f4cffe-4398-4fd5-8350-a3a2978d7dcd" />
2025-03-06 18:39:58 +01:00
Shahzad
33f51f6d6e
[SLOs] Allow slo query wild card filters !! (#213119)
## Summary

Allow slo query wild card filters when kql filter and dsl filter both
are used.

For KQL filter, allowLeadingWildcards was true by default. introduces
the ability to use wildcard filters in SLO queries when DSL filters are
also used.

### Changes Made
1. **Updated `getElasticsearchQueryOrThrow` function:**
- Added support for `dataView` parameter in the `toElasticsearchQuery`
function.
   - Included additional options for `allowLeadingWildcards`.
- Enhanced error handling to differentiate between invalid KQL and KQL
queries with invalid filters.

2. **Test Coverage:**
- Added new test cases to cover scenarios with wildcard queries and
filters.
2025-03-06 17:45:23 +01:00
Nikita Indik
ebe90e5c80
[Security Solution] Allow prebuilt rules import and export (#212509)
**Resolves: https://github.com/elastic/security-team/issues/11502**
(internal)

This PR implements following changes and adds API integration tests for
them:
- [x] Users with any license can export prebuilt rules (with enabled
feature flag)
- [x] Users with Basic/Essentials license can import prebuilt rules only
if they are non-customized and the feature flag is enabled
- [x] Users with Enterprise/Complete license can import prebuilt rules
without restrictions

Flaky test runner (had to create 4 separate runs to test all configs):
-
[1](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7987)
-
[2](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7986)
-
[3](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7988)
-
[4](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7989)
2025-03-06 16:58:33 +01:00
Angela Chuang
56ea5cced3
[SecuritySolution] Register AI Assistant management settings according to productFeatureKeys (#213105)
## Summary

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

AI Assistant management is registered according to `productFeatureKeys`
set by security_solution_ess or security_solution_serverless plugin.

To verify:

- Security project

```
yarn es serverless --projectType security --kill --clean -E  —ssl xpack.security.authc.api_key.enabled=true
yarn serverless-security --no-base-path
```

Update xpack.securitySolutionServerless.productTypes in
config/serverless.security.yml to switch between `essentials` and
`complete` tier

Project essentials:

<img width="2140" alt="Screenshot 2025-03-04 at 17 05 59"
src="https://github.com/user-attachments/assets/c2df5d20-a0f8-4ee4-82d3-b04a47a47f53"
/>

Project complete:

<img width="2199" alt="Screenshot 2025-03-04 at 17 07 16"
src="https://github.com/user-attachments/assets/0e6f0c5d-f318-4db8-925b-01e46ed76a7b"
/>


- ESS 

License trial and enterprise:

```
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true -E discovery.type=single-node -E network.host=0.0.0.0

```



https://github.com/user-attachments/assets/1771f51b-7b48-46e5-8bf6-3918c6e913c5


License basic and others:

```
yarn es snapshot --license basic -E xpack.security.authc.api_key.enabled=true -E discovery.type=single-node -E network.host=0.0.0.0

```



https://github.com/user-attachments/assets/fe00454c-10f6-4862-8eca-03179431ea6c

---------

Co-authored-by: Sergi Massaneda <sergi.massaneda@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 16:46:09 +01:00
Kevin Delemme
4107d9809d
chore(slo): Add testing plan (#213392) 2025-03-06 09:54:23 -05:00
Michael Olorunnisola
4db40eacde
[Performance][Security Solution] - Improve cell renderer performance (#212982)
## Summary

Background: https://github.com/elastic/kibana/pull/212173

Based off of feedback on the work in the PRs listed in that issue,
additional performance improvements can be made to the cells rendered in
the alert table. The changes made in this PR involve migrating out
shared context to a provider so certain hooks (some expensive... i.e.
browserFieldsByName) aren't made for every cell in the UI, but once and
passed down to each cell accordingly.


- [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-06 08:35:04 -05:00
José Luis González
c67a239e45
[Search] Removing elastic managed connectors misleading content (#213335)
## Summary

Fixing misleading info noted in this GH issue ticket
https://github.com/elastic/search-team/issues/9483 regarding Elastic
managed connectors that are not available in Serverless


Connectors empty state page:

![CleanShot 2025-03-06 at 10 38
45@2x](https://github.com/user-attachments/assets/c26da5f3-ec9a-4ec0-bf6c-a50284556bbd)

Connectors list page (without the Callout banner on top):

![CleanShot 2025-03-06 at 10 41
00@2x](https://github.com/user-attachments/assets/68920905-b2d3-49b8-a2ad-a8500717e129)



### 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-06 14:24:11 +01:00
jennypavlova
f195570049
[ObsUX] [APM] [OTel] Runtime metrics show dashboards with different ingest path (#211822)
Closes #211783
Part of https://github.com/elastic/kibana/issues/195857

## Summary

This PR expands the logic to get the dashboard files based on the agent.
We have many different ways to ingest data so we want to add more
metrics dashboards to the APM metrics tab. The different ingest paths we
have:
Classic APM Agent   --> APM Server       --> ES
Vanilla OTel SDKs     --> APM Server       --> ES
EDOT OTel SDKs      --> APM Server       --> ES
Classic APM Agent   --> EDOT Collector --> ES
Vanilla OTel SDKs.    --> EDOT Collector --> ES
EDOT OTel SDKs      --> EDOT Collector --> ES
We agreed on having a dashboard filename pattern to make showing the
correct dashboard easier described
[here](https://github.com/elastic/kibana/issues/195857#issue-2580733648)

First, we determine if the ingest path is through APM Server or EDOT
Collector by checking the `telemtry.sdk` fields.

## TODOs / Reviewer notes
- [ ] Currently, we have a fallback to metrics charts which is valid
only if we have APM agent so this PR adds an empty state message:
"Runtime metrics are not available for this Agent / SDK type." in case
there is no dashboard for the service language. To be improved in
https://github.com/elastic/kibana/issues/211774 and will be updated in
this PR when ready - I will still open it for review as the other logic
can be reviewed
- The dashboards are to be updated (by the agent team so not part of the
changes here)

## Testing: 
- Using e2e PoC 
- The available dashboard cases can be found in
[loadDashboardFile](91f169e19a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/dashboards/dashboard_catalog.ts (L40))
- Cases to be checked:
- OTel native with Vanilla OTel SDKs with available dashboard (example
case file: `otel_native-otel_other-nodejs`, `...-java`, `...-dotnet`)
   
<img width="1903" alt="image"
src="https://github.com/user-attachments/assets/44d37b05-a8e7-4f14-a1de-2c631f1843bb"
/>

- APM server with Vanilla OTel SDKs service with available dashboard
(example case file: `classic_apm-otel_other-nodejs`, `...-java`,
`...-dotnet`)
   

![image](https://github.com/user-attachments/assets/caef88ea-2603-41ad-b815-f4c0c3647809)

- APM server with Classic APM Agent (example case file:
`classic_apm-apm-nodejs`, `...-java`)
   
<img width="962" alt="image"
src="https://github.com/user-attachments/assets/f9e96dce-55c8-467a-93f0-a09fa219597e"
/>

- OTel native with Vanilla OTel SDKs without available dashboard (empty
state case example: python service)
 

![image](https://github.com/user-attachments/assets/4cb6cca3-240e-422b-9288-701ef080f9cc)

- APM server with Vanilla OTel SDKs service without available dashboard
(empty state)
   
<img width="1910" alt="image"
src="https://github.com/user-attachments/assets/5219cf94-5013-4874-aaea-e558cca69281"
/>

- APM server with Classic APM Agent without available dashboard (Current
metrics fallback)
   
<img width="1914" alt="image"
src="https://github.com/user-attachments/assets/66342f49-876c-4ad5-a4d1-1414c3abac75"
/>

- ⚠️ OTel native Dashboards are still not available (at the time of
adding the description)

---------

Co-authored-by: Sergi Romeu <sergi.romeu@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-06 13:52:44 +01:00
Meghan Murphy
02c313ca06
[Connectors] A11y refocus manage button (#212157)
## Summary

As part of Accessibility requirements, a user thats using only the
keyboard should be able to know which element they are on at the moment
after closing windows. As part of that the 'Ingest Pipelines' page, the
'Manage' button now refocuses once the 'Delete Custom Pipeline' popup is
closed. See screenshots below

### Closes https://github.com/elastic/kibana/issues/196650

<img width="1437" alt="Screenshot 2025-02-21 at 3 20 47 PM"
src="https://github.com/user-attachments/assets/4fa44b18-9856-4e39-9c1b-03dd367d798b"
/>
<img width="1407" alt="Screenshot 2025-02-21 at 3 19 53 PM"
src="https://github.com/user-attachments/assets/71aa01ca-f936-47f2-909e-57f649b03ca5"
/>
<img width="1443" alt="Screenshot 2025-02-21 at 3 20 05 PM"
src="https://github.com/user-attachments/assets/f1df4d64-e4e3-440f-a833-a7b2746def60"
/>
<img width="1448" alt="Screenshot 2025-02-21 at 3 20 16 PM"
src="https://github.com/user-attachments/assets/ac5f4100-b155-417a-b453-5ba9594d06e5"
/>

Notice that the 'Manage' button is refocused

### 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
- [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: Rodney Norris <rodney@tattdcodemonkey.com>
2025-03-06 07:51:00 -05:00
Pablo Machado
98c18a395e
[main] [SecuritySolution] Fix risk engine component template renaming (#212853) (#213329)
# Backport

This will backport the following commits from `8.18` to `main`:
- [[SecuritySolution] Fix risk engine component template renaming
(#212853)](https://github.com/elastic/kibana/pull/212853)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-03-05T09:50:31Z","message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:
SecuritySolution","Feature:Entity Analytics","Team:Entity
Analytics","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[SecuritySolution]
Fix risk engine component template
renaming","number":212853,"url":"https://github.com/elastic/kibana/pull/212853","mergeCommit":{"message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770"}},"sourceBranch":"8.18","suggestedTargetBranches":["9.0","main","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212853","number":212853,"mergeCommit":{"message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770"}},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-03-06 17:19:51 +05:30
Faisal Kanout
3535d86d39
[OBX-UX-MGMT] Test plan for Rules and alerts, Overview page, and Cases (#212097)
## Summary

Adding a UI test plan for Rules, Alerts, Overview page, and Cases
2025-03-06 11:25:50 +00:00
Pablo Machado
b69b696e7f
[SecuritySolution] Fix Risk score Insufficient privileges warning missing cluster privileges (#212405)
## Summary

### 
* Fixes Bug: User with no cluster privileges should not be able to
enable the risk score
When users with no cluster privileges open the risk score page, they
don't see any errors and are able to click the install button.

This happened because we were only checking for index privileges in the
UI, but for the enablement flow we also need to check cluster
privileges. I also introduced a new parameter to the missing privileges
hook so pages that only need to check for `read` privileges can work as
before.


https://github.com/user-attachments/assets/fe162005-ee2b-497d-8744-6262e4511d2d


* Fixed Bug: The install button was enabled when all toggles were
disabled
There were too many booleans in the panel, which was confusing and led
me to introduce more bugs while trying to fix this one, so I refactored
the code to understand it before fixing it.
I also simplified the logic to display the modal. Now, it only shows
when one of the engines' status is "not_installed"

<img width="300"
src="https://github.com/user-attachments/assets/a2e8fbba-ac64-4c97-9ef0-ef6fe61e60cd"
/>







### To Reproduce

1. Create a user with security privileges and index privileges but no
cluster privileges
2. Go to the risk score page and enable the toggle


### Checklist

Check the PR satisfies following conditions. 


- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or
2025-03-06 10:51:08 +01:00
Shahzad
8f7f5ff73b
[Observability] Add alert details action button !! (#213195)
## Summary

Add alert details action button !!

if you have opened up the flyout, reason action button gets hidden.

Also fixed dark theme issues for the chart !!

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/e9ba3330-2378-418a-91b7-52b67fdc4c09"
/>
2025-03-06 08:02:37 +01:00
Nathan Reese
04ee5fc4f3
[embeddable] remove EmbeddableInput type (#211949)
EmbeddableInput type is part of the legacy embeddable system. The legacy
embeddable system is being removed and as such, the EmbeddableInput type
is being removed.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-05 18:41:00 -07:00
Alejandro Fernández Haro
c240b035d4
[CI tools] Use ES 8.x (#213056)
## Summary

After upgrading the ES client to 9.0
(https://github.com/elastic/kibana/pull/208776), we noticed that the CI
fails to upload the results of the tests to the CI cluster:

```
ERROR ResponseError: media_type_header_exception
      	Caused by:
      		status_exception: Accept version must be either version 8 or 7, but found 9. Accept=application/vnd.elasticsearch+json; compatible-with=9
      	Root causes:
      		media_type_header_exception: Invalid media-type value on headers [Content-Type, Accept]
```

This PR makes sure that the CI client is still using v8.x until we
upgrade that cluster.
2025-03-05 20:26:57 +01:00
Shahzad
80f4aab305
[Synthetics] Fix tls alert data !! (#212758)
### Summary
This PR improves and fixes the TLS alert data handling in the Synthetics
plugin. Key updates include:


### Code changes

1. **Request Body Updates**:
   - Added `agent.name`.
- Changed optional chaining to direct property access for
`ping.monitor.name`, `ping.monitor.id`, and `ping.observer.name`.
   - Added `ping.agent.name`.

2. **Cert Type Adjustments**:
- Added fields: `monitorName`, `monitorId`, `monitorType`, `locationId`,
`locationName`, `@timestamp`, `hostName`.

3. **Observer Codec**:
   - Ensured `name` and `geo.name` are required fields.

4. **Monitor Type and Ping Type**:
   - Added `name` to `MonitorType`.
   - Moved `@timestamp` to required fields in `PingType`.

7. **Message Utils**:
- Adjusted `getCertSummary` and `getTLSAlertDocument` so that we can
properly generate alert document
2025-03-05 19:40:04 +01:00
Jordan
827219b82a
[Cloud Security] Asset Inventory - Universal Flyout Header Boxes, Tags, Fields Components (#211366) 2025-03-05 18:13:35 +01:00
Alberto Blázquez
af147b5cc6
Set from & to as optional args in @kbn/grouping (#213212)
## Summary

Set `from` and `to` as optional args in `getGroupingQuery`, a function
exposed by `@kbn/grouping`.

It will unblock this PR:
- https://github.com/elastic/kibana/pull/212955

### Motivation 

`getGroupingQuery` returns an ES aggregation for grouping documents.
This function assumes data will be queried in a certain interval of
time. However, Asset Inventory needs to query data from the beginning of
time because the UI will not provide any time-range filter. So in order
to reuse this logic, we need to set both args as optional.

Reason for wrapping both fields in an optional `timeRange` record is to
have either both present or both undefined, not only one of them
present.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [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.
- [ ] [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)

### Risks

No risk at all. It would be a breaking change otherwise, if we had to
require args that were optional before.
2025-03-05 11:21:54 -05:00
Jatin Kathuria
197a281bf9
[Siem Migrations] Translated Rules Upsell Page (#212777)
## Summary

This PR adds the Upsell for `Translated Rules` Page as per
[design](https://www.figma.com/design/BD9GZZz6y8pfSbubAt5H2W/%5B8.18%5D-GenAI-Powered-SIEM-Migration%3A-Rule-translation?node-id=63-81202&p=f&t=oJug1zebtufPlNKM-0).


Below is the Demo for the same.

|Instance|Demo|
|---|---|
|ESS|<video
src="https://github.com/user-attachments/assets/d7484635-292d-4bf0-883b-c9fd93b72096"/>|
|Serverless|<video
src="https://github.com/user-attachments/assets/767d8409-a391-41b8-b4d1-1c838dffc363"/>|




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


### 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>
2025-03-05 15:53:26 +01:00
Tomasz Kajtoch
75f9c6113d
Upgrade EUI to v99.4.0 (#212974) 2025-03-05 14:09:55 +01:00
Davis Plumlee
461787bea6
[Security Solution] Add UI incentivizers to upgrade prebuilt rules (#211862)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/210358

Adds all callouts and logic to incentivize users to upgrade their rules asap. These include:

- [x] Showing a callout on the Rule Management page
- [x] Showing a callout on the Rule Details page
  - [x] Letting users open the Rule Upgrade flyout from the Rule Details page
- [x] Showing a callout on the Rule Editing page
- [x] Showing a callout in the Rule Upgrade flyout if rule has missing base version

This PR also adds related updates to the rule diff algorithms in order to facilitate an easier upgrade experience when rules have missing base versions. These include:

- [x] When the rule has a missing base version and is NOT marked as customized:
  - [x] We should return all the target fields from the diff algorithm as NO_CONFLICT
- [x] When the rule has a missing base version and is marked as customized:
  - [x] We should attempt to merge all non-functional mergeable fields (any field that doesn't have consequences with how the rule runs e.g. tags) and return them as `SOLVABLE_CONFLICT`.
    - **NOTE**: When base versions are missing and the rule is customized, we attempt to merge all mergable, non-functional rule fields. These include all fields covered by the scalar diff array (`tags`, `references`, `new_terms_fields`, `threat_index`). We typically also consider multi-line string fields as mergeable but without three versions of the string, we are currently unable to merge the strings together, so we just return target version.
  - [x] We should pick the target version for all functional mergeable fields (e.g. `index`) and non-mergeable fields and return them as `SOLVABLE_CONFLICT`.


### Screenshots


**Callout on Rule details page w/ flyout button**
![Screenshot 2025-03-03 at 3 58 17 PM](https://github.com/user-attachments/assets/77117cad-fd8c-4b37-8ef7-f66d77f373b8)

---

**Upgrade flyout now accessible from rule details page**
![Screenshot 2025-03-03 at 3 58 25 PM](https://github.com/user-attachments/assets/f78e10fe-0767-44ab-a9c9-a5ae616b8b0e)

---

**Callout on rule editing page**
![Screenshot 2025-03-03 at 3 58 38 PM](https://github.com/user-attachments/assets/be68420f-a612-4e3d-9139-ad65a3d8b9fc)

---

**Dismissible callout on rule management page**
![Screenshot 2025-03-03 at 3 57 52 PM](https://github.com/user-attachments/assets/5227a4d1-474a-44d2-b0bb-fc020e584e8e)

---

**Callout in rule upgrade flyout when rule has missing base version**
![Screenshot 2025-03-03 at 3 58 04 PM](https://github.com/user-attachments/assets/3c1a23fa-f1f0-4301-b392-4c91097a9cb9)

### 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-03-05 13:14:31 +01:00
Arturo Lidueña
cb4e2023b4
fix: Product Documentation function not available error (#212676)
## Summary
Closes [#212655](https://github.com/elastic/kibana/issues/212655)
FIX:
When a user asks a question about the Elastic stack, we expect the LLM
to request the `retrieve_elastic_doc` function. However, due to the
limit of number of functions we can register, it errors out because the
function is not available.


![Image](https://github.com/user-attachments/assets/585ee05d-f10b-4a03-b40b-a07b2148d11b)
2025-03-05 12:43:16 +01:00
Ievgen Sorokopud
85555042be
[Attack Discovery][Scheduling] Add a new feature flag to hide scheduling feature (#12005) (#213148)
## Summary

Feature description: [internal
link](https://github.com/elastic/security-team/issues/10142)
Addresses: [internal
link](https://github.com/elastic/security-team/issues/12005)

These changes introduce a new feature flag to control visibility of the
Attack Discovery Scheduling feature.

To enable the flag:

> xpack.securitySolution.enableExperimental:
['assistantAttackDiscoverySchedulingEnabled']
2025-03-05 12:18:49 +01:00
Jatin Kathuria
4998b75677
[Siem Migration] - Start/Stop Translation integration tests (#212030)
## Summary

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

This PR adds the integration tests for 
- Start Translation API
- Stop Translation API
2025-03-05 12:06:06 +01:00
Søren Louv-Jansen
0fb83efd82
[Obs AI Assistant] Add API test for get_alerts_dataset_info tool (#212858)
Follow-up to: https://github.com/elastic/kibana/pull/212077

This PR includes an API test that covers `get_alerts_dataset_info` and
would have caught the bug fixed in
https://github.com/elastic/kibana/pull/212077.

It also contains the following bug fixes:

- Fix system message in `select_relevant_fields`
- Change prompt in `select_relevant_fields` so that the LLM consistently
uses the right format when responding.
2025-03-05 09:09:22 +01:00
Nathan Reese
f66fa68ab5
[dashboard] remove folder src/platform/plugins/shared/dashboard/public/dashboard_container (#212587)
PR removes `dashboard_container` and adds `dashboard_renderer` folder. I
tried to find a best fit for files but have no strong opinions about
where I put things. Please comment if you would like files in different
locations.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-04 18:36:03 -07:00
Patryk Kopyciński
5e742f0425
[Security Assistant] Fix use default inference endpoint (#212191)
## Summary

Removes internal feature flag responsible for switching to Kibana's
internal inference endpoint instead of using a dedicated one.

How to test:

**Clean cluster:**
**1. Setup KB**
**2. Make sure the `.kibana-elastic-ai-assistant-knowledge-base-*` Data
Stream is using default Inference endpoint**
```
http://localhost:5601/app/management/data/index_management/component_templates/.kibana-elastic-ai-assistant-component-template-knowledge-base
```
<img width="1656" alt="image"
src="https://github.com/user-attachments/assets/84fda205-6272-4393-8f7d-a449fae2a090"
/>

<img width="1086" alt="image"
src="https://github.com/user-attachments/assets/19e562ec-da5f-4ec2-ab64-7bfb1d64789c"
/>

**3. Make sure there is no inference endpoint on the list**
<img width="1875" alt="image"
src="https://github.com/user-attachments/assets/3465df8b-7c0d-4faf-b113-df897694521e"
/>

**4. Make sure Security Labs content exists on KB list and you can add
and edit Document/Index entry
```
http://localhost:5601/app/management/kibana/securityAiAssistantManagement?tab=knowledge_base
```

Migration:
**1. Setup KB on at least 2 Kibana spaces on `main` branch**
**2. Switch to this PR's branch and start Kibana**
**3. Make sure there is no inference endpoint on the list**
```
http://localhost:5601/app/elasticsearch/relevance/inference_endpoints
```
<img width="1875" alt="image"
src="https://github.com/user-attachments/assets/3465df8b-7c0d-4faf-b113-df897694521e"
/>

**4. Make sure that the Data stream was rolled over**
```
http://localhost:5601/app/management/data/index_management/indices?filter=know&includeHiddenIndices=true
```
Should see two indices per Kibana space:
<img width="1741" alt="Zrzut ekranu 2025-03-3 o 15 37 55"
src="https://github.com/user-attachments/assets/e6da48c8-59e9-43b8-8eac-c2b5e0059954"
/>

The older index per space should have mapping:
<img width="1083" alt="image"
src="https://github.com/user-attachments/assets/01f6e422-77d1-4f8b-8b7e-9c541a7ea47c"
/>

Newer index per space:
<img width="1086" alt="image"
src="https://github.com/user-attachments/assets/19e562ec-da5f-4ec2-ab64-7bfb1d64789c"
/>

**4. Make sure Security Labs content exists on KB list and you can add
and edit Document/Index entry
```
http://localhost:5601/app/management/kibana/securityAiAssistantManagement?tab=knowledge_base
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-05 02:14:08 +01:00
Saikat Sarkar
1e00a04c2b
[Playground] Increase the height of the indices container (#212827)
This PR increase the height of the container for indices in the
playground




https://github.com/user-attachments/assets/0fbacb11-ce8e-4566-b07e-b6058de89af0
2025-03-04 17:34:42 -07:00
Kevin Delemme
df59c26083
feat(slo): update preview data API to show groups (#211801) 2025-03-04 17:04:10 -05:00
Kevin Delemme
d7445380b3
chore(slo): replace error log level with debug (#212975)
## Summary

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

This PR replaces the info and error log levels with debug since most of
these errors are for developers or users. Not operations.
2025-03-04 20:35:28 +01:00
Joey F. Poon
647a183e3b
[Security Solution] defend insights langgraph upgrade (#211038)
## Summary

This is intended to be a "minimal" migration for Defend Insights to
langgraph + output chunking. Other than the increased events due to the
context increase from output chunking, the functionality is unchanged.

* migrates defend insights to langgraph
* adds output chunking / refinement


### 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-04 19:43:28 +01:00
Nathan Reese
b213eb6bb2
[embeddable] replace Embeddable ViewMode with presentation-publishing ViewMode (#211960)
Embeddable ViewMode is part of legacy embeddable architecture. This PR
removes Embeddable ViewMode and replaces its usage with
presentation-publishing ViewMode. presentation-publishing ViewMode is a
string literal type so an enum is no longer needed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-04 09:05:23 -07:00
Carlos Crespo
8e5b8580f4
[Infra] Fix hosts total count query (#212749)
Fixes [#212745](https://github.com/elastic/kibana/issues/212745)

## Summary

Fix for the hosts total count query, which was not correctly filtering
hosts from system integration and APM

<img width="584" alt="image"
src="https://github.com/user-attachments/assets/05c3b244-3a0f-425a-82db-3498c1a6dbb7"
/>


### How to test
- Connect Kibana to an edge cluster
- Navigate to Infrastructure > Hosts
- The total number of items on the table should be equal to the number
in the hosts count KPI

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-04 16:46:21 +01:00
Konrad Szwarc
dfe542bd8e
[EDR Workflows] Workflow Insights - insights generating script (#213094)
This PR introduces a new script for loading parameterized workflow
insights into a data stream. It enables UI/UX testing without requiring
an agent installation or generating insights manually.

Arguments

```
--endpointId       Required. The endpoint ID to use for generating workflow insights.
--elasticsearch    Optional. The URL to Elasticsearch. Default: http://localhost:9200
--username         Optional. The username to use for authentication. Default: elastic
--password         Optional. The password to use for authentication. Default: changeme
--count            Optional. The number of workflow insights to generate. Default: 5
--os               Optional. The OS to use for generating workflow insights. Default: linux
--antivirus        Optional. The antivirus to use for generating workflow insights. Default: ClamAV
--path             Optional. The executable path of the AV to use for generating workflow insights. Default: /usr/bin/clamscan
```
Example usage:

* Load 5 workflow insights, using the default values - Linux, ClamAV,
/usr/bin/clamscan on the endpoint with ID
8ee2a3a4-ca2b-4884-ae20-8b17d31837b6
 
`node ./load_workflow_insights.js --endpointId
8ee2a3a4-ca2b-4884-ae20-8b17d31837b6`
 
* Load 10 workflow insights for Malwarebytes with path of C:\\Program
Files\\Malwarebytes\\Anti-Malware\\mbam.exe on Windows endpoint with ID
8ee2a3a4-ca2b-4884-ae20-8b17d31837b6
        
`node ./load_workflow_insights.js --endpointId
8ee2a3a4-ca2b-4884-ae20-8b17d31837b6 --count 10 --os windows --antivirus
Malwarebytes --path 'C:\\Program
Files\\Malwarebytes\\Anti-Malware\\mbam.exe'`
2025-03-04 16:09:35 +01:00
Vitalii Dmyterko
847be917a6
[Security Solution][Detection Engine] adds bulkGetUserProfiles privilege to Security Feature (#211824)
## Summary

- addresses https://github.com/elastic/kibana/issues/202051

Few observations, based on ticket
[description](https://github.com/elastic/kibana/issues/202051):

1. User can update assignees in alert(i.e. update any alert details,
which is handled by **SecuritySolution** priv)
2. User can see suggested users in searchbox
3. User **can not** see assignees details(name, avatar) in alerts table
column and alerts flyout(that's where error toast originates from)

Why this happens?
2 different APIs used to show users in searchbox and user details in
alerts table column:

1. API to show users in searchbox:
[/internal/detection_engine/users/_find](https://github.com/elastic/kibana/blob/8.18/x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/routes/users/suggest_user_profiles_route.ts#L24)
It requires `securitySolution` privilege
2. API for alerts table cell:
[/internal/security/user_profile/_bulk_get](https://github.com/elastic/kibana/blob/8.18/x-pack/platform/plugins/shared/security/server/routes/user_profile/bulk_get.ts#L20)
It requires `bulkGetUserProfiles` privilege

User was configured with read only Security Feature, that covers only
first API, that's why we see error
> API [POST /internal/security/user_profile/_bulk_get] is unauthorized
for user, this action is granted by the Kibana privileges
[bulkGetUserProfiles] (403)

However `bulkGetUserProfiles` is covered by `Cases` feature already. If
Cases access will be set to read, user would be able to see assignees
details through `/internal/security/user_profile/_bulk_get` API.
It happens, because cases API tags include `bulkGetUserProfiles`
privilege:
https://github.com/elastic/kibana/blob/8.18/x-pack/platform/plugins/shared/cases/common/utils/api_tags.ts#L32,
https://github.com/elastic/kibana/blob/8.18/x-pack/solutions/security/packages/features/src/cases/types.ts#L7

This PR includes `bulkGetUserProfiles` privilege in Security Feature:
https://github.com/elastic/kibana/pull/211824. Since, it's already
present in Cases feature, and user profiles available through Security
Solution `/internal/detection_engine/users/_find` API
2025-03-04 15:08:41 +00:00
Zacqary Adam Xeper
367ff8dbec
[Response Ops] [Rule Form] Add Rule Form Flyout v2 (#206685)
## Summary

Part of #195211

Replaces the create/edit rule flyout with the new rule flyout

<img width="1032" alt="Screenshot 2025-01-14 at 3 12 30 PM"
src="https://github.com/user-attachments/assets/9cbcf4f8-1078-4f7e-a55a-aacc2d877a14"
/>
<img width="1383" alt="Screenshot 2025-01-14 at 3 12 52 PM"
src="https://github.com/user-attachments/assets/2270d57b-9462-4898-9dd0-41baefcc02d4"
/>

Restores the confirmation prompt before canceling or saving a rule
without actions defined.

Also fixes most of the design papercuts in the Actions step:

<img width="494" alt="Screenshot 2025-01-14 at 3 11 06 PM"
src="https://github.com/user-attachments/assets/3cf21d43-88e0-4250-b290-a545e1ebdbcf"
/>
<img width="494" alt="Screenshot 2025-01-14 at 3 11 01 PM"
src="https://github.com/user-attachments/assets/00ef3f95-c91b-4bb7-aead-a3e23c02f7df"
/>





### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-04 16:52:58 +02:00
Katerina
a16dc711fb
[Perfomance] Add Inline documentation for TTFMP (#212393)
## Summary

closes https://github.com/elastic/observability-dev/issues/4101 

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/4937722f-f05b-404b-9844-930e80c8e15e"
/>


### ⚠️ Instrumentation

Pass the `description` as metadata. The prefix [TTFMP] is required. 

### How to test

- Checkout the PR
- make sure you run `yarn kbn bootstrap`
- go to any page that has onPageReady function instrumented (ex
services)
2025-03-04 15:33:38 +01:00
Alex Prozorov
17931c5c5b
[Cloud Security ]update csp README.md file i18n instructions (#213068)
## Summary
update i18 instructions regarding how to add and remove translations.
2025-03-04 14:49:53 +02:00