Commit graph

84082 commits

Author SHA1 Message Date
Charlotte Alexandra Wilson
ba9210c259
[Security Solution] Fix Incorrect Enable Button Behavior in Entity Store Modal (#212078)
## Summary

Ensure Enable Button Considers Disabled State of Risk Score & Entity
Store. Previously only used the checked state of the toggle.

### Reproduce the Issue
Steps, as [per bug
ticket:](https://github.com/elastic/kibana/issues/209242#issue-2826951496)

1. Kibana version 8.16.0 or above should exist
2. Navigate to the Dashboards tab under Security
3. Select Entity Analytics dashboard
4. Click on the enable button and enable risk score
5. Disable the options for Entity store
6. Then again select the enable button for Entity store
7. Disable the enable button
8. Observe the Enable button is still enabled

### After Issue Solved

Same steps as above, but should show the warning and disable the button.

#### Videos

Videos show when either riskScore or entityStore is enabled, and the
other is unchecked, the warning should show and the button should be
disabled.


https://github.com/user-attachments/assets/236f9e69-f810-4116-9948-38fd27d4d945



https://github.com/user-attachments/assets/2971e845-5d46-4eac-997a-79b3b17922c0

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 14:35:30 +00:00
Davis Plumlee
a51e96eae2
[Security Solution] Adds prebuilt rule customization integration tests (#207016)
## Summary

Adds tests in accordance to
https://github.com/elastic/kibana/pull/204888

Adds integration tests for the prebuilt rule customization features

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] 🟢 ESS x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7919
- [x] 🟡 Serverless x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7920
- [x] 🟡 Serverless x100
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7927

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-24 15:35:17 +01:00
Agustina Nahir Ruidiaz
fd18951f8f
[SecuritySolution] Numbers of Network KPI metric are cropped (#211460)
## Summary

Fix issue https://github.com/elastic/kibana/issues/210806


### Network Page
| Before | After |
|--------|-------|
| ![Network
Before](https://github.com/user-attachments/assets/0b3277f7-dbe2-41a4-ac76-05a806bb42e8)
| ![Network
After](https://github.com/user-attachments/assets/12b16e81-d13b-495f-9d46-a4154aa8e0cf)
|

### Host Page
| Before | After |
|--------|-------|
| ![Host
Before](https://github.com/user-attachments/assets/1338b0e5-f4b1-4d1a-ad54-da392f0eff07)
| ![Host
After](https://github.com/user-attachments/assets/48af01d9-a4aa-450d-ac81-e2b4a724363f)
|

### Users Page
| Before | After |
|--------|-------|
| ![Users
Before](https://github.com/user-attachments/assets/d7acdf4d-9a4f-4b67-923c-a184e13b367f)
| ![Users
After](https://github.com/user-attachments/assets/43bf36bd-1e3b-47d7-b121-0d4142b18cbe)
|


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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
2025-02-24 11:18:12 -03:00
Vitalii Dmyterko
04a9acd365
[Security Solution][Detection Engine] moves general logic rule executions FTR tests to Essentials/Basic tier (#211477)
## Summary

 - addresses https://github.com/elastic/kibana/issues/179767
- ignore_fields tests run as expected on basic/essentials license, so
moved to that tier
- moves the rest of files in `general_logic` set of tests to basic
level, apart from synthetic source tests that requires platinum(trial)
license
2025-02-24 13:59:06 +00:00
Vitalii Dmyterko
6345c2b6ac
[Security Solution][Detection Engine] marks ES|QL rule type errors as user errors (#211064)
## Summary

- addresses https://github.com/elastic/kibana/issues/211003
- marks syntax, data verification(missing indices or wrong type of
index), license errors as user errors to avoid triggering response-ops
Serveless SLO

### Testing

create ES|QL rule with invalid query syntax through API call: `from
YOUR_INDEX metadata _id |`
run rule, observe error
use any debugging method to check that in
`x-pack/platform/plugins/shared/alerting/server/monitoring/rule_result_service.ts`
alerting method `addLastRunError` reports userError

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 13:54:43 +00:00
Joe Reuter
ee7f1b5e06
🌊 LLM integration follow-ups (#212208)
This PR takes care of two follow-ups related to the LLM integration:
* Shows CTA if AI assistant can be configured, but isn't (see
https://github.com/elastic/kibana/pull/208777#issuecomment-2664988172)
<img width="505" alt="Screenshot 2025-02-24 at 11 24 30"
src="https://github.com/user-attachments/assets/da01e782-6b02-4ec4-91ab-b46009b41e29"
/>

* Adds some tests

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 13:33:45 +00:00
Gerard Soldevila
a41badf964
SKA: Misc cleanup and enhancements (#212207)
## Summary

* Remove some old paths pointing to `packages/kbn-pm` (no longer
exists).
* ~Fix group and visibility for `@kbn/streams-app-wrapper-plugin`~.
(done in https://github.com/elastic/kibana/pull/212210)
* Update `scripts/relocate` logic with latest enhancements.
* Convert `@kbn/observability-synthetics-test-data` folder name to
camel-case (messes up with pre-commit hook).
2025-02-24 13:31:00 +00:00
Marius Iversen
d2c8984d67
[Rule Migrations] Add Prerelease flag for integrations (#212206)
## Summary

This adds the flag to include prerelease integrations in the
packageClient used to fetch integrations for the Rule Migration RAG
2025-02-24 14:01:03 +01:00
Sander Philipse
2b621eef9b
[Search] Add read version of enterprise search privilege (#211810)
## Summary

This adds a read version of the default Search privilege. This will make
sure that viewer users don't land on a 403 error when logging into a
Search solution.

Optimizing the experience for the viewer role will be a separate task.
2025-02-24 12:14:43 +00:00
Joe Reuter
74eb39e4db
🌊 Fix plugin visibility (#212210)
Fixes the visibility of `@kbn/streams-app-wrapper-plugin` (should be an
observability thing, not a platform thing)
2025-02-24 12:11:57 +00:00
Julia Bardi
218174ff4e
[Fleet] adjust ux on manage auto-upgrade agents (#212089)
Adjust UX of manage auto-upgrade agents status based on this comment:
https://github.com/elastic/kibana/pull/210866#issuecomment-2674610055

<img width="990" alt="image"
src="https://github.com/user-attachments/assets/4aceb64b-1ac6-429a-89c5-cbce7615b5a5"
/>
2025-02-24 12:58:27 +01:00
Pablo Machado
9fa4e56d19
[SecuritySolution] Delete startedAt check from init_and_status_apis FTR test (#212074)
## Summary

Delete `startedAt` check from init_and_status_apis FTR test.
After @hop-dev [fixed](https://github.com/elastic/kibana/pull/211867)
the status flakiness by accepting `running` as a valid status, the
`startedAt` property has become optional. Deleting it should fix the
[flakiness](https://buildkite.com/elastic/kibana-on-merge/builds/62432#0195243b-92c2-4838-85c1-f06096a62e61).


### How to test it?
That is hard. The flakiness is very flaky ❄️ 
To test it locally, I added `waitFor status === 'running'` before the
`expect`
2025-02-24 11:10:06 +00:00
Gerard Soldevila
6a7c904f92
SKA: Relocate "platform" packages that remain on /packages (#208704)
## Summary

The `/packages` folder at the root of the Kibana repository used to
contain a lot of packages.
In the context of SKA, they have been gradually moved to various
locations:
* `src/platform/packages`
* `x-pack/platform/packages`
* `src/core/packages`

Currently, only `devOnly: true` packages are left in this folder. This
comprises libraries for CLI scripts as well as testing utilities.

With this PR, we are moving ~half of these packages under
`src/platform/packages/(private|shared)/`.
In particular, we are moving those packages that are being used from
platform and/or solutions.

Since they are `"devOnly": true`, this means they are ONLY used from
tests, cypress tests, storybook configs, ./scripts/ folders inside some
modules, or other non-prod-time logic. Nonetheless, they are effectively
referenced from platform and/or solutions code, hence I decided they
should be placed under `platform` folders.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-24 11:03:30 +00:00
Jeramy Soucy
317580fdd5
Log request ID in SAML provider (#211877)
## Summary

This PR adds logging of request ID in SAML provider. Having the request
ID assists in troubleshooting by providing a means to correlate
authentication attempts across Kibana and ES logs.

The full request ID is logged because it is not considered sensitive
information - it is a temporary identifier that is only relevant for a
single authentication attempt.
2025-02-24 12:00:06 +01:00
elastic-vault-github-plugin-prod[bot]
01a850793d
[main] Sync bundled packages with Package Storage (#211908)
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/2323

Co-authored-by: elasticmachine <elasticmachine@elastic.co>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
2025-02-24 10:40:06 +00:00
Kibana Machine
5fe5310c55
[api-docs] 2025-02-24 Daily api_docs build (#212197)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/993
2025-02-24 07:28:53 +00:00
Davis Plumlee
3e4ed6ebd5
[Security Solution] Adds prebuilt rule import/export integration tests (#206893)
## Summary

Adds integration tests in accordance to
https://github.com/elastic/kibana/pull/204889

Adds on to the existing tests we have for rule import and export to
include tests related to the prebuilt rule customization epic and the
new functionality that will be shipping. All these tests are running
behind the `prebuiltRulesCustomizationEnabled` feature flag.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] ESS x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7921
- [x] Serverless x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7922

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2025-02-24 02:18:02 +01:00
Alex Prozorov
9ecf5b6ca8
[Cloud Security] replace sleep usage with retry.tryForTime in add_cis_integration FTR (#212187)
## Summary

This PR replace the usage of sleep method to use retry.tryForTime
instead.


### Checklist
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-02-23 13:30:16 +02:00
Kibana Machine
2288cc8b04
[api-docs] 2025-02-23 Daily api_docs build (#212185)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/992
2025-02-23 07:17:59 +00:00
elastic-renovate-prod[bot]
1d130d256e
Update dependency @redocly/cli to ^1.29.0 (main) (#212048) 2025-02-22 14:21:39 +00:00
Søren Louv-Jansen
54f96d0070
[Obs AI Assistant] Fix bug with get_alerts_dataset_info (#212077)
Closes https://github.com/elastic/kibana/issues/212005

Regression introduced in:
https://github.com/elastic/kibana/pull/209773/files#diff-83722bb07633512b20beb965628b18290628de985d399989011cc20c82fa483cL116

TODO:

- Add a test that would have caught this
2025-02-22 12:50:14 +01:00
Alex Prozorov
a37b3cfba2
[Cloud Security] fix fleet form save button bug (#211563)
## Summary

This PR tries to fix the following
[https://github.com/elastic/security-team/issues/11881](url)
the bug causes a lot of flakiness in our test cases.

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

### Closes
this PR closes the above mentioned issues in relation for this ticket -
https://github.com/elastic/security-team/issues/11881

### Video recording

https://github.com/user-attachments/assets/b6389216-8078-4f06-9a39-41b9559f8f1b
2025-02-22 10:42:52 +02:00
Kibana Machine
a0050691fa
[api-docs] 2025-02-22 Daily api_docs build (#212174)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/991
2025-02-22 07:15:15 +00:00
Paulo Silva
863171c623
Asset Inventory Status API (#211647)
## Summary

It closes #210712

This PR adds the following features:

- Introduces a new `status` API for the asset inventory, which returns
the status of the entity store, including statuses like
`insufficient_privileges`, `disabled`, `initializing`, `ready`, and
`empty`.
- Implements a mechanism to check the current status of the host entity
store and processes the transform component metadata.

It also introduces the following changes:
- Implemented the use of the host entity store to support the new status
API while awaiting the readiness of the 'generic' entity store.
- Added a `metadata` field to the entity store stats object and used it
to add additional metadata from the transform components.
- Replaced the retrieval of the entity store ID with the inclusion of
`stats.id` from the transform stats.
- Unit tests were added to ensure that the new API and status behavior
are functioning correctly, covering all possible states and edge cases.

### Key Changes:
- **API Changes**: A new `status` endpoint was added to query the asset
inventory's status, leveraging the host entity store for now.
- **Metadata Changes**: The `metadata` field was added to the entity
store stats to include transform-related metadata, such as
`documents_processed` and `trigger_count`.
- **Testing**: New unit tests were added to validate the behaviour of
the status API, including scenarios like insufficient privileges, entity
store installation, and document processing status.


### How to test it locally

To test it locally, execute the following in the Kibana dev tools:

```
GET kbn:/api/asset_inventory/status
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-21 17:44:12 -08:00
Jen Huang
8f266145e6
[UII] Validate and surface errors for required_vars groups (#211863) 2025-02-21 17:33:56 -08:00
Michael DeFazio
1a9315c07d
Wrap inference service in avatar for dark mode support (#212092)
## Summary

Wraps the logos in our service provider list in an avatar so they are
visible in dark mode.

![CleanShot 2025-02-21 at 09 34
11@2x](https://github.com/user-attachments/assets/5bc83ee3-265b-4a8f-a811-cc0d8fd1cfd6)

This does not change the selected state for a provider. These logos will
still look poorly in dark mode, but this seemed like a larger effort
(perhaps someone can help make that more seamless).

We could also just remove the logo when selected. The logos are
beneficial when finding a preferred service, but possibly less so once
I've chosen one.

![CleanShot 2025-02-21 at 09 34
19@2x](https://github.com/user-attachments/assets/00ee3cac-3e6d-4b77-ae00-a88dda62506e)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Samiul Monir <samiul.monir@elastic.co>
2025-02-21 17:25:54 -05:00
Jen Huang
f0797dbaf1
[UII] Add remote cluster instructions for syncing integrations (#211997)
## Summary

Resolves https://github.com/elastic/kibana/issues/206239. This PR adds
instructions for configuring the remote cluster to enable syncing
integrations (for a Remote Elasticsearch output).

It also hides extra fields when `Sync integrations` is not enabled:


![image](https://github.com/user-attachments/assets/fc76050c-fdc7-4d5f-b169-8fcb97c65b4e)

When enabled: 


![image](https://github.com/user-attachments/assets/23a28086-598c-478b-a898-ad0214c45b37)

### 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-02-21 14:24:04 -08:00
Efe Gürkan YALAMAN
c0da61a225
[Fix] [Synonyms UI] Fix infinite loading when permissions missing (#211530)
## Summary

Fixes infinite loading when user had missing permissions.
<img width="948" alt="Screenshot 2025-02-18 at 12 24 22"
src="https://github.com/user-attachments/assets/975c46ef-a729-4bec-9442-fdb38b59fe19"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-02-21 14:40:48 -06:00
Sergi Massaneda
64426b2b4d
[Security Solution][Siem migrations] Implement rate limit backoff (#211469)
## Summary

Implements an exponential backoff retry strategy when the LLM API throws
rate limit (`429`) errors.

### Backoff implementation

- The `run` method from the `RuleMigrationsTaskClient` has been moved to
the new `RuleMigrationTaskRunner` class.
- The settings for the backoff are defined in this class with:
```ts
/** Exponential backoff configuration to handle rate limit errors */
const RETRY_CONFIG = {
  initialRetryDelaySeconds: 1,
  backoffMultiplier: 2,
  maxRetries: 8,
  // max waiting time 4m15s (1*2^8 = 256s)
} as const;
```
- Only one rule will be retried at a time, the rest of the concurrent
rule translations blocked by the rate limit will await for the API to
recover before attempting the translation again.

```ts
/** Executor sleep configuration
 * A sleep time applied at the beginning of each single rule translation in the execution pool,
 * The objective of this sleep is to spread the load of concurrent translations, and prevent hitting the rate limit repeatedly.
 * The sleep time applied is a random number between [0-value]. Every time we hit rate limit the value is increased by the multiplier, up to the limit.
 */
const EXECUTOR_SLEEP = {
  initialValueSeconds: 3,
  multiplier: 2,
  limitSeconds: 96, // 1m36s (5 increases)
} as const;
```

### Migration batching changes

```ts
/** Number of concurrent rule translations in the pool */
const TASK_CONCURRENCY = 10 as const;
/** Number of rules loaded in memory to be translated in the pool */
const TASK_BATCH_SIZE = 100 as const;
```

#### Before 

- Batches of 15 rules were retrieved and executed in a `Promise.all`,
requiring all of them to be completed before proceeding to the next
batch.
- A "batch sleep" of 10s was executed at the end of each iteration.

#### In this PR

- Batches of 100 rules are retrieved and kept in memory. The execution
is performed in a task pool with a concurrency of 10 rules. This ensures
there are always 10 rules executing at a time.
- The "batch sleep" has been removed in favour of an "execution sleep"
of rand[1-3]s at the start of each single rule migration. This
individual sleep serves two goals:
  - Spread the load when the migration is first launched.
- Prevent hitting the rate limit consistently: The sleep duration is
increased every time we hit a rate limit.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-21 19:54:40 +00:00
Bailey Cash
de7d33dec2
[Synthetics] introduce new spaces field for synthetics api keys (#211816)
### Summary

- Resolves #211049
- Adds the ability for a user to create an API Key in synthetics
settings that applies to specified space(s)
- Reuses existing spaces combo box from private locations, enhances the
component to incorporate a generic interface and help text prop to
enable additional uses
- Modifies functionality of Generate API Key button to consider a blank
spaces field before creating the key
- Currently, in private locations, if the spaces field is blank, the
save button has no functionality, so this was copied here.

![Screenshot 2025-02-19 at 3 59
24 PM](https://github.com/user-attachments/assets/4bd7cf33-636a-4bba-a7fd-97b2315fcff1)

![Screenshot 2025-02-19 at 4 00
44 PM](https://github.com/user-attachments/assets/21b7cab6-8f95-44e9-b91d-f06e15cbac0c)

### Release Notes
Adds the ability for a user to create an API Key in synthetics settings
that applies only to specified space(s)

---------

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-02-21 14:25:54 -05:00
Rodney Norris
ef2ec69b40
[Search][Playground] Support Multiple Context Fields (#210703)
## Summary

This PR updates the search playground to allow selecting > 1 context
fields to be included in context documents for the LLM.

### Screenshots
<img width="1399" alt="image"
src="https://github.com/user-attachments/assets/76c6bd84-1dc6-4862-b822-a7fc3595cd69"
/>


Context Fields Updated to ComboBox:
<img width="384" alt="image"
src="https://github.com/user-attachments/assets/e246628b-4952-4832-9ac3-f2203700a667"
/>

### Checklist

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-21 18:39:00 +00:00
Tiago Costa
f67036ba3f
skip flaky suite (#207040) 2025-02-21 18:38:06 +00:00
elastic-renovate-prod[bot]
06cbf45992
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 0801a43 (main) (#212046)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `d74b1fd` ->
`0801a43` |

---

### 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>
2025-02-21 12:04:44 -06:00
Davis McPhee
257971d4c0
[Discover] [Embeddable] Fix Discover session embeddable drilldown (#211678)
## Summary

This PR re-adds drilldown support to the Discover session embeddable
after it was accidentally removed during the refactoring in #180536
(related PR where drilldowns / dynamic actions were refactored:
#178896). A new functional test has also been added to prevent future
regressions.

Fixes #211677.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
2025-02-21 13:26:22 -04:00
Gonçalo Rica Pais da Silva
dcca0ba567
[Discover] Fix resource badge text rendering (#211885)
## Summary

Fixes the resource badge rendering so that the formatting does not
output html when the page has a filter applied to it. Badges will no
longer have `<mark>` applied to the text.

<img alt="Resource badge fix 2025-02-20 114954"
src="https://github.com/user-attachments/assets/f92c3c5d-152f-42c5-8159-ba34f6cd174e"
/>

## How to test

- Setup an edge-oblt cluster to point to in `kibana.dev.yml`, or create
a data view with an id that contains `apm_static_data_view_id`, so for
example `apm_static_data_view_id_default`. Then, add the following as
well to the `kibana.dev.yaml`:
```yaml
discover.experimental.enabledProfiles:
  - traces-data-source-profile
```
- Go to Discover page with the data view enabled
- Add a filter for one of the resource badge fields: service.name,
event.outcome
- The formatting on the badge should not show `<mark>` around the text
label, and instead only on the flyout, will the filtered fields show the
marked formatting.
2025-02-21 13:20:33 -04:00
Cristina Amico
ff84c0e85a
[Fleet] Expose ssl options for ES and remote ES outputs in UI (#208745)
Fixes https://github.com/elastic/kibana/issues/207326

## Summary
Expose SSL options for outputs of type ES and remote ES outputs to use
in case of mTLS configuration.

These options correspond to `--elastic-agent-cert,
--elastic-agent-cert-key, --certificate-authorities` CLI options
explained [in the
docs](https://www.elastic.co/guide/en/fleet/current/tls-overview.html#mutual-tls-connection)
and they need to be defined only when the user intends to configure mTLS
in the system.

Secrets inputs are disabled for now in the UI until the needed changes
to fleet server are done.

### Testing
- Create an ES or remote ES output with all the SSL fields compiled
- Either make it default or assign it as a custom output for an agent
policy
- Check that the agent policy has the input data under `fleet` section:

<img width="741" alt="Screenshot 2025-02-20 at 11 56 05"
src="https://github.com/user-attachments/assets/bc891bbc-d669-4e31-951f-d045b64328e7"
/>


<details>
  <summary>Screenshots</summary>

<img width="803" alt="Screenshot 2025-02-20 at 16 07 38"
src="https://github.com/user-attachments/assets/e489cd51-6a40-4820-bf39-7670ad2ce69b"
/>
<img width="810" alt="Screenshot 2025-02-18 at 15 31 54"
src="https://github.com/user-attachments/assets/9f155b2b-1feb-424f-b02b-b232e1e4e63e"
/>


</details>


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-21 17:13:30 +00:00
Dominique Clarke
93c2bd5175
[Synthetics] Remove excess tests and adjust deployment agnostic tests for additional coverage (#206508)
## Summary

Remove overlapping Synthetics tests from the `api_integration` folder.

Tests are kept in the original directory if one of the following is true

A.) They haven't yet been moved to the deployment agnostic
B.) They create custom users and roles (this provides some coverage for
real stateful privileges, which the deployment agnostic directory mocks
with api keys),
C.) They deal directly with api key privileges
D.) They would fail entirely in deployment agnostic (for example, params
which fails in serverless, both MKI and local serverless).


Additionally, some files in the `deployment_agnostic` folder were split
in order to provide some level of coverage for public locations. Files
which contain coverage for public locations are skipped in cloud and
MKI, as they would fail there due to not having the mock location
available.

---------

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-02-21 11:57:24 -05:00
Shahzad
aaf73ff5f6
[Synthetics] Fix overview error popover !! (#211431)
## Summary

Fix overview error popover !!

Pings aren't being returned as part of overview data anymore, so had to
add redux actions to fetch it separately via an existing API

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


<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/2244948f-e42d-443d-b6e7-42e0a72b1bfa"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Justin Kambic <jk@elastic.co>
2025-02-21 16:38:54 +00:00
Jatin Kathuria
74ef9fcdee
[Security Solution] - Feat Add Severity and risk_score to the Siem migrations (#211202)
## Summary

Handles below Features:
- https://github.com/elastic/security-team/issues/11837


This PR adds `risk_score` and `severity` based on below 3 rules
- `Rule Severity` should be mapped to Splunk's `alert.severity`.
- `Rule Severity` values should be mapped as mentioned in below section
Mapping Elastic Security Rule's Severity with Splunk's Severity

> 
> |Splunk's Severity| Elastic Rule Severity |
> |---|---|
> |1- Info|Low|
> |2-Low|Low|
> |3-Medium|Medium|
> |4-High|High|
> |5-Critical|Critical|

- Elastic Security Rule's `Risk Score` derived from the `Severity` of
the Rulet based on below mapping(
[Source](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#rule-ui-basic-params)
)


![Image](https://github.com/user-attachments/assets/d88acd1f-9b73-467f-bf16-0dbecadec465)


## Desk Testing


[splunk_rules_test_severity.json](https://github.com/user-attachments/files/18825855/splunk_rules_test_severity.json)


1. Use the above attached test file which has the `alert.severity`
exported from Splunk.
2. Check the Severity of the translated rule should match the mapping
given above. Expect results like below :

<img width="1474" alt="Screenshot 2025-02-17 at 14 19 23"
src="https://github.com/user-attachments/assets/a8459c71-3208-480e-8049-05293a0a3d2a"
/>



### 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-02-21 17:24:44 +01:00
Sander Philipse
6507cc3fd0
Search indices consume onboarding token (#211755)
## Summary

This consumes the onboarding token propagated by Cloud to determine
which workflow to show in Serverless and ECH.

Best way to test this locally when running on localhost:5601:

In Serverless:
- Go to
http://localhost:5601/app/cloud/onboarding?next=/app/elasticsearch&onboarding_token=vector
- You should be redirected to the getting started flow
- Switch to code view and you should have vector search selected
- Go to
http://localhost:5601/app/cloud/onboarding?next=/app/enterprise_search/overview&onboarding_token=vectorsearch
- You should be redirected to the getting started flow
- Switch to code view and now you should have vector search selected

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-21 16:16:08 +00:00
Abdul Wahab Zahid
cb71dff86e
[Synthtrace] Improve URL discovery when running locally in Serverless mode (#211670)
## Summary

This PR improves how **Synthtrace** resolves the Kibana URL when only
`--target` (Elasticsearch) is provided or when neither `--target` nor
`--kibana` is specified. The CLI now attempts to **automatically
discover** the appropriate URLs based on the provided arguments.

Some adjustments were made to improve this discovery process, especially
when running **locally in Serverless mode**, where Kibana may be using
`http`, while Elasticsearch (ES) is on `https`. Additionally,
self-signed certificates do not work with the IP address `127.0.0.1`, so
this PR defaults to `localhost` and warns the user if `127.0.0.1` is
detected in Serverless mode.

### **Improvements**
- If either of `--target` or `--kibana` or neither provided, the CLI
attempts to **discovers the URLs** dynamically now in both Stateful and
Serverless.
- Defaults to `localhost` instead of `127.0.0.1` to avoid SSL
certificate issues.
- Provides a **clear error message and hint** when Kibana and ES use
different protocols (http vs https) and either or both are unreachable.

### **Expected Behavior After This PR**
These commands should now work **seamlessly** in both **local Stateful**
and **Serverless** modes:

```sh
✗ node scripts/synthtrace simple_logs
```

For **Serverless mode**, these also work:

```sh
✗ node scripts/synthtrace simple_logs --kibana=http://elastic_serverless:changeme@localhost:5601
```

```sh
✗ node scripts/synthtrace simple_logs --target=https://elastic_serverless:changeme@localhost:9200 --kibana=http://elastic_serverless:changeme@localhost:5601
```

### **(Side Note) Serverless Kibana with SSL Disabled**
However, the following command will **fail** with an error message if
Kibana is running without SSL, while Elasticsearch is using `https`:

```sh
✗ node scripts/synthtrace simple_logs --target=https://elastic_serverless:changeme@localhost:9200
```

#### **Error Output:**
```sh
Loading scenario from kibana/packages/kbn-apm-synthtrace/src/scenarios/simple_logs.ts
Error: Could not connect to Kibana. request to https://elastic_serverless:changeme@localhost:5601/ failed, reason: write EPROTO 400882F501000000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:

If your Kibana URL differs, consider using the '--kibana' parameter to customize it.
```

**Solution:** 
If you must have to provide `--target` (non defaults), also provide
`--kibana` or start Kibana with SSL enabled.
```sh
✗ yarn start --serverless=oblt --ssl
```
2025-02-21 16:58:07 +01:00
Dzmitry Lemechko
f5a1ead8cf
[scout] disable reporter for config validation command (#212072)
## Summary

In #211918 I added config validation check to skip run if there are no
tests in playwright config.

It turned out that Playwright init reporters even when `--list` command
is passed and no tests are executed, that lead to Scout reports being
loaded and then causing reporter error when the other command runs the
tests:

```
 proc [playwright]  info Calling save with destination: /Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953
 proc [playwright] ERROR Error: Save destination path '/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953' already exists
 proc [playwright]           at ScoutEventsReport.save (/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/report/events/report.ts:56:13)
 proc [playwright]           at ScoutPlaywrightReporter.onEnd (/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/playwright/events/playwright_reporter.ts:277:19)
 proc [playwright]           at ReporterV2Wrapper.onEnd (/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/reporterV2.js:91:165)
 proc [playwright]           at /Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:71:117
 proc [playwright]           at wrapAsync (/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:112:18)
 proc [playwright]           at Multiplexer.onEnd (/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:69:31)
 proc [playwright]           at InternalReporter.onEnd (/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/internalReporter.js:77:12)
 proc [playwright]           at finishTaskRun (/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:90:26)
 proc [playwright]           at runTasks (/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:73:10)
 proc [playwright]           at Runner.runAllTests (/Users/dmle/github/kibana/node_modules/playwright/lib/runner/runner.js:72:20)
 proc [playwright]           at runTests (/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:211:18)
 proc [playwright]           at t.<anonymous> (/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:54:7)
```

The simplest solution is to explicitly disable Scout reporter for config
validation command.
2025-02-21 16:42:32 +01:00
Pablo Machado
aebf23ed36
[Security Solution] Unskip cypress test (#211277)
## Summary

It ran 300 times successfully. Enabling it 🤞
2025-02-21 15:39:43 +00:00
Joe Reuter
8a9bb363aa
🌊 Move streams to platform (#211893)
This PR moves the `streams` and `streams_app` plugins into platform so
they can be used in other solutions in the future. This PR is not
actually making it available in other solutions yet since we are still
discussing the release plans.

## Inlined helpers

As discussed before, this PR inlines a couple simple helper methods for
query building, time zone normalization, a header portal helper and a
data plugin timefilter state react integration hook as there is no good
place for these outside of the observability solution.

## streams_app plugin

The streams_app plugin is not actually registering anything, instead it
simply exports a component that renders the app which needs to be
consumed by another plugin to turn it into a registered app - for now,
`observability_streams_wrapper` takes over this job.

## observability_streams_wrapper plugin

While 99% of the streams logic is moved into the
`platform/shared/streams_app`, two bits are left behind in
`observability_streams_wrapper`:
* The actual app registration
* Integration with the observability_shared `PageTemplate` component

Once we decide streams should be displayed outside of the observability
solution, it's probably not necessary anymore to decouple app definition
and registration like this because it will always be visible no matter
the solution. Once this is the case, the navigation registration can be
moved into the central `observability` plugin, like it's handled with
other apps like infra.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-21 16:34:50 +01:00
elastic-renovate-prod[bot]
876959fb01
Update dependency xstate to ^4.38.3 (main) (#211786)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[xstate](https://redirect.github.com/statelyai/xstate/tree/main/packages/core#readme)
([source](https://redirect.github.com/statelyai/xstate)) | dependencies
| patch | [`^4.38.2` ->
`^4.38.3`](https://renovatebot.com/diffs/npm/xstate/4.38.2/4.38.3) |

---

### Release Notes

<details>
<summary>statelyai/xstate (xstate)</summary>

###
[`v4.38.3`](https://redirect.github.com/statelyai/xstate/releases/tag/xstate%404.38.3)

[Compare
Source](https://redirect.github.com/statelyai/xstate/compare/xstate@4.38.2...xstate@4.38.3)

##### Patch Changes

- [#&#8203;4380](https://redirect.github.com/statelyai/xstate/pull/4380)
[`e9e065822`](e9e0658221)
Thanks [@&#8203;Andarist](https://redirect.github.com/Andarist)! - Fixed
an issue with `exit` actions sometimes being called twice when a machine
reaches its final state and leads its parent to stopping it at the same
time.

</details>

---

### Configuration

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

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

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

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

---

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

---

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

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-02-21 16:14:28 +01:00
Hannah Mudge
85f4f4d5b4
[Dashboard Navigation] Swap SASS for Emotion (#211124)
Part of https://github.com/elastic/kibana/issues/207852

## Summary

This PR migrates all `*.scss` files in the Links plugin to Emotion.
Testing should simply verify that this PR does not introduce any style
changes.


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

Any risks associated with this PR are purely cosmetic, since it contains
exclusively style-related changes.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-21 08:07:23 -07:00
Khristinin Nikita
99c84fcc3a
Force popover click for manual rule run (#211623)
## Summary

Similar to other place which use this popover, let's try force click to
fix flaky tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-21 16:00:04 +01:00
Sergi Romeu
6a6f0e70b3
[ObsUX][APM][Profiling] Update documentation links to use doc link service instead of hardcoded URLs (#212051)
## Summary

Closes #208895

This PR updates documentation links to use the doc link service, to
avoid hardcoding URLs
2025-02-21 15:52:40 +01:00
elastic-renovate-prod[bot]
8ab9b66a80
Update dependency @openfeature/core to ^1.7.1 (main) (#212047) 2025-02-21 14:06:56 +00:00
Julia Bardi
dbfb433ec2
[Fleet] fix prerelease:boolean in package_service (#212054)
Use `boolean` instead of `false` in `getPackages` to support querying
prerelease packages.
2025-02-21 14:51:21 +01:00