Commit graph

82723 commits

Author SHA1 Message Date
Kibana Machine
9d95a8038f
[api-docs] 2025-01-07 Daily api_docs build (#205673)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/945
2025-01-07 07:11:39 +00:00
Jatin Kathuria
088169f446
[Security Solution] Fix timeline dynamic batching (#204034)
## Summary

Handles :


### Issue with Batches
- https://github.com/elastic/kibana/issues/201405
- Timeline had a bug where if users fetched multiple batches and then if
user adds a new column, the value of this new columns will only be
fetched for the latest batch and not old batches.
- This PR fixes that  by cumulatively fetching the data for old batches
till current batch `iff a new column has been added`.
- For example, if user has already fetched the 3rd batch, data for
1st,2nd and 3rd will be fetched together when a column has been added,
otherwise, data will be fetched incrementally.

### Issue with Elastic search limit

- Elastic search has a limit of 10K hits at max but we throw error at
10K which should be allowed.
    - Error should be thrown at anything `>10K`. 10001 for example.
    -   This PR fixes that just for timeline by allowing 10K hits.

### Removal of obsolete code

Below files related to old Timeline code are removed as well:
-
x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.test.tsx
-
x-pack/plugins/security_solution/public/timelines/components/timeline/footer/index.tsx

---------

Co-authored-by: Philippe Oberti <philippe.oberti@elastic.co>
2025-01-07 06:20:30 +00:00
Yuliia Naumenko
47b19ba29c
[AI Connector] Migrates AI inference Connector to use a shared components from '@kbn/inference-endpoint-ui-common' (#204885)
1. Migrated stack-connector `.inference` to use share UI components
https://github.com/elastic/kibana/pull/203204
2. Extended package `@kbn/inference-endpoint-ui-common` to support edit
mode for the form of the connector, by adding the optional property
`isEdit` to `InferenceServiceFormFields` component
3. Resolves flaky timing out test
https://github.com/elastic/kibana/issues/205129

---------

Co-authored-by: Samiul Monir <samiul.monir@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-07 04:22:20 +00:00
Lukas Olson
df3665fbf5
[data.search] Clean up code around ES preference usage (#204076)
## Summary

While refreshing my memory on how we are using the Elasticsearch
`preference` parameter, I noticed we had a method `getEsPreference` that
was exported but not used. We then had an additional method
`getPreference` that was being used to actually set the parameter. I
consolidated these into one place and moved the tests so that we can
utilize it when ES|QL supports this parameter.

### 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: Marco Vettorello <vettorello.marco@gmail.com>
2025-01-06 15:02:48 -07:00
Weronika Olejniczak
b95211bc50
[Stack Monitoring] Visual refresh changes (#204258)
## Summary

This PR introduces changes to `x-pack/plugins/monitoring` necessary for
the Visual Refresh project
(https://github.com/elastic/kibana/issues/199715):

- replacing `euiThemeVars` with `euiTheme` context
- replacing old tokens with `euiTheme`
- making sure all color palette functions are run within the context of
the `EuiProvider`

Additionally:

- I migrated Sass to `@emotion/react`
- I migrated `euiStyled` to `@emotion/react`
- I extended `emotion.d.ts` in `tsconfig.json` for typing of the EUI
theme

closes [#8228](https://github.com/elastic/eui/issues/8228)

### QA

We need to test the critical paths in the Stack monitoring, paying close
attention to:

- [ ] color palette, visibility and contrast ratio of elements in
Amsterdam / Borealis

Specific paths:
- [ ] Monitoring time-series "Zoom out" button hover behavior -
`x-pack/plugins/monitoring/public/components/chart/monitoring_timeseries_container.tsx`
- [ ] Shard allocation (especially color mapping with shard type and
status):
- [ ]
`x-pack/plugins/monitoring/public/components/elasticsearch/shard_allocation/components/assigned.js`
- [ ]
`x-pack/plugins/monitoring/public/components/elasticsearch/shard_allocation/components/shard.js`
- [ ] Kuery bar suggestions and autocomplete field:
- [ ]
`x-pack/plugins/monitoring/public/components/kuery_bar/autocomplete_field.tsx`
- [ ]
`x-pack/plugins/monitoring/public/components/kuery_bar/suggestion_item.tsx`

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated
- [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>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-06 21:57:07 +01:00
Jon
750ccb10f0
[ci/artifacts] Increase disk size (#205632) 2025-01-06 14:20:57 -06:00
Jon
8ed7283104
[ci] Use daily promoted EPR distribution (#205221)
https://github.com/elastic/kibana/pull/199071 introduced a daily
pipeline to run acceptance tests against the latest EPR image and to
promote the image if successful.

This updates our tests to start using the daily promotion except when
running the acceptance tests.
2025-01-06 14:08:27 -06:00
Nicolas Chaulet
0b8ae3634d
[Fleet] Use Kibana Authz for API authorization (#205335) 2025-01-06 14:41:00 -05:00
Kibana Machine
2fc2019c83 skip failing test suite (#205545) 2025-01-07 06:28:28 +11:00
Alexi Doak
99f5e32faf
[ResponseOps] Granular Connector RBAC - adding back UIs for testing connectors in stack management (#204804)
Part of https://github.com/elastic/kibana/issues/180908

## Summary

As part of the changes for EDR Connector Execution for Testing, this PRs
updates the SentinelOne and Crowdstrike params UIs to limit to a single
sub-action.

SentinelOne:
<img width="861" alt="Screenshot 2024-12-18 at 11 16 49 AM"
src="https://github.com/user-attachments/assets/1a839d21-7ba7-4c4e-b3e9-8772725fad63"
/>

Crowdstrike:
<img width="855" alt="Screenshot 2024-12-18 at 11 17 01 AM"
src="https://github.com/user-attachments/assets/b6c17964-8c49-4b5a-b1c7-bb4c6bb89621"
/>

### Checklist

Check the PR satisfies following conditions. 

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

### To test

1. In Stack Management create SentinelOne and Crowdstrike connectors
(They don't need to work, you can use fake values for the url and token)
2. Test the new connectors. Verify that you only see one action type and
that it can't be changed and that the params are correctly sent in the
request.
2025-01-06 11:27:54 -08:00
elastic-renovate-prod[bot]
90e738f09d
Update @elastic/kibana-data-discovery dependencies (main) (#202622)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@types/diff](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/diff)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/diff))
| devDependencies | major | [`^5.0.8` ->
`^6.0.0`](https://renovatebot.com/diffs/npm/@types%2fdiff/5.0.8/6.0.0) |
| [diff](https://togithub.com/kpdecker/jsdiff) | dependencies | major |
[`^5.1.0` ->
`^7.0.0`](https://renovatebot.com/diffs/npm/diff/5.1.0/7.0.0) |
|
[fastest-levenshtein](https://togithub.com/ka-weihe/fastest-levenshtein)
| dependencies | patch | [`^1.0.12` ->
`^1.0.16`](https://renovatebot.com/diffs/npm/fastest-levenshtein/1.0.12/1.0.16)
|

---

### Release Notes

<details>
<summary>kpdecker/jsdiff (diff)</summary>

###
[`v7.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#700)

[Compare
Source](https://togithub.com/kpdecker/jsdiff/compare/v6.0.0...7.0.0)

Just a single (breaking) bugfix, undoing a behaviour change introduced
accidentally in 6.0.0:

- [#&#8203;554](https://togithub.com/kpdecker/jsdiff/pull/554)
**`diffWords` treats numbers and underscores as word characters again.**
This behaviour was broken in v6.0.0.

###
[`v6.0.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#600)

[Compare
Source](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)

This is a release containing many, *many* breaking changes. The
objective of this release was to carry out a mass fix, in one go, of all
the open bugs and design problems that required breaking changes to fix.
A substantial, but exhaustive, changelog is below.

[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.2.0...v6.0.0)

- [#&#8203;497](https://togithub.com/kpdecker/jsdiff/pull/497)
**`diffWords` behavior has been radically changed.** Previously, even
with `ignoreWhitespace: true`, runs of whitespace were tokens, which led
to unhelpful and unintuitive diffing behavior in typical texts.
Specifically, even when two texts contained overlapping passages,
`diffWords` would sometimes choose to delete all the words from the old
text and insert them anew in their new positions in order to avoid
having to delete or insert whitespace tokens. Whitespace sequences are
no longer tokens as of this release, which affects both the generated
diffs and the `count`s.

    Runs of whitespace are still tokens in `diffWordsWithSpace`.

As part of the changes to `diffWords`, **a new `.postProcess` method has
been added on the base `Diff` type**, which can be overridden in custom
`Diff` implementations.

**`diffLines` with `ignoreWhitespace: true` will no longer ignore the
insertion or deletion of entire extra lines of whitespace at the end of
the text**. Previously, these would not show up as insertions or
deletions, as a side effect of a hack in the base diffing algorithm
meant to help ignore whitespace in `diffWords`. More generally, **the
undocumented special handling in the core algorithm for ignored
terminals has been removed entirely.** (This special case behavior used
to rewrite the final two change objects in a scenario where the final
change object was an addition or deletion and its `value` was treated as
equal to the empty string when compared using the diff object's
`.equals` method.)

- [#&#8203;500](https://togithub.com/kpdecker/jsdiff/pull/500)
**`diffChars` now diffs Unicode code points** instead of UTF-16 code
units.

- [#&#8203;508](https://togithub.com/kpdecker/jsdiff/pull/508)
**`parsePatch` now always runs in what was previously "strict" mode; the
undocumented `strict` option has been removed.** Previously, by default,
`parsePatch` (and other patch functions that use it under the hood to
parse patches) would accept a patch where the line counts in the headers
were inconsistent with the actual patch content - e.g. where a hunk
started with the header `@@&#8203; -1,3 +1,6 @&#8203;@&#8203;`,
indicating that the content below spanned 3 lines in the old file and 6
lines in the new file, but then the actual content below the header
consisted of some different number of lines, say 10 lines of context, 5
deletions, and 1 insertion. Actually trying to work with these patches
using `applyPatch` or `merge`, however, would produce incorrect results
instead of just ignoring the incorrect headers, making this "feature"
more of a trap than something actually useful. It's been ripped out, and
now we are always "strict" and will reject patches where the line counts
in the headers aren't consistent with the actual patch content.

- [#&#8203;435](https://togithub.com/kpdecker/jsdiff/pull/435) **Fix
`parsePatch` handling of control characters.** `parsePatch` used to
interpret various unusual control characters - namely vertical tabs,
form feeds, lone carriage returns without a line feed, and EBCDIC NELs -
as line breaks when parsing a patch file. This was inconsistent with the
behavior of both JsDiff's own `diffLines` method and also the Unix
`diff` and `patch` utils, which all simply treat those control
characters as ordinary characters. The result of this discrepancy was
that some well-formed patches - produced either by `diff` or by JsDiff
itself and handled properly by the `patch` util - would be wrongly
parsed by `parsePatch`, with the effect that it would disregard the
remainder of a hunk after encountering one of these control characters.

- [#&#8203;439](https://togithub.com/kpdecker/jsdiff/pull/439) **Prefer
diffs that order deletions before insertions.** When faced with a choice
between two diffs with an equal total edit distance, the Myers diff
algorithm generally prefers one that does deletions before insertions
rather than insertions before deletions. For instance, when diffing
`abcd` against `acbd`, it will prefer a diff that says to delete the `b`
and then insert a new `b` after the `c`, over a diff that says to insert
a `c` before the `b` and then delete the existing `c`. JsDiff deviated
from the published Myers algorithm in a way that led to it having the
opposite preference in many cases, including that example. This is now
fixed, meaning diffs output by JsDiff will more accurately reflect what
the published Myers diff algorithm would output.

- [#&#8203;455](https://togithub.com/kpdecker/jsdiff/pull/455) **The
`added` and `removed` properties of change objects are now guaranteed to
be set to a boolean value.** (Previously, they would be set to
`undefined` or omitted entirely instead of setting them to false.)

- [#&#8203;464](https://togithub.com/kpdecker/jsdiff/pull/464)
Specifying `{maxEditLength: 0}` now sets a max edit length of 0 instead
of no maximum.

- [#&#8203;460](https://togithub.com/kpdecker/jsdiff/pull/460) **Added
`oneChangePerToken` option.**

- [#&#8203;467](https://togithub.com/kpdecker/jsdiff/pull/467)
**Consistent ordering of arguments to `comparator(left, right)`.**
Values from the old array will now consistently be passed as the first
argument (`left`) and values from the new array as the second argument
(`right`). Previously this was almost (but not quite) always the other
way round.

- [#&#8203;480](https://togithub.com/kpdecker/jsdiff/pull/480) **Passing
`maxEditLength` to `createPatch` & `createTwoFilesPatch` now works
properly** (i.e. returns undefined if the max edit distance is exceeded;
previous behavior was to crash with a `TypeError` if the edit distance
was exceeded).

- [#&#8203;486](https://togithub.com/kpdecker/jsdiff/pull/486) **The
`ignoreWhitespace` option of `diffLines` behaves more sensibly now.**
`value`s in returned change objects now include leading/trailing
whitespace even when `ignoreWhitespace` is used, just like how with
`ignoreCase` the `value`s still reflect the case of one of the original
texts instead of being all-lowercase. `ignoreWhitespace` is also now
compatible with `newlineIsToken`. Finally, **`diffTrimmedLines` is
deprecated** (and removed from the docs) in favour of using `diffLines`
with `ignoreWhitespace: true`; the two are, and always have been,
equivalent.

- [#&#8203;490](https://togithub.com/kpdecker/jsdiff/pull/490) **When
calling diffing functions in async mode by passing a `callback` option,
the diff result will now be passed as the *first* argument to the
callback instead of the second.** (Previously, the first argument was
never used at all and would always have value `undefined`.)

- [#&#8203;489](togithub.com/kpdecker/jsdiff/pull/489) **`this.options`
no longer exists on `Diff` objects.** Instead, `options` is now passed
as an argument to methods that rely on options, like `equals(left,
right, options)`. This fixes a race condition in async mode, where
diffing behaviour could be changed mid-execution if a concurrent usage
of the same `Diff` instances overwrote its `options`.

- [#&#8203;518](https://togithub.com/kpdecker/jsdiff/pull/518)
**`linedelimiters` no longer exists** on patch objects; instead, when a
patch with Windows-style CRLF line endings is parsed, **the lines in
`lines` will end with `\r`**. There is now a **new
`autoConvertLineEndings` option, on by default**, which makes it so that
when a patch with Windows-style line endings is applied to a source file
with Unix style line endings, the patch gets autoconverted to use
Unix-style line endings, and when a patch with Unix-style line endings
is applied to a source file with Windows-style line endings, it gets
autoconverted to use Windows-style line endings.

- [#&#8203;521](https://togithub.com/kpdecker/jsdiff/pull/521) **the
`callback` option is now supported by `structuredPatch`, `createPatch`,
and `createTwoFilesPatch`**

- [#&#8203;529](https://togithub.com/kpdecker/jsdiff/pull/529)
**`parsePatch` can now parse patches where lines starting with `--` or
`++` are deleted/inserted**; previously, there were edge cases where the
parser would choke on valid patches or give wrong results.

- [#&#8203;530](https://togithub.com/kpdecker/jsdiff/pull/530) **Added
`ignoreNewlineAtEof` option to `diffLines`**

- [#&#8203;533](https://togithub.com/kpdecker/jsdiff/pull/533)
**`applyPatch` uses an entirely new algorithm for fuzzy matching.**
Differences between the old and new algorithm are as follows:
- The `fuzzFactor` now indicates the maximum [*Levenshtein*
distance](https://en.wikipedia.org/wiki/Levenshtein_distance) that there
can be between the context shown in a hunk and the actual file content
at a location where we try to apply the hunk. (Previously, it
represented a maximum [*Hamming*
distance](https://en.wikipedia.org/wiki/Hamming_distance), meaning that
a single insertion or deletion in the source file could stop a hunk from
applying even with a high `fuzzFactor`.)
- A hunk containing a deletion can now only be applied in a context
where the line to be deleted actually appears verbatim. (Previously, as
long as enough context lines in the hunk matched, `applyPatch` would
apply the hunk anyway and delete a completely different line.)
- The context line immediately before and immediately after an insertion
must match exactly between the hunk and the file for a hunk to apply.
(Previously this was not required.)

- [#&#8203;535](https://togithub.com/kpdecker/jsdiff/pull/535) **A bug
in patch generation functions is now fixed** that would sometimes
previously cause `\ No newline at end of file` to appear in the wrong
place in the generated patch, resulting in the patch being invalid.

- [#&#8203;535](https://togithub.com/kpdecker/jsdiff/pull/535) **Passing
`newlineIsToken: true` to *patch*-generation functions is no longer
allowed.** (Passing it to `diffLines` is still supported - it's only
functions like `createPatch` where passing `newlineIsToken` is now an
error.) Allowing it to be passed never really made sense, since in cases
where the option had any effect on the output at all, the effect tended
to be causing a garbled patch to be created that couldn't actually be
applied to the source file.

- [#&#8203;539](https://togithub.com/kpdecker/jsdiff/pull/539)
**`diffWords` now takes an optional `intlSegmenter` option** which
should be an `Intl.Segmenter` with word-level granularity. This provides
better tokenization of text into words than the default behaviour, even
for English but especially for some other languages for which the
default behaviour is poor.

###
[`v5.2.0`](https://togithub.com/kpdecker/jsdiff/blob/HEAD/release-notes.md#v520)

[Compare
Source](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)

[Commits](https://togithub.com/kpdecker/jsdiff/compare/v5.1.0...v5.2.0)

- [#&#8203;411](https://togithub.com/kpdecker/jsdiff/pull/411) Big
performance improvement. Previously an O(n) array-copying operation
inside the innermost loop of jsdiff's base diffing code increased the
overall worst-case time complexity of computing a diff from O(n²) to
O(n³). This is now fixed, bringing the worst-case time complexity down
to what it theoretically should be for a Myers diff implementation.
- [#&#8203;448](https://togithub.com/kpdecker/jsdiff/pull/448)
Performance improvement. Diagonals whose furthest-reaching D-path would
go off the edge of the edit graph are now skipped, rather than being
pointlessly considered as called for by the original Myers diff
algorithm. This dramatically speeds up computing diffs where the new
text just appends or truncates content at the end of the old text.
- [#&#8203;351](https://togithub.com/kpdecker/jsdiff/issues/351)
Importing from the lib folder - e.g. `require("diff/lib/diff/word.js")`
- will work again now. This had been broken for users on the latest
version of Node since Node 17.5.0, which changed how Node interprets the
`exports` property in jsdiff's `package.json` file.
- [#&#8203;344](https://togithub.com/kpdecker/jsdiff/issues/344)
`diffLines`, `createTwoFilesPatch`, and other patch-creation methods now
take an optional `stripTrailingCr: true` option which causes
Windows-style `\r\n` line endings to be replaced with Unix-style `\n`
line endings before calculating the diff, just like GNU `diff`'s
`--strip-trailing-cr` flag.
- [#&#8203;451](https://togithub.com/kpdecker/jsdiff/pull/451) Added
`diff.formatPatch`.
- [#&#8203;450](https://togithub.com/kpdecker/jsdiff/pull/450) Added
`diff.reversePatch`.
- [#&#8203;478](https://togithub.com/kpdecker/jsdiff/pull/478) Added
`timeout` option.

</details>

<details>
<summary>ka-weihe/fastest-levenshtein (fastest-levenshtein)</summary>

###
[`v1.0.16`](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)

[Compare
Source](https://togithub.com/ka-weihe/fastest-levenshtein/compare/1.0.15...03d621ba324d0f665b3b7f557429ca622560d9a3)

###
[`v1.0.15`](37bd0917de...1.0.15)

[Compare
Source](37bd0917de...1.0.15)

###
[`v1.0.14`](45d58d245e...37bd0917de8347c73d67467bd1c5ea803cba5f94)

[Compare
Source](45d58d245e...37bd0917de8347c73d67467bd1c5ea803cba5f94)

###
[`v1.0.13`](606c132c58...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)

[Compare
Source](606c132c58...45d58d245e0d75138bb7da00dd1188ef8d6fdb84)

</details>

---

### Configuration

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

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

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

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

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

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkRhdGFEaXNjb3ZlcnkiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
2025-01-06 15:26:30 -04:00
Efe Gürkan YALAMAN
e542fd2370
[Synonyms UI] Synonyms UI base plugin (#203284)
## Summary

Creates a plugin for Synonyms UI implementation. It is hidden under the
UI flag and config option which is off by default.
```
POST kbn:/internal/kibana/settings/searchSynonyms:synonymsEnabled
{"value": true}
```

Serverless Search:
<img width="379" alt="Screenshot 2024-12-17 at 13 18 02"
src="https://github.com/user-attachments/assets/8c2cb6f0-ce2a-4be6-8605-4f994adeefd7"
/>

Stack Search
<img width="293" alt="Screenshot 2024-12-17 at 13 21 43"
src="https://github.com/user-attachments/assets/0d61de0e-2cd3-46a6-990f-1f1a70843324"
/>



### 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/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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.
- [ ] [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: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 19:15:19 +00:00
Dominique Clarke
00a846f3b3
[Synthetics] unskip previously flaky test (#205573)
## Summary

Unskips flaky tests.

Passed in stateful and serverless for 50 iterations.

Previous failures related to fleet integration package failures. The
logic for installing the synthetics integration via fleet was changed to
improve flakiness in #204273. Those changes have also impacted the
flakiness of these tests.
2025-01-06 14:00:04 -05:00
Alexi Doak
23a5c6d2db
[ResponseOps] Granular Connector RBAC (#203503)
Part of https://github.com/elastic/kibana/issues/180908

## Summary

**EDR Connector Subfeature Privilege**
This PR creates a new EDR connector sub-feature privilege under the read
privilege for connectors. The read privilege currently allows users to
execute connectors, and this new privilege will limit some of the
connectors that can be executed. When the EDR privilege is turned on,
users will be able to execute EDR connectors, and when it is off they
will not execute. This new privilege includes SentinelOne and
Crowdstrike connectors.

To determine which connectors are considered EDR connectors, we
leverage`getKibanaPrivileges` in the connector type definition. I
removed the restrictions to use this field only for system actions and
renamed `getSystemActionKibanaPrivileges` to
`getActionKibanaPrivileges`. I also added a field, `subFeatureType `, to
the connector type definition to help disable testing/executing an
connectors that are restricted under a sub-feature.

**EDR Connector Execution for Testing**
The execution of EDR connectors using the API is limited to a single
sub-action for testing purposes. This ensures users can still
configure/test EDR connectors. In a separate
[PR](https://github.com/elastic/kibana/pull/204804), I added back the
SentinelOne and Crowdstrike params UIs with options restricted to one
sub-action.

**Rule API and Feature Configuration Updates**
Validation has been added to the rule APIs to enforce restrictions on
adding EDR connectors. The connector feature configuration has been
updated to include a new feature ID, EdrForSecurityFeature, which
ensures that EDR connectors are hidden on the rule form.
Note: I saw that EDR connectors are also temporarily restricted in the
Security Solution UI. To streamline this, I removed the
`isBidirectionalConnectorType` check in `action_type_registry.ts`.
Instead, I removed `SecurityConnectorFeatureId` from the
`supportedFeatureIds` of the SentinelOne connector type definition.


### Checklist

Check the PR satisfies following conditions. 

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


## To test

**EDR Connector Subfeature Privilege**
1. Create a new role and disable EDR connectors under the Actions and
Connectors privilege
2. Create a new user and assign that role to user
3. Create a Sentinel One connector (It doesn't need to work, you can use
fake values for the url and token)
4. Login as the new user and run the following in Dev Tools to verify
that you aren't authorized execute the Sentinel One connector
```
POST kbn:/api/actions/connector/$CONNECTOR_ID/_execute
{
  "params": {
    "subAction": "getAgents",
    "subActionParams": {}
  }
}
```
7. Update the role to enable EDR connectors and repeat the steps to
verify that you are authorized to run the connector. (It will fail but
verify it's not Unauthorized)

**EDR Connector Execution for Testing**
1. Enable the EDR connectors privilege in the role you created above and
log in as the user you created above.
2. Run the following in Dev Tools to verify that you are authorized
execute the Sentinel One connector using only the `getAgents`
sub-action. (It will fail but verify it's not `Unauthorized`)
```
POST kbn:/api/actions/connector/$CONNECTOR_ID/_execute
{
  "params": {
    "subAction": "getAgents",
    "subActionParams": {}
  }
}
```
3. Run it again but replace the `subAction` with `isolateHost`. Verify
that you get an unauthorized error.

**Rule API and Feature Configuration Updates**
1. 1. Enable the EDR connectors privilege in the role you created above
and log in as the user you created above.
2. Go to Stack Management
3. Try to create a rule, and verify that you don't see the SentinelOne
connector.
4. Try to create a rule using the API and add your SentinelOne
connector, verify that the API throws an error.
```
POST kbn:/api/alerting/rule
{
  "tags": [],
  "params": {},
  "schedule": {
    "interval": "1m"
  },
  "consumer": "alerts",
  "name": "Always firing rule",
  "rule_type_id": "example.always-firing",
  "actions": [
    {
      "group": "small",
      "id": "$CONNECTOR_ID",
      "params": {
        "subAction": "isolateAgent",
        "subActionParams": {}
      },
      "frequency": {
        "notify_when": "onActionGroupChange",
        "throttle": null,
        "summary": false
      }
    }
  ],
  "alert_delay": {
    "active": 1
  }
}
```
5. You can test the same behaviors when trying to add a SentinelOne
connector to existing rules.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 10:53:35 -08:00
Michael Dokolin
540963148d
Sustainable Kibana Architecture: Fix after-relocation issues (#205613)
After merging #202748, #204959, and #201653, all of the properties in
some telemetry schemas were moved completely, but `node
scripts/telemetry_check --fix` didn't update the `properties` object
correctly.

Also, in #202748 and #201653, the relocation script changed some paths,
confusing them with `@kbn/security-plugin` and `@kbn/cloud-plugin`.
2025-01-06 19:02:36 +01:00
Nicolas Chaulet
d00a73c5e5
[Fleet] Fix getBulkAssets behavior with missing dashboard (#205619) 2025-01-06 12:59:32 -05:00
Larry Gregory
d16bc940b1
Fix dependency assignments for security-generative-ai team (#205621)
## Summary

Fixes dependency assignment for security generative AI dependencies
introduced via https://github.com/elastic/kibana/pull/205523
2025-01-06 12:54:19 -05:00
Matthew Kime
1128787cd1
[console] Add REST API Authz content (#205183)
## Summary

Part of https://github.com/elastic/kibana/issues/204681
2025-01-06 11:45:01 -06:00
Nicolas Chaulet
3d6711bb95
[Fleet] Trigger a rollover on error when updating enabled mappings (#205532) 2025-01-06 17:35:34 +00:00
Kfir Peled
301f91da2b
[Cloud Security] Added investigate in timeline to graph investigation (#205264)
## Summary

This PR includes the following changes to the graph investigation
component:
- Add "Investigate in timeline" button to the graph in the expanded
flyout (applying the same filters to the timeline)
- Move graph control buttons to the right and align their design



https://github.com/user-attachments/assets/6e7c59a7-150d-4046-8e3d-14790b8f6d4d

<details>
<summary>New storybook stories 📹 </summary>


https://github.com/user-attachments/assets/adf64f7f-3bd3-499e-b9ba-f8040df729e7

</details>

**How to test:**

To test this PR using storybook (alternatively access to storybooks
attached to this build)

```
yarn storybook cloud_security_posture_packages
```

To test e2e:

- Enable the feature flag 

`kibana.dev.yml`:

```yaml
uiSettings.overrides.securitySolution:enableVisualizationsInFlyout: true
xpack.securitySolution.enableExperimental: ['graphVisualizationInFlyoutEnabled']
```

- Load mocked data:

```bash
node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/logs_gcp_audit \ 
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601

node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/security_alerts \
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601
```

- Make sure you include data from Oct 13 2024. (in the video I use Last
year)

To run FTR tests:

```
yarn test:ftr:server --config x-pack/test/cloud_security_posture_functional/config.ts
yarn test:ftr:runner --config x-pack/test/cloud_security_posture_functional/config.ts --grep="Graph visualization"
```

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 16:51:05 +00:00
Alexey Antonov
eafa15bba6
fix: [Security:Rules:Detection Rules]Notify Bell button on installed rules table on Detection rules(siem) page is missing accessible discernible text (#205336)
Closes: #204483

Related to: https://github.com/elastic/kibana/pull/188075

## Description 

A similar issue was already fixed in
https://github.com/elastic/kibana/pull/188075. To address #204483, we
just need to restore the name from the fetchRulesSnoozeSettings request.

## Screen

<img width="1652" alt="image"
src="https://github.com/user-attachments/assets/c3f6fcf6-6448-49cb-8e46-e840656417a6"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 16:24:20 +00:00
Joe McElroy
bf4c7da5c3
[Search] [Playground] updating AI SDK to latest (#204659)
## Summary

Upgrading AI SDK to latest version


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-06 16:20:06 +00:00
Julia Bardi
8113ddfb30
[Fleet] fix platform selector css (#205598)
## Summary

Fix error that came when clicking on Add agent in Fleet

Before:

![image](https://github.com/user-attachments/assets/0fb8e8ec-565e-41a0-bdbb-857585bcdad4)


After:
<img width="1690" alt="image"
src="https://github.com/user-attachments/assets/70df4792-aab9-4230-8f7b-55eeb0ef57ab"
/>
2025-01-06 16:19:42 +00:00
Elena Shostak
26cc597b36
[Authc] Security authentication config (#205367)
## Summary

We cannot support `security.authc` evolvement for versioned routes,
since authentication is passed down to hapi during route registration
and it is tight up with the authentication strategy defined. Adjusted
the code to pass `auth` option correctly.


e5cf28bc27/packages/core/http/core-http-server-internal/src/http_server.ts (L378-L393)


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

__Fixes: https://github.com/elastic/kibana/issues/205360__
2025-01-06 17:02:21 +01:00
Ahmad Bamieh
deb52fd9e7
[Core] [Telemetry] Update file references (#205603)
## Summary

Fixed broken CI. The bug was happening due to moving file roots while
not updating the telemetry.rc file and the .json schema files properly
2025-01-06 15:46:46 +01:00
Karen Grigoryan
72980e1676
[Security Solution][Data Quality Dashboard]: migrate styled-component… (#205559)
…s to Emotion

Addresses #205449

This PR migrates `ecs_data_quality_dashboard` package from
`styled-components` to `emotion`. In the process we also convert the
`kbn/ui-theme` json tokens to `euiTheme` counterparts.

Additionally we decorate root `babel-jest`
[transform](211d4a6889/packages/kbn-test/src/jest/transforms/babel.js)
locally in `security_solution/public/overview` and
`ecs_data_quality_dashboard` package folder to include
`@emotion/babel-preset-css-prop`.

The reason for local `babel-jest` transforms is that root `babel-jest`
transform doesn't include `@emotion/babel-preset-css-prop` which is
necessary for proper compilation of emotion css prop in tests. Without
it there is a warning

![image](https://github.com/user-attachments/assets/c75b9827-a731-469c-a762-ff04f86cd80e)
appearing in every test that tests a component that uses css prop with
theme function passed into it. Other use cases seem to be compiling fine
without this babel preset. But theme callback is a valid way of using
emotion so we shouldn't avoid using it just because it's not added
properly to the test compilation step. Hence I am adding it locally to
`ecs_data_quality_dashboard` package and
`security_solution/public/overview`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-06 14:48:11 +01:00
Nikita Indik
e04b20018a
[Security Solution] Display unavailable ML jobs (#205483)
**Resolves: https://github.com/elastic/kibana/issues/202700**

## Summary
This PR resolves an issue where an ML job referenced by a rule does not
appear in the Rule Details, Upgrade flyout, or Rule Editing pages if the
job is missing or not yet created.

For example, if you had an ML rule with a single selected job and this
job was not available, you would see a blank space instead of job name.

## Screenshots
**Rule Details: Before**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 32"
src="https://github.com/user-attachments/assets/e8bc073f-0420-4888-8dd9-b4dc70fd0682"
/>

**Rule Details: After**
<img width="578" alt="Scherm­afbeelding 2025-01-03 om 13 20 05"
src="https://github.com/user-attachments/assets/bd4d0f91-8adf-45c5-8d31-b42ac483027b"
/>

**Rule Edit: Before**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 21"
src="https://github.com/user-attachments/assets/bffcb871-8cfc-4f50-8d19-c14b122c0be4"
/>

**Rule Edit: After**
<img width="427" alt="Scherm­afbeelding 2025-01-03 om 13 21 09"
src="https://github.com/user-attachments/assets/be8f60b9-17a6-48d2-978c-cfa63c426a08"
/>

**Upgrade flyout: Before**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 22 30"
src="https://github.com/user-attachments/assets/553ff837-95cf-4670-91f1-dffb169ec505"
/>

**Upgrade flyout: After**
<img width="1066" alt="Scherm­afbeelding 2025-01-03 om 13 21 55"
src="https://github.com/user-attachments/assets/150cfb82-bc69-4aeb-a20a-03f54c7edc70"
/>

## Testing
You can test by removing an ML job referenced by a rule in
`http://localhost:<port>/kbn/app/ml/jobs`.
2025-01-06 23:33:10 +11:00
Matthew Kime
4eb900651a
[upgrade assistant] Add authz info to REST api endpoints (#205071)
## Summary

Simply adding `authz` info to REST endpoints as part of
https://github.com/elastic/kibana/pull/204531
2025-01-06 05:43:30 -06:00
Robert Oskamp
69cb96654b
Skip serverless AI assistant knowledge base tests on MKI (#205582)
## Summary

This PR skips the serverless API integration tests for Observability AI
assistant knowledge base for MKI runs.

Details in #205581
2025-01-06 11:07:24 +01:00
Kibana Machine
9b07ca4df5
[ES|QL] Update function metadata (#205579)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-01-06 10:24:14 +01:00
Kibana Machine
5f8ce1d989
[api-docs] 2025-01-06 Daily api_docs build (#205580)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/944
2025-01-06 07:01:54 +00:00
Matthew Kime
3003d5cc43
[upgrade assistant] Borealis updates (#205345)
## Summary
Broken out from https://github.com/elastic/kibana/issues/203664

Changes affect rendering of reindexing UI, specifically the progress
indicators.

Before - 

failed
<img width="312" alt="failed"
src="https://github.com/user-attachments/assets/b2444ac9-e2de-4103-9a44-b18877f5f609"
/>
canceled
<img width="303" alt="canceled"
src="https://github.com/user-attachments/assets/c1358f1e-14c1-4b1d-8870-f32d264e833f"
/>
paused
<img width="307" alt="paused"
src="https://github.com/user-attachments/assets/9731a466-fc79-41d1-94e1-da0500dbb1c4"
/>
completed
<img width="312" alt="completed"
src="https://github.com/user-attachments/assets/8d9c7037-dc33-4761-aac3-4b69d31fb72e"
/>

After 

failed
<img width="307" alt="Screenshot 2025-01-01 at 9 42 57 PM"
src="https://github.com/user-attachments/assets/54ad6a52-ffa4-4cc4-b19f-8620ff4754d1"
/>
canceled
<img width="300" alt="Screenshot 2025-01-01 at 9 39 14 PM"
src="https://github.com/user-attachments/assets/2dabb927-aed7-4e82-9a4c-3973ea6f8c36"
/>
paused
<img width="299" alt="Screenshot 2025-01-01 at 9 38 22 PM"
src="https://github.com/user-attachments/assets/4f359c42-ee1f-4708-a66b-d9eda7271a15"
/>
complete
<img width="306" alt="Screenshot 2025-01-01 at 9 37 17 PM"
src="https://github.com/user-attachments/assets/c330ee41-d401-4076-afa0-8ffb95d3a775"
/>
2025-01-06 05:02:53 +00:00
Tomasz Kajtoch
211d4a6889
Update styled_components_files.js to include all files that import styled-components (#205011) 2025-01-05 16:54:17 +01:00
Gerard Soldevila
ca5a08db00
Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-security (#202748)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).

#### 4 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/encrypted-saved-objects-plugin` |
`x-pack/platform/plugins/shared/encrypted_saved_objects` |
| `@kbn/interactive-setup-plugin` |
`src/platform/plugins/private/interactive_setup` |
| `@kbn/security-plugin` | `x-pack/platform/plugins/shared/security` |
| `@kbn/spaces-plugin` | `x-pack/platform/plugins/shared/spaces` |




#### 14 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/crypto` | `src/platform/packages/shared/kbn-crypto` |
| `@kbn/handlebars` | `src/platform/packages/private/kbn-handlebars` |
| `@kbn/safer-lodash-set` |
`src/platform/packages/shared/kbn-safer-lodash-set` |
| `@kbn/security-api-key-management` |
`x-pack/platform/packages/shared/security/api_key_management` |
| `@kbn/security-authorization-core` |
`x-pack/platform/packages/private/security/authorization_core` |
| `@kbn/security-authorization-core-common` |
`x-pack/platform/packages/private/security/authorization_core_common` |
| `@kbn/security-form-components` |
`x-pack/platform/packages/shared/security/form_components` |
| `@kbn/security-hardening` |
`src/platform/packages/shared/kbn-security-hardening` |
| `@kbn/security-plugin-types-common` |
`x-pack/platform/packages/shared/security/plugin_types_common` |
| `@kbn/security-plugin-types-public` |
`x-pack/platform/packages/shared/security/plugin_types_public` |
| `@kbn/security-plugin-types-server` |
`x-pack/platform/packages/shared/security/plugin_types_server` |
| `@kbn/security-role-management-model` |
`x-pack/platform/packages/private/security/role_management_model` |
| `@kbn/security-ui-components` |
`x-pack/platform/packages/private/security/ui_components` |
| `@kbn/user-profile-components` |
`src/platform/packages/shared/kbn-user-profile-components` |


<details open>
<summary>Script errors</summary>

```
Cannot replace multiple occurrences of "../.." in the same line, please fix manually:	/Users/dokmic/work/elastic/kibana/src/platform/packages/shared/kbn-safer-lodash-set/package.json:6
```

</details><details >
<summary>Updated references</summary>

```
./.buildkite/scripts/steps/test/kbn_handlebars.sh
./.eslintrc.js
./.i18nrc.json
./docs/developer/advanced/sharing-saved-objects.asciidoc
./docs/developer/plugin-list.asciidoc
./legacy_rfcs/text/0007_lifecycle_unblocked.md
./legacy_rfcs/text/0016_ols_phase_1.md
./package.json
./packages/kbn-dependency-usage/src/dependency_graph/providers/cruiser.test.ts
./packages/kbn-ts-projects/config-paths.json
./packages/kbn-user-profile-components/src/user_profile.ts
./src/core/packages/saved-objects/common/src/types.ts
./src/core/packages/security/server/src/audit_logging/audit_logger.ts
./src/core/packages/user-profile/common/src/user_profile.ts
./src/dev/precommit_hook/casing_check_config.js
./src/platform/packages/private/kbn-handlebars/README.md
./src/platform/packages/private/kbn-handlebars/index.test.ts
./src/platform/packages/private/kbn-handlebars/index.ts
./src/platform/packages/private/kbn-handlebars/jest.config.js
./src/platform/packages/private/kbn-handlebars/scripts/check_for_upstream_updates.sh
./src/platform/packages/private/kbn-handlebars/scripts/print_ast.js
./src/platform/packages/private/kbn-handlebars/scripts/update_upstream_git_hash.sh
./src/platform/packages/private/kbn-handlebars/src/__jest__/test_bench.ts
./src/platform/packages/private/kbn-handlebars/src/handlebars.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.basic.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.blocks.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.builtins.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.compiler.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.data.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.helpers.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.partials.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.regressions.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.security.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.strict.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.subexpressions.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.utils.test.ts
./src/platform/packages/private/kbn-handlebars/src/spec/index.whitespace_control.test.ts
./src/platform/packages/private/kbn-handlebars/src/symbols.ts
./src/platform/packages/private/kbn-handlebars/src/types.ts
./src/platform/packages/private/kbn-handlebars/src/utils.ts
./src/platform/packages/private/kbn-handlebars/src/visitor.ts
./src/platform/packages/private/kbn-repo-packages/package-map.json
./src/platform/packages/private/kbn-ui-shared-deps-src/BUILD.bazel
./src/platform/packages/shared/kbn-crypto/jest.config.js
./src/platform/packages/shared/kbn-safer-lodash-set/fp/assoc.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/fp/assoc.js
./src/platform/packages/shared/kbn-safer-lodash-set/fp/assocPath.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/fp/assocPath.js
./src/platform/packages/shared/kbn-safer-lodash-set/fp/index.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/fp/index.js
./src/platform/packages/shared/kbn-safer-lodash-set/fp/set.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/fp/set.js
./src/platform/packages/shared/kbn-safer-lodash-set/fp/setWith.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/fp/setWith.js
./src/platform/packages/shared/kbn-safer-lodash-set/index.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/index.js
./src/platform/packages/shared/kbn-safer-lodash-set/lodash/_baseSet.js
./src/platform/packages/shared/kbn-safer-lodash-set/lodash/set.js
./src/platform/packages/shared/kbn-safer-lodash-set/lodash/setWith.js
./src/platform/packages/shared/kbn-safer-lodash-set/package.json
./src/platform/packages/shared/kbn-safer-lodash-set/scripts/_get_lodash.sh
./src/platform/packages/shared/kbn-safer-lodash-set/scripts/license-header.txt
./src/platform/packages/shared/kbn-safer-lodash-set/scripts/save_state.sh
./src/platform/packages/shared/kbn-safer-lodash-set/scripts/update.sh
./src/platform/packages/shared/kbn-safer-lodash-set/set.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/set.js
./src/platform/packages/shared/kbn-safer-lodash-set/setWith.d.ts
./src/platform/packages/shared/kbn-safer-lodash-set/setWith.js
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp_assoc.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp_assocPath.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp_patch_test.js
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp_set.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/fp_setWith.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/index.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/patch_test.js
./src/platform/packages/shared/kbn-safer-lodash-set/test/set.ts
./src/platform/packages/shared/kbn-safer-lodash-set/test/setWith.ts
./src/platform/packages/shared/kbn-user-profile-components/jest.config.js
./src/platform/plugins/private/interactive_setup/jest.config.js
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/packages/private/security/authorization_core/jest.config.js
./x-pack/platform/packages/private/security/authorization_core_common/jest.config.js
./x-pack/platform/packages/private/security/role_management_model/jest.config.js
./x-pack/platform/packages/private/security/ui_components/jest.config.js
./x-pack/platform/packages/shared/security/api_key_management/jest.config.js
./x-pack/platform/packages/shared/security/form_components/jest.config.js
./x-pack/platform/plugins/shared/cases/server/authorization/index.ts
./x-pack/platform/plugins/shared/cases/server/authorization/types.ts
./x-pack/platform/plugins/shared/cases/server/connectors/cases/utils.ts
./x-pack/platform/plugins/shared/cases/server/routes/api/utils.ts
./x-pack/platform/plugins/shared/encrypted_saved_objects/README.md
./x-pack/platform/plugins/shared/encrypted_saved_objects/jest.config.js
./x-pack/platform/plugins/shared/fleet/common/http_authorization_header.ts
./x-pack/platform/plugins/shared/rule_registry/server/lib/get_is_kibana_request.ts
./x-pack/platform/plugins/shared/security/jest.config.js
./x-pack/platform/plugins/shared/spaces/jest.config.js
./x-pack/solutions/security/plugins/security_solution/server/lib/timeline/routes/notes/get_notes.ts
./yarn.lock
.github/CODEOWNERS
```

</details><details >
<summary>Updated relative paths</summary>

```
src/platform/packages/private/kbn-handlebars/jest.config.js:8
src/platform/packages/private/kbn-handlebars/src/spec/index.regressions.test.ts:276
src/platform/packages/private/kbn-handlebars/src/spec/index.regressions.test.ts:277
src/platform/packages/private/kbn-handlebars/tsconfig.json:2
src/platform/packages/shared/kbn-crypto/jest.config.js:12
src/platform/packages/shared/kbn-crypto/tsconfig.json:2
src/platform/packages/shared/kbn-safer-lodash-set/package.json:6
src/platform/packages/shared/kbn-safer-lodash-set/package.json:7
src/platform/packages/shared/kbn-safer-lodash-set/package.json:8
src/platform/packages/shared/kbn-safer-lodash-set/tsconfig.json:2
src/platform/packages/shared/kbn-security-hardening/tsconfig.json:2
src/platform/packages/shared/kbn-user-profile-components/jest.config.js:12
src/platform/packages/shared/kbn-user-profile-components/tsconfig.json:2
src/platform/plugins/private/interactive_setup/jest.config.js:12
src/platform/plugins/private/interactive_setup/tsconfig.json:2
x-pack/platform/packages/private/security/authorization_core/jest.config.js:13
x-pack/platform/packages/private/security/authorization_core/tsconfig.json:2
x-pack/platform/packages/private/security/authorization_core_common/jest.config.js:15
x-pack/platform/packages/private/security/authorization_core_common/tsconfig.json:2
x-pack/platform/packages/private/security/role_management_model/jest.config.js:14
x-pack/platform/packages/private/security/role_management_model/tsconfig.json:2
x-pack/platform/packages/private/security/ui_components/jest.config.js:13
x-pack/platform/packages/private/security/ui_components/tsconfig.json:2
x-pack/platform/packages/shared/security/api_key_management/jest.config.js:14
x-pack/platform/packages/shared/security/api_key_management/tsconfig.json:2
x-pack/platform/packages/shared/security/form_components/jest.config.js:14
x-pack/platform/packages/shared/security/form_components/tsconfig.json:2
x-pack/platform/packages/shared/security/plugin_types_common/tsconfig.json:2
x-pack/platform/packages/shared/security/plugin_types_public/tsconfig.json:2
x-pack/platform/packages/shared/security/plugin_types_server/tsconfig.json:2
x-pack/platform/plugins/shared/encrypted_saved_objects/README.md:8
x-pack/platform/plugins/shared/encrypted_saved_objects/jest.config.js:10
x-pack/platform/plugins/shared/encrypted_saved_objects/tsconfig.json:2
x-pack/platform/plugins/shared/security/jest.config.js:10
x-pack/platform/plugins/shared/security/tsconfig.json:2
x-pack/platform/plugins/shared/spaces/jest.config.js:10
x-pack/platform/plugins/shared/spaces/tsconfig.json:2
```

</details>

---------

Co-authored-by: Michael Dokolin <mikhail.dokolin@elastic.co>
Co-authored-by: “jeramysoucy” <jeramy.soucy@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-05 12:57:01 +01:00
Kibana Machine
eba13abe65
[api-docs] 2025-01-05 Daily api_docs build (#205568)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/943
2025-01-05 07:04:58 +00:00
Sandra G
b17b10eea1
[Obs AI Assistant] unskip kb user instructions test in serverless (#205519)
## Summary
Resolves https://github.com/elastic/kibana/issues/192886

- Unskips `knowledge_base_user_instructions.spec.ts` in serverless
  - stays skipped in mki due to proxy usage issue
  - Duplicates new changes from non serverless
- Removes `skipInMKI` tags for:
`knowledge_base_setup.spec.ts`
`knowledge_base.spec.ts `
`knowledge_base_status.spec.ts`


If https://github.com/elastic/kibana/issues/192718 is merged before
this, I will move `knowledge_base_user_instructions.spec.ts` to
deployment agnostic. Otherwise It can be done in that PR or another.
2025-01-04 16:32:32 -05:00
Gerard Soldevila
6049493e4a
Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-core (#201653)
## Summary

Start relocating Kibana modules (packages and plugins) to the new folder
structure, according to the _Kibana Sustainable Architecture_
initiative.
#### 16 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/cloud-chat-plugin` |
`x-pack/platform/plugins/private/cloud_integrations/cloud_chat` |
| `@kbn/cloud-experiments-plugin` |
`x-pack/platform/plugins/shared/cloud_integrations/cloud_experiments` |
| `@kbn/cloud-full-story-plugin` |
`x-pack/platform/plugins/private/cloud_integrations/cloud_full_story` |
| `@kbn/cloud-links-plugin` |
`x-pack/platform/plugins/private/cloud_integrations/cloud_links` |
| `@kbn/cloud-plugin` | `x-pack/platform/plugins/shared/cloud` |
| `@kbn/features-plugin` | `x-pack/platform/plugins/shared/features` |
| `@kbn/ftr-apis-plugin` | `src/platform/plugins/private/ftr_apis` |
| `@kbn/kibana-usage-collection-plugin` |
`src/platform/plugins/private/kibana_usage_collection` |
| `@kbn/licensing-plugin` | `x-pack/platform/plugins/shared/licensing` |
| `@kbn/newsfeed-plugin` | `src/platform/plugins/shared/newsfeed` |
| `@kbn/saved-objects-management-plugin` |
`src/platform/plugins/shared/saved_objects_management` |
| `@kbn/telemetry-collection-manager-plugin` |
`src/platform/plugins/shared/telemetry_collection_manager` |
| `@kbn/telemetry-collection-xpack-plugin` |
`x-pack/platform/plugins/private/telemetry_collection_xpack` |
| `@kbn/telemetry-management-section-plugin` |
`src/platform/plugins/shared/telemetry_management_section` |
| `@kbn/telemetry-plugin` | `src/platform/plugins/shared/telemetry` |
| `@kbn/usage-collection-plugin` |
`src/platform/plugins/shared/usage_collection` |

#### 22 package(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/analytics` | `src/platform/packages/shared/kbn-analytics` |
| `@kbn/analytics-collection-utils` |
`src/platform/packages/private/analytics/utils/analytics_collection_utils`
|
| `@kbn/apm-config-loader` |
`src/platform/packages/private/kbn-apm-config-loader` |
| `@kbn/cloud` | `src/platform/packages/shared/cloud` |
| `@kbn/config` | `src/platform/packages/shared/kbn-config` |
| `@kbn/config-mocks` | `src/platform/packages/private/kbn-config-mocks`
|
| `@kbn/config-schema` |
`src/platform/packages/shared/kbn-config-schema` |
| `@kbn/crypto-browser` |
`src/platform/packages/shared/kbn-crypto-browser` |
| `@kbn/ebt-tools` | `src/platform/packages/shared/kbn-ebt-tools` |
| `@kbn/es-errors` | `src/platform/packages/shared/kbn-es-errors` |
| `@kbn/es-types` | `src/platform/packages/shared/kbn-es-types` |
| `@kbn/hapi-mocks` | `src/platform/packages/private/kbn-hapi-mocks` |
| `@kbn/health-gateway-server` |
`src/platform/packages/private/kbn-health-gateway-server` |
| `@kbn/i18n` | `src/platform/packages/shared/kbn-i18n` |
| `@kbn/i18n-react` | `src/platform/packages/shared/kbn-i18n-react` |
| `@kbn/logging` | `src/platform/packages/shared/kbn-logging` |
| `@kbn/logging-mocks` |
`src/platform/packages/shared/kbn-logging-mocks` |
| `@kbn/router-to-openapispec` |
`src/platform/packages/shared/kbn-router-to-openapispec` |
| `@kbn/server-http-tools` |
`src/platform/packages/shared/kbn-server-http-tools` |
| `@kbn/std` | `src/platform/packages/shared/kbn-std` |
| `@kbn/utility-types` |
`src/platform/packages/shared/kbn-utility-types` |
| `@kbn/zod` | `src/platform/packages/shared/kbn-zod` |

---------

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-04 11:47:24 -07:00
Kibana Machine
0b3a4a0a5d
[api-docs] 2025-01-04 Daily api_docs build (#205560)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/942
2025-01-04 07:03:37 +00:00
Kibana Machine
ff6adff23b skip failing test suite (#205344) 2025-01-04 10:44:58 +11:00
Jon
9efa527333
Reapply "[ci] Revert org-wide commit status checks (#195954)" (#205546)
Previously reverted due to the number of statuses we were tracking, and
the subsequent rate limiting.

The number of updates we need to do after
https://github.com/elastic/kibana/pull/199073 is significantly lower.
We've already been using org-wide status checks for [on-merge commit
statuses](https://github.com/elastic/kibana/commits/main) in the interim
and are not seeing issues.
2025-01-03 16:40:27 -06:00
Jon
552eb553bd
[cypress/security_solution] Rebalance parallelism (#205452)
Mainly to address timeouts on [Investigations - Security Solution
Cypress Tests
#2](https://buildkite.com/elastic/kibana-on-merge/builds/58405#01942904-03f4-406a-856d-d1f24d6fd533)
but made a pass on all groups.

Timings were based on the on-merge pipeline
https://buildkite.com/elastic/kibana-on-merge.
2025-01-03 16:34:19 -06:00
Kibana Machine
326ca3e2da skip failing test suite (#205316) 2025-01-04 08:41:42 +11:00
Catherine Liu
2b9104c327
[kbn-grid-layout] EUI Visual Refresh Integration (#204445)
## Summary

Related to https://github.com/elastic/kibana/issues/203132.
Closes [#204592](https://github.com/elastic/kibana/issues/204592).

This replaces all references to euiThemeVars in favor of the useEuiTheme
hook in the `kbn-grid-layout` package.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

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

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

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-01-03 13:10:37 -08:00
Viduni Wickramarachchi
f7b9d15df4
[Obs AI Assistant] Add alerts test to serverless (#205524) (#205530)
Closes https://github.com/elastic/kibana/issues/205524

## Summary

Adds the alerts.spec to serverless tests. It's skipped in MKI because of
the LLM proxy. There is an open issue for this -
https://github.com/elastic/kibana/issues/192751

### 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-01-03 16:01:05 -05:00
Kurt
283bcf5a15
Upgrading APM Node (#205440)
## Summary

Upgrade `elastic-apm-node` from 4.9.0 to 4.10.0


[CHANGELOG](https://github.com/elastic/apm-agent-nodejs/blob/main/CHANGELOG.asciidoc)
2025-01-03 15:39:25 -05:00
Mason Herron
8534f0a35d
[Fleet] Improve text strings in new agent binary download section (#204988)
## Summary
Closes #139151 

Changed placeholder and help text to be more descriptive (using approved
text from issue).


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

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

### Identify risks

n/a

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-03 12:45:49 -07:00
Rickyanto Ang
32dbd14519
[Cloud Security] Fix for issue where date is not retained when opening new tab (#205128)
## Summary

This PR addresses the issue where when user opens new tab by clicking on
popout icon on Alerts Data grid on Alerts preview Contextual flyout, the
date from original tab is not retained, as such there are scenario where
user don't see any alerts on new tab because its defaulted to today when
the alerts only exist from view days ago



https://github.com/user-attachments/assets/58a30d7d-18b3-47a8-ab4b-2ce143583368
2025-01-03 11:44:11 -08:00
Thom Heymann
8902f7026c
Remove links to Logs Explorer (#203685)
Resolves https://github.com/elastic/kibana/issues/182229

## Release Note

Remove Logs Explorer

## Summary

- Removes the Discover/Logs Explorer tabs in the top nav
- Changes all links to Logs Explorer in other applications to Discover
- Removes all APIs exposed by Logs Explorer

Note: This does not remove Logs Explorer from the codebase. There will
be a follow up for that work.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-03 17:25:13 +00:00
Larry Gregory
e8ef186be8
Dependency ownership for security solution teams, part 1 (#205523)
## Summary

This updates our `renovate.json` configuration to mark the security
solution teams as owners of their set of dependencies.
2025-01-03 17:22:39 +00:00
Rickyanto Ang
9933cc6595
[Cloud Security] Contextual flyout table sorting (#203950)
## Summary

This PR adds sorting capability to Alerts, Misconfiguration and
Vulnerabilities table


https://github.com/user-attachments/assets/12cc203e-470c-4166-bb8a-e2b64f4141e3
2025-01-03 08:52:50 -08:00