Commit graph

48625 commits

Author SHA1 Message Date
Sergi Massaneda
81880aa393
[Security Solution][Automatic migrations] Disable test MKI explicitly (#225579)
## Summary

Disable MKI explicitly for automatic migrations test with
`@skipInServerlessMKI`

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-27 09:36:26 -05:00
Kenneth Kreindler
686315e62d
[Security Solution] [AI assistant] Global assistant bugs (#225149)
## Summary

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

Fixes various bugs introduced by this PR
https://github.com/elastic/kibana/pull/223936

Changes:
- Fix bug where esql_content_references (citations that open the ESQL
editor) were not working due to the discover plugin not getting imported
to the elastic_assistant plugin. This caused the assistant to crash.
- Fix bug where some buttons in the AI4Soc flavour were not linking to
the correct pages.
https://github.com/elastic/kibana/pull/223936#discussion_r2164506213

### How to test:
#### Verify ESQL citations work:
- Start Kibana
- Create a semantic index and index a document through the dev console:
```
PUT my-index-000001
{
  "mappings": {
    "properties": {
      "description": {
        "type": "semantic_text"
      }
    }
  }
}


# Add a document to my-index
POST /my-index-000001/_doc
{
    "id": "Security threats",
    "title": "Stuxnet",
    "description": "What Made It Special:
Stuxnet was the first known cyber weapon designed to cause physical destruction. It targeted the Iranian nuclear program by infecting uranium enrichment facilities and sabotaging centrifuges."
}
```
- Set up a knowledge base and a knowledge base index in
http://localhost:5601/app/management/kibana/securityAiAssistantManagement?tab=knowledge_base
<img width="678" alt="image"
src="https://github.com/user-attachments/assets/a267146e-7973-4723-8c1d-365b8729a28e"
/>

- Open the security AI assistant and ask "What is the Stuxnet computer
virus?"
- Check the response to see if it contains a citation, click on the
citation, and verify the ESQL editor opens.
* If you don't get a citation, ask "What is the Stuxnet computer virus?
Provide me the citation"

#### Verify Ai4Soc buttons in the Security AI assistant link to the
correct pages:
- Start AI4Soc flavor - Create the following file
`config/serverless.security.dev.yml` with this content:
```yml
xpack.securitySolutionServerless.productTypes:
  [
    { product_line: 'ai_soc', product_tier: 'search_ai_lake' },
  ]
```
- Start serverless ES
```bash
node scripts/es serverless --projectType security --clean --kill
```
- Start serverless Kibana for security
```bash
node --no-experimental-require-module scripts/kibana --dev --serverless=security --no-base-path
```

- Open the security AI assistant
- Check that clicking on these buttons takes you to the respective pages
(KB settings
`/app/security/configurations/ai_settings?tab=knowledge_base` and AI
settings `/app/security/configurations/ai_settings` ):
<img width="690" alt="image"
src="https://github.com/user-attachments/assets/4e2728e9-8a13-4670-aef4-05b1bdb3fd57"
/>


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-27 09:30:23 -05:00
Charis Kalpakis
8b6b00e94d
Changed failsOnMKI to skipCloud at synthetics API test suite for multispace monitors (#225644)
### Summary 

Changed `failsOnMKI` to `skipCloud` at synthetics API test suite for
multispace monitors.
Same issue on ECH -> https://github.com/elastic/kibana/issues/225431
2025-06-27 16:21:40 +02:00
Charis Kalpakis
c75f67970e
[ska][x-pack] Move canvas, watcher and dev_tools functional tests 2025-06-27 17:20:22 +03:00
Vitalii Dmyterko
fefaea74fa
[Security Solution][Detection Engine] fixes docs version reference in actions test (#225611)
## Summary

We had a few cases of backport tests failing because version in docs
link is hardcoded as `current` but can be previous version.

Examples:
https://github.com/elastic/kibana/pull/225582
https://github.com/elastic/kibana/pull/225584

Failed assertion:

> Error: expected 'This rule\'s API key is unable to access all indices
that match the ["host_alias"] pattern. To learn how to update and manage
API keys, refer to
https://www.elastic.co/guide/en/kibana/9.1/alerting-setup.html#alerting-authorization.\n\nThis
rule is attempting to query data from Elasticsearch indices listed in
the "Index patterns" section of the rule definition, however no index
matching: ["host_alias"] was found. This warning will continue to appear
until a matching index is created or this rule is disabled.' to contain
'This rule\'s API key is unable to access all indices that match the
["host_alias"] pattern. To learn how to update and manage API keys,
refer to
https://www.elastic.co/guide/en/kibana/current/alerting-setup.html#alerting-authorization.'
2025-06-27 16:18:39 +02:00
Anton Dosov
fe9dcf751a
[Workspace Chrome] Bootstrap grid layout for classic nav (#224255)
> [!IMPORTANT]
> **Should be no user-facing changes!!!** The new layout work is behind
a feature flag!

> [!IMPORTANT]  
> This bootstraps new grid layout for chrome using a feature flag. It
only works with classic nav and hack a lot of bugs and EUI-related
workarounds, but the overall code structure and approach can be reviewed
and merged to main.


## Summary

Part of [workspace
chrome](https://github.com/elastic/kibana-team/issues/1581 ) work. In
this PR we lay down the ground work for new grid layout that will power
Kibana's chrome. This is done by introducing **a feature flag** with
which Kibana can switch between "legacy-fixed" layout and new "grid"
layout.


![Image](https://github.com/user-attachments/assets/8d91ef37-f17e-4cee-980b-23834d81290e)

Proper detailed figma link:
https://www.figma.com/design/10ca4AhnWDkyJklUDXnHg5/Sidebar?node-id=5192-259808&p=f&m=dev


kibana.yml:
```
feature_flags.overrides:
  core.chrome.layoutType: 'grid'
```

For this, in-between `rendering_service` and `chrome_service` a new
`layout_service` was introduced the goal of which is to aggregate stuff
from chrome service and compose it together using the needed layout.
There are two implementations for `layout_service`:
- `LegacyFixedLayout` - old one, just code refactor, should still work
as in main
- `GridLayout`- new one, mostly works, but only for classic nav, for
now, and with bunch of hacks and bugs that we will resolve over time

The switch is in `rendering_service` based on a feature flag: 

```tsx
const layout: LayoutService =
      layoutType === 'grid'
        ? new GridLayout(renderCoreDeps)
        : new LegacyFixedLayout(renderCoreDeps);

    const Layout = layout.getComponent();

    ReactDOM.render(
      <KibanaRootContextProvider {...startServices} globalStyles={true}>
        <Layout />
      </KibanaRootContextProvider>,
      targetDomElement
    );`
```

To see the grid and new layout in action there is a helpful `debug` flag
that displays not yet used elements of new layout:

kibana.yml:
```
feature_flags.overrides:
  core.chrome.layoutType: 'grid'
  core.chrome.layoutDebug: true
```


https://github.com/user-attachments/assets/9e4ad1d9-ed23-41ab-b029-254f7511136d




### Other clean ups 

- Migrate `.chrHeaderBadge__wrapper`, `. chrHeaderHelpMenu__version`,
`breadcrumbsWithExtensionContainer` to emotion on simplify global css of
chrome
- remove `getIsNavDrawerLocked` and related css since not used 
- Small unzyme 

### TODO

- [x] fix solution nav in management 
- [x] make sure solution nav works with header 
- [x] fix dashboard full screen mode
- [x] check discover eui grid full screen
- [x] check chromeless mode
- [x] Follow up on EUI related hacks
https://github.com/elastic/eui/issues/8820
- [ ] Misaligned console in search solution 
- [ ] Miaaligned secondary nav in security solutions
- [ ] double scroll in discover push flyout


## How to review 

1. Most importantly, we need to ensure that nothing is broken in the old
layout during the refactor. - Functional tests + visual/manual testing
2. Then for the new layout: 

kibana.yml:
```
feature_flags.overrides:
  core.chrome.layoutType: 'grid'
  core.chrome.layoutDebug: true
```

- Check that it mostly works (some specific edge cases and bugs are
fine)
- Code-review:  focus on the layout implementation split approach
2025-06-27 16:08:47 +02:00
Ying Mao
f43138c059
[Response Ops][Reporting][Task Manager] Allow setting dtstart in rrule schedule - schema changes only for intermediate release (#224979)
## Summary

This PR contains the schema changes needed to support using `dtstart` in
task manager rrule schedules. This is meant for intermediate release and
then the changes will be used in this PR:
https://github.com/elastic/kibana/pull/224948

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-27 10:05:28 -04:00
Zachary Parikh
3ef270c167
[OneChat] Simple Chat UI (#222816)
## Summary


https://github.com/user-attachments/assets/47cf7b8e-fb43-43c8-b6b4-e7a379660d80


### 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: Jedr Blaszyk <jedr.blaszyk@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-27 09:30:15 -04:00
Peter Pisljar
180f90a65c
freeze response (#222160) 2025-06-27 15:00:07 +02:00
Dzmitry Lemechko
10cc7b3c62
[ska] relocate 'shared/lib/security' helpers to 'osquery/cypress' dir (#225438)
## Summary

This PR removes `kbn/test-suites-serverless` as kbn reference for
osquery/cypress test-helper module in order to fix circular dependency I
faced in https://github.com/elastic/kibana/pull/225377

Since the main consumer of that `shared/lib/security` code is
`osquery/cypress` test module, I believe it is a resonable change in
order to unblock us relocating tests from `x-pack/test` dir.
2025-06-27 14:50:52 +02:00
Abhishek Bhatia
a88d7f02bd
[SecuritySolution][EA][PrivMon]Changes to replace hard coded css values to use euiTheme instead (#225307)
## Summary

Change to use EuiTheme instead of hardcoded css values

## Screenshot after the change:


![image](https://github.com/user-attachments/assets/e21421dc-1a84-4134-9221-69a280ca9a07)



### 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)
2025-06-27 18:05:23 +05:30
Ying Mao
ac8b1c5b5f
Fixes Failing test: X-Pack Alerting API Integration Tests.x-pack/platform/test/alerting_api_integration/security_and_spaces/group2/tests/actions/execute·ts - alerting api integration security and spaces enabled - Group 2 Connectors execute no_kibana_privileges at space1 should log api key information from execute request (#225555)
Resolves https://github.com/elastic/kibana/issues/224987

## Summary

This test was failing the ES snapshot promotion pipeline. See in the
logs:

```
[00:04:15]             │ proc [kbn-ui] [2025-06-26T17:44:06.841+00:00][WARN ][plugins.eventLog] invalid event logged: [kibana.user_api_key.managed_by]: definition for this key is missing; {"@timestamp":"2025-06-26T17:44:06.840Z","event":{"provider":"actions","action":"execute","kind":"action","start":"2025-06-26T17:44:06.762Z","end":"2025-06-26T17:44:06.840Z","duration":"78000000","outcome":"success"},"kibana":{"saved_objects":[{"rel":"primary","type":"action","id":"c4a64b3b-e5f5-4ffc-a58c-98584b6b5e59","type_id":"test.index-record","namespace":"space1"}],"space_ids":["space1"],"action":{"name":"My Connector","id":"c4a64b3b-e5f5-4ffc-a58c-98584b6b5e59","type_id":"test.index-record","execution":{"uuid":"ecbbf89f-729a-416c-a711-05b0a1e27de6","source":"http_request","usage":{"request_body_bytes":0}}},"user_api_key":{"managed_by":"elasticsearch","name":"test user managed key","id":"r1RWrZcB4HDiQQlB8SOM"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d","version":"9.1.0"},"user":{"name":"elastic"},"message":"action executed: test.index-record:c4a64b3b-e5f5-4ffc-a58c-98584b6b5e59: My Connector","ecs":{"version":"1.8.0"}}) {"service":{"node":{"roles":["ui"]}}}
```

So it looks like the `api_key` information now returns a `managed_by`
field which we were copying over to the event log but was not accepted
by the event log schema. Updated the code to only copy over the `name`
and `id` field to address this. Can open a followup issue to see if we
want to copy over the `managed_by` field.
2025-06-27 08:17:58 -04:00
Mykola Harmash
f8e4ccb03b
[Obs Onboarding] Add E2E Ensemble test for Firehose flow (#223560)
Closes https://github.com/elastic/kibana/issues/208328

This change adds Playwright test for Ensemble e2e testing CI.

[🔒 Corresponding PR in Ensemble
repo](https://github.com/elastic/ensemble/pull/580)
[🔒 Successful CI
run](1561308352)

# How to test

1. Run Kibana locally
2. Adjust
`x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/.env`
file if needed (see README in the same folder for more details)
3. Run the test:
```bash
npx playwright test -c ./x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/playwright.config.ts --reporter list --headed x-pack/solutions/observability/plugins/observability_onboarding/e2e/playwright/stateful/firehose.spec.ts
```
4. The test will open the Firehose onboarding page and stop after
copying the CLI command snippet. When running on the CI, Ensemble would
take over by running the snippet on the CI instance. The Playwright test
at this point is just waiting for data to start coming in, to imitate
that without actually creating infrastructure on a real AWS account, you
can ingest a dummy document manually, for example:
```
# Adjust the @timestamp before executing
POST logs-aws.apigateway_logs-default/_doc
{
  "@timestamp": "2025-06-13T13:32:01.000Z",
  "some": 111,
  "aws.kinesis.name": "Elastic-Cloudwatch"
}
```
5. After doing that, you should see Kibana UI update with detected data
and the Playwright should continue and finish successfully.
2025-06-27 14:16:35 +02:00
Kibana Machine
3da35797cd skip failing test suite (#225181) 2025-06-27 05:54:29 -06:00
Ash
1c316c1386
[SecuritySolution][Endpoint][ResponseActions] Enable response actions telemetry (#225233)
## Summary

Enables feature flag to collect response actions telemetry

### 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: Paul Tavares <paul.tavares@elastic.co>
2025-06-27 11:56:10 +02:00
Eleonora
b3573364cf
Add docs for chat/complete public API (#224235)
## 26/06 Edits

Following discussion with the team, made the following changes:
* Modified curl and request and response examples with more appropriate
examples

## 20/06 Edits

Following discussion with the team, made the following changes:
* Removed `query` parameter from the API, and therefore removed it from
docs
* Made API return OpenAI format by default
* Removed `unredactions` property from public API schema and removed it
from docs

## Summary

Closes https://github.com/elastic/obs-ai-assistant-team/issues/193

Add docs for chat/complete public API.

## Steps to view documentation
1. checkout branch
2. Install bump-cli if you don't already have it:
https://docs.bump.sh/help/continuous-integration/cli/
3. Go to kibana/oas_docs folder
4. Run `bump preview output/kibana.yaml` or `bump preview
output/kibana.serverless.yaml`
5. Go to the url given by the command (it takes a while to load). On the
side bar, click on Observability AI Assistant menu item and there you
can see the docs :)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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)

![Screenshot 2025-06-26 at 16 10
38](https://github.com/user-attachments/assets/ba9ad9db-512e-443e-8e7f-e8b538183b98)
![Screenshot 2025-06-26 at 16 11
07](https://github.com/user-attachments/assets/445dfd7e-ab21-4066-b3b3-7ea9da60563b)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-27 10:55:43 +01:00
Shahzad
f7253bc0d1
[Logs Essential] Disable exploratory view !! (#225445)
## Summary

Disable exploratory view !!

Fixes https://github.com/elastic/observability-dev/issues/4638 !!

### Testing 
http://localhost:5601/app/exploratory-view

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/5a03fe49-0057-4a6c-aa76-795fa562edf3"
/>
2025-06-27 10:15:18 +02:00
Kuba Soboń
ef883eb07c
[Security Solution][Entity Store][Test] Make Entity Store initialization more resilient (#223528)
## Summary

Add retries and error-check logic to Entity Store set-up. Also clean up
running Enrichment Policies, which have been preventing proper tear down
in the past.

- Closes https://github.com/elastic/kibana/issues/222090
- Closes https://github.com/elastic/kibana/issues/223166
- Closes https://github.com/elastic/kibana/issues/224196

### 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.
- [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-06-27 09:56:35 +02:00
Rickyanto Ang
170670cfa1
[Asset Inventory] Cypress for Filters (#225238)
## Summary

Added Cypress to cover filter functionality in Asset Inv page
2025-06-26 22:44:24 -07:00
seanrathier
35b2a22f02
[Cloud Security] [Bug] Namespace filtering Findings from CSPM dashboard links (#225161) 2025-06-26 21:20:15 -07:00
Tiago Costa
b37d3bb26e
chore(NA): bump version to 9.2.0 (#225519)
Usually bump from 9.1.0 to 9.2.0
2025-06-27 03:12:11 +01:00
Steph Milovic
41ccdf0bec
[Security Assistant] Removes Default Quick Prompts (#225536) 2025-06-26 16:17:16 -06:00
Steph Milovic
4543f3e25d
[OpenAI Connector] Get http info from config url, not proxyUrl (#225541) 2025-06-26 16:16:32 -06:00
Kibana Machine
5cb7f2ddf4 skip failing test suite (#225196) 2025-06-26 16:11:07 -06:00
Bailey Cash
1c76710f67
add a11y label to monitor script uploader (#225518)
## Summary

Closes #212467

![Screenshot 2025-06-26 at 12 38
17 PM](https://github.com/user-attachments/assets/60b3805b-ce58-48d9-97fe-b946c3a14684)

![Screenshot 2025-06-26 at 12 37
53 PM](https://github.com/user-attachments/assets/cad36c1f-6a77-41eb-a5bd-52c74181c246)
2025-06-26 21:19:41 +01:00
Justin Kambic
21fcf54178
[EBT] Add Meta description for EBT metrics on management pages (#225095)
## Summary

Resolves https://github.com/elastic/observability-dev/issues/4556.

This PR will amend the existing EBT `onPageReady` tracking for TTFCP
with some descriptions to help consumers of the telemetry data
understand the context around what we are tracking for this timing data.

Also exports the `Meta` type for re-use in a Synthetics-specific
implementation that needs to accept this parameter.
2025-06-26 15:59:48 -04:00
Ievgen Sorokopud
d38801034a
[Attack Discovery][Scheduling] Cases support followup 1 (#225452)
## Summary

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

These changes addresses the review comment from my previous PR
36ed6b38c1 (r2150081638)

Initially I broke up rendered component into multiple memoized
sub-sections. Reverting that back and adding tests coverage for the new
functionality - Case actions UI for the Attack Discovery rule type:
* Hidden `group by` component
* Hidden `time window` component
* Hidden `reopen case` component
* Disabled `template selector` component
* Tooltip explaining why we disabled the `template selector` component
2025-06-26 21:31:35 +02:00
Tiago Costa
4de6f7ca2c
skip failing es promotion (#224987) 2025-06-26 20:14:29 +01:00
Tiago Costa
70fec45522
skip flaky suite (#225446) 2025-06-26 20:12:59 +01:00
Mason Herron
bb547ad2eb
[Fleet] Disable reinstall button on custom integrations (#225359)
## Summary

Closes #220604 

- Added additional prop check to disable reinstall button when an
integration is a custom integration

### 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>
2025-06-26 12:53:15 -06:00
Sebastián Zaffarano
5b4a65b98c
[Security Solution][Telemetry] Review logging (#225077)
## Summary

This PR reduces logging in the security solution plugin’s telemetry code
for production environments by reviewing existing logs and adjusting
their log levels.

- Deprecated a logging helper method and moved to standard
`logger.[debug|info|warn|error]` calls.
- Reviewed all the logging sentences to adjust the log level, remove the
non-useful ones, and improve messages.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
2025-06-26 19:34:49 +01:00
Mason Herron
547c198c3d
[Fleet] Fix string escaping (#225516)
## Summary

Closes https://github.com/elastic/kibana-team/issues/1767

Fixes a string escaping flaw in the regex, switched to using the built
in function that safely escapes special characters


### 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### Identify risks

N/A
2025-06-26 19:11:56 +01:00
Agustina Nahir Ruidiaz
f47f83b6c2
[Security Solution]: on ESC key close the timeline flyout instead of the timeline modal (#224352)
## Summary

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

I've added a `handleKeyDown` to capture the `ESC` key press behavior.

1. First `ESC` finds any .euiFlyout and close it with`closeFlyout()`
from `useExpandableFlyoutApi()`, then stops.

2. Next `ESC` (when no flyout) clicks `openToggleRef.current`, toggling
the timeline modal closed.


https://github.com/user-attachments/assets/0e42f9e9-2694-429d-8a5a-df86aa671809

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [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>
2025-06-26 18:39:38 +01:00
Irene Blanco
9e88cd97cf
[Discover][ES|QL] Update query for recommended database queries to use db.system.name (#225421)
## Summary

Relates to https://github.com/elastic/kibana/issues/222908.

While working on the recommended queries, I completely missed that
`db.system` has been replaced by `db.system.name` in the
[semconv](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/#database-client-span-attributes).

The OTel demo is still using `db.system` for now, and since I was using
it to test, I didn't catch the change.
2025-06-26 13:07:13 -04:00
Dzmitry Lemechko
868a4657ee
[ska] relocate api_integration_basic & defend_workflows_cypress tests (#225374)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

Before:

```
x-pack/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

After: 
```
x-pack/solutions/security/test/
     | - api_integration_basic/
     | - defend_workflows_cypress/
```

---------

Co-authored-by: Cesare de Cal <cesare.decal@elastic.co>
2025-06-26 17:43:58 +01:00
Marco Antonio Ghiani
2de5294819
[useUnsavedChangesPrompt] Don't prompt when history is replaced given its option. (#225471)
## 📓 Summary

Fixes an issue with prompting the user about leaving the page when the
URL changes due to data source changes.



https://github.com/user-attachments/assets/88e36769-96a4-4499-87f0-1e6db4502725
2025-06-26 17:28:26 +01:00
Pierre Gayvallet
48e4ede08a
[onechat] Add researcher agent mode (#224801)
## Summary

Follow-up of https://github.com/elastic/kibana/pull/223367
Fix https://github.com/elastic/search-team/issues/10259

This PR introduce the concept of agent **mode**, and expose the "deep
research" agent as a mode instead of a tool.

## Examples

### Calling the Q/A (default) mode

```curl
POST kbn:/internal/onechat/chat
{
  "nextMessage": "Find all info related to our work from home policy"
}
```

### Calling the researcher mode

```curl
POST kbn:/internal/onechat/chat
{
  "mode": "researcher",
  "nextMessage": "Find all info related to our work from home policy"
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-26 17:04:31 +01:00
Sergi Massaneda
7683dd9125
[Security Solution] Disable MKI test for automatic migrations (#225426)
## Summary

There's an issue where the `esArchiverLoad` migrates SO if any index
starting with `.kibana` is affected.

```
CypressError: `cy.task('esArchiverLoad')` failed with the following error:

> security_exception
	Root causes:
		security_exception: action [indices:admin/settings/update] is unauthorized for user [testing-internal] with effective roles [superuser] on restricted indices [.kibana_security_solution_1,.kibana_alerting_cases_1,.kibana_task_manager_1,.kibana_usage_counters_1,.kibana_1,.kibana_ingest_1,.kibana_analytics_1], this action is granted by the index privileges [manage,all]

```

This PR disables the test for MKI so it doesn't interfere with the
release, we'll work on a fix in a separate PR

Example MKI execution

https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-investigations/builds/2889

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-26 17:03:15 +01:00
Bailey Cash
e1868b3c97
[Bugfix / Incident Management] Set proximal filter to true only when indicated (#225461)
Resolves #225460

Addresses an issue where the related alerts by timestamp filter is
applied without user request


https://github.com/user-attachments/assets/b911295e-0748-4a8d-a365-f2af06855d72
2025-06-26 16:28:59 +01:00
Dario Gieselaar
7d20301289
Load huggingface content datasets (#224543)
Implements a huggingface dataset loader for RAG evals - see
[x-pack/platform/packages/shared/kbn-ai-tools-cli/src/hf_dataset_loader/README.md](https://github.com/dgieselaar/kibana/blob/hf-dataset-loader/x-pack/platform/packages/shared/kbn-ai-tools-cli/src/hf_dataset_loader/README.md).
Additionally, a `@kbn/cache-cli` tool was added that allows tooling
authors to cache to disk (possibly remote storage later).

Used o3 for finding datasets on HuggingFace and doing an initial pass on
a line-by-line dataset processor ([see
conversation](https://chatgpt.com/share/6853e49a-e870-8000-9c65-f7a5a3a72af0))

Libraries added:

- `cache-manager`, `cache-manager-fs-hash`, `keyv`,
`@types/cache-manager-fs-hash`: caching libraries and plugins. could not
find any existing caching libraries in the repo.
- `@huggingface/hub`: api client for HF.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-06-26 17:24:45 +02:00
Paulina Shakirova
b0704474f0
[a11y][ml] fix screen reader not reading tooltip p-value (#224666)
## Summary
This PR fixes [[ML] Change point detection: p-value tooltip is not
announced because lack of
focus](https://github.com/elastic/kibana/issues/216545) issue.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-26 17:16:10 +02:00
Julia Bardi
6cea1b0b6a
[Fleet] fix UI error when no tags filter is selected (#225413)
## Summary

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

To verify:
- filter on `No Tags` or `not tags:*` in Agent list
- add tag to an agent
- expect that the agent disappears from view and there is no UI error



https://github.com/user-attachments/assets/77982bc9-13a8-4141-b0a0-e9198706691f
2025-06-26 16:58:15 +02:00
Stratoula Kalafateli
731ab84487
[Lens][ES|QL] Do not rerun the hook in case of an error in the query (#225067)
## Summary

While testing the ES|QL charts I realized that in case of an error in
the query, the hook goes into a loop and causes performance issues.

As the error is being reported we do not need to re-run the query to get
the results

For example if you create a control wrongly.

e.g.

1. Create a chart and add a control which will create an error:

<img width="508" alt="image"
src="https://github.com/user-attachments/assets/f2013d2c-e161-47bf-a3cb-d5033be9de59"
/>

2. Add to the control no-date fields. e.g. clientip
3. Check the editor is not going into a rendering loop

<img width="482" alt="image"
src="https://github.com/user-attachments/assets/cc541b68-b317-41ae-b4a6-87569466edd6"
/>


### Release notes
Fixes a performance issue in the Lens ES|QL charts in case of errors in
the query.

### 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
2025-06-26 15:56:50 +01:00
Mason Herron
2aaf27bb69
[Fleet] Fix CSV download when no fields are chosen (#225368)
## Summary

Closes #218097 

- Added check to stop download button from being active when no fields
are selected as it doesnt make sense to download a CSV with zero fields.


![image](https://github.com/user-attachments/assets/0c69bade-a464-49a4-8276-1845e0f887e9)

### 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>
2025-06-26 08:48:46 -06:00
Kenneth Kreindler
dc24f2068b
[Security Solution] [AI assistant ] Fix error where llm.bindTools is not a function. (#225268)
## Summary

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

This PR fixes a bug where the error message "llm.bindTools is not a
function" would appear in the Security AI assistant.

![Screenshot 2025-06-25 at 11 05
25 AM](https://github.com/user-attachments/assets/3e24b857-667c-4be7-b0ac-236d48decd4f)

Changes:
- Make AssistantTool.getTool return a promise. This means tools can be
created asynchronously. This eliminates the error, as the error stems
from the promise `createLlmInstance()`
([ref](https://github.com/elastic/kibana/pull/225268/files#diff-69e7fc6c29ce0673d7d33c0472a012ad310fa571487a6b594d2e1378b3e5f246R286))
not being awaited.
- Improve type definition for tools so that we avoid bugs when the
AssistantTool type changes e.g.
https://github.com/elastic/kibana/pull/225268/files#diff-b603523fee68a791bd3af770b780fc654eb7866c8d2a73192d29fa935c80e541R17

### How to test:
- Enable AdvancedEsqlGeneration feature flag:
```yml
# kibana.dev.yml
xpack.securitySolution.enableExperimental: ['advancedEsqlGeneration']
```
- Start Kibana
- Open the Security AI assistant
- Ask a question
- Expect to see a response from the LLM.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-26 15:22:01 +01:00
Ievgen Sorokopud
4937b3a849
[Attack Discovery][Scheduling] Actions: Return formatted markdown fields in the context (#225330)
## Summary

Main ticket ([Internal
link](https://github.com/elastic/security-team/issues/10142))

With these changes we make sure that we return attack discovery fields
reformatted to a nice markdown text. We already format discovery details
when we create a new Case and add markdown comment to it.

### To Test

1. Create attack discovery schedule
2. Add an action to the schedule (email, slack etc.)
3. Select `For each alert > Per rule run` action frequency
4. Update subject, body or other fields of the connector to include
discovery details through the context variables
5. Wait until the action is triggered and check the received message

### Example of the email connector fields

**Subject**:
```
{{context.attack.title}}
```

**Message**: 
```
{{{context.attack.detailsMarkdown}}}

{{{context.attack.detailsUrl}}}
```

<img width="665" alt="Screenshot 2025-06-25 at 18 05 30"
src="https://github.com/user-attachments/assets/71b2e02b-0437-4486-a584-108bec4d477f"
/>

which will result in an email similar to this one

<img width="1125" alt="Screenshot 2025-06-25 at 17 54 32"
src="https://github.com/user-attachments/assets/fefe60f0-e560-4288-9ec8-d1d444feb950"
/>

## NOTES

The feature is hidden behind the feature flag (in `kibana.dev.yml`):

```
feature_flags.overrides:
  securitySolution.attackDiscoveryAlertsEnabled: true
  securitySolution.assistantAttackDiscoverySchedulingEnabled: true
```
2025-06-26 16:18:36 +02:00
Robert Oskamp
169e7b32a4
Skip failing synthetics multispace monitor test suite for MKI (#225434)
## Summary

This PR skips the failing synthetics multispace monitors API test suite
for MKI runs.

For failure details see #225431
2025-06-26 16:14:50 +02:00
Davis Plumlee
f44a7655d9
[Security Solution] Test plan for reverting customized prebuilt rules to their base version (#219628)
## Summary

Test plan for: https://github.com/elastic/kibana/issues/215506 and https://github.com/elastic/kibana/issues/207172

Adds test cases to cover when writing implementation for the reverting customized prebuilt rules to their base version enhancement
2025-06-26 14:04:47 +00:00
Sergi Romeu
76642fbf16
[ObsUX][Infra][APM] Hide Settings from serverless navigation (#225436)
## Summary

Closes [#222240](https://github.com/elastic/kibana/issues/222240)

This PR adds the prop `sideNavStatus: 'hidden'` to the settings links to
prevent them from appearing in the nav bar, but keeping them in the
breadcrumbs.
It also fixes the `Application` breadcrumb not being clickable.

## Screenshots

| Description | Before | After |
|--------|--------|--------|
| Classic Infra |
![image](https://github.com/user-attachments/assets/3b179b0b-cdca-4bc1-a4be-beffe689dbd1)
|
![image](https://github.com/user-attachments/assets/79a3cf5d-e7af-42eb-aa22-361f6f3f7527)
|
| Classic APM |
![image](https://github.com/user-attachments/assets/4944000a-e583-47c9-8647-7152b9eab60d)
|![image](https://github.com/user-attachments/assets/ab88c54c-8d5c-47fc-b46f-efc197da6673)
|
| Serverless Infra |
![image](https://github.com/user-attachments/assets/eece25d8-be06-457a-a4c8-940ce5f02790)
|
![image](https://github.com/user-attachments/assets/ca2b0d57-f0b3-4517-807e-a91e42e507bb)
|
| Serverless APM |
![image](https://github.com/user-attachments/assets/228bedba-7687-42cd-b47a-557bfbfda210)
|
![image](https://github.com/user-attachments/assets/7c7f551f-3d6a-4dcf-8ac3-167f0db0d05e)
|
2025-06-26 14:40:05 +01:00
Dzmitry Lemechko
2e2576fbf5
[ska][x-pack] relocate reporting tests (#225333)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This PR is mostly about moving tests from x-pack/test/

Before:

```
x-pack/test/
     | - reporting_api_integration/
     | - reporting_functional/

```

After: 
```
x-pack/platform/test/
     | - reporting_api_integration/
     | - reporting_functional/
```

Few page objects, required by functional tests, were relocated as well

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-26 08:35:10 -05:00