Commit graph

85443 commits

Author SHA1 Message Date
elastic-renovate-prod[bot]
6295c24ba8
Update picomatch to v4 2025-04-08 22:28:37 +00:00
Dzmitry Lemechko
a234f3646c
[ftr] split feature controls tests into v1/v2 configs (#217458)
## Summary

Splitting long running config:
`x-pack/test/functional/apps/saved_query_management/config.ts` **~57
min** into

  - x-pack/test/functional/apps/saved_query_management/config.ts 35m 
- x-pack/test/functional/apps/saved_query_management/config.v2.ts 25m
17s

ideally we need to split both even more, but I will leave it for the
later (probably Data-Discovery Team have some ideas how to re-org it?)
2025-04-08 19:01:06 -03:00
Davis McPhee
c3bcdab741
[Discover] Keep fetched results when switching tabs (#216741)
## Summary

This PR implements the initial work to keep fetched results when
switching tabs:
- Avoid cancelling the current document request when switching tabs
(this still needs more work, especially migrating the `use_esql_mode`
hook to the central data fetching).
- Move `DiscoverStateContainer` and `DiscoverCustomizationService` to
`RuntimeStateManager` so they can be reused by tabs without
reinitializing.
- Re-add the current tab ID to `InternalStateStore` for high-level tab
management only (called `unsafeCurrentId` now to discourage misuse).
- Move `initializeAndSync` and initial `fetchData` call to the
`initializeSession` thunk to avoid calling it when switching back to
existing tabs.
- Move URL tracking directly into `DiscoverSavedSearchContainer` since
it previously used a hook which could now become out of sync because
`initializeAndSync` was moved (URL could update before the hook was
called).
- Support fully disconnecting tabs with a new `disconnectTab` thunk
(called on tab close and for all remaining tabs when leaving Discover).
- Sync global services to current tab state when switching tabs (this
should probably be cleaned up more, but it should work as a start).
- Basic implementation of `getPreviewData` (needs to be cleaned up).
- A couple of small misc changes (e.g. fixing scrollbar when tabs are
enabled).

Part of #216475.

### 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
- [ ] [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)
2025-04-08 16:28:46 -03:00
Paul Tavares
990432ccc0
[Security Solution][Endpoint] Fix endpoint package policy update Fleet extension callback error (#217391)
## Summary

### Fleet Changes

- Added a debug statement to the execution of external callbacks that
outputs `callback.toString()` whenever an external callback throws an
error
- The output of `callback.toString()` should help identify the code
behind the callback that threw an error and assist with debugging

### Security Solution

- Fixes the Endpoint package policy update callback that is registered
with Fleet to now throw an error while attempting to report policy
protection feature usage. (see error below)
- Fleet recently made a change to `PackagePolicy.bulkUpdate()` service
method that ensure registered callbacks for policy update is called,
which seems to be the reason why this started to happen recently. Its
unclear why this error is occurring being that Space Awareness features
are currently disabled by default.
2025-04-08 14:37:54 -04:00
Melissa Alvarez
f51ac13197
[ML] Moves job and trained model management features into Stack Management (#204290)
## Summary

Updates the navigation for Machine Learning pages, moving admin tasks
for managing ML jobs and models to a single place inside Stack
Management, and leaving exploratory tasks in a consolidated top-level
Machine Learning menu.

The available items vary by solution, so that the navigation for an
Elasticsearch project, for example, contains a single item for managing
trained models.

#### Stack management menu for classic/observability/security nav
<img width="275" alt="Screenshot 2025-04-04 at 16 10 04"
src="https://github.com/user-attachments/assets/14b6e8d4-7111-4fbd-ae5d-9f389f83f23c"
/>

#### Stack management for search:
<img width="271" alt="Screenshot 2025-04-07 at 14 38 45"
src="https://github.com/user-attachments/assets/e104bf20-8a4d-4eed-9b5b-9c05944091ca"
/>


#### Machine Learning menu for Classic nav
<img width="341" alt="Screenshot 2025-04-07 at 14 22 03"
src="https://github.com/user-attachments/assets/610efd59-311f-410f-9881-548359ca7997"
/>


#### Machine Learning menu for Observability
<img width="522" alt="Screenshot 2025-04-04 at 16 11 48"
src="https://github.com/user-attachments/assets/ef16acf1-4d39-4494-a5d3-0fb078d74730"
/>


#### Machine Learning menu for Security
<img width="528" alt="Screenshot 2025-04-04 at 17 46 43"
src="https://github.com/user-attachments/assets/2df20c20-b894-4421-a732-9370bb5d6f2d"
/>


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

### Identify risks

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

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

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

---------

Co-authored-by: Quynh Nguyen <quynh.nguyen@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2025-04-08 19:52:16 +02:00
Mason Herron
b0c0917fa7
[Fleet] Add 'No Tags' filter to agent table (#216944)
## Summary

Closes #213933 

Adds a `No Tags` filter to the filter select on the agents table so that
users can filter for agents without tags.


https://github.com/user-attachments/assets/1223d049-1f21-4565-854c-75776ae4609b



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

N/A
2025-04-08 19:47:27 +02:00
Alexey Antonov
fb961ec880
fix: [Platform:Dashboards:DashboardEditMode] Add Maps, Lens, Custom visualizations,markdown,TSVB are announced incorrectly (#217312)
Closes: #215457

**Description**
When user clicks on Add lens, maps or custom visualizations, Kibana
announces them as "Group" which doesn't give the user the context that
they are on create lens page or maps page or custom visualization

**Changes made:**

1. Added `role="menu"` and `role="menuitem"` to provide users with more
context.
2. The `Group` component was slightly updated: `EuiListGroupItem` and
`EuiTooltip` were removed in favor of using the native EuiListGroup API.

**Screens:**


https://github.com/user-attachments/assets/8587787c-6444-4d39-b499-5f1a3daefbde
2025-04-08 20:00:31 +03:00
Dzmitry Lemechko
9c560e5444
[ftr] split discover group3 config (#217486)
## Summary

Split long running config
`src/platform/test/functional/apps/discover/group3/config.ts: 39.1
minutes` into

  - src/platform/test/functional/apps/discover/group3/config.ts 10m
  - src/platform/test/functional/apps/discover/group9/config.ts 14m 34s
  - src/platform/test/functional/apps/discover/group10/config.ts 18m 15s
2025-04-08 18:52:13 +02:00
elastic-renovate-prod[bot]
84f647ad54
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to c56628d (main) (#217401)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `29150cd` ->
`c56628d` |

---

### Configuration

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

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

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

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

---

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

---

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

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2025-04-08 11:35:01 -05:00
elastic-renovate-prod[bot]
194e54fcf4
Update docker.elastic.co/wolfi/chainguard-base-fips:latest Docker digest to 22d75e2 (main) (#216553)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base-fips | digest | `60d2da3` ->
`22d75e2` |

---

### Configuration

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

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

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

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

---

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

---

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

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2025-04-08 11:34:27 -05:00
Marco Vettorello
971edc124a
[Lens] Fix getIndexPatternsObjects for index-pattern only and minor cleanups (#215325)
## Summary

This PR fixes the https://github.com/elastic/kibana/issues/215323 issue
and also provide small cleanup on the code near the edited file, not
directly correlated but I was already there and the changes are pretty
minimal.

Cleanups:

- the `SavedObjectReference` is deprecated and needs to be imported from
`core/server` instead
- Looking at the locator I've noticed a couple of non-null assertion
that wasn't necessary
- the locator readme was referencing the old `kibana app services` team
- cleaned up the `x-pack/platform/plugins/shared/lens/public/utils.ts`
to align all the method to use the same form (or all functions or all
arrow function, there was a pretty interesting mix there)
- replaced usages of exclusive OR with a more appropriate nullish
coalescing operator
2025-04-08 18:31:56 +02:00
Dominique Clarke
9d56263413
[Chore] Remove Investigate plugin, Investigate app plugin, and Investigation-schema package (#216342)
## Summary

Removes unused code from the Investigate and Investigate app plugin.

Removes all references to those plugins in storybook, i18n, types, etc.

Removes codeowner requirements for those plugins

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 12:25:21 -04:00
Viduni Wickramarachchi
a2e0bb1422
[Obs AI Assistant] Remove direct function calling from the chat input (#217359)
Closes https://github.com/elastic/kibana/issues/215206

## Summary

Removes direct function calling capabilities as this feature is not
important anymore.

Before:

<img width="588" alt="image"
src="https://github.com/user-attachments/assets/5c4e3dfb-a8dd-420b-aa02-389a2d4f7b5c"
/>

After:

<img width="592" alt="image"
src="https://github.com/user-attachments/assets/97bea8d0-f1e9-43c7-a4df-42e094861879"
/>


### Checklist

- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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-04-08 12:17:46 -04:00
Saarika Bhasi
9c3c0b72da
[Onboarding] search playground UX improvements (#217243)
## Summary

Update search playground UI to align with new design. Updated following
in this PR

- [x] Remove pagination from top of search results.
- [x] Hide Field & Contents when document is not expanded
- [x] Remove space between search results but shows space when expanded.
- [x] Enable clear search for the search bar and updated to search as
user types
- [x] Update empty state text

## Demo

https://github.com/user-attachments/assets/9242061b-5f40-4cb0-b2c5-b3a4bdebd982




### 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-04-08 12:17:21 -04:00
Ioana Tagirta
9d698eb36a
Add retrievers autocomplete in dev console (#216827) 2025-04-08 17:55:14 +02:00
Viduni Wickramarachchi
3aa036d515
[Obs AI Assistant] Archiving conversations (#216012)
Closes https://github.com/elastic/kibana/issues/209386

## Summary

1. The option to archive conversations are enabled via the conversation
contextual menu.
2. Archived conversations can be viewed under the "Archived" section of
the conversation list.
3. Only the owner of the conversation can archive and unarchive.
4. Once archived, the conversation cannot be continued until unarchived.
5. If the archived conversation is shared, other users (who are not the
owner) can duplicate the conversation, if they wish to continue the
conversation.
6. The archived section of the conversation list is collapsed by
default.
7. Updating the conversation such as title updates, regenerating,
providing chat feedback are disabled for archived conversations

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 10:42:20 -04:00
Søren Louv-Jansen
a5f3c0ad03
[LockManager] Fix flaky API test (#217470)
Related: https://github.com/elastic/kibana/pull/216916

The flaky test runner is sometimes throwing this error:

```

└-: withLock API
--
  | └-> "before all" hook: beforeTestSuite.trigger in "withLock API"
  | └-> "before all" hook in "withLock API"
  | └- ✖ fail: Stateful Observability - Deployment-agnostic API integration tests observability AI Assistant LockManager withLock API "before all" hook in "withLock API"
  | │       ResponseError: {"took":1,"timed_out":false,"total":1,"deleted":0,"batches":1,"version_conflicts":1,"noops":0,"retries":{"bulk":0,"search":0},"throttled_millis":0,"requests_per_second":-1,"throttled_until_millis":0,"failures":[{"index":".kibana_locks-000001","id":"my_lock_with_token_fencing","cause":{"type":"version_conflict_engine_exception","reason":"[my_lock_with_token_fencing]: version conflict, required seqNo [117], primary term[1]. but no document was found","index_uuid":"F_O5sNfQSLqtyPeLexG_Qw","shard":"0","index":".kibana_locks-000001"},"status":409}]}
  | │       at SniffingTransport._request (node_modules/@elastic/elasticsearch/node_modules/@elastic/transport/src/Transport.ts:605:17)
  | │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
  | │       at /opt/buildkite-agent/builds/bk-agent-prod-gcp-1744099176361402458/elastic/kibana-flaky-test-suite-runner/kibana/node_modules/@elastic/elasticsearch/node_modules/@elastic/transport/src/Transport.ts:711:22
  | │       at SniffingTransport.request (node_modules/@elastic/elasticsearch/node_modules/@elastic/transport/src/Transport.ts:708:14)
  | │       at Client.DeleteByQueryApi [as deleteByQuery] (node_modules/@elastic/src/api/api/delete_by_query.ts:143:10)
  | │       at Context.<anonymous> (distributed_lock_manager.spec.ts:444:9)
  | │       at Object.apply (wrap_function.js:74:16)
```

The error happens when `release` and `clearAllLocks` simultaneously
tries to delete the same document. This PR ensures that `clearAllLocks`
will not throw an exception on conflict
2025-04-08 16:06:05 +02:00
Christos Nasikas
2a01722cfa
[ResponseOps][Rules] Ignore unknowns in the schema of the log threshold params (#217440)
## Summary

A PR introduced into 8.18/9.0
(https://github.com/elastic/kibana/pull/205507) changed the way we
validate the log threshold rule type parameters. The validation happens
on rule params and changes a loose validation to a strict validation, so
those users who’ve inserted excess fields before 8.18/9.0 will see rules
starting to fail to run, their rule page failing to load and the API
starting to reject calls with excess fields.

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

## Testing instructions

1. Start Kibana on 8.17 and create the following rule using the API. Let
the rule run.

<details><summary>Rule</summary>

```
{
    "name": "[QAF] Observability rule 3",
    "tags": [
        "metrics",
        "threshold",
        "qaf"
    ],
    "rule_type_id": "logs.alert.document.count",
    "consumer": "alerts",
    "schedule": {
        "interval": "1m"
    },
    "actions": [],
    "params": {
        "timeSize": 8,
        "timeUnit": "h",
        "count": {
            "value": 1,
            "comparator": "more than"
        },
        "criteria": [
            {
                "field": "bytes",
                "comparator": "more than",
                "value": 1
            }
        ],
        "logView": {
            "logViewId": "log-view-reference-0",
            "type": "log-view-reference"
        },
        "groupBy": [
            "geo.dest"
        ],
        "outputIndex": ".alerts-observability.logs.alerts-default"
    }
}
```

</details> 

2. Start Kibana on 8.18. Verify that you cannot create the same rule and
the rule created in step 1 starts failing.
3. Start Kibana on this PR and that you can create the same rule and the
rule created in step 1 is working as expected.

### 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-04-08 15:58:26 +02:00
Joe Reuter
fd374463f7
🌊 Streams: Permission handling (#217353)
Currently, the streams UI doesn't deal well with partial permissions.
This PR improves that. As a lot of things come together in streams, we
could do even better, but I think it's OK to draw a line somewhere.

The logic is now as follows:
When reading a stream, the privileges of the current user are returned
along with the stream itself. These are grouped like this:
```
interface IngestStreamPrivileges {
  // User can change everything about the stream
  manage: boolean;
  // User can read stats (like size in bytes) about the stream
  monitor: boolean;
  // User can change the retention policy of the stream
  lifecycle: boolean;
  // User can simulate changes to the processing or the mapping of the stream
  simulate: boolean;
}
```

This is part of the definition response and is passed around to the
components and disabled buttons and similar in the places where this is
necessary.

The "advanced" tab is only shown when full `manage` permissions are
present - there constellations of permissions that would allow some
access but not all (e.g. having `read_pipelines` but not
`manage_index_templates`), but these should be rather rare and not worth
the additional effort.

## Conditions

In the following places privileges are checked:
* Overview
  * Without `monitor`, the overall stats are not shown
* Enrichment
  * Without `manage`, you can't save changes
  * Without `simulate`, the UI is readonly
* Partitioning
  * Without `manage`, you can't save changes
  * Without `simulate`, the UI is readonly
* Schema editor
  * Without `manage`, the UI is readonly
* Retention
  * Without `monitor`, the ingest stats are not shown
* Without `lifecycle`, the retention can't be changed and ILM breakdown
is not rendered
* Advanced
  * Without `manage`, the tab is hidden completely

## Drive-by fix

I noticed that we still register the app header action menu which adds
an empty bar on serverless, removed that code.

## Testing

Check
https://github.com/elastic/kibana/pull/217353/files#diff-d8f33d7021058bf90cbeea908bf399da2af50d8b8bfac8a07f160ddc0cdff12bR747
for which Elasticsearch level privileges you need for different
permutations. Then set up a role and a user and log in as that user.

Also test the different pre-defined roles on serverless.
2025-04-08 15:42:29 +02:00
Paul Tavares
970e9fe4a3
[Security Solution][Endpoint] Update artifact export api in support of space awareness (#217102)
## Summary

### Lists plugin:

- Add the ability to pass a KQL `filter` to the
exportExceptionListAndItems()` server-side service
- NOTE: this `filter` property is NOT exposed via the public API. Only
used internally
- Fixes the `getExcetionList()` service method to ensure that if a list
if not found using the `id`, that it attempts to then find it using
`list_id` if that was provided on input to the method.


### Security Solution:

- Export for endpoint artifacts was updated with additional filtering
criteria to ensure that only artifact accessible in active space are
included in the export
2025-04-08 15:28:05 +02:00
Nicolas Chaulet
587add8e60
[Fleet] Compare agent version with build (#217376) 2025-04-08 09:27:32 -04:00
Rudolf Meijering
32c66acc4a
Remove legacy dashboard import/export API (#217485)
## Summary

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


### 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-04-08 15:23:32 +02:00
Dzmitry Lemechko
aa9be6a621
[ftr] split oblt DA configs to speedup CI (#217452)
## Summary

Splitting the following config:

-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
**~61 min**

by moving `ai_assistant`, `synthetics` and `streams` tests in its own
configs

-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts
~11m 30s
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts
~21m 30s
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts
~21m 43s

original config with less tests:
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
~17 min
2025-04-08 08:14:58 -05:00
Mason Herron
f8f6e6ed0a
[Fleet] Move log level setting to settings tab (#217112)
## Summary

Closes #197707 

Moves the log level setting on an agent from the `Logs` tab, to a newly
created `Settings` tab

Before: 

![image](https://github.com/user-attachments/assets/1532f698-73e6-49dd-9dbf-037d75483e2b)

After: 

![image](https://github.com/user-attachments/assets/1239a451-dc5d-465c-a090-22bc220c8b17)


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

N/A

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 09:12:49 -04:00
Krzysztof Kowalczyk
94f210dc4c
[FileUpload] Allow special characters in file names (#217361)
## Summary

This PR adds the ability for file names to have special characters.
Closes: #210312
2025-04-08 13:38:34 +02:00
Dzmitry Lemechko
8c08db126c
[scout] support tests run against Cloud / MKI (#216705)
## Summary

closes #203588

This PR extends `kbn-scout` to run UI tests against Cloud deployment or
MKI project.

It it required by design to define `cloud_ech.json` or `cloud_mki.json`
with Cloud enviroment details:

**ECH config**

```json
{
  "serverless": false,
  "isCloud": true,
  "cloudHostName": "console.qa.cld.elstc.co",
  "cloudUsersFilePath": "/path_to_your_cloud_users/role_users.json",
  "hosts": {
    "kibana": "https://my.cloud.deployment.kb.co",
    "elasticsearch": "https://my.cloud.deployment.es.co"
  },
  "auth": {
    "username": "deployment_username",
    "password": "deployment_password"
  }
}
```

How to run:

1. Create stateful deployment on QA env
2. Add `cloud_ech.json` (see above) in `KIBANA_REPO_ROOT/.scout/servers`
dir
3. Run tests

Scout: 
```bash
node scripts/scout.js run-tests \
--stateful \
--testTarget=cloud \
--config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--headed
```
PW: 
```
npx playwright test \
--project=ech \
--config=x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--grep=@ess
```

**Serverless config**

```json
{
  "serverless": true
  "projectType": "es",
  "isCloud": true,
  "cloudHostName": "console.qa.cld.elstc.co",
  "cloudUsersFilePath": "/path_to_your_cloud_users/role_users.json",
  "hosts": {
    "kibana": "https://my.es.project.kb.co",
    "elasticsearch": "https://my.es.project.es.co"
  },
  "auth": {
    "username": "deployment_username",
    "password": "deployment_password"
  }
}
```

How to run:

1. Create stateful deployment on QA env
2. Add `cloud_mki.json` (see above) in `KIBANA_REPO_ROOT/.scout/servers`
dir
3. Run tests

Scout: 
```bash
node scripts/scout.js run-tests \
--serverless=es \
--testTarget=cloud \
--config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
```
PW: 
```
npx playwright test \
--project=mki \
--config=x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--grep=@svlSearch
```
2025-04-08 13:03:48 +02:00
Milton Hultgren
fa23a90d80
🌊 Refactor API control flow for stream management (#211696)
### Background
This PR is a proposal for a different way to structure the Streams code
flow based on some challenges faced while working on
https://github.com/elastic/streams-program/issues/26 and discussed
[here](https://github.com/elastic/streams-program/discussions/147) and
[here](https://github.com/elastic/streams-program/discussions/55),
mainly around finding it difficult to decide where to place certain
validations that need access to the state as a whole.
It is also in response to some expressed difficulty about how to add new
stream types into the code base.

It aims to achieve 3 goals:
1. It is easy to add new stream types and there is a clear place where
changes (new validation, new logic) for existing stream types happen,
making the code easier to evolve over time
2. It is easier to improve the robustness of the system because there
are clear phases where problems can be caught, fixed and rolled back
3. It lays some ground work for features such as [bulk
changes](https://github.com/elastic/streams-program/issues/125), [dry
runs](https://github.com/elastic/streams-program/discussions/138) and a
[health
endpoint](https://github.com/elastic/streams-program/discussions/139)

In the future, this will most likely be handled by Elasticsearch to a
large degree, as imagined in
https://github.com/elastic/streams-program/discussions/30

The solution takes inspiration from the reconciliation / controller
pattern that Kubernetes uses, where users specify a desired state and
the system takes action towards reaching that step. But it is also
somewhat more similar to how React's Virtual DOM works in that it
happens in a single iteration.

Another key pattern is the [Active Record
pattern](https://www.martinfowler.com/eaaCatalog/activeRecord.html), we
let each stream class contain all the logic for how to validate and
modify that stream in Elasticsearch. The client and `State` class simply
orchestrate the flow but defer all actual work and decision making to
the stream classes.

**Note:** This PoC ignores the management of assets 

### Summary

The process takes the following steps:
1. A route accepts a request (upsert / delete) and translates it into
one or more (for bulk) `StreamChange` objects before passing these to
`State.applyChanges` method (which also takes a toggle for dry runs)
2. The current state of Streams is loaded by using the `State` class
3. The changes are then applied to the current state to derive the
desired state [1]
4. The desired state is then validated, this is done by asking each
individual stream if given the desired state and starting state, from
the perspective of that individual stream, is it in a valid state
(upserted or deleted correctly)
5. If the state is invalid, we return those errors and stop
6. Else we continue, if it's a dry run, we ask the desired state object
for what has changed and report that in the shape of the Elasticsearch
actions that would be attempted
7. Else we proceed to commit the changes to Elasticsearch by asking each
changed stream to determine which Elasticsearch actions need to be
performed to reach the desired state
8. These actions are then combined and sent to the `ExecutionPlan` class
which does planning (mainly for actions around Unwired streams) and then
handles executing the actions in the most parallel way but in the safe
order
9. If any error happens, we attempt to revert back to the starting state
by taking the changed streams and marking each stream as created based
on the starting state and then getting the Elasticsearch actions for
that and applying those

This PR also changes our `resync` endpoint to make use of the same rough
strategy (load current state, mark all as created, get Elasticsearch
actions and apply).

[1] Applying changes:

1. The current state is first cloned
2. Then for each change we see if it is a deletion or an upsert
3. Based on this we either mark existing streams for deletion or
create/update existing streams
10. When creating a new stream instance we use the helper
`streamFromDefinition` which is the only mapping between the definition
documents and the Active Record-style stream type classes
11. As part of this, each stream that changes is marked in the desired
state
12. The stream is passed the desired and current state and should update
itself based on the change
13. The stream can return a set of cascading changes (taking the same
format as the requested changes) which are executed directly after but
we have a limit for how many rounds of cascading changes can happen to
avoid infinite loops

### Adding new stream types

Key in all of this is that the client and `State` classes don't know
anything about any of the specific stream types, they know only of the
`StreamActiveRecord` interface.
When adding a new stream type you need to implement this interface and
update `streamFromDefinition` to create the right class for your new
definition. Streams of different types should only interact with each
other by creating cascading changes.

### Possible follow up tasks
- Introduce a lazy Elasticsearch cluster state cache because multiple
places in the code access the same stuff over and over again
- Make API endpoints the consume `attemptChanges` pass back the
`DesiredState` and planned `ElasticsearchActions` as debug information
based on a flag (maybe also all cascading changes)
- Don't run cascading changes by default but run them if _some_ flag is
submitted based on
https://github.com/elastic/streams-program/discussions/230
- Wrap `attemptChanges` and `resync` with the new LockManager
https://github.com/elastic/kibana/pull/216397
- Unit test WiredStream, UnwiredStream and GroupStream
- Clean up old sync helpers 
- Wrap ES calls to get better stack traces for errors

### Out of scope

- Asset linking and content pack installation (it's probably okay for
these to continue to use the asset client directly since there is less
domain logic and no cascading changes involved)

---------

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 13:02:56 +02:00
Elena Shostak
18ca869d92
Added DisabledAuthz utility (#216633)
## Summary

Added `DisabledAuthz` utility class, this will address the current
repetition of the reason string `'This route delegates authorization to
the ES/SO client` and other common scenarios.

__Closes: https://github.com/elastic/kibana/issues/216632__

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
2025-04-08 12:59:28 +02:00
Luca Wintergerst
05712f2bf8
[Streams] Data ingestion tooltip (#217453)
Adds a tooltip to the histogram, and adjusts the wording of the other
ingestion tooltips slightly

Before:
![CleanShot 2025-04-08 at 10 26
28@2x](https://github.com/user-attachments/assets/49d9c242-9a3f-42a4-a787-c3a1f3da6b51)
After:
![CleanShot 2025-04-08 at 10 22
33@2x](https://github.com/user-attachments/assets/a816be12-0d06-4184-9803-8b161932dc95)
2025-04-08 12:27:09 +02:00
Paulina Shakirova
0a3e1fa3d8
[SharedUX][A11y] Fix Share modal export icon focusable (#217313)
## Summary

This PR fixes [[Platform:Dashboards:DashboardViewMode] Tooltips on
export tab on share panel are not announced because of lack of focus
on](https://github.com/elastic/kibana/issues/214447) and fixes [[a11y]
In the sharing menu the POST url info cannot be accessed with the
keyboar](215991d) issues.

Before:


https://github.com/user-attachments/assets/9c8c532d-1628-4f57-a2f0-2fe1d09e5cb6

After: 


https://github.com/user-attachments/assets/d7716469-ad73-4241-934d-f9f4d23a1279
2025-04-08 12:00:08 +02:00
Elena Shostak
c6056655e6
[CodeQL] Updated version to 3.28.15 (#217463)
## Summary

Updated version of `codeql-action` to `3.28.15`.
2025-04-08 11:47:12 +02:00
Alejandro Fernández Haro
3ab31d3fc9
[ES 9.0] Remove body workaround (@elastic/fleet) (#217218)
## Summary

Follow up to https://github.com/elastic/kibana/pull/213375: The latest
version of the ES client fixed the issue
https://github.com/elastic/elasticsearch-js/issues/2584.

We should be able to remove all usages of `// @ts-expect-error
elasticsearch@9.0.0
https://github.com/elastic/elasticsearch-js/issues/2584`.


### 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-04-08 11:34:26 +02:00
Alejandro Fernández Haro
e7dbe43e28
[ES 9.0] Remove body workaround (@elastic/security-entity-analytics) (#217225)
## Summary

Follow up to https://github.com/elastic/kibana/pull/213375: The latest
version of the ES client fixed the issue
https://github.com/elastic/elasticsearch-js/issues/2584.

We should be able to remove all usages of `// @ts-expect-error
elasticsearch@9.0.0
https://github.com/elastic/elasticsearch-js/issues/2584`.
2025-04-08 11:10:46 +02:00
Joe Reuter
86fab6e2b4
🌊 Streams: Small bug fixes (#217309)
* Preview tables for enrichment and partitioning showed header actions
which were not actually taking effect (now disabled)
* Ingest pipeline was linking to "not found" flyout if data stream
doesn't have a default ingest pipeline
* Index pattern for discover link and histogram was built the wrong way
(shows child streams for classic streams instead of wired streams)
2025-04-08 10:58:02 +02:00
Lene Gadewoll
0f4361d05d
[HCM] High contrast mode style adjustments (#216964)
## Summary

This PR adds a couple of style fixes to ensure improved visual output in
high contrast mode.

The updates focus on borders, mainly removing duplicate borders due to
nested `EuiPanel` usages and ensuring custom borders are correctly
applied and receive a high contrast color.

### Changes

| Solution | Before | After |
|--------|-----|-----|
| discover | ![Screenshot 2025-04-03 at 09 48
20](https://github.com/user-attachments/assets/068c5dc7-be38-482a-9b60-74ec15ec0c69)
| ![Screenshot 2025-04-03 at 09 50
45](https://github.com/user-attachments/assets/3e06c775-6c4f-481f-9186-334803ee0f3b)
|
| dashboard | ![Screenshot 2025-04-03 at 09 32
56](https://github.com/user-attachments/assets/ca4cda9d-5607-4aff-9485-b9e5a864322f)
| ![Screenshot 2025-04-03 at 09 31
44](https://github.com/user-attachments/assets/0324d367-f86e-440b-950a-a4debd77962c)
|
| dashboard | ![Screenshot 2025-04-03 at 09 33
07](https://github.com/user-attachments/assets/3aac0640-1d34-4f03-8d47-32253d6f7092)
| ![Screenshot 2025-04-03 at 09 33
37](https://github.com/user-attachments/assets/9679e008-9aac-441c-ae0c-5d713eb83a61)
|
| elasticsearch | ![Screenshot 2025-04-03 at 09 40
26](https://github.com/user-attachments/assets/ced77757-086a-4dc6-ab9d-4befcd543177)
| ![Screenshot 2025-04-03 at 09 41
36](https://github.com/user-attachments/assets/39f51db1-fb0b-4231-9d58-cd3100e1f7f8)
|
| observability | ![Screenshot 2025-04-03 at 09 47
40](https://github.com/user-attachments/assets/568c9c60-63ea-4ffa-9155-26bd160600c5)
| ![Screenshot 2025-04-03 at 09 47
55](https://github.com/user-attachments/assets/be036721-fccc-4514-b7b0-67340087b020)
|
| security | ![Screenshot 2025-04-03 at 09 31
01](https://github.com/user-attachments/assets/01b24035-54bc-4471-a5b8-df3446fbc230)
| ![Screenshot 2025-04-03 at 09 30
46](https://github.com/user-attachments/assets/fbb3ac03-50fe-4ecc-aaeb-e0dfecabc566)
|

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-08 10:39:07 +02:00
Ievgen Sorokopud
6ab8808d72
[Attack Discovery][Scheduling] Use core.services.featureFlags to control access to assistantAttackDiscoverySchedulingEnabled feature flag (#12005) (#217306)
## Summary

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

These changes we switched to `core.services.featureFlags` to manage the
`assistantAttackDiscoverySchedulingEnabled` feature flag to control
visibility of the Attack Discovery Scheduling feature.

To enable the flag locally, add this in the `kibana.dev.yml`:

```
feature_flags.overrides:
  securitySolution.assistantAttackDiscoverySchedulingEnabled: true
```
2025-04-08 10:24:35 +02:00
José Luis González
ba91787976
[Search][Query Rules] Ruleset table (#217170)
## Summary

Listing the rulsets created, otherwise the Empty prompt will be
rendered.

- [x] Create paginated query ruleset table as with design.
- [x] This is the table only, no edit/create/update actions available.

![CleanShot 2025-04-04 at 14 53
17@2x](https://github.com/user-attachments/assets/2a59848a-8ebc-42e8-8f19-b94d5e9f4e10)

Jira ticket: https://elasticco.atlassian.net/browse/SEARCH-927

### 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
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

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

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

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-08 10:13:32 +02:00
Søren Louv-Jansen
624410524f
[Obs AI Assistant] Replace Task Manager usage with Lock Manager (#216916)
This PR replaces usage of the Kibana Task Manager with the [LockManager
utility](https://github.com/elastic/kibana/pull/216397) that ensures
strict mutual exclusion when running operations such as re-indexing or
data migrations.

---------

Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 10:13:00 +02:00
Alex Szabo
08c5f0799d
[ci] Minor quick-checks updates (#215856)
## Summary
1 - `node scripts/prettier_topology_check` occasionally breaks with
`.gitignore` not being available, it's required for a globby call.
(https://buildkite.com/elastic/kibana-on-merge/builds/64944#0195c874-c2b0-436c-9752-91a6118dde9d)

2 - some scripts are run together by `yarn kbn run-in-packages` - this
script only logs AFTER a script finished successfully; when a script
like this fails, the failing script is not logged. This change logs
before to see what the error is. (ref:
https://elastic.slack.com/archives/C5UDAFZQU/p1742824259264329)
2025-04-08 09:26:14 +02:00
Alex Prozorov
854bfc4964
[Cloud Security ] 12165 update UI handling of multiple CVEs and package fields (#216411)
## Summary

This PR updates the rendering of multi value fields - vulnerability.id,
package.name, package.version and package.fixed_version in the
vulnerabilities data-grid page and alerts insights vulnerabilities tab
data grid.
It also updates the rendering of package.* fields in the vulnerabilities
flyout and both flyout and data grids are re using the same kbn package
component to display it.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Make CVSS column to be displayed first in the data grid.
- [x] if there is a single CVE display its value across the data grid.
- [x] data-grid if there is more than a single CVE show it as
<first_cve> <+x more> badge indicating the number of CVES left. Clicking
on the badge should open a Popver where all CVEs are displayed as badges
- clicking on the value will add it to the search bar filters, each
batch should have a copy icon as well.
- [x] insights tab data-grid should have similar logic to display multi
value fields but without adding it to the filters logic since there are
no filters in that page.
- [x] logic of displaying multiple CVEs should be applied to
package.name, package.version and package.fixed_version fields in both
data grids.
- [x] arrays in package-related vulnerability fields are rendered
correctly in the flyout header and footer.
- [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
- [ ] [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)

### Screen recording


https://github.com/user-attachments/assets/208f8445-83c1-4e8f-a490-85ec48830fae

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 10:22:57 +03:00
Carlos Crespo
9cc220ac52
[Synthtrace] APM Otel v2 (#217019)
## Summary
This PR enhances support for otel data in Synthtrace. It introduces the
ability to generate otel-sdk data and transforms APM Server data into
otel format.

Key Changes
- Added a pipeline for processing otel traces.

- Add a pipeline to convert APM server traces into exported otel traces

- Removed `OtelSynthtraceEsClient` in favor of `ApmSynthtraceEsClient`.

### Examples

Reproduces the otlp traces -> APM Server/tracesexporter -> output case
```ts
 // this needs to be set in the synthtrace scenario's `bootstrap` to run the correct pipeline
apmEsClient.pipeline(apmEsClient.getPipeline('otelToApm'));

// scenario
apm.otelService({
    name: 'sendotlp-otel-native-synth',
    sdkName: 'otlp',
    sdkLanguage: 'nodejs',
  })
  .instance('otel-native-instance')
   // this interface doesn't provide a `transaction` function
  .span({
    name: transactionName,
    kind: 'Server',
  })
  .timestamp(timestamp)
  .duration(1000)
  .success()
  .children(
    instance
      .dbExitSpan({
        name: 'GET /',
        type: 'elasticsearch',
      })
      .duration(1000)
      .success()
      .timestamp(timestamp)
  )
```

APM Server -> otel output. This can be useful for reusing existing
synthtrace scenarios.

```ts
 // this needs to be set in the synthtrace scenario's `bootstrap` to run the correct pipeline
 apmEsClient.pipeline(apmEsClient.getPipeline('apmToOtel'));

 // scenario
 apm.service({
    name: 'apmserver-otel-synth',
    environment: 'prod',
    agentName: 'opentelemetry/java',
  })
  .instance('otel-apmserver-instance')
  .transaction({ transactionName })
  .timestamp(timestamp)
  .defaults({
    'url.domain': 'foo.bar',
  })
  .duration(1000)
  .success()
  .children(
    otelApmServerInstace
      .span({
        spanName: 'GET apm-*/_search',
        spanType: 'db',
        spanSubtype: 'elasticsearch',
      })
      .duration(1000)
      .success()
      .destination('elasticsearch')
      .timestamp(timestamp)
  )
```

### How to test


otel -> APM Server/tracesexporter -> output
Run `node scripts/synthtrace otel_simple_trace.ts --live --uniqueIds
--clean`


<img width="800" alt="image"
src="https://github.com/user-attachments/assets/e237e506-1c0d-4851-9053-0f1e2fe554db"
/>

APM Server -> otel 

Run `node scripts/synthtrace simple_trace.ts --scenarioOpts
pipeline=apmToOtel --live --uniqueIds --clean`

<img width="800" alt="image"
src="https://github.com/user-attachments/assets/1bd577be-ded6-44ad-a54d-c5bb4e5ad59d"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-08 09:16:19 +02:00
Kibana Machine
fd5b5eea84
[api-docs] 2025-04-08 Daily api_docs build (#217435)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1036
2025-04-08 08:23:35 +02:00
Stratoula Kalafateli
400a91464d
[ES|QL] Makes the controls values clearable (#217132)
## Summary

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

Adds a clear button in the values dropdowns

<img width="400" alt="image"
src="https://github.com/user-attachments/assets/79d3f615-9ce1-4caa-be65-99895bb35d49"
/>


<img width="373" alt="image"
src="https://github.com/user-attachments/assets/d4edab35-18a4-477c-afb3-a4b316db1a40"
/>
2025-04-08 07:47:43 +02:00
elastic-renovate-prod[bot]
1db06dc93c
Update dependency @launchdarkly/node-server-sdk to ^9.7.7 (main) (#216931)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@launchdarkly/node-server-sdk](https://redirect.github.com/launchdarkly/js-core/tree/main/packages/sdk/server-node)
([source](https://redirect.github.com/launchdarkly/js-core)) |
dependencies | patch | [`^9.7.6` ->
`^9.7.7`](https://renovatebot.com/diffs/npm/@launchdarkly%2fnode-server-sdk/9.7.6/9.7.7)
|

---

### Configuration

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJUZWFtOlNlY3VyaXR5IiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-04-08 03:02:06 +02:00
elastic-renovate-prod[bot]
ae433cd0a3
Update dependency @redocly/cli to ^1.34.1 (main) (#217267)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@redocly/cli](https://redirect.github.com/Redocly/redocly-cli) |
devDependencies | patch | [`^1.34.0` ->
`^1.34.1`](https://renovatebot.com/diffs/npm/@redocly%2fcli/1.34.0/1.34.1)
|
| [@redocly/cli](https://redirect.github.com/Redocly/redocly-cli) |
dependencies | patch | [`^1.34.0` ->
`^1.34.1`](https://renovatebot.com/diffs/npm/@redocly%2fcli/1.34.0/1.34.1)
|

---

### Release Notes

<details>
<summary>Redocly/redocly-cli (@&#8203;redocly/cli)</summary>

###
[`v1.34.1`](https://redirect.github.com/Redocly/redocly-cli/releases/tag/%40redocly/cli%401.34.1)

[Compare
Source](https://redirect.github.com/Redocly/redocly-cli/compare/@redocly/cli@1.34.0...@redocly/cli@1.34.1)

##### Patch Changes

-   Improved OpenTelemetry data serialization.
- Updated
[@&#8203;redocly/respect-core](https://redirect.github.com/redocly/respect-core)
to v1.34.1.

</details>

---

### Configuration

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

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

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

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

---

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

---

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

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

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-08 03:01:25 +02:00
Patryk Kopyciński
17440896f9
[Security Assistant] Don't cache MLClient (#217408)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.


### 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-04-08 01:25:45 +02:00
Alexi Doak
902bca98f1
[ResponseOps] ES|QL rules should generate a context.link that points to Discover (#216376)
Resolves https://github.com/elastic/kibana/issues/188856

## Summary

Currently ES query rule types link back to the alert details in the
`context.link` variable, except for the search source type. This PR
updates the rest of the ES query rule types to links to the relevant
docs in Discover.


### Checklist


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

### To verify
1. Set `server.publicBaseUrl` in kibana.yml
2. Create an ES|QL rule and include `context.link` in your action
message. Verify that when you go to the link it goes to Discover with
the correct query and timestamp
3. Create a DSL ES query rule and include `context.link` in your action
message. Verify that when you go to the link it goes to Discover and
works as expected
4. For your DSL rule also add some filters and verify that when you go
to Discover your filters are correctly applied.
2025-04-07 14:59:55 -07:00
Kibana Machine
9897f5dd60 skip failing test suite (#217399) 2025-04-07 23:09:03 +02:00
Ying Mao
3d54923123
[Response Ops][Reporting] Add health API to inform whether conditions are sufficient for scheduled reports (#216857)
Resolves https://github.com/elastic/kibana/issues/216319

## Summary

Adds an internal reporting health API to return whether conditions are
sufficient to support scheduled reports. For scheduled reporting, we
need for security and API keys to be enabled in Elasticsearch and for a
permanent encryption key to be set for the encrypted saved objects
plugin.

```
GET kbn:/internal/reporting/_health

Response 
{
  "has_permanent_encryption_key": true,
  "is_sufficiently_secure": true
}
```

The issue also mentions returning whether a preconfigured email service
is configured, but that will be done as part of the main scheduled
reporting task.

## To Verify

1. Run kibana and ES with no special flags, both flags should be `true`
2. Run ES with `-E xpack.security.enabled=false`.
`is_sufficiently_secure` should be set to `false`
3. Run ES With `-E xpack.security.authc.api_key.enabled=false`.
`is_sufficient_secure` should be set to `false`

Note that in dev mode, an encryption key is auto-set if not defined in
the Kibana yml so `has_permanent_encryption_key` will always return
`true` in dev mode.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-07 16:46:02 -04:00
elastic-renovate-prod[bot]
04a3d3308f
Update dependency @types/semver to ^7.7.0 (main) (#216932)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/semver](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/semver)
([source](https://redirect.github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/semver))
| devDependencies | minor | [`^7.5.8` ->
`^7.7.0`](https://renovatebot.com/diffs/npm/@types%2fsemver/7.5.8/7.7.0)
|

---

### Configuration

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

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

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

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

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2025-04-07 22:36:17 +02:00