Commit graph

83681 commits

Author SHA1 Message Date
Felix Stürmer
f4d5aeabeb
[Logs UI] Use the advanced setting in fallback log views (#209779)
This fixes the problem that fall-back log views use the deprecated
inline log index configuration instead of the advanced setting.
2025-02-06 15:47:22 +01:00
Kylie Meli
5878c77784
[Automatic Import] Adding UI and FTR tests for automatic import cel creation flyout (#209418)
## Summary

This PR adds the following tests for Automatic Import:
- jest unit tests for the CEL generation flyout
- FTR tests for the `analyze_api` and `cel` graph endpoints (excluding
200 tests due to https://github.com/elastic/kibana/issues/204177 still
being open)

There is also some very minor cleanup of a test mocking of the now
deprecated FF for generateCel, and small refactor to move a function to
a different file for consistency.

(Cypress tests coming in a separate PR)
2025-02-06 09:29:56 -05:00
Elena Shostak
f058b50f93
[Authz] Added justification for authz opt out for security routes (#209527)
## Summary

Added justification for authz opt out for security routes.


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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-06 15:29:24 +01:00
Marius Iversen
3394b691b1
[GenAI Connectors] Add support for telemetry metadata (#208180)
## Summary

This extends initial connector telemetry from PR ref
https://github.com/elastic/kibana/pull/186936.

The PR adds the following optional fields when instantiating a new
actionClient as part of its `subActionParams`:

```ts
{
  telemetryMetadata : {
    pluginId: "your plugin name or unique identifier",
    aggregateBy: "ID to aggregate on" 
  }
}
```

The support is added to all AI connector models for both
stream/non-stream/raw.

The PR also adds token count usage for bedrock `InvokeAIRaw`, as that
was currently not added correctly.

Pierre also helped with adding a new metadata optional field for the `NL
to ESQL functions`, so that users can pass in similar metadata for LLM
conversations using the InfereceClient.

PluginId is a field used to filter telemetry in the way the team wants
to implement it. It could be a team name, a plugin name etc, all
depending on how the team wants to group and filter on the telemetry
event.

AggregateBy is intended to be used to group multiple LLM calls for
aggregations and stats, for example a conversationId that has multiple
LLM calls.

Both fields are optional, so when you do not want to aggregate the
option can simply be ignored.

### 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
- [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: pgayvallet <pierre.gayvallet@elastic.co>
2025-02-06 15:24:35 +01:00
Jedr Blaszyk
1ae70effe0
[Connectors][Bugfix] Fix agentless policies created with background task (#209984)
## Summary

Background task that creates agentless policies for connectors was
missing some fields in the paylaod, fixing them in this PR

Added unit test

### Verification

Checked against working agentless API calls, example of 2 working calls
from Integrations UI. I added missing fields in the background task
payload.

<img width="600" alt="Screenshot 2025-02-06 at 11 58 05"
src="https://github.com/user-attachments/assets/df35f96b-e60e-4189-8270-c3de92fa9db5"
/>

<img width="600" alt="Screenshot 2025-02-06 at 11 57 55"
src="https://github.com/user-attachments/assets/f88adcff-479e-4af7-b4dc-1cef04757aac"
/>

Now the generated policies show up correctly (tested locally):

<img width="1633" alt="Screenshot 2025-02-06 at 12 04 23"
src="https://github.com/user-attachments/assets/b632b6e0-05dd-4719-8a0d-b5f3879dae53"
/>



### 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)
2025-02-06 15:05:57 +01:00
Marco Antonio Ghiani
f534b5466f
[Streams 🌊] Improve typing for samples and simulation docs (#209991)
## 📓 Summary

This change introduce a new recursive record type to let the documents
applied used for sampling and simulation not fail on the excessive
strict keys check.

```tsx
// Any primitive value allowed for schema validation, excludes symbols and bigint
type Primitive + zod primitive 
// Recursive object  
interface RecursiveRecord  + zod recursiveRecord 
```
2025-02-06 14:46:31 +01:00
Giorgos Bamparopoulos
3e5f55dd02
Remove observability:logsExplorer:allowedDataViews advanced setting (#209120)
## 📓 Summary
Removes the `observability:logsExplorer:allowedDataViews` advanced
setting that was introduced by
https://github.com/elastic/kibana/pull/178602 as Logs Explorer is [no
longer available](https://github.com/elastic/kibana/pull/203685) in
Serverless and 9.0.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-06 14:28:00 +01:00
elastic-vault-github-plugin-prod[bot]
7ff24bc35f
[main] Sync bundled packages with Package Storage (#209724)
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/2212

Co-authored-by: elasticmachine <elasticmachine@elastic.co>
2025-02-06 10:01:47 +00:00
Kevin Lacabane
cf01af250c
[streams] basic lifecycle management UI (#208461)
Implements an initial UI to manage the data retention of a stream.

The view displays informations about the lifecycle configuration/origin
and also allows one to update it to one of the available options.
Options depend on the type of stream and the deployment type.

These are the options that should be currently available (the api also
have guards):

|    | stateful | serverless |
| -------- | ------- | ------ |
| root stream  | dsl, ilm    | dsl |
| wired stream | inherit, dsl, ilm     | inherit, dsl |
| unwired stream*    | inherit, dsl    | inherit, dsl |

*unwired stream's retention cannot be updated if it's currently using
ILM

### Screenshots
![Screenshot 2025-02-03 at 18 50
01](https://github.com/user-attachments/assets/68bdd8c1-889c-4e10-8caf-2bb0b8ce5652)

![Screenshot 2025-02-04 at 14 20
35](https://github.com/user-attachments/assets/835f9b48-09e6-40b8-8a61-8af4b8ea0ee3)

![Screenshot 2025-02-04 at 12 33
58](https://github.com/user-attachments/assets/bae476d0-1907-44a1-b1d6-0805b6c567bc)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>
2025-02-06 10:56:42 +01:00
Sonia Sanz Vivas
a1619b3994
[Remote clusters] Clean values sent to ES API (#209538)
Fixes https://github.com/elastic/kibana/issues/156354
2025-02-06 10:44:17 +01:00
Gergő Ábrahám
ca390dadc0
[EDR Workflows] Fix allow_cloud_features advanced option description text (#209766)
## Summary

before
> It's meant only for telemetry extra-avoidant users users.

after
> It's meant only for telemetry extra-avoidant users.

<img width="565" alt="image"
src="https://github.com/user-attachments/assets/3c55e551-7a9a-485a-b8e3-bccc57bc0910"
/>
2025-02-06 10:10:00 +01:00
Julia Rechkunova
ad7a9a90b1
[Discover] Update colors for in-table search highlights (#209564)
- Closes https://github.com/elastic/kibana/issues/208944

## Summary

This PR updates colors for Borealis theme while keeping previous colors
for Amsterdam theme.

Borealis:
<img width="1103" alt="Screenshot 2025-02-05 at 10 26 24"
src="https://github.com/user-attachments/assets/94594b5e-bf94-4c03-8fcf-ae9e7470aea6"
/>
<img width="1100" alt="Screenshot 2025-02-05 at 10 26 55"
src="https://github.com/user-attachments/assets/9a075506-6984-44ba-8d19-be68f910ad8c"
/>

Amsterdam:
<img width="1028" alt="Screenshot 2025-02-05 at 10 18 37"
src="https://github.com/user-attachments/assets/b7a432ae-be1c-4eb3-beca-bb198f1b58df"
/>
<img width="1029" alt="Screenshot 2025-02-05 at 10 18 05"
src="https://github.com/user-attachments/assets/100a90f7-b680-4d91-8b83-9526d3266d21"
/>
2025-02-06 09:53:20 +01:00
Yngrid Coello
931c34e219
[Dataset quality] 🐞 Quality issues is no longer stuck + non-Aggregatable fixes (#209716)
Closes https://github.com/elastic/kibana/issues/209308.

### Notes
- Stuck loading state was caused by the changes introduced in
https://github.com/elastic/kibana/pull/206758.
- non-Aggregatable bugs were long running bugs, since this is a tricky
functionality to test I believe they were always there

### 🎥 Demo
In the following scenario, I went into the upgrade scenario, so I
created first a cluster in 7.27.x and then upgrade to latest 8.18.x. The
I performed a manual rollover for `logs-synth.3-default`. Hence what you
can see in the video is:
1. The loading state is not stuck anymore in dataset details page (e.g.
`logs-synth.2-default` )
2. The non-aggregatable is calculated properly for
`logs-synth.3-default`


https://github.com/user-attachments/assets/fa097445-7f0a-4dcb-adae-27688e99bf3c
2025-02-06 09:29:22 +01:00
Kibana Machine
dc9ecd1684
[api-docs] 2025-02-06 Daily api_docs build (#209949)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/975
2025-02-06 08:51:50 +01:00
Yngrid Coello
242e319a9c
[Dataset quality] UI improvements to failed flyout errors table (#208511)
Closes https://github.com/elastic/observability-design/issues/365.

## Summary
This PR aims to improve failure store errors table in the flyout. The
following acceptance criteria items were resolved

### Dataset quality page
- [x] Show upfront 200-208 characters in `message` column.
- [x] Provide link to Discover, filtered by error.type, in `type`
column.

 🎥 Demo 


https://github.com/user-attachments/assets/f318a54e-88d0-4801-af28-14e93a03e39d
2025-02-06 06:31:42 +01:00
Kibana Machine
70b860b9ec skip failing test suite (#178367) 2025-02-06 15:59:52 +11:00
Kibana Machine
4c3218290f skip failing test suite (#199583) 2025-02-06 15:59:32 +11:00
Kibana Machine
7eb7ab4739 skip failing test suite (#199563) 2025-02-06 15:59:14 +11:00
Jon
63d1f7474b
[ci] Fix storybooks (#209887) 2025-02-05 17:55:49 -06:00
Bailey Cash
02fc0a725d
[SLO]: Optional groupings for slo summary (#209910)
## Summary

Resolves #209159

Make groupings property in SLO summary optional to fix schema validation
issues with SLOs without groups.

## Release Notes

Fixed bug that caused issues with loading SLOs by status, SLI type, or
instance id.

## Testing

Create a SLO without an entry in the "group by" field. All SLOs should
still be able to be grouped despite this distinction.
2025-02-05 18:18:56 -05:00
Hannah Mudge
c35698bcf8
[Dashboard] Presentation panel refactor (#207275)
Closes https://github.com/elastic/kibana/issues/206686
Closes https://github.com/elastic/kibana/issues/197897
Part of https://github.com/elastic/kibana/issues/207852

## Summary

This PR is a major refactor of the `PresentationPanel` component,
including an overhaul of the hover action and panel title components.
Some notable highlights include:
- All styles in the `PresentationPanel` component were moved from SASS
to Emotion
- The over-complicated logic to combine hover actions when the panel
shrinks was removed in favour of CSS, driven by a [container
query](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries)
Removing the `updateCombineHoverActions` function (which was defined in
a React component and not memoized) also made a difference in
performance when dragging:
    
   | Before | After |
   |--------|--------|
|
![image](https://github.com/user-attachments/assets/e66898d6-a6fc-42c7-9e24-f116d3bd85a6)
|
![image](https://github.com/user-attachments/assets/1f1d75ba-2ebc-4def-9d2e-14dfd5e1a585)
|
      

- The over-complicated logic defined in
`usePresentationPanelTitleClickHandle`, which was meant to ignore the
`onClick` that would trigger after a panel was dragged, was converted to
2 lines of CSS

### Small usability improvements

This PR also includes a few small usability improvements, such as:

- Ensuring that only the **first** row of hover actions overlaps with
the Dashboard's sticky top navigation bar, and this only happens when
the dashboard has no controls. This results in much better behaviour in
most scenarios:
  
  | Before | After |
  |--------|--------|
| ![Jan-27-2025
16-14-26](https://github.com/user-attachments/assets/2bf5eaa0-06ab-4d87-897f-d217f189daf7)
| ![Jan-27-2025
16-13-41](https://github.com/user-attachments/assets/61b0f06a-1363-4bfc-8a2b-c57a3e736552)
|

- Adding a small delay for hiding the hover actions on mouse leave,
which makes it a lot easier to grab the drag handle:

  | Before | After |
  |--------|--------|
| ![Jan-27-2025
16-21-11](https://github.com/user-attachments/assets/65138e53-1856-44f0-913f-01383b8aa6c2)
| ![Jan-27-2025
16-20-17](https://github.com/user-attachments/assets/7c8ba4d8-8b77-4bc5-85af-a082cace1f96)
|

- Preventing the resize handle from overlapping Dashboard's stick top
navigation:

  | Before | After |
  |--------|--------|
| ![Jan-27-2025
16-24-31](https://github.com/user-attachments/assets/5363a302-5f6a-4483-9782-516023567d87)
| ![Jan-27-2025
16-25-04](https://github.com/user-attachments/assets/8614d025-b45b-4af2-81d6-c62a086ca427)
|


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-05 15:18:04 -07:00
Ying Mao
7f28ae63e3
Fixes Failing test: Jest Integration Tests.x-pack/platform/plugins/shared/task_manager/server/integration_tests - capacity based claiming should claim tasks to full capacity (#201681)
Resolves https://github.com/elastic/kibana/issues/205949,
https://github.com/elastic/kibana/issues/191117

## Summary

Trying to fix flaky integration test by performing a bulk create for the
test tasks instead of creating one by one. After making this change, was
able to run the integration test ~100 times without failure.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 16:20:38 -05:00
Marius Iversen
6cab1dc6f8
[Rule Migration] Add telemetry events to translation graphs (#209352)
## Summary

This PR adds telemetry events to SIEM migration backend using the event
based telemetry already existing in security solutions.

Here is a list of events:

```typescript
export const SIEM_MIGRATIONS_MIGRATION_SUCCESS: EventTypeOpts<{
  model: string;
  migrationId: string;
  duration: number;
  completed: number;
  failed: number;
  total: number;
}

export const SIEM_MIGRATIONS_RULE_TRANSLATION_SUCCESS: EventTypeOpts<{
  model: string;
  migrationId: string;
  duration: number;
  translationResult: string;
  prebuiltMatch: boolean;
}

export const SIEM_MIGRATIONS_PREBUILT_RULES_MATCH: EventTypeOpts<{
  model: string;
  migrationId: string;
  preFilterRuleNames: string[];
  preFilterRuleCount: number;
  postFilterRuleName: string;
  postFilterRuleCount: number;
}

export const SIEM_MIGRATIONS_INTEGRATIONS_MATCH: EventTypeOpts<{
  model: string;
  migrationId: string;
  preFilterIntegrationNames: string[];
  preFilterIntegrationCount: number;
  postFilterIntegrationName: string;
  postFilterIntegrationCount: number;
}

export const SIEM_MIGRATIONS_MIGRATION_FAILURE: EventTypeOpts<{
  model: string;
  error: string;
  migrationId: string;
  duration: number;
  completed: number;
  failed: number;
  total: number;
}

export const SIEM_MIGRATIONS_RULE_TRANSLATION_FAILURE: EventTypeOpts<{
  model: string;
  error: string;
  migrationId: string;
}
```
2025-02-05 22:12:50 +01:00
Jatin Kathuria
54b4fac705
[ Security Solution ] Fix Refetch logic with new timeline batching (#205893)
## Summary

PR : https://github.com/elastic/kibana/pull/204034 fixed some issues
with timeline batching. It was not able to fix one of the issue with
`Refetch` logic which exists in `main` ( resulting in a flaky test ) and
causing some tests to fail in `8.16`, `8.17` and `8.x`.

## Issue Description

There are 2 issues with below video:

1. When user updates a status of an alert, the `Refetch` only happens on
the first `batch`. This behaviour is flaky currently. Even if the user
is on nth batch, table will fetch 0th batch and reset the user's page
back to 1.



https://github.com/user-attachments/assets/eaf88a82-0e9b-4743-8b2d-60fd327a2443
     


3. When user clicks `Refresh` manually, then also only first (0th)
`batch` is fetched, which should have rather fetched all the present
batches.




https://github.com/user-attachments/assets/8d578ce3-4f24-4e70-bc3a-ed6ba99167a0



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-02-05 22:12:38 +01:00
Michael DeFazio
ab7aae4c49
Fixes UI bugs in semantic text UI and index mgmt mappings tab (#209638)
## Summary

A few minor UI clean up fixes on the index mappings tab for Stack
Management. Also touches the inference popover (shows on both search and
stack management views)

- Fixes layout shift when choosing semantic text as a field option
- Changs about panel to `subdued`
- Fixes responsive behavior for about panel
  - max-width on large breakpoint
- Inference popover styling updates 
- Decreases gap size in mapping column to reduce space between sections

_Responsive and About panel updates_
![CleanShot 2025-02-04 at 14 24
16@2x](https://github.com/user-attachments/assets/448bc537-6f98-4c34-96df-f553f089dca2)
![CleanShot 2025-02-04 at 14 14
15@2x](https://github.com/user-attachments/assets/0dd6851c-6299-47b6-9549-38f7ce822427)


_Inference popover styling cleanup_
![CleanShot 2025-02-04 at 11 19
50@2x](https://github.com/user-attachments/assets/fdfef447-6d35-419b-a276-55c1b442d749)


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

- [ ]

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Samiul Monir <samiul.monir@elastic.co>
2025-02-05 15:55:48 -05:00
Jan Monschke
dda538111e
[SecuritySolution][Alerts table] Fix issue with multiple ip addresses in strings (#209475)
## Summary

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

Multiple IPs are now displayed as individual links, even in the case
where multiple IPs are passed as a single string (e.g.
`127.0.0.1,127.0.0.2`). Clicking on an individual link will open the
flyout correctly as well.



https://github.com/user-attachments/assets/74b05cff-3843-4149-bf27-cd0af07aa558



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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-02-05 21:40:17 +01:00
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