Commit graph

69601 commits

Author SHA1 Message Date
Thomas Watson
f8e992393a
[Serverless] Improve stability of prod quality gate SLO check (#171917) 2023-11-27 13:50:26 -07:00
Paul Tavares
20d3fe23bd
[ResponseOps] Require all privilege to "Actions and Connectors" in order to execute SentinelOne sub-actions (#171247)
## Summary

- Adds an additional authz check to the execution of SentinelOne
sub-actions to ensure the user has the `all` privilege to "Actions and
Connectors"
2023-11-27 15:49:35 -05:00
Jatin Kathuria
72d2457ee2
[Security Solution] - Timeline UI refactor (#168230)
## Summary

This PR implements many small refactors in the Timeline UI. I have
listed all the changes below which can help you while you are desk
testing.

### EQL Bar

|Before|After|
|--|--|

|![image](b989e2e5-d124-400c-b12e-24c306d38561)|

### Timeline Title Bar / Bottom Bar

Below screenshots show how timeline bottom bar has changed. Things to
note:

- Favorite button is now just an icon with the title. User can simply
click on it to favorite /un-favorite a timeline

|Before | After|
|---|---|

|![image](c2f0ea5b-bf7b-48e2-b14f-43b9afee16bc)|

Below screenshots show how timeline title bar has changed. Things to
note :
- A new timeline action menu has been added to right to timeline title
bar.
- All actions such as create a new timeline, a new timeline template.
adding timeline to case, etc can be performed from here.

|Before|After|
|---|---|

|![image](44ac7f00-3897-4c64-86f9-161376290b2e)|


- On the left side of the Timeline Header below are the changes.
- Timeline Title is not longer a button/link, so timeline cannot be
closed by clicking on that.
- ⊕ action menu is not longer available and corresponding actions are
available in above screenshots.

|Before|After|
|--|--|

|![image](fee4e846-f0d3-45bf-9139-d3b21d93c567)|


### Timeline Header Panel

Below timeline header panel has been completely removed.


![image](c7eb27a2-0314-49e6-8e6d-8db11badd4a8)
 

### Changes on how Data provider works

1. Data provider is by-default hidden in normal timeline but visible in
template timeline.
2. Data provider can be toggled by the user on-demand.
3. Data Provider will automatically become visible if user wants to put
a data grid column value in data provider and stars dragging it. Below
videos shows how that interaction works.


c7232596-40aa-4687-9fcf-e4a707be8a76

### KPI

This PR also changes how KPIs are visible in empty and populated state.

|Before|After|
|---|---|

|![image](173debdb-cdae-4547-a5f2-913c1b4561aa)|

KPI bar has been completely removed till this issue resolves:
https://github.com/elastic/kibana/issues/171569

### Query Bar

In contrast to current layout of the query bar, DataView picker, Query
bar and Date Picker has been brought in the same line. This was done in
an effort to make it uniform in looks w.r.t the global query bar.

---------------
#### Before

![Screenshot 2023-11-21 at 11 58
31](9e62491e-a500-4a94-9421-cb2fdcb7eb7c)

--------------
#### After
All the highlighted components are in the same line now + A button to
toggle Data Provider ( as explained in Data Porvider/QueryBuilder
Section) has also been added.


![image](d2df322b-23dc-4f1b-9167-ece32ca70947)


### Spacing Uniformity

In the existing version of timeline, spacing is different at many
places. This PR aims to bring some uniformity to those spacing decisions
( primarily in EQL and Query Tab). The changes are very minor visually,
please feel free to find and report any discrepancies.

### Checklist

Delete any items that are not applicable to this PR.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 21:32:32 +01:00
Aleh Zasypkin
f7fa8469bd
Move Kibana Security public types to separate packages (#171886)
## Summary

In this PR, I'm relocating all Kibana Security types (along with a few
schemas necessary for some of these types, unfortunately) that are part
of public contracts to separate packages. This change will enable any
plugin to utilize Security APIs via "static" or
["runtime"](https://github.com/elastic/kibana/pull/167113) dependencies,
regardless of whether Kibana Security already relies on these plugins or
not.

__NOTE TO REVIEWERS:__ I tried to minimize changes as much as I could
via moving only necessary types. I also didn't move deprecated parts of
the Setup/Start contracts to these new packages.

__Triggered by:__ https://github.com/elastic/kibana/pull/168910

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 21:26:31 +01:00
Kathleen DeRusso
bfb450e7ee
Remove mapping step from inference pipeline flow (#171690)
## Summary

Removes the mapping step from the inference pipeline flow. Related to
SEARCH-98.

**Before:** 
<img width="954" alt="ELSER pipeline flow - BEFORE"
src="5c90c1b9-d4e2-41f9-a651-08f98aa1abff">

**After:** 
<img width="880" alt="Screenshot 2023-11-22 at 11 15 28 AM"
src="9362a61b-c480-4a20-aa28-ef2c6741600d">
2023-11-27 14:40:35 -05:00
Nicolas Chaulet
e7478d5739
[Fleet] Do not uninstall package on reinstall error (#171880) 2023-11-27 13:55:50 -05:00
Alex Szabo
750989beb9
[Ops] Trim long stat blocks (#171997)
## Summary
Some post-build steps are failing because sometimes we're outgrowing the
buildkite metadata limits.

This PR will prevent upload of a text block too big, instead it will try
to gesture towards the build for more info.
2023-11-27 11:43:03 -07:00
Dima Arnautov
c8537bf964
[ML] "Add model" flyout for the Trained Models UI (#171024)
## Summary

Adds the "Add trained model" button to the Trained Models UI that opens
the flyout with available models for download.
It also contains the "Third-party" tab with instructions for deploying
3rd party models with Eland.

<img width="1685" alt="image"
src="73cf81ae-b761-4808-a89d-e70235a9fd2f">

<img width="1337" alt="image"
src="33984952-32c4-4ab1-9160-6f585b1d7968">

<img width="1685" alt="image"
src="0060a7dd-9875-4884-a83a-4e277d53942b">

### 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)
- [ ]
[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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] 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 renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-11-27 10:44:54 -07:00
Nathan Reese
8af39c3836
[inspector] clusters tab search bar (#171806)
https://github.com/elastic/kibana/issues/167666

PR adds table sorting. In picture below, table is sorted by request time
<img width="200" alt="Screenshot 2023-11-22 at 2 13 41 PM"
src="710b0a3e-875b-463a-8344-f171b37df506">

PR adds search bar. Screen shot below shows status filter popover
<img width="200" alt="Screenshot 2023-11-22 at 2 14 18 PM"
src="644eeb47-0eba-4742-a381-4f997fbdf379">

Then, once search selections are made, the search bar filters the health
bar and table. In the screen shot below, the table only display remote1
because its the only cluster that matches the status.
<img width="200" alt="Screenshot 2023-11-22 at 2 14 11 PM"
src="e9491c88-1f11-4179-ad4a-476f8fd210c0">

### test instructions 
1. Follow CCS setup instructions from
https://github.com/elastic/kibana/issues/164350.
2. Open discover
3. Open inspector "clusters and shards" tab. Try sorting table and using
search bar to narrow clusters

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 10:07:30 -07:00
amyjtechwriter
2b362095dd
[DOCS] Updating legacy link in /telemetry.md. (#171989)
## Summary

Updates a link in the docs file
`x-pack/plugins/apm/dev_docs/telemetry.md` which was pointing to the
legacy link https://github.com/elastic/telemetry#kibana-access. That
link has been updated to
https://github.com/elastic/telemetry#i-just-want-to-see-the-data.

Closes: #171470
2023-11-27 16:54:29 +00:00
Lisa Cawley
9adcfd072f
[DOCS] Fix authentication types for alerting rule enable API (#171807) 2023-11-27 08:24:43 -08:00
christineweng
f5648d9585
[Security Solution] Use new expandable flyout in alert preview (#167902)
## Summary

This PR updates the alert preview in Create rule -> Rule preview to use
the new expandable alert flyout:

- Switched timeline wrapper to be visible on create rule page. This
allows us to keep all the timeline navigation in the new expandable
alert flyout
- Disabled alert specific components, when flyout is open in create
rule:
   - Alert status is not shown
   - Rule summary preview is disabled
   - Title link to rule details page is removed
   - Exclude filter in/filter out hover actions in highlighted fields
- New placeholder text for investigation guide and response: we should
not show link to documentation when user is setting up a rule

With feature flag on:


a45e930e-f1e8-4899-aef4-1aa0c3dc3330



**How to test**
- Add `xpack.securitySolution.enableExperimental:
['expandableFlyoutInCreateRuleEnabled' ]` to `kibana.yml.dev`
- Go to Rules page -> Detection rules (SIEM) => Create rule
- Pick a rule type and populate the query, click `Continue`
- On the right hand side, click `Refresh`, some alerts should appear in
the table
- Click expand on a row

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

---------

Co-authored-by: Nikita Indik <nikita.indik@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 10:04:32 -06:00
Sébastien Loix
192519d01f
[Cloud] Rename "Endpoints" to "Connection details" (#171982) 2023-11-27 15:58:42 +00:00
Sebastián Zaffarano
3a5bb45c87
Diagnostic timelines task (#171567)
## Summary

Add a new telemetry task to collect diagnostic timelines.

### Checklist

Delete any items that are not applicable to this PR.

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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Pete Hampton <pjhampton@users.noreply.github.com>
2023-11-27 08:46:16 -07:00
Keerthy
e80a6d2416
Adding Usage Telemetry for Detection Rules & Secuirty Lists Tasks (#170056)
## Summary

Adding Usage Telemetry for Detection Rules & Secuirty Lists Tasks

### Checklist

Delete any items that are not applicable to this PR.

- [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: Pete Hampton <peter.hampton@elastic.co>
Co-authored-by: Pete Hampton <pjhampton@users.noreply.github.com>
2023-11-27 08:40:25 -07:00
Pierre Gayvallet
414260d42f
[PIT finder] return empty generator if first page is empty (#171598)
## Summary

Makes the PIT finder more consistent by ignoring empty first page and
not yielding it (as this is also what is done for other pages)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 16:12:52 +01:00
Marco Liberati
d900f8473b
[ES|QL] Ignore drop commands for date histogram in discover (#171769)
## Summary

Fixes #169907 

This PR cleans the ES|QL statement from DROP commands before sending it
over for the date histogram chart in Lens.


### Checklist

Delete any items that are not applicable to this PR.

- [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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-11-27 08:02:27 -07:00
Hannah Mudge
31a8b7bca6
[Dashboard Navigation] Add Links telemetry (#171877)
Closes https://github.com/elastic/kibana/issues/164305

## Summary

This PR adds two `uiCounters` to keep track of when something is clicked
in the new Links panel:

1. `dashboardLink:click` - counts when a dashboard link is clicked
2. `externalLink:click` - counts when an external link is clicked

These counters can be tracked via the `kibana-ui-counters` data view on
the telemetry clusters, like so:

![Screenshot 2023-11-23 at 1 37
26 PM](fe719121-73e3-4b53-8440-5a725a1a7c98)

Note that this **only** applies if the `onClick` method is called; if
the user, for example, right clicks on the link and selects "Open in new
tab" instead, this "click" will not be tracked. To my knowledge, there
is no way to track these types of clicks.

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 07:44:14 -07:00
Ying Mao
618cc48bc5
[Reponse Ops][Alerting] Excluding ECS experimental fields from ECS component template (#170571)
Resolves https://github.com/elastic/kibana/issues/168959

## Summary

Hard-coding a list of experimental (RFC stage 2) ECS fields to exclude
from the ECS component template. These are only the fields that are not
currently defined in `ecs_flat.yml`. The only existing field that is
excluded is `faas.trigger` which, if included, will cause a mapping
conflict exception because of an ECS mapping change from `nested` to
`object`.

## To Verify

Compare the mappings for the `.alerts-ecs-mappings` component template
between `main` and this branch and notice that the `faas.trigger` field
is excluded from the component template on this branch.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 08:54:56 -05:00
Antonio
5f5c92a5a3
[Cases] Display required badge in custom field configuration. (#171975)
Fixes #167767

## Summary

I added information about whether the custom field is required or not.

Additionally, I followed @mdefazio 's comment and changed how we display
these to use an`EuiBadge` instead. The color is custom.

<img width="1207" alt="Screenshot 2023-11-27 at 11 57 52"
src="4c491293-1ccf-4377-843f-55fef45fc9b3">
2023-11-27 14:28:54 +01:00
Cristina Amico
8d7816ca49
[Fleet] Fix epm endpoints return errors (#171722)
## Summary

[Fleet] Improve error handling on epm endpoints. 

Currently most errors occurring when doing any operation with packages
will throw and result in a `500` in the correspondent endpoint.
This PR is an attempts to handle those errors in a more comprehensive
way and to return meaningful responses.

Where I can I'm replacing the generic `Error` with `FleetError`; it
calls `Logger.error` and checks if the error belongs to a specific type,
if not defaults to 500.

The error described in https://github.com/elastic/integrations/pull/8268
will now return a 400:
https://github.com/elastic/kibana/pull/171722/files#diff-952b3c1842d5d24d9e70833cae1683e2d78df7b489dc99665dab723cc10927c1R349-R352


### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 14:26:44 +01:00
Dima Arnautov
808990a78d
[ML] Validate and limit threading parameters for starting model deployment (#171921)
## Summary

Closes #171883

This PR adds:
- Limiting options for "Threads per allocation" control for a model
deployment based on the `max_single_ml_node_processors` limit
- Validation of the number of allocation according to the
`total_ml_processors` field

<img width="1018" alt="image"
src="b8debd82-5f84-469a-8440-4a48b00a9dc3">


### 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)
- [ ] [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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2023-11-27 14:08:22 +01:00
Antonio
903149af5f
[ResponseOps][Connectors] Pager duty connector UI (#171748)
Fixes #170048

## Summary

This PR adds support in the `UI` for the `custom_details` and links
attributes in the Pagerduty connector.

### Release Notes

PagerDuty connector now supports the links and custom_details
attributes.
2023-11-27 14:02:17 +01:00
Sébastien Loix
75e8f3de95
[Project navigation] Improve performance (#171662) 2023-11-27 05:39:12 -07:00
Stratoula Kalafateli
037f68852b
[ES|QL] Allows searching in the documentation description (#171916)
## Summary

Allows searching on the ES|QL reference markdown. This means that now
the search will return more results. Examples:

- If I search for keep it will return all the occurences of the word
keep so the user will see the keep command but also all the other
commands that the keep word is used in the examples. I think that this
is very useful as the user can see more than 1 examples of a command
- If I search for date it will return not only the commands that have
the word date but also the commands that allow date in their arguments
- As now it searches also to the description it can also return false
positive results. I think is an accepted drawback.

<img width="1050" alt="image"
src="5de45bcf-c0fc-4fbc-bbdf-bdf25fcb89f6">


Note: I am not allowing this for Lens formulas. I introduced a new
property to disable it. The implementation works for formulas too but we
haven't received any negative feedback so far so I would like to test it
in the ES|QL reference first.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 14:30:32 +02:00
Maryam Saeidi
0942bcea04
[Custom threshold] Fix not showing threshold line in lens preview (#171970)
Closes #171843

## Summary

This PR fixes not showing the threshold line in the following case:

<img
src="fa0af167-b7f1-499a-a703-b336d4f2414c"
width=500 />
2023-11-27 05:11:57 -07:00
Shahzad
619b8b2f1e
[skip-ci] [OBS UX MG] Add team path label for changes (#171904) 2023-11-27 12:30:51 +01:00
Antonio
df30b7eb50
[Cases] Add scroll to columns popover. (#171912)
## Summary

- Added vertical scroll to the column selection popover
- Changed the fixed width of some columns in the cases table



08bccc40-792c-4bc0-8a4b-2a007b7257c2
2023-11-27 12:25:49 +01:00
Stratoula Kalafateli
e29e3160ff
[ES|QL] Displays the columns as they are returned from the query (#171874)
## Summary

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

Removes the sanitize function from ES|QL strategy

**Now**
<img width="1790" alt="image"
src="67d3d32a-28f9-40c2-9697-070234041323">


**Before**
<img width="501" alt="Screenshot 2023-11-23 at 4 29 38 PM"
src="e9a1d38e-80cb-4bd0-af21-5afbf31e3aed">
2023-11-27 12:35:35 +02:00
Josh Dover
c2d4a67e5a
[Fleet] Add traces to Fleet setup on Kibana boot (#171836)
## Summary

Several improvements to tracing and logging in Fleet setup to find root
cause of problems:
- Add a trace transaction to ensure Fleet setup calls on Kibana start up
are traced
- Add specific spans around each step of setup preconfiguration to more
easily correlate errors to the process
- Capture errors in APM errors
- Add stack traces to error logs during package installation to better
identify the cause of the error

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 02:44:18 -07:00
Mykola Harmash
3f9b2ce448
[ObsUX] Add Profiling tab to Asset Details (#171764)
## Summary

This adds a new "Universal Profiling" tab to asset details with a
flamegrapth for a selected host. The tab is behind a feature flag and is
disabled by default. It will be enabled by default for clound/onprem
once we implement Profiling empty state, serverless is tbd.

* Added two new endpoints for fetching profiling status (not used by the
FE yet) and flamegraph data.
* Added a `profilingEnabled` feature flag
* Added a new tab in the UI and integrated the Flamegraph embeddable

![CleanShot 2023-11-22 at 16 38
00@2x](acc789df-00c0-45af-878a-39fa5e2064cc)


## How to test

* Connect local kibana to oblt cluster that has Profiling configured
(e.g. edge)
* Add this to your dev `kibana.yml`
```
xpack.profiling.enabled: true
xpack.infra.profilingEnabled: true

# Direct ES URL on the oblt cluster that you're using, in case of edge it's https://edge-oblt.es.us-west2.gcp.elastic-cloud.com:443
xpack.profiling.elasticsearch.hosts: REMOTE_CLUSTER_ES_URL

# If needed create a new user on the remote oblt cluster
xpack.profiling.elasticsearch.username: REMOTE_CLUSTER_USER
xpack.profiling.elasticsearch.password: REMOTE_CLUSTER_PASWORD
```

* Open kibana, go to Hosts
* Open a flyout for one of the hosts and make sure you see the Profiling
tab with a flamegraph
* Open Host details as a full page and also make sure you see the new
tab

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-27 10:28:32 +01:00
Devin W. Hurley
a8dc2292c6
[Security Solution] adds maintenance privileges to t3 analyst and endpoint ops analyst user roles (#170778)
## Summary

Ref: https://github.com/elastic/security-team/issues/7950

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ievgen Sorokopud <ievgen.sorokopud@elastic.co>
2023-11-27 09:41:48 +01:00
Candace Park
69b2cd2b38
[Security Solution][Admin][Policy][Event Filters] Update event filters creation to include more match options (#170495)
## Summary

- [x] Adds a `matches` and `does not match` operator option to all
eligible event filter creation entry fields that support matches
- [x] Updates the existing warning to only appear if that is the
`file.path.text` entry field is selected
- [x] Generalize the warning for wildcard usage if operator is matches
and a wildcard is used in the value
- [x] Updates wildcard warning tooltip to include "Creating event
filters with both `matches` and `does not match` operators may
significantly decrease performance."
- [x] Unit tests

# Screenshots

![efmatch](9efad4f7-e49f-4542-9052-08e578ea4f6b)

Warning about wildcards affecting Endpoint performance
<img width="1219" alt="image"
src="5bceec10-6387-44d5-bc7f-76de1816ce46">


# Event Filter & Artifact 
**LINUX**

![image](4bba92ff-965a-47d9-b2e8-0a94b322acd8)
<details open>
<summary> linux artifact entry </summary>
<p>

```
{
  "entries": [
    {
      "type": "simple",
      "entries": [
        {
          "field": "event.category",
          "operator": "included",
          "type": "wildcard_cased",
          "value": "network"
        },
        {
          "field": "process.name",
          "operator": "included",
          "type": "exact_cased",
          "value": "network"
        }
      ]
    }
  ]
}
```
</p>
</details open>

**WINDOWS**

![image](e44020c7-0701-482a-bb74-6a1150b5552c)
<details open>
<summary> windows artifact entry </summary>
<p>

```
{
  "entries": [
    {
      "type": "simple",
      "entries": [
        {
          "field": "event.kind",
          "operator": "included",
          "type": "wildcard_cased",
          "value": "event"
        },
        {
          "field": "process.name",
          "operator": "included",
          "type": "exact_caseless",
          "value": "event"
        },
        {
          "field": "event.category",
          "operator": "included",
          "type": "wildcard_cased",
          "value": "authentication"
        },
        {
          "field": "process.name",
          "operator": "included",
          "type": "exact_caseless",
          "value": "authentication"
        }
      ]
    }
  ]
}
```
</p>
</details open>

**MAC**

![image](9c1782f8-2386-4cf0-8236-fa613bb6f9ee)

<details open>
<summary> mac artifact entry</summary>
<p>

```
{
  "entries": [
    {
      "type": "simple",
      "entries": [
        {
          "field": "event.id",
          "operator": "included",
          "type": "wildcard_cased",
          "value": "071e1cfc-8333-4c6c-965a-00678c7b1d61"
        },
        {
          "field": "process.name",
          "operator": "included",
          "type": "exact_caseless",
          "value": "071e1cfc-8333-4c6c-965a-00678c7b1d61"
        },
        {
          "field": "file.path",
          "operator": "included",
          "type": "wildcard_cased",
          "value": "C:\\My Documents\\business\\January\\processName"
        },
        {
          "field": "process.name",
          "operator": "included",
          "type": "exact_caseless",
          "value": "C:\\My Documents\\business\\January\\processName"
        }
      ]
    }
  ]
}
```
</p>
</details open>
2023-11-27 00:39:44 -07:00
Kibana Machine
7f61770f44
[api-docs] 2023-11-27 Daily api_docs build (#171957)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/534
2023-11-27 01:11:29 -05:00
Kibana Machine
6dc057ee75
[api-docs] 2023-11-26 Daily api_docs build (#171950)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/533
2023-11-26 01:10:38 -05:00
Ignacio Rivas
3fe27bf222
[Index Management] Add serverless tests for index mappings (#171920) 2023-11-25 19:28:51 +01:00
Kibana Machine
cc12ab7150
[api-docs] 2023-11-25 Daily api_docs build (#171946)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/532
2023-11-25 01:10:20 -05:00
Tiago Costa
cfb1cb7473
skip flaky suite (#171890) 2023-11-24 21:04:25 +00:00
Lisa Cawley
14886bf8b8
[OAS] Migrate connector APIs to v3.1.0 (#171464) 2023-11-24 12:51:14 -08:00
Lisa Cawley
1a2363dd1f
[OAS] Add support for links and custom_details in PagerDuty connector (#171812) 2023-11-24 09:09:57 -08:00
Lisa Cawley
ea85f2a479
[OAS] Migrate case APIs to v3.1.0 (#171593) 2023-11-24 09:08:34 -08:00
Ash
bb34e1bc98
[Security Solution][Endpoint] Fix and unskip test (#171719)
## Summary

Fix and unskip isolation cypress test from response console

- correctly does substring match when agent isolation state is
`Isolated`
- splits the tests so to avoid flaky states where the first test fails
and on a re-run creates another agent and that fails the test as there
are two agents on the list instead of one.

fixes elastic/kibana/issues/170470

**Flaky test runner**
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4044
x 50 ( all pass )
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4049
x 150 ( all pass )
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4050
x 150 ( 1 fail )

_with split tests_
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4052
x 150 ( all pass )

_with action API for isolating host_
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4054
x 150 ( 1 failed, cancelled rest )

_with action retries_
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/4055
x 150 ( all pass )

### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-24 09:30:20 -07:00
Davis McPhee
0c0ac93331
[Discover] Fix ES|QL visualization save modal title not defaulting after first open (#171894)
## Summary

This PR fixes a small bug when saving ES|QL visualizations in Discover
where the title doesn't default correctly when opening the save modal
more than once. The issue was a race condition that resulted in an empty
`title` being passed to `SaveModal` on the first render, causing it to
be used as the title input's initial value. The bug never occurred the
first time the save modal was opened because async imports hid the race
condition.

Fixes #171895.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/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
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] 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 renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-11-24 12:26:35 -04:00
Dima Arnautov
40e9ee33ea
[ML] Report render completion for the Anomaly swim lane embeddable (#171879)
## Summary

Reports render completion for the Anomaly swim lane embeddable with the
`onRenderChange` callback by elastic-charts.
2023-11-24 16:48:55 +01:00
Faisal Kanout
81381506ad
[BUG][OBX-UX-MNGMT] Apply the query on the EmbeddableComponent instead of the base layer (#171861)
## Summary

It fixes #171710 

<img width="603" alt="Screenshot 2023-11-23 at 14 03 57"
src="e7009716-45d2-41e0-9324-7159c2a9fb5e">
2023-11-24 15:03:56 +01:00
James Gowdy
56c494f908
[ML] [AIOps] Moving uiActions code (#171771)
Moves the categorize field uiAction trigger and action and related items
to the AIOps/ML uiActions package.
ML and AIOps are adding more and more uiActions, and so it's nicer to
have them all in one package.

Also cleans up the registration of the uiActions in the AIOps plugin

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-24 13:16:20 +00:00
Milton Hultgren
f555dbef29
[infra] Disable flaky ML job ID format test suite (#171915)
These tests rely on using browser performance timings to extract URLs
used when resolving ML job IDs to check if the right format is used and
updated when migrating to the new format.
Because this change is transparent to the user there isn't any way to
test the behaviour through UI elements and due to the structure of the
state management it's not straight forward to test it in isolation.

https://github.com/elastic/kibana/issues/171913 has been opened to
refactor the state management which should allow for this tests to be
updated and re-enabled.
2023-11-24 04:33:00 -07:00
Yulia Čech
52d0e38b83
[Index Management] Add serverless tests for indices routes (#171773)
## Summary

This PR adds api integration tests for indices routes that were missing
for serverless ("reload" and "delete index"). To avoid copy-pasting the
code, this PR also adds an index management service to re-use in
serverless tests. Also some refactoring of js code into ts.


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] 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 renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-11-24 06:02:23 -05:00
Alejandro Fernández Haro
1a4ac013b1
Add process.uptime to the json logger (#171873) 2023-11-24 10:32:41 +01:00
Pierre Gayvallet
87213e7efe
[HTTP Server] support TLS config hot reload via SIGHUP (#171823)
## Summary

Fix https://github.com/elastic/kibana/issues/54368

Add support for hot reloading the Kibana server's TLS configuration,
using the same `SIGHUP`-based reload signal, as already implemented for
other parts of the Kibana configuration (e.g `logging`)

**Note:**
- hot reloading is only supported for the server TLS configuration
(`server.ssl`), not for the whole `server.*` config prefix
- swaping the certificate files (without modifying the kibana config
itself) is supported
- it is not possible to toggle TLS (enabling or disabling) without
restarting Kibana
- hot reloading requires to force the process to reload its
configuration by sending a `SIGHUP` signal

### Example / how to test

#### Before

```yaml
server.ssl.enabled: true
server.ssl.certificate: /path-to-kibana/packages/kbn-dev-utils/certs/kibana.crt
server.ssl.key: /path-to-kibana/packages/kbn-dev-utils/certs/kibana.key
```

<img width="550" alt="Screenshot 2023-11-23 at 15 11 28"
src="1226d161-a9f2-4d62-a3de-37161829f187">

#### Changing the config

```yaml
server.ssl.enabled: true
server.ssl.certificate: /path-to-kibana/packages/kbn-dev-utils/certs/elasticsearch.crt
server.ssl.key: /path-to-kibana/packages/kbn-dev-utils/certs/elasticsearch.key
```

```bash
kill -SIGHUP {KIBANA_PID}
```

<img width="865" alt="Screenshot 2023-11-23 at 15 18 21"
src="c9412b2e-d70e-4cf0-8eaf-4db70a45af60">

#### After

<img width="547" alt="Screenshot 2023-11-23 at 15 18 43"
src="c839f04f-4adb-456d-a174-4f0ebd5c234c">

## Release notes

It is now possible to hot reload Kibana's TLS (`server.ssl`)
configuration by updating it and then sending a `SIGHUP` signal to the
Kibana process.

Note that TLS cannot be toggled (disabled/enabled) that way, and that
hot reload only works for the TLS configuration, not other properties of
the `server` config prefix.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-24 10:05:27 +01:00