Commit graph

53818 commits

Author SHA1 Message Date
Christos Nasikas
e1f3aca0c8
Improve CORS messages (#134659)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-21 11:04:38 +03:00
Milton Hultgren
d13d997d4c
[Infra] Fix metric table fields and calculations (#134341)
* [Infra] Fix metric table fields and calculations

Fixes 133119
Fixes 133122
Fixes 133124
2022-06-21 09:18:32 +02:00
Julia Rechkunova
7410fbf4d8
[Discover] Hide "Add a field", "Edit" and "Create a data view" buttons in viewer mode (#134582)
* [Discover] Hide "Add a field" button for read only access

* [Discover] Hide "Create a data view" button for read only access on desktop

* [Discover] Hide "Create a data view" and "Add a field" button for read only access on mobile

* [Discover] Make sure that error message is shown when access rights were reduced for a user in meantime

* [Discover] Make checks safe

* [Discover] Update tests

* [Discover] Streamline the logic

* [Discover] Update tests

* [Discover] Add tests

* [Discover] Add tests

* [Discover] Update code style

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-21 09:05:23 +02:00
Clint Andrew Hall
9ec4d311ed
[Shared UX] Move Solution Toolbar components to package (#134392)
* [Shared UX] Move Solution Toolbar components to package

* Addressing feedback

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* Adding support to jest_config_check

* Fixing i18n

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2022-06-21 02:00:57 -05:00
Kibana Machine
04e621727b
[api-docs] Daily api_docs build (#134799) 2022-06-21 00:51:44 -04:00
Tiago Costa
1599cd8d2a
docs(NA): windows wsl development (#134589)
* docs(NA): windows wsl development

* docs(NA): update titles for the documentation created

* chore(NA): update dev_docs/tutorials/development_windows.mdx

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>

* docs(NA): updated guide to include info around GUI apps support

* docs(NA): updated guide to include info around GUI apps support

* docs(NA): include win10 GUI workaround

* docs(NA): run a first sudo command before running others

* docs(NA): added remote code wsl extension

* docs(NA): mentioned NVIDIA does now includes vGPU drivers for WSL within the common drivers

* docs(NA): update sudo commands separation

* docs(NA): added hardware virtualization prerequisite awareness into the guide

* docs(NA): update wording on guide recomendation for win11

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-21 00:45:08 +01:00
Georgii Gorbachev
cdcb272082
[Security Solution][Detections] Fix fetching package info from registry for installed integrations (#134732)
**Fixes:** https://github.com/elastic/kibana/issues/134639

## Summary

In Cloud, `Elastic APM` and `Fleet Server` integrations are installed by default. However, attempts to fetch their packages from Elastic Package Registry via Fleet services on the server-side fail with the following errors:

```json
{
    "message": "apm@8.3.0 not found",
    "status_code": 500
}
```
```json
{
    "message": "fleet_server@1.2.0 not found",
    "status_code": 500
}
```

<img width="797" alt="Screenshot 2022-06-20 at 11 28 18" src="https://user-images.githubusercontent.com/7359339/174571610-4c24e777-c49a-49e0-addf-54c6301cc8ca.png">

This behavior happens in some Cloud environments (like the one in the related ticket). It seems to not happen in Cloud CI environments and locally.

This PR adds error handling for this edge case to `GET /internal/detection_engine/fleet/integrations/installed?packages=` endpoint.

- It logs fetching errors to the console logs of Kibana.
- It uses a "best-effort" approach for returning data from the endpoint. If we could successfully read existing integration policies, we already have all of the needed data except correct integration titles. So, if after that any request to EPR results in an error, we:
  - Still return 200 with a list of installed integrations
  - Include correct titles for those packages that were successfully fetched
  - Include "best guess" titles for those packages that failed

```
[2022-06-20T12:57:10.270+02:00][ERROR][plugins.securitySolution] Error fetching package info from registry for 
fleet_server@1.2.0. Boom!
[2022-06-20T12:57:10.270+02:00][ERROR][plugins.securitySolution] Error fetching package info from registry for 
apm@8.4.0. Boom!
```

<img width="1085" alt="Screenshot 2022-06-20 at 13 05 08" src="https://user-images.githubusercontent.com/7359339/174588468-d28c1383-3a25-4f16-8905-bad3ca73e63e.png">


### 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
2022-06-20 13:07:15 -07:00
Nathan Reese
eee3f7ec08
[Maps] fix array values out of order in tooltips (#134588)
* [Maps] fix array values out of order in tooltips

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 13:55:53 -06:00
Paul Tavares
021b6eab83
[Security Solution][Endpoint] new dev script to listen for pending actions and send responses for them to ES (#134712)
* New script endpoint_action_responder that will (currently) continuously pull for pending actions and respond to them (by sending to ES both the Fleet action response and Endpoint action response)
* common services for creating security user and stack services
2022-06-20 15:54:41 -04:00
Nathan Reese
b7c8ff5d7b
[maps] fix sort not applied to vector tile search request (#134607)
* [maps] fix sort not applied to vector tile search request

* clean up

* clean comment

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* fix jest, integration, and functional test

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 13:52:28 -06:00
Mark Hopkin
7cbd0bf15d
[Fleet] Add fetch package unit tests (#134768)
* move getPathParts tests into describe block

* move archive tests to archive folder

* fetchFindLatestPackageOrUndefined tests

* fetchFindLatestPackageOrThrow test

* move generic tests to util fn

* fix spelling
2022-06-20 12:37:55 -07:00
Pete Hampton
52f15aa46d
Timeline telemetry: Collect less telemetry payloads for 8.3 (#134766)
* Update receiver.ts

* commit using @elastic.co
2022-06-20 19:35:39 +01:00
Bhavya RM
7e44314b4a
Graph a11y tests (#134694)
Graph a11y tests
2022-06-20 14:33:13 -04:00
Zacqary Adam Xeper
a1eaaa4680
{REDO} [RAM] Add Snooze Scheduling UI and API (#134512)
* Add inline range datepicker

* Finish interscheduler UI internals

* Add repeat summaries and begin implementing saving

* Fix unsnooze, move all UI to snooze notify badge

* Hook up snooze schedule api

* Finish Rule Ds List scheduling UI

* Fix half-baked dropdown work:

* Fix displaying yearly recurrences

* Move snooze scheduler into snooze panel

* Implement scheduler on shareable RuleStatusDropdown

* Fix title and typecheck

* Fix lint

* Fix typecheck

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Fix types and jest

* Fix jest

* Fix functional tests

* Fix Jest

* Fix test

* Re-enable snooze status on O11y

* Fix popover title and position

* Add 24h default to snooze schedule

* Fix delete schedule button text

* Disable daily recurrence when snooze is over 24h

* Fix button size

* Use default kibana tz in scheduler

* Add scheduled snooze notification badge

* Fix compressed styling

* Compress timezone dropdown

* Memoize select options

* Sort active snoozes in descending order

* re-structure

* unit test

* fix unit test

* fix collapse snooze notification

* re-structure RuleSnoozePanel components

* Clean up helper unit test descriptions

* add unit test for CustomRecurrenceScheduler

* Add rule_snooze helpers test

* Add base snooze panel tests

* Fix test

* Consolidate repeated types

* Fix bad merge

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2022-06-20 13:11:09 -05:00
Terrance DeJesus
04ace86b0c
[Detection Rules] Add 8.3 rules (#134686) 2022-06-20 13:41:17 -04:00
James Gowdy
3d5a1a788b
[ML] Anomaly detection job from lens functional tests (#133899)
* [ML] Anomaly detection job from lens functional tests

* test commit

* adding dashboard and tests

* increasing tab switch timeout

* moving archive

* changes based on review

* fix for browser window being too small

* adding another resize after tab open

* removing commented code

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 17:34:42 +01:00
Kfir Peled
64f0d65037
[Cloud Posture] Using resource.id instead of deprecated resource_id in findings index (#134581)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 18:56:02 +03:00
James Rucker
8a15142218
[Enterprise Search] Adds an endpoint to list indices (#134608)
* rename indices to search_indices since it is scoped to search-*

* Refactor existing indices route to add a second more general option
2022-06-20 08:42:46 -07:00
Peter Pisljar
8d2e371062
update generateFilters method (#134303) 2022-06-20 17:36:40 +02:00
Joey F. Poon
e668693f36
[Security Solution] add running-processes response action API (#134573) 2022-06-20 08:25:03 -07:00
Lisa Cawley
7649b00689
[DOCS] Adds prerequisites in update rule API (#134151) 2022-06-20 08:19:38 -07:00
Matthias Wilhelm
69cd603a90
[Discover] Replace RxJS firstValueFrom with RxJS lastValueFrom to prevent problem with partial results (#134682) 2022-06-20 17:15:15 +02:00
Tre
44b2a2ded0
[Archive Migration] x-pack global_search/search_syntax (#134217)
* [Archive Migration] x-pack global_search/search_syntax

* Fix using sort.

* Drop the original archive.

* Drop the original archive.

* Reordered.

* Revert.
2022-06-20 16:13:40 +01:00
Dzmitry Lemechko
e57f207aad
[scalability testing] filtering out setup/teardown related APM transactions (#134697)
* [packages/kbn-performance-testing-dataset-extractor] filter server transactions by journey time range

* check only 1 ftr transaction for run is found

* fixes
2022-06-20 16:48:22 +02:00
Ioana Tagirta
f59fd4a343
Fix document URLs in the query analytics view (#134685)
* Fix document URLs in the query analytics view

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* Remove engine prop from QueryClick

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 16:37:42 +02:00
Pablo Machado
b2ef47b2d8
Fix integrations with a long name break Host page UI (#134728) 2022-06-20 16:05:32 +02:00
Mark Hopkin
42e7ab347e
fix unable to proceed on fleet server steps adding agent (#134739) 2022-06-20 15:00:58 +01:00
Aurélien FOUCRET
8f24c1c8e3
Fix default sort order for meta engines. (#134729) 2022-06-20 15:50:38 +02:00
Julia Bardi
e6edc4b87b
[Fleet] fix schedule upgrade if no versions available (#134740)
* fix schedule upgrade if no versions available

* rewording
2022-06-20 06:41:32 -07:00
Shahzad
6de772db8d
[Synthetics] Don't show form validation error on loading (#134675) 2022-06-20 15:32:10 +02:00
Shahzad
f13de61291
[Synthetics] Added monitor summary page header (#134502)
Co-authored-by: Abdul Zahid <awahab07@yahoo.com>
2022-06-20 15:27:59 +02:00
Sergi Massaneda
8e61ed6b10
[Home] Solution panels updates when navLinks change (#134683)
* listen to navLinks changes

* navLinks changes update in kibana overview

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 15:25:21 +02:00
Joe Reuter
220126e329
delete all indices to enforce no data (#134646) 2022-06-20 14:18:26 +03:00
Garrett Spong
01b8482cd9
[Security Solution][Detections] Updates Get Installed Integrations route to use Internal SO Client (#134373)
## Summary

Follow up to https://github.com/elastic/kibana/pull/134299 that updates the `Get Installed Integrations` route to use the Internal SO Client and removes client-side privilege checks. This change ensures the `Related Integrations` feature works regardless of client users Fleet/Integration/SOM privileges, enabling all Security Solution users the ability to see which integrations are installed/configured with relation to their Detection Rules.

This change is helpful for low privilege users like T1/T2 Analysts that may not have more broad privileges like SOM or Fleet to still see which of their Detection Rules have the necessary integrations.

### Test instructions

To test, configure a role with the 3 mentioned privileges (SOM/Integrations/Fleet) as `None`, e.g.

<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/173156872-dfaece7e-a6ef-4774-b01d-e2fa7b66a068.png" />
</p>


Then the UI should _still show_ installed details (installed/not installed badges):

##### Rules Table
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/173658501-9b384ce6-ddef-4643-a36e-3da3082c8972.png" />
</p>


##### Rules Details
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/173658533-a60b6e96-7283-441a-8faa-ed186476c1ac.png" />
</p>


### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
  * Working docs as part of https://github.com/elastic/security-docs/issues/2015
- [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

### Risk Ma
2022-06-20 12:39:03 +02:00
Mark Hopkin
e3aa999f21
[Fleet] Remove confirm enrollment & confirm incoming data steps for standalone first integration flow (#134474)
* remove data and agent confirmation steps from standalone flow

* bonus: downloading policy should set step as complete

* Bring confirm incoming data step for standalone agent

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 11:37:49 +01:00
renovate[bot]
41d3f8b83b
Update dependency @elastic/charts to v46.10.2 (#134594)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
2022-06-20 05:44:53 -04:00
Pierre Gayvallet
a969d42ecf
Move server-side logging service to packages (#134438)
* Adapt LoggerConfigType to no longer inferred from config schema

* creating the new empty packages

* moving the public types to @kbn/core-logging-server

* updating @kbn/core-logging-server bazel config

* fix imports due to types moving to @kbn/core-logging-server

* moving the concrete implementation to @kbn/core-logging-server-internal

* updating @kbn/core-logging-server-internal bazel config

* adapt @kbn/core-logging-server-internal test files

* Move the mocks to @kbn/core-logging-server-mocks

* Fix imports due to server and mock moving to packages

* update generated doc

* update READMEs

* update tsdoc
2022-06-20 10:54:21 +02:00
Dominique Clarke
4c506e4bfb
[Synthetics] project monitors - disable deletion and allow enabling/disabling (#134601)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-20 10:44:08 +02:00
Michael Dokolin
f13d321c9f
[Data] Move the rest of the datatable utility functions to the related service (#134562)
* Move date histogram column meta utility function to the datatable utilities service
* Move number histogram interval utility function to the datatable utilities service
* Move precision error check to the datatable utility service
2022-06-20 10:25:37 +02:00
Kibana Machine
161e9df8c3
[api-docs] Daily api_docs build (#134714) 2022-06-20 00:50:25 -04:00
Dario Gieselaar
b01bb62d66
[APM] Display top spans for operation (#134179) 2022-06-19 01:23:35 -07:00
Kibana Machine
1d95bd6bae
[api-docs] Daily api_docs build (#134709) 2022-06-19 00:43:53 -04:00
Kibana Machine
1a3762ad7a
[api-docs] Daily api_docs build (#134707) 2022-06-18 00:42:22 -04:00
Hannah Mudge
4406ff3b60
[Dashboard] [Controls] Fix bug when combining filters (#134606)
* Combine filter arrays directly to prevent overwriting

* Add Jest tests
2022-06-17 13:38:59 -06:00
Matthias Wilhelm
961b47a08b
[Discover] Remove _type of uiSettings metaFields (#134453)
Remove the deprecated _type of metaFields to prevent from showing up in Discover's sidebar
2022-06-17 20:09:25 +02:00
Sergi Massaneda
62e9b8b956
[Security Solution] Use observable to update deepLinks when setting changes (#134577)
* use observable to update deepLinks when setting changes

* change advanced setting texts

* test fix. app links needs always to be defined

* fix home page bug
2022-06-17 18:59:50 +02:00
Tiago Costa
3e948ba06f
skip flaky suite (#134430) 2022-06-17 17:39:18 +01:00
James Gowdy
0294ed4d3c
[ML] Fix advanced wizard detector combo box (#134666) 2022-06-17 17:30:18 +01:00
István Zoltán Szabó
182849fa7b
[DOCS] Adds important note about allowlisting email addresses to email connector docs (#134552) 2022-06-17 08:38:03 -07:00
Shahzad
8f369db749
unskip test (#134549) 2022-06-17 17:37:11 +02:00