Commit graph

83655 commits

Author SHA1 Message Date
Tiago Costa
2c28139f45
skip flaky suite (#206366) 2025-02-05 20:25:35 +00:00
Tiago Costa
8a4f528dda
skip flaky suite (#207907) 2025-02-05 20:24:26 +00:00
Tiago Costa
054e1f708e
skip flaky suite (#202037) 2025-02-05 20:20:41 +00:00
Kibana Machine
a086076fba skip failing test suite (#203508) 2025-02-06 07:12:04 +11:00
Patrick Mueller
b311acfec4
update puppeteer to 24.1.1 (#208477)
## Summary

Updates puppeteer to 24.1.1

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 14:46:51 -05:00
Jon
b3434353e3
[renovate] Update baseBranches (#209186) 2025-02-05 13:31:48 -06:00
Viduni Wickramarachchi
5975fd6376
[Obs AI Assistant] Shared ownership for kbn-ai-assistant (#209849) 2025-02-05 14:16:58 -05:00
christineweng
3e7e7ad8fe
[Security Solution][Flyouts] Update ip links in host and user flyout (#209429)
## Summary

Updated IP addressed in host and user flyout to open IP preview


https://github.com/user-attachments/assets/a1099faa-3854-4e33-939f-d266c2f6f91d


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-02-05 13:15:25 -06:00
Gerard Soldevila
7b1c74a7a8
SKA: Follow-up relocations (#209477)
## Summary

* Categorise and move `@kbn/timelines-plugin` as _platform/shared_,
target location: `x-pack/platform/plugins/shared/timelines`.
This helps reduce the scope of the illegal dependencies from `osquery`
plugin towards _security/private_ code.
cc @tomsonpl 

* Simplify path and rename `@kbn/observability-alerting-rule-utils`
(platform/shared):
```
# Before 
@kbn/observability-alerting-rule-utils
x-pack/platform/packages/shared/observability/alerting_rule_utils/

# After
@kbn/alerting-rule-utils
x-pack/platform/packages/shared/alerting_rule_utils/
```

* Simplify path and rename `@kbn/observability-logs-overview`
(platform/shared):
```
# Before 
@kbn/observability-logs-overview
x-pack/platform/packages/shared/observability/logs_overview/

# After
@kbn/logs-overview
x-pack/platform/packages/shared/logs_overview/
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 19:53:36 +01:00
Ersin Erdal
906910c737
Don't stop Task Manager polling when ES or SO is unavailable (#209794)
Resolves: #203470

This PR removes the codes that stop task polling when Elasticsearch or
SO service is unavailable.
So the TM relies only on the back pressure mechanism.
502 and 504 status codes are also added to be sure that all the possible
reasons that stops ES or SO are covered by the back pressure.

## To verify:

Force Elasticsearch version check to throw an error:

https://github.com/elastic/kibana/blob/main/src/core/packages/elasticsearch/server-internal/src/version_check/ensure_es_version.ts#L189

Then mock the response of `this.esClientWithoutRetries.msearch` in task
store
[here](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/task_manager/server/task_store.ts#L584)

Example:

```
    const responses = [
      {
        error: {
          type: 'not found',
        },
        took: 1000,
        timed_out: false,
        hits: { hits: [] },
        _shards: {
          failed: 1,
          successful: 0,
          total: 1,
        },
        status: 503,
      },
    ];
  ```  
  Expect[ back pressure](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/task_manager/server/lib/create_managed_configuration.ts#L182) to return a longer poll interval.
2025-02-05 19:50:06 +01:00
Vitalii Dmyterko
04102c4141
[Security Solution][Detection Engine] fixes ES|QL alert on alert (#208894)
## Summary

- addresses https://github.com/elastic/kibana/issues/205419: 
  - rule does not fail anymore and ancestors array is built correctly
- partly addresses https://github.com/elastic/security-team/issues/11116
by using [drop_null_columns
parameter](https://www.elastic.co/guide/en/elasticsearch/reference/8.15/esql-query-api.html#esql-query-api-query-params
)

### To reproduce

1. Create ES|QL rule alert on alert.
2. Use 2 queries:
3. `from .alerts-security* metadata _id` - rule generates alert and
ancestors array has only 1 item
4. `from .alerts-security* metadata _id | keep _id` - rule fails with
error "existingAncestors is not iterable"
2025-02-05 18:39:26 +00:00
Nathan Reese
896ba294cc
[observability] avoid loading slo.chunk and synthetics.chunk on every page load (#209582)
Part of https://github.com/elastic/kibana/issues/194171 and
https://github.com/elastic/kibana/issues/191642

* [avoid async chunk loading during plugin setup and start
phase](https://github.com/elastic/kibana/issues/194171)
* Replace `addTriggerAction` with `addTriggerActionAsync` to [avoid
including action contents in page load
bundle](https://github.com/elastic/kibana/issues/191642)
* Immediately open flyout on action execution with loading state to
avoid UI lag when awaiting async chunks and then opening flyout.

### Test instructions
* Start kibana locally and start 30 day trial license.
* Open network tab in browser
* Open home page. Verify `slo.chunk` and `synthetics.chunk` are not
loaded. The screen shots show the behavior in main where `slo.chunk` and
`synthetics.chunk` are loaded on home page
<img width="600" alt="Screenshot 2025-02-03 at 1 02 13 PM"
src="https://github.com/user-attachments/assets/6dea7d62-0e8b-4c1f-a87c-f8e9d4b85c87"
/>
<img width="600" alt="Screenshot 2025-02-03 at 1 02 02 PM"
src="https://github.com/user-attachments/assets/0deb3c2a-d832-4d21-974d-0803b0984006"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 11:24:59 -07:00
Meghan Murphy
37736a335b
[Connectors] don't display extra 'content-' (#209676)
## Summary

There was an extra 'content-' prefix when attaching an automated index
name.

Verified e2e that "content-" is still added to the index name without
being in the box and it is not added when `is_native` is false.

<img width="300" alt="Screenshot 2025-02-05 at 9 22 48 AM"
src="https://github.com/user-attachments/assets/fc3a0129-8c5e-4182-bc80-9a8ec88b810a"
/>

<img width="200" alt="Screenshot 2025-02-05 at 9 25 12 AM"
src="https://github.com/user-attachments/assets/fa5b8d2f-3ca5-4df3-bfa4-af190e570ae6"
/>


#### Closes https://github.com/elastic/search-team/issues/9217
### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jedr Blaszyk <jedrazb@gmail.com>
2025-02-05 13:23:46 -05:00
Dario Gieselaar
27893f5fcd
[Journeys] Set traceparent for Playwright (#189800)
Sets the traceparent for Playwright, so the trace from the test runner
includes the trace events from the browser and Kibana server.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 18:53:34 +01:00
Nathan Reese
fe9023efff
[canvas] fix All embeddables rebuilt on refresh (#209677)
Fixes https://github.com/elastic/kibana/issues/209566

### Problem
Any input change causes Canvas embeddable's to get re-created. This
means that setting a filter control or clicking the refresh button
causes embeddables to get re-created.

In the old embeddable system, the Canvas would only call
`embeddable.updateInput` and `embeddable.reload` on [input
changes](https://github.com/elastic/kibana/blob/8.13/x-pack/plugins/canvas/canvas_plugin_src/renderers/embeddable/embeddable.tsx#L163).

### Solution
PR updates embeddable renderer to store embeddable API. Then, on input
changes, Canvas calls `embeddable.setFilters`.

There is no `embeddable.updateInput` equivalent in the new embeddable
system. Instead, each state key needs to be updated by a setter. The
[Canvas
documentation](https://www.elastic.co/guide/en/kibana/current/canvas-function-reference.html#embeddable_fn)
states that the embeddable function only accepts `filters`. Therefore,
the only key that is expected to change from the input is `filters`.
Please correct me if this is an incorrect assumption.

### Test instructions
1) install sample web logs
2) install canvas saved object and reload kibana (otherwise canvas is
not available in the nav menu)
3) open new canvas
4) add map embeddable
5) add filter control. set source to sample web logs and field to
`geo.dest`.
<img width="200" alt="Screenshot 2025-02-04 at 2 58 01 PM"
src="https://github.com/user-attachments/assets/6862f0bc-4f61-4f16-aa7c-ea8008cfdbf9"
/>
6) prefix map element expression with `kibana | selectFilter` so it
looks like `kibana | selectFilter | embeddable config=...`
7) change filter. Verify map updates but map embeddable is not
re-created.
8) click refresh button, Verify map updates but is not re-created.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 10:34:44 -07:00
Yuliia Naumenko
ba0b1eca91
[Inference Connector] Enable inference connector for ESS by default, disable it for Serverless (#209197)
1. ECH/ESS: enable by default for 8.18
2. Serverless: disable by default until PC approval
2025-02-05 09:20:58 -08:00
Yuliia Naumenko
a3189cc681
[Inference Connector][8.18] Do not show inference connector in the GenAI connectors list if the inference endpoint does not exist (#209406)
Based on the discussion regarding the availability of the Inference
Connector in 8.18, the decision was next:
- enable .inference connector type by default for 8.18
https://github.com/elastic/kibana/pull/209197
- do not show inference connector for Kibana GenAI if Inference Endpoint
does not exist. This is related to the preconfigured connector for
Elastic Rainbow Sprinkles availability and UX.
- preconfigured connector for Elastic Rainbow Sprinkles will always
exists in the Stack Management Connectors list, but on run will show the
banner message in case if that Inference Endpoint does not exist

<img width="2265" alt="Screenshot 2025-02-03 at 11 38 41 AM"
src="https://github.com/user-attachments/assets/029a814a-cc66-4a31-9e92-3512587e377f"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 11:58:56 -05:00
Bailey Cash
b47c8266e7
[SLO] do not display apm chart without transaction type or svc name (#209552)
## Summary

Resolves #209172 

### Old
<img width="1728" alt="Screenshot 2025-02-05 at 11 48 59 AM"
src="https://github.com/user-attachments/assets/c08e9544-5a84-462b-80fe-cf5e982bfccf"
/>

### New
<img width="1728" alt="Screenshot 2025-02-05 at 11 47 57 AM"
src="https://github.com/user-attachments/assets/d4f26f21-70a5-4c5c-9f43-05a9da6734c5"
/>

## Testing
Create an APM availability SLO with any service. Use default settings
(`*`) for transaction type and service name. Once SLI drops below
objective, you should see an alert. View alert details. On main branch,
several alerts appear indicating that Kibana is unable to load APM
visualizations, even if for just a second. Now, the errored out charts
(alerts) should not appear.

## Release Notes

Fixes an issue where APM charts were rendered without required
transaction type or service name, causing excessive alerts to appear
2025-02-05 11:58:34 -05:00
Charlotte Alexandra Wilson
f5c9d8b031
Service example added to entity store upload (#209023)
## Summary
This PR adds an example for service input to file uploader on entity
store, solving this
[enhancement](https://github.com/orgs/elastic/projects/668/views/53?sliceBy%5Bvalue%5D=EA+8.18+Sprint+7&pane=issue&itemId=94879938&issue=elastic%7Ckibana%7C207993)
issue.

Updated the storybook file for future use - security solution alias
currently [commented out due to issues
running](https://github.com/elastic/kibana/issues/207227).

### Testing Steps
Kibana v8.18.0 build be must be available
Navigate to the Stack Management >> Alerts and Insights >> Entity Store
tab
See `'service,service,arn:aws:s3:::bucket/001,extreme_impact'` is now in
the file upload example, as below:


![image](https://github.com/user-attachments/assets/4c133a63-41c5-4aa1-a24f-9b551896897a)
2025-02-05 16:58:15 +00:00
Joe Reuter
4f38cf96d2
🌊 Streams: Define explicit authorization (#209787)
Related to https://github.com/elastic/kibana-team/issues/1236

Adds a couple missing explicity authorization opt-outs (since we rely on
Elasticsearch everywhere). For some endpoints in the dashboards we
didn't check Elasticsearch first, I added those checks.
2025-02-05 17:47:01 +01:00
Andrew Macri
734fc175a3
[Security Solution] [Attack discovery] Display additional Attack Chain tactics (#209434)
### [Security Solution] [Attack discovery] Display additional Attack Chain tactics

This PR updates the Attack discovery _Attack Chain_ allow list to visualize additional tactics (e.g. `Defense Evasion`), as illustarted by the screenshot below:

![attack_chain](https://github.com/user-attachments/assets/afc57cef-bc01-4a67-8028-8528c96e8ced)

_Above: The Attack Chain includes `Defense Evasion`, a newly allow listed tactic_

#### Details

This PR updates the Attack Chain allow list to include the following additional tactics:

- `Resource Development`
- `Defense Evasion`
- `Credential Access`
- `Collection`
- `Impact`

#### Desk testing

1. Navigate to Security > Attack discovery

2. Click `Generate` to generate Attack discoveries

**Expected result**

- The Attack Chain visualization includes the additional allow listed tactics noted in the details of this PR

3. Locate an Attack discovery where one of the newly allow listed tactics is red, (which indicates the tactic was part of the attack), and click the `View in AI Assistant` button

**Expected result**

- A `>` accordion button in the assistant appears next to the selected Attack discovery, indicating it will be included as context

4. Click the `>` button to expand the discovery in the assistant

**Expected result**

- The expanded `Attack Chain` markdown includes an entry for the newly allow listed tactic, and all other tactics that were colored red in the discovery
2025-02-05 11:35:18 -05:00
Shahzad
679e2badaf
Remove dependency date-fns !! (#209539)
## Summary

What's better than upgrade? removing it alltogther !!
2025-02-05 17:34:16 +01:00
Kirti Sodhi
5f5b6bc8d5
[ML] Update the bucket_span for ML jobs in the security_host module (#209663)
Updated the bucket_span for ML jobs in the `security_host` module.
2025-02-05 11:16:20 -05:00
Marco Antonio Ghiani
ddf3bdcce3
[Streams 🌊] Extract schema editor component (#209514)
## 📓 Summary

Closes https://github.com/elastic/streams-program/issues/130

This work decouples the `SchemaEditor` component from the business logic
used for the stream management schema detail to make this part re-usable
with a consistent UX on the enrichment processing part.

The core changes of this work are:
- Move the new `SchemaEditor` component into its own folder and provide
it to the existing stream details section.
- Expose event handlers and custom hooks to facilitate interacting with
a definition streams.
- Refactor internal state to push down those states the consumer doesn't
need to know about (editing form, loadings)

It is now responsibility of a consumer to adapt into the supported
properties, which can of course be extended for upcoming changes.

```tsx
<SchemaEditor
  fields={fields}
  isLoading={isLoadingDefinition || isLoadingUnmappedFields}
  stream={definition.stream}
  onFieldUnmap={unmapField}
  onFieldUpdate={updateField}
  onRefreshData={refreshFields}
  withControls
  withFieldSimulation
  withTableActions={!isRootStreamDefinition(definition.stream)}
/>
```
2025-02-05 16:48:03 +01:00
Dzmitry Lemechko
6635fe501c
[scout] unique runId for reporting, disabled failed test reporter locally (#209507)
## Summary

This PR makes few changes to scout reporter:

Recently I found out that Playwright load configuration file _multiple
times_:
- first time after you run `npx playwright test -c ...`
- on every worker start

log before:

```
[main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts
[createPlaywrightConfig] called with runId: 18f35f735a10155c

Running 1 test using 1 worker

[createPlaywrightConfig] called with runId: 2633b4e4c20afa15
[chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess
```

With our current logic unique `runId` will be generated on each
configuration load, meaning for parallel run we will report failures in
different directories instead of the same one.

Playwright doesn't expose any unique identifier for the run, so we have
do something similar described in

https://github.com/microsoft/playwright/issues/28941#issuecomment-1888008102

log after fix:

```
[main][~/github/kibana]$ npx playwright test --config x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts
[createPlaywrightConfig] called with runId: 310a576f32d3b8a5

Running 1 test using 1 worker

[createPlaywrightConfig] called with runId: 310a576f32d3b8a5
[chromium] › full_screen_mode.spec.ts:28:9 › Maps › Full screen mode @svlSecurity @svlOblt @svlSearch @ess
```

We also had a chat with @dolaru and agreed that Scout reporters to be
disabled for local test run. Few reasons:
- Scout custom reporting targets CI execution: events-based reporter was
already disabled
- Failed test reporter purpose is to provide html boilerplate to be
annotated in pipeline build
- When you run tests with IDE playwright plugin it provides its own
reporter / history, should be enough.
2025-02-05 16:35:26 +01:00
Mykola Harmash
5af4d370c7
[Observability Onboarding] Add OTel tech preview badges on Serverless (#209302)
Closes #209083

This adds `Technical Preview` badges for Host OTel and K8S OTel flows on
Serverless

**Host OTel**
| Home | Flow |
|----|-----|
| ![CleanShot 2025-02-03 at 14 53
13@2x](https://github.com/user-attachments/assets/a984d2e6-834b-40e4-91f5-46f9b3076e83)
| ![CleanShot 2025-02-03 at 14 53
21@2x](https://github.com/user-attachments/assets/e056bfa8-4a7f-4094-bdde-06ae134c60e3)
|

**K8S OTel**
| Home | Flow |
|----|-----|
| ![CleanShot 2025-02-03 at 14 52
58@2x](https://github.com/user-attachments/assets/e7324192-88c9-46d8-a5cd-4c30f600fc86)
| ![CleanShot 2025-02-03 at 14 53
29@2x](https://github.com/user-attachments/assets/1d8850dd-1953-49e4-998a-93b784750b40)
|
2025-02-05 16:24:38 +01:00
Yngrid Coello
c56d7ea24a
[Synthtrace] Introducing teardown for scenarios (#209739)
### Background

In some scenarios we need to perform some setup at bootstrap time, this
setup could affect following scenarios.
Take for example
[failed_logs](https://github.com/elastic/kibana/blob/main/packages/kbn-apm-synthtrace/src/scenarios/failed_logs.ts)
scenario where we create a pipeline that will do some checks in
`log.level` property, if we try to run an scenario after that one we
will enter into some issues.

### Changes

This PR aims to introduce a `teardown` setup for scenarios where we
could undo the changes done at `bootstrap` time.
2025-02-05 15:57:50 +01:00
Faisal Kanout
bc5bff8cc3
[OBX-UX-MGMT] - Add a lik to Advanced settings for the Logs Threshold rule creation form to update log views (#209747)
## Summary

It fixes #209098

<img width="692" alt="Screenshot 2025-02-05 at 12 58 53"
src="https://github.com/user-attachments/assets/bd02260a-f3b6-4752-a174-bffb2f6672dc"
/>
2025-02-05 15:57:31 +01:00
Meghan Murphy
1cac82fdf5
[Connectors] depend Sharepoint secret_value on auth_method (#209656)
## Summary

Only have secret_value box when configuring a Sharepoint online
connector when auth_method is 'secret'.

#### Closes https://github.com/elastic/search-team/issues/9196
### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 09:55:27 -05:00
Elena Shostak
8a26cf6f94
[CSP] Added object-src to Content-Security-Policy-Report-Only header (#209306)
## Summary

Added support for `object_src` directive in reporting mode.

## How to test

- Add in your `kibana.dev.yml`.
```
server.customResponseHeaders.Reporting-Endpoints: violations-endpoint="https://localhost:5601/kibana/internal/security/analytics/_record_violations"
csp.report_to: [violations-endpoint]
```
- Make sure you have [dev tools configured for Reporting
API](https://developer.chrome.com/docs/capabilities/web-apis/reporting-api#use_devtools).
- Add `<embed src="https://not-example.com/flash"/>` anywhere in the
page body in
`src/platform/plugins/shared/home/public/application/components/home.tsx`
and go to Home page
- Open Dev Tools -> Console
You should be able to see the violation
<img width="1023" alt="Screenshot 2025-02-03 at 14 30 03"
src="https://github.com/user-attachments/assets/b2e5f957-4403-4b2b-a3dd-c0109fff6306"
/>


> [!NOTE]
> Hopefully, you should be able to see the violation in the Dev Tools ->
Application -> Reporting, but it's sometimes hard to catch. My recent
Chrome `132.0.6834.160` shows only CSP reports with disposition
`enforce`, not `report`.

### Checklist

- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Release Notes

Added `object_src` directive to `Content-Security-Policy-Report-Only`
header.

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 15:18:06 +01:00
Milton Hultgren
3c4694e1dd
🌊 Make client check for hierarchy conflicts before creating streams (#208914)
## Summary

If you enable streams (which creates `logs`) and then try to create
`logs.child.grandchild` but `logs.child` already exists as either an
index or an unwired (Classic) stream, then we end up in a weird state
where `logs.child.grandchild` gets created as a wired child but then the
request fails as it tries to turn the unwired stream into a wired
stream.

This PR adds a step that asserts that there are no such conflicts in the
hierarchy before proceeding.
It also adds a check to ensure Streams are enabled before allowing the
creation of any streams, as well as blocking the creation of a root
stream that isn't `logs`.
Finally, there is some minor improvements to error handling for when a
data stream isn't found and error messages.
2025-02-05 15:01:47 +01:00
Christiane (Tina) Heiligers
1c4d0e99b4
Update archives for migrations multiple nodes test (#209667)
fix https://github.com/elastic/kibana/issues/167676 for 9.0 promotion

steps taken:
1. Start Node01: 
`yarn es snapshot --version=8.19.0 --data-archive
src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip
--base-path .es/node01`

2. Start Node02: 
`yarn es snapshot --version=8.19.0 --data-archive
src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip
--base-path .es/node02`

3. Wait for both nodes to start and be ready

4. Stop both ES nodes

5. change into the directory for node01:
`cd .es/node01/8.19.0`

6. Remove (or move) the outdated archive:
`rm
../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip`

7. zip the updated data and store as the original test filename in the
test directory:
`zip -r
../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_01.zip
data -x "*/\.*"`

Repeat these steps for node02:

8. `cd ../../../`
9. `cd .es/node02/8.19.0`
10. `rm
../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip`
11. `zip -r
../../../src/core/server/integration_tests/saved_objects/migrations/archives/7.13.0_5k_so_node_02.zip
data -x "*/\.*"`

12. `cd ../../../`
13. `git commit -m "Updated archives" && git push`

### Identify risks

Data archives have to be updated for every major.last before a new major
is released.
Should updating the archives not resolve test failures, there may be a
bug elsewhere in the stack. If so, carefully inspect the error logs to
determine the cause.
2025-02-05 06:57:52 -07:00
Marius Iversen
06f3c30f60
[Rule Migration] Add audit logging for SIEM Migration tasks. (#207831)
## Summary

Adds audit logging for successful calls to these API routes:
- Start/Stop migration
- Create migration
- Update Rule
- Install Rule
- Retrieve migration results.
- Uploaded Macro/Lookup
- Retrieved Macro/Lookup

Tested it manually by going through the workflow with audit logging
enabled:

Enable:
`xpack.security.audit.enabled: true`

Results:
```
{"event":{"action":"siem_migration_created","category":["database"],"type":["creation"],"outcome":"success"},"user":{"name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default"},"trace":{"id":"00885dd4-7fd9-45fe-9a0b-2173adcac4ad"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-22T15:05:12.875+01:00","message":"User created a new SIEM migration with [id=cd9552ce-05c8-4893-b659-b5a5ed9325d9","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":91324,"uptime":540.063456227},"transaction":{"id":"ee4606116856393c"}}
{"event":{"action":"siem_migration_started","category":["database"],"type":["start"],"outcome":"success"},"user":{"name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default"},"trace":{"id":"e852b328-9e53-4c4d-b8ca-b8fa2b76383d"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-22T15:11:36.569+01:00","message":"User started an existing SIEM migration with [id=3805f79e-123c-4962-b22b-8ddf365cdd89]","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":5438,"uptime":62.828177986},"transaction":{"id":"0ac652c8f722f1c4"}}
{"event":{"action":"siem_migration_stopped","category":["database"],"type":["end"],"outcome":"success"},"user":{"name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default"},"trace":{"id":"136f3a38-d47d-455d-bca2-aaf38559b20a"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-22T15:11:05.871+01:00","message":"User stopped an existing SIEM migration with [id=3805f79e-123c-4962-b22b-8ddf365cdd89]","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":5438,"uptime":32.12840553},"transaction":{"id":"be379686654f4bdf"}}
{"event":{"action":"siem_migration_updated_rule","category":["database"],"type":["change"],"outcome":"success"},"user":{"id":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default","session_id":"IPgQ3+R8DW9uxx4RQqUx9eZj+D5Es7SGQdcDoM/02l4="},"trace":{"id":"368b31e7-812d-464b-83d8-0e635c7fe5ed"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-22T15:13:15.827+01:00","message":"User updated a translated detection rule with [id=29pWjpQB_LGnD_bEV66u]","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":5438,"uptime":162.09338085},"transaction":{"id":"404b3cb31be3c94f"}}
{"event":{"action":"siem_migration_installed_rule","category":["database"],"type":["creation"],"outcome":"success"},"user":{"id":"u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0","name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default","session_id":"IPgQ3+R8DW9uxx4RQqUx9eZj+D5Es7SGQdcDoM/02l4="},"trace":{"id":"d90396dc-a0d3-4308-b07e-54761b562803"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-22T15:13:46.709+01:00","message":"User installed a new detection rule through SIEM migration with [id=3805f79e-123c-4962-b22b-8ddf365cdd89]","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":5438,"uptime":192.977728866},"transaction":{"id":"4b17bafb9fbf48a4"}}
{"event":{"action":"siem_migration_uploaded_macro","category":["database"],"type":["creation"],"outcome":"success"},"user":{"name":"elastic","roles":["superuser"]},"kibana":{"space_id":"default"},"trace":{"id":"e5fcb9cc-9d27-41cf-a171-13b9faf6078e"},"client":{"ip":"127.0.0.1"},"service":{"node":{"roles":["background_tasks","ui"]}},"ecs":{"version":"8.11.0"},"@timestamp":"2025-01-23T13:45:18.639+01:00","message":"User uploaded a new macro through SIEM migration with [id=2fc199ef-5bc7-4d87-a349-baeaea662273]","log":{"level":"INFO","logger":"plugins.security.audit.ecs"},"process":{"pid":89625,"uptime":106.911700803},"transaction":{"id":"fc95c131e86b0284"}}
```
2025-02-05 14:43:13 +01:00
Alex Szabo
aa4ce832f8 skip failing suite (#206396) 2025-02-05 14:12:07 +01:00
Bharat Pasupula
8181858385
[Automatic Import] Fix Structured log template to use single quotes (#209736)
## Release Note

Fix Structured log template to use single quotes

### Summary

Currently with a single backslash as escape character the template is
setting up a double quote surrounding it and it causes YAML Exception
```
 1 |   - kv:
 2 |       field: message
 3 |       field_split: "\|"
--------------------------^

YAMLException: unknown escape sequence (3:22)
```

This PR fixes to use single quotes to not break YAML parsing.
2025-02-05 13:52:04 +01:00
Jon
70989af677
[ci] Temporarily remove build_plugin_list_docs from Quick Checks (#209687)
While docs are undergoing migration. See
https://elastic.github.io/docs-builder/migration/freeze/index.html

Follow up tracked at https://github.com/elastic/kibana/issues/209686
2025-02-05 13:39:44 +01:00
Kibana Machine
dfc62e4a3e skip failing test suite (#203508) 2025-02-05 23:36:58 +11:00
Sonia Sanz Vivas
f398ef877c
[Snapshot and restore] Scape especial chars in snapshot searchbar (#208573)
Fixes https://github.com/elastic/kibana/issues/174039
2025-02-05 12:47:21 +01:00
Marco Antonio Ghiani
8d0f3544f1
[Streams 🌊] Enrichment UX redesign (#208141)
## 📓 Summary

Closes https://github.com/elastic/streams-program/issues/67
Closes https://github.com/elastic/streams-program/issues/69
Closes https://github.com/elastic/streams-program/issues/93
Closes https://github.com/elastic/streams-program/issues/75

This work heavily changes the initial prototype of the stream enrichment
section.
- Update the design into a unified split view.
- Introduce auto-simulation for real-time changes
- Differentiate between saved and staged processors, with
multi-processor simulation for the draft ones.

A downgrade versus the previous experience is the removal of the field
mapping selectors and simulation.
This is a temporary change, as we want to set a detected fields tab in
the simulation panel that embeds the schema editor, which is not ready
for this yet.


https://github.com/user-attachments/assets/6ea172b1-087f-4fd0-a850-b6dddc5ca311
2025-02-05 12:27:50 +01:00
Marco Liberati
0d9ce86d0b
[Aggs] Force return 0 on empty buckets on count if null flag is disabled (#207308)
## Summary

Fixes #206555 

This PR is an attempt to address the `null` bucket issue with `count` in
Lens formula via the `emptyAsNull` flag.

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

### Risks

This PR introduces potentially some breaking changes, as count `null`
values, in particular coming from shifted computations, as now converted
to `0` if the flag has been enabled.
This change is not news in the code base as other aggs like
`distinct_count` or `value_count` already implements it, but not
`count`.
Apparently no test failed with this change, I've also added new unit
ones to freeze the current behaviour and detect future changes.

---------

Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
Co-authored-by: Peter Pisljar <peter.pisljar@gmail.com>
2025-02-05 12:04:09 +01:00
Ignacio Rivas
86497d5e7f
[Console] Refactor flaky test (#209516) 2025-02-05 11:28:46 +01:00
Shahzad
22a015bb46
Update dependency form-data to ^4.0.1 !! (#209533)
## Summary

Update dependency form-data to ^4.0.1 !!

Minor changes https://github.com/form-data/form-data/releases/tag/v4.0.1

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 11:22:35 +01:00
Shahzad
0f5a523deb
[Synthetics] E2e test update test logic to remove flakiness !! (#209554)
## Summary

 E2e test update test logic to remove flakiness !!
2025-02-05 11:22:12 +01:00
elastic-vault-github-plugin-prod[bot]
dd21a92ab9
[main] Sync bundled packages with Package Storage (#209332)
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/2176

Co-authored-by: elasticmachine <elasticmachine@elastic.co>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
2025-02-05 09:37:41 +00:00
jennypavlova
2e84285a32
[APM] Skip flaky test (Service map) (#209510)
Closes #207005 

## Summary

This PR skips flaky tests - 2 of the flaky tests were already skipped so
I skipped the test on the top level (as all the tests will be skipped
anyway it makes more sense to have the whole test skipped)
I tried to fix it and managed to reproduce the flaky behavior only once
out of many runs (the input was not filled but the next check failed -
which was not an expected behavior as it should fail on the previous
step or retry it) - It's super hard to reproduce it. I followed the
steps locally and it worked as expected so it's not an actual issue:



https://github.com/user-attachments/assets/d0d33622-c186-4b31-bcf7-b2c27df330ac



As we plan to refactor the test anyway we should not spend more time on
it so I skipped it for now.
2025-02-05 10:23:44 +01:00
Arturo Lidueña
3924e095c5
[Observability AI Assistant] rule connector - handle multiple prompt (#209221)
Intermediate releases to change rule or connector schemas in serverless
for #185032

## Summary

An Observability AI Assistant connector is available to be set as action
for Observability rules. When an alert is triggered, a conversation with
the AI assistant will be created sending the initial prompt set by the
user in the rule action. The conversation is then stored and can be
retrieved from the AI Assistant interface. the action is triggered on
any status change of the alert (active, recovered, untracked), creating
a new conversation for each of them using the same initial prompt which
may not be suitable for the 3 cases.

Improvement
The user is able to choose in when the action should be run (active,
recovered, untracked, all),. That would allow the user to specify more
than one AI Assistant action, with a different and more suitable prompt
in each case.
2025-02-05 10:16:42 +01:00
Stratoula Kalafateli
05b1cf2962
[ES|QL] Fixes the emotion bug (#209567)
## Summary

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

When I removed the scss in favor of emotion I used this function
wrongly. This PR is fixing it
2025-02-05 10:13:37 +01:00
Mykola Harmash
015a4ac618
[Observability Onboarding] Make custom cards always appear in search results (#208913)
Closes #207734

This PR:
* Changes the behavior of the search form to always include quickstart
flows in search results even when a category is not selected
* Refactors and cleans up the code a bit


https://github.com/user-attachments/assets/e5de7092-2d9f-41be-8d69-25954e5e4bff

## How to test

Make sure that the search works as expected and when clicking on the
cards it leads to the right places.
2025-02-05 09:47:08 +01:00
Julia Rechkunova
b1b28c3258
[Discover] Some cleanups for the new in-table search (#208980)
- Addresses https://github.com/elastic/kibana/issues/208939

## Summary

This PR makes some cleanups to the code introduced in
https://github.com/elastic/kibana/pull/206454 and adds more tests.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-02-05 08:48:46 +01:00
Yara Tercero
d4199dcac1
[Detection Engine][Docs] Updating examples to meet old ascii docs (#207558)
# Summary

As part of the effort to add missing content for Security APIs, this PR
introduces a few missing request, response, and parameter examples for
Detection Engine Alert and migration APIs.
2025-02-05 08:02:48 +01:00