Commit graph

59021 commits

Author SHA1 Message Date
Shahzad
dc2b29add9
[Synthetics] Fixes project monitor edit code path (#146416)
## Summary

Fixed project monitor editor code path, it was called un-necessarily on
each request.
2022-12-02 09:56:29 +01:00
David Sánchez
2a34e0e783
[Security Solution][Endpoint] Adds FTR service for roles and users create/delete using endpoint security RBAC privileges (#144710)
## Summary

- New FTR service for create/delete rules and users using roles with new
security sub-privileges in.
- Create/delete roles and users during before/after suite hook instead
of doing it on each test case.
- Updates a test using new roles/users.

### TBD

- Move role files to the common folder once this is merged:
https://github.com/elastic/kibana/pull/143880 - DONE
- Use new role/users in other tests in this suite.
- Move new service to an upper level?

### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-02 09:13:26 +01:00
David Sánchez
2b3755e395
[Security solution] [Endpoint] Use internal ES user in get index patterns and autosuggestions for event filters form (#145883)
## Summary

- Cretes new search strategy for getting index patterns in security
solution plugin that uses the internal ES user in order to retrieve
event filters fields without having extra index privileges.
- Adds new API endpoint for autocomplete suggestions that uses
unified_search plugin logic but using the internal ES user.
- Updates frontend code to use both approaches above in event filters
form.
- Adds new unit tests

### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-02 09:09:50 +01:00
Kibana Machine
8c7efbba54
[api-docs] 2022-12-02 Daily api_docs build (#146850)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/174
2022-12-02 00:49:45 -05:00
Kevin Logan
fec599d0f5
Update Endpoint package version to 8.6.1 for 8.6 release (#146839)
## Summary

Update bundled Endpoint package version to `8.6.1` for the `8.6` stack
release.

We released an `8.6.1` Endpoint package that contains some important bug
fixes for the `8.6` stack release
2022-12-01 20:59:26 -05:00
Nathan Reese
15ed59d6f0
[controls] complete control input builder API (#146764)
ControlGroupRenderer API changes
* Added parameter `initialInput: Partial<ControlGroupInput>,` to
getCreationOptions method signature so consumers don't need to call
`getDefaultControlGroupInput`
* Rename prop onEmbeddableLoad -> onLoadComplete
* Rename prop getCreationOptions -> getInitialInput

controlGroupInputBuilder API changes
* Added `addOptionsListControl` method that allows users to pass
selectedOptions
* Added `addRangeSliderControl`
* Added `addTimeSliderControl`

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
2022-12-01 16:38:43 -07:00
gchaps
f95414f76f
[DOCS] Adds content on nested queries (#146829)
## Summary

This PR adds content on nested queries.

Preview:

[https://kibana_146829.docs-preview.app.elstc.co/guide/en/kibana/master/kuery-query.html](https://kibana_146829.docs-preview.app.elstc.co/guide/en/kibana/master/kuery-query.html)
2022-12-01 14:11:28 -08:00
Tomasz Ciecierski
ec7ba49dca
[Osquery] [Fix] Response action pack's queries update (#146782) 2022-12-01 21:30:20 +01:00
Paul Tavares
d3b4d39099
[Security Solution][Endpoint] Add RBAC to Endpoint Policy List and Policy Details pages (#146480)
## Summary

- The following changes were done in support of RBAC for the policy
management from security solution:
    - Pages are only accessible if user has `read` permissions
- If user does not have `read` or `write` permissions, the link to the
Policy list is remove from the Security Solution management page
- If user ONLY has `read`, then the Policy Details save button is
removed and all form controls (ex. switches, checkboxes, etc) are
disabled
- If user does not have `read` permissions to the Endpoint list page,
then the policy list `Endpoints` column is displayed as plain text (no
link)
- Fixes a bug with the `Cancel` button on the Policy Details, which was
redirecting the user by default to the Endpoint List - correct behavior
is to redirect to the policy list by default
2022-12-01 10:41:53 -07:00
Pablo Machado
c3d1d9ec28
Quick-fix Users can’t upgrade their clusters when riskScore experimental feature is enabled (#146780)
Users can't upgrade their clusters when an old experimental feature is
enabled.

While we don't have a final solution for this issue, I am adding the
experimental flag configuration back to prevent users from having this
frustrating experience.

Quick-fix for: https://github.com/elastic/kibana/issues/146777
Original report:
https://elastic.slack.com/archives/C6E3MTCD7/p1669236299374339

Fix
```
FATAL Error: [config validation of [xpack.securitySolution].enableExperimental]: [riskyUsersEnabled] is not allowed. Allowed values are: tGridEnabled, tGridEventRenderedViewEnabled, excludePoliciesInFilterEnabled, kubernetesEnabled, disableIsolationUIPendingStatuses, pendingActionResponsesWithAck, policyListEnabled, policyResponseInFleetEnabled, previewTelemetryUrlEnabled, responseActionsConsoleEnabled, insightsRelatedAlertsByProcessAncestry, extendedRuleExecutionLoggingEnabled, socTrendsEnabled, responseActionsEnabled
```

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 18:25:46 +01:00
Rodney Norris
b155134d66
[Enterprise Search] Engines feature flag (#146756)
## Summary

Added the ui settings feature flag to show/hide Engines with it
defaulted to off. For now I put engines in the content plugin and
stubbed the engines list page using the
`EnterpriseSearchContentPageTemplate`.

We'll most likely want to create an Engines specific page template. 
We'll also likely want to move the engines routes out of the Content
router since right now the path is
`app/enterprise_search/content/engines` and we likely want
`app/enterprise_search/engines`

### Screenshots
ui setting:

![image](https://user-images.githubusercontent.com/1972968/204911301-7c0bb283-7c75-4871-81d8-7aed55f17425.png)

FF On: 

![image](https://user-images.githubusercontent.com/1972968/204911338-8529e2d9-13ca-4faf-a677-0466b1fcfe9f.png)

FF Off:

![image](https://user-images.githubusercontent.com/1972968/204911400-b09c30f8-4250-4692-b504-d18cfbee42cc.png)
2022-12-01 10:01:12 -06:00
Spencer
2e314db2ce
Wrap rison-node to improve types (#146649)
@maximpn brought up the issues caused by the types required by the
rison-node package, which attempted to communicate that "encoded values
must be primitive values, or recursive arrays/object of primitive
values". This isn't actually expressible in TypeScript, which lead to
many instances of `rison.encode(value as unknown as RisonValue)` which
is useless. Additionally, the rison-node library actually supports any
value and will either produce valid rison or `undefined` for that value.

To address this I'm adding a wrapper function which accepts `any` and
returns a `string`. If rison-node is totally unable to produce any rison
for the value (because the value is `undefined` or some other type like
Symbol or BigInt) the `encode()` function will throw. If you're
accepting arbitrary input you can use the `encodeUnknown()` function,
which will return a string or undefined, if the value you provided has
zero rison representation.

Like JSON.stringify() any non-circular primitive, object, or array can
be encoded with either function. If the values within those objects are
not encodable (functions, RegExps, etc) then they will be skipped. Any
object/array with the `toJSON()` method will be converted to JSON first,
and if the prototype of the object has the `encode_rison()` method it
will be used to convert he value into rison.

The changes in this PR are mostly updating usage of rison-node to use
`@kbn/rison` (which is also enforced by eslint). There are also several
changes which remove unnecessary casting.
2022-12-01 08:33:56 -07:00
Shahzad
6f7c6ad947
[Synthetics] Fixes monitors search by location/hosts (#146529)
Fixes https://github.com/elastic/kibana/issues/146077
Fixes https://github.com/elastic/kibana/issues/146078
2022-12-01 16:26:53 +01:00
renovate[bot]
5e65ebb846
Update dependency @types/node-forge to ^1.3.1 (main) (#146762) 2022-12-01 16:18:32 +01:00
Alejandro Fernández Haro
24de7178ed
[Telemetry] Cache the report generation promise (#146679)
Resolves https://github.com/elastic/kibana/issues/146676
2022-12-01 16:14:46 +01:00
Alejandro Fernández Gómez
df41bfa9fe
[Shared UX] Add <NotFound /> prompt (#145598)
## Summary

Creates a shared `<NotFound />` prompt to be used when any given
consumer needs to show a 404 error.

<img width="1278" alt="Screenshot 2022-11-17 at 18 06 12"
src="https://user-images.githubusercontent.com/57448/202511151-a35f489b-d988-46cc-9810-5fc725e29b18.png">

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 09:44:56 -05:00
Faisal Kanout
137d178d71
[Actionable Observability] - add alertDetailAppSection to the APM Rule Details page (#143298)
## Summary

It fixes #145572 and #143183 by
- Adding an abstraction layer for the Timeseries chart and using it
without APM's context and hooks
- Create and link `AlertDetailAppSection` new component to all APM rule
types
- Provide the new Alert Details page under Observability using APM
charts

<img width="1205" alt="Screenshot 2022-11-08 at 17 22 17"
src="https://user-images.githubusercontent.com/6838659/200619684-0f9eaf5b-4618-4dd3-8539-f4bc13107c2e.png">

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


## For the reviewers
- Enable the feature flag
`xpack.observability.unsafe.alertDetails.apm.enabled: true` in
`kibana.yml`.
- Create an APM rule that fires alerts
- Click on `View alert details` from the Alert table
2022-12-01 15:40:37 +01:00
Nicolas Chaulet
11451129d2
[Fleet] Fix agent status computation to support agent v2 uppercase (#146757) 2022-12-01 09:12:53 -05:00
Julia Rechkunova
66718fc2c1
[Discover][UnifiedFieldList] Integrate unified field list sections into Discover (#144412)
Closes https://github.com/elastic/kibana/issues/135678

## Summary

This PR continues the work started in
https://github.com/elastic/kibana/pull/142758 to bring field list
grouping from Lens into Discover.

- [x] Integrate new components and hooks into Discover page
- [x] Refactor fields grouping logic
- [x] Render Popular fields under a new separate section
- [x] Remove "Hide empty fields" switch
- [x] Adjust filtering logic
- [x] Refactor fields existence logic in Discover
- [x] Add "Unmapped fields" section
- [x] Highlight the matching term when searching for a field 
- [x] Show field icons when in SQL mode
- [x] Add tooltips to field list section headings
- [x] Add tests, clean up

<img width="340" alt="Screenshot 2022-11-15 at 15 39 27"
src="https://user-images.githubusercontent.com/1415710/201947349-726ffc3a-a17f-411b-be92-81d97879765a.png">

For testing on Discover page:
Please check different use cases and toggling Advanced Settings:
- regular vs ad-hoc data views
- data views with and without a time field
- data views with unmapped and empty fields
- data views with a lot of fields
- data views with some fields being filtered out via data view
configuration
- updating query, filters, and time range
- regular and SQL mode
- searching by a field name in the sidebar
- applying a field filter in the sidebar
- adding, editing, and removing a field
- Field Statistics table when some columns are selected or no columns
are selected
- multifields in the field popover should work as before (icon should
change from "+" to "x" when subfield is selected as a column)
- `discover:searchOnPageLoad` should not show fields if turned off
- `discover:searchFieldsFromSource` should show multifields right in the
fields list if enabled
- `discover:enableSql` should show Selected and Available fields only
when enabled
- `discover:showLegacyFieldTopValues` should show old (green) field
stats in its popover
- `doc_table:legacy`

On Lens page:
- scroll position should reset when data view is switched or when
searching by a field name
- regular and SQL mode

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

Co-authored-by: Michael Marcialis <michael@marcial.is>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-12-01 15:02:04 +01:00
Jonathan Buttner
08805d0d69
[Cases] Make the audit logger required (#146569)
This PR makes the audit logger required for the
`AuthorizationAuditLogger`. We can do this because the security plugin
is not optional anymore.
2022-12-01 08:14:17 -05:00
Or Ouziel
7e035f4189
[Cloud Posture] Add test for filtering findings by evaluation (#146452) 2022-12-01 14:56:04 +02:00
Søren Louv-Jansen
f3d12b33e6
Change default refresh interval to 10 seconds (#144389) 2022-12-01 05:42:10 -07:00
Uladzislau Lasitsa
bb4012664a
[ML][Lens] Use new lens chart info helper for ml plugin (#145000)
## Summary

As new helper was already exposed we should use it.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 13:35:28 +02:00
Gergő Ábrahám
5f3ac5d938
[Security Solution] UI Event Filters RBAC (#146111)
## Summary

Similarly to https://github.com/elastic/kibana/pull/145593, this PR
handles the _None_ and _Read_ privileges for the Event Filters
sub-feature. The _All_ privilege should not need any UI modification,
but will need API modification.
<img width="554" alt="image"
src="https://user-images.githubusercontent.com/39014407/203514418-b016a47b-819c-4057-a86e-d7b4a3d8e5c5.png">

The modification should:
- hide Event Filters from Manage navigation items if privilege is NONE,
~(note: it is still displayed for non-superusers, if the feature flag is
disabled)~ update: it is hidden for non-superusers if the feature flag
is disabled
- disable add/edit/delete for Event Filters if privilege is READ.



#### Checked:
- the Event Filters form still works from the "Hosts > Events" side of
the app 
<img width="1354" alt="image"
src="https://user-images.githubusercontent.com/39014407/204316619-85121106-9d28-4165-9675-522890e39dfe.png">
<img width="1323" alt="image"
src="https://user-images.githubusercontent.com/39014407/204326904-6917c8fe-a364-4a40-8bdc-e8240115fa1d.png">



### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 12:32:20 +01:00
Or Ouziel
bbd229f96b
[Cloud Posture] Add tests for rendering Findings flyout (#146374) 2022-12-01 13:25:02 +02:00
Thomas Dullien
0a065f3c1d
[profiling] Ensure constant colors in profiling bar chart (#146696)
## Summary

Make sure that identical objects in the bar chart always get assigned
the same colors.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Rühsen <tim.ruhsen@elastic.co>
2022-12-01 12:11:49 +01:00
Yulia Čech
e7da574c5d
[Guided onboarding] Add guide config route (#146149)
## Summary
Fixes https://github.com/elastic/kibana/issues/145871
Fixes https://github.com/elastic/kibana/issues/145875
This PR adds an internal API endpoint that returns all existing config
guides. The client side code (api service) is updated to use the
endpoint instead of a guide configs file.

Note: This PR deletes the docs link for the kube-state-metrics from the
"Add data" step in the Kubernetes guide. I opened
https://github.com/elastic/kibana/issues/146404 to follow up on this.

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-01 09:44:20 +01:00
Kibana Machine
9e6f24a331
[api-docs] 2022-12-01 Daily api_docs build (#146767)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/173
2022-12-01 00:48:48 -05:00
Kevin Delemme
16ad022244
feat(slo): rename kql indicator parameters (#146747) 2022-11-30 15:59:32 -05:00
Marshall Main
40184978d3
[Security Solution][Alerts] Add suppression info to alert details insights (#145766)
## Summary

https://github.com/elastic/kibana/issues/145678 - Alert suppression info
does not display in the details flyout (issue mentions highlighted
fields, but we add it to `Insights` as shown in the
[mocks](https://github.com/elastic/security-team/issues/3405#issuecomment-1304197446))


![image](https://user-images.githubusercontent.com/55718608/204872298-92b9d48a-3853-4ec9-b15c-876f4183e3c1.png)
2022-11-30 11:54:11 -08:00
renovate[bot]
4da62ae90f
Update react-query to ^4.16.1 (main) (#144670) 2022-11-30 14:20:15 -05:00
Or Ouziel
2eddbc0518
[Cloud Posture] Add tests for filtering findings by query and filters (#146364) 2022-11-30 20:57:32 +02:00
Ahmad Bamieh
1323fd8de6
[i18n] Fix ja-JP locale causing FATAL error when starting kibana (#146704)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/146693
2022-11-30 21:28:28 +03:00
Ievgen Sorokopud
d9b690f97a
[Security Solution] Full Screen of Rule Preview breaking the UI under Rule Creation form (#146687)
## Summary

These changes fix broken fullscreen table that displays the rule preview
results.

Fullscreen table before fix:

<img width="1879" alt="Screenshot 2022-11-30 at 14 46 00"
src="https://user-images.githubusercontent.com/2700761/204812399-52138490-a42a-4ea2-bd00-04680375580a.png">

Fullscreen table after fix:

<img width="1881" alt="Screenshot 2022-11-30 at 14 45 20"
src="https://user-images.githubusercontent.com/2700761/204812419-5b528ae5-02e4-4808-adcc-14ede7cec56b.png">

Ticket: #145954

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-30 18:57:30 +01:00
Devin W. Hurley
ebfc715105
[Security Solution] [Exceptions] fixes affects shared lists route on rule details -> view exceptions (#146448)
## Summary

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-30 18:55:52 +01:00
Julia Rechkunova
c7cc58df3f
[Discover] Fix flaky jest test (#146668)
Closes https://github.com/elastic/kibana/issues/145894
2022-11-30 17:31:24 +01:00
gchaps
7d6ae27897
[DOCS] Adds intro section to landing page (#146207)
## Summary

This PR:

- Adds an intro section to the landing page that links to what is
Kibana, how to use, concepts, and add data
- Updates the link to What's new

Preview:

[https://kibana_146207.docs-preview.app.elstc.co/guide/en/kibana/master/index.html](https://kibana_146207.docs-preview.app.elstc.co/guide/en/kibana/master/index.html)
2022-11-30 08:00:14 -08:00
Marshall Main
d659ee6f2e
[Security Solution][Alerts] Don't use maxSignals for topHits agg size (#146564)
## Summary

Addresses https://github.com/elastic/kibana/issues/146494

We only need the first document from the bucket to create the alert, not
`maxSignals` documents. If `maxSignals` was greater than 100, this
caused an error in the search.
2022-11-30 07:50:16 -08:00
Dima Arnautov
9ad78b244a
[ML] Functional tests for the Test Model action (#146399)
## Summary

Part of #142456

Adds functional tests for the Test model action


### 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
2022-11-30 16:48:27 +01:00
Gloria Hornero
8a6cc0cd26
[Security Solution] Refactors All exception lists - read only tests to remove flakiness (#146677)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-11-30 16:41:44 +01:00
Tiago Costa
3718b773c8
skip flaky suite (#142347) 2022-11-30 15:33:41 +00:00
Tiago Costa
6085beafce
skip flaky suite (#140867) 2022-11-30 15:30:37 +00:00
Tiago Costa
1a9eb5dfa5
skip flaky suite (#134529) 2022-11-30 15:26:22 +00:00
Andrew Tate
6892a3ea05
[Lens] color by slice for multi-metric partition chart (#145948) 2022-11-30 09:24:20 -06:00
Tiago Costa
d70497ccf7
skip flaky suite (#124781) 2022-11-30 15:23:36 +00:00
Tiago Costa
0a03a911c9
skip flaky suite (#124780) 2022-11-30 15:20:56 +00:00
Tiago Costa
b70812e731
skip flaky suite (#124779) 2022-11-30 15:18:08 +00:00
jennypavlova
93d5d384ed
[Infrastructure UI] Set unified search bar displayStyle to 'inPage' on hosts page (#146671)
Closes: #146670 

## Summary

This PR fixes the unified search bar size on the host view page.
2022-11-30 15:56:42 +01:00
Gloria Hornero
2cb675d814
[Security Solution] Adding security solution packages as a dependency (#146561) 2022-11-30 15:17:32 +01:00
Stratoula Kalafateli
dd0a9dd070
[Lens] Moves the mosaic/waffle charts into GA (#146261)
## Summary

Removes the technical preview badge from the mosaic/waffle charts

<img width="497" alt="image"
src="https://user-images.githubusercontent.com/17003240/203747315-45a1e817-c1c4-4f72-9d8c-d2d564d1e721.png">
2022-11-30 16:14:56 +02:00