Commit graph

43960 commits

Author SHA1 Message Date
Ignacio Rivas 09bd6301d6
[CCR & Snapshot+Restore] Center align states under tabs (#103237)
* fix up CCR centered sates in tabs content

* update snapshots list

* fix lint errors

* Change tab states for all pages in snapshot+restore

* Remove unnecessary variables

* Seems we dont need the class wrapper

* fix broken type

* Fix bug in ILM table when filtering it down

* center align search box

* fix linter errors

* fix prettier warnings

* revert content var refactor and just focus on ux

* add breakword class to paragraph so we avoid text overflowing

* fix prettier errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:57:30 +03:00
Nathan L Smith 1dce600efe
Collect host.os.platform telemetry for APM (#103520)
Fixes #97958.
2021-06-28 21:27:10 -05:00
Candace Park da13795ed4
Task/host isolation status pending (#103549) 2021-06-28 22:03:08 -04:00
Patryk Kopyciński ccf42c0b80
[Osquery] Add Saved queries (#100965) 2021-06-28 21:19:02 -04:00
ymao1 c05588f077
[Alerting] Enable rule import/export and allow rule types to exclude themselves from export (#102999)
* Removing feature flag changes

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Adding isExportable flag to rule type definition

* Filtering rule on export by rule type isExportable flag

* Fixing types

* Adding docs

* Fix condition when exportCount is 0

* Unit test for fix condition when exportCount is 0

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 20:35:27 -04:00
Constance 633649460a
[Enterprise Search] Improve flash messages screen reader UX (#103412)
* Remove role region on flash messages

- just `aria-live` is enough for screen readers to read it out, and `role` was causing "Flash messages" to get read out loud repeatedly between page navigation even when empty which was annoying and not good

* Further a11y attribute recommendations from @myasonik
2021-06-28 20:25:24 -04:00
Tim Sullivan aafcc473f3
[Reporting] Reorganize UI components (#103571) 2021-06-28 17:23:10 -07:00
Scotty Bollinger 699c875b21
[Workplace Search] Fix edge case API error (#103574)
This PR fixes an edge case where a race condition mught cause the total_results from a federated content source to come back null from the server. This PR tells the server to expect null in those edge cases to prevent browser errors
2021-06-28 20:18:14 -04:00
fgierlinger ad3601c260
fix: typo in time dropdown list (#103407)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:17:26 +09:00
Aaron Caldwell f28bfa71ad
[Maps] Move edit tools to beta and remove experimental config flags (#103556) 2021-06-28 20:13:12 -04:00
Frank Hassanabad d7d4a14c8d
[Security Solutions][Detection Engine] Implements best effort merging of constant_keyword, runtime fields, aliases, and copy_to fields (#102280)
## Summary

This adds utilities and two strategies for merging using the [fields API](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-fields.html) and the `_source` document during signal generation. This gives us the ability to support `constant_keyword`, field alias value support, some runtime fields support, and `copy_to` support. Previously we did not copy any of these values and only generated signals based on the `_source` record values. This changes the behavior to allow us to copy some of the mentioned values above.

The folder of `source_fields_merging` contains a `strategy` folder and a `utils` folder which contains both the strategies and the utilities for this implementation. The two strategies are `merge_all_fields_with_source` and `merge_missing_fields_with_source`. The defaulted choice for this PR is we use `merge_missing_fields_with_source` and not the `merge_all_fields_with_source`. The reasoning is that this is much lower risk and lower behavior changes to the signals detection engine.

The main driving force behind this PR is that ECS has introduced `constant_keyword` and that field has the possibility of only showing up in the fields section of a document and not `_source` when index authors do not push the `constant_keyword` into the `_source` section. The secondary driving forces behind this behavioral change is that some users have been expecting their runtime fields, `copy_to` fields, and field alias values of their indexes to be copied into the signals index.

Both strategies of `merge_missing_fields_with_source` and  `merge_all_fields_with_source` are considered Best Effort meaning that both strategies will not always merge as expected when they encounter ambiguous use cases as outlined in the `README.md` text at the top of `source_fields_merging` in detail.

The default used strategy of `merge_missing_fields_with_source` which has the simplest behavior will work in most common use cases. This is simply if the `_source` document is missing a value that is present in the `fields`, and the `fields` value is a primitive concrete value such as a `string` or `number` or `boolean` and the `_source` document does not contain an existing object or ambiguous array, then the value will be merged into `_source` and a new reference is returned. If you call the strategy twice it should be idempotent meaning that the second call will detect a value is now present in `_source` and not re-merge a second time.

* 301 unit tests were added
* Extensive README.md docs are added
* e2e tests are updated to test scenarios and ambiguity and conflicts from previously to support this effort.
* Other e2e tests were updated
* One bug with EQL and fields was found with a workaround implemented. See https://github.com/elastic/elasticsearch/issues/74582
* SearchTypes adjusted to use recursive TypeScript types
* Changed deprecated for `@deprecated` in a few spots
* Removed some `ts-expect-error` in favor of `??` in a few areas
* Added a new handling of epoch strings and tests to `detection_engine/signals/utils.ts` since fields returns `epoch_millis` as a string instead of as a number. 
* Uses lodash safer set to reduce changes of prototype pollution

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

### Risk Matrix


| Risk                      | Probability | Severity | Mitigation/Notes        |
|---------------------------|-------------|----------|-------------------------|
| Prototype pollution | Low | High | Used lodash safer set |
| Users which have existing rules that work, upgrade and now we do not generate signals due to bad merging of fields and _source | Mid | High | We use the safer strategy method, `merge_missing_fields_with_source `, that is lighter weight to start with. We might add a follow up PR which enables a key in Kibana to turn off merging of fields with source. We added extensive unit tests and e2e tests. However, unexpected unknowns and behaviors from runtime fields and fields API such as geo-points looking like nested fields or `epoch_milliseconds` being a string value or runtime fields allowing invalid values were uncovered and tests and utilities around that have been added which makes this PR risky |
| Found a bug with using fields and EQL which caused EQL rules to not run. | Low | High | Implemented workaround for tests to pass and created an Elastic ticket and communicated the bug to EQL developers. |
2021-06-28 18:11:10 -06:00
Spencer 7442a99168
[dev_docs] add tutorial for setting up a development env (#103566)
Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 19:44:29 -04:00
Ece Özalp 1b5cc2a7bc
[Security Solution] Disables loadPrebuiltRulesAndTemplatesButton if loading is in progress (#103568) 2021-06-28 19:43:38 -04:00
Bhavya RM bc097856e6
Unskip the reporting screenshots.ts by fixing unable to update UI settings error. (#103184) 2021-06-28 19:33:35 -04:00
Scotty Bollinger 6085f90e2d
[Workplace Search] Port 4 PRs from ent-search to kibana (#103547)
* Poprt #3567 to Kibana

https://github.com/elastic/ent-search/pull/3567

* Poer #3582 to Kibana

https://github.com/elastic/ent-search/pull/3582

Also adds missing i18n

* Port #3634 to Kibana

https://github.com/elastic/ent-search/pull/3634

* Port #3758 to Kibana

* Rename var
2021-06-28 19:20:12 -04:00
Constance 6feea1a506
[Enterprise Search] Distinguish between error connecting vs. 5xx responses from Enterprise Search in UI (#103555)
* Update Enterprise Search request handler to send back an error connecting header

- vs only distinguishing error connecting issues by 502 status

+ clarify comment where this.handleConnectionError is called - for the most part, auth issues should already be caught by 401s in logic above

* Update HttpLogic to set errorConnecting state based on header

+ update tests etc to match read-only-mode state

* [Tech debt] Gracefully handle invalid HTTP responses

I've noticed this error a few times after Kibana gets shut down (http.response is undefined) so figured I would catch it here

* Fix missing try/catch/flashAPIErrors on engines overview

- This is the only http call I found missing a try/catch across our codebase, so we should be set for all views correctly flashing an API error that receive a 5xx response from ent-search

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 18:56:03 -04:00
Jason Stoltzfus 068aef82bc
[App Search] Remove analytics tracking from the entire dashboard (#103534) 2021-06-28 18:45:48 -04:00
James Rucker b6fb390ea9
[Workplace Search] OAuth flows for Custom Search and Default Search (#101996)
* Add OAuth authorize endpoint support for custom search experiences

* Add support for default search experience authentication

Co-authored-by: scottybollinger <scotty.bollinger@elastic.co>
2021-06-28 18:27:49 -04:00
Nathan Reese bf6be219e8
[Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source (#103373)
* [Maps] deprecate 'map.regionmap' kibana config and 'Configured GeoJSON' source

* clean up message

* revert change to KibanaRegionmapSource.getGeoJsonWithMeta

* tslint

* doc updates

* clean up

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 16:27:41 -06:00
Joe Portner 196531502f
Sharing saved objects phase 3.5 (#100424) 2021-06-28 18:06:54 -04:00
Zacqary Adam Xeper 899ee5e0de
[Fleet] Add multi field support to preconfiguration API (#103347)
* [Fleet] Add multi field support to preconfiguration API

* Loosen preconfig value schema
2021-06-28 16:34:20 -05:00
Spencer 407b96e021
[eslint/module-migration] add support for re-export defs and test rule (#102840)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 14:28:10 -07:00
Constance d655c05ef0
[Enterprise Search] Add beta notification (#103535)
* Set up new BetaNotification component

* Update shared page template to append new beta notification item to side nav

NOTE: I'm mutating the array because:
- returning a new instance leads to a lot of really annoying type errors
- the side nav's we're getting are entirely static with predictable items & and always come from us anyway
- this is eventually going to get removed, and I'm optimizing for easy-to-remove code

* Add beta notification to error connecting state

- to help users/SDH cases where users cannot connect at all

* Fix type error

- sideNav itself can be undefined but not `sideNav.items`
2021-06-28 17:12:55 -04:00
Tiago Costa f3a5ff2b98
skip flaky suite (#100968) 2021-06-28 20:56:05 +01:00
Kyle Pollich 4e20645fee
Allow for versionless integration details urls (#103484)
Default to either the installed version of an integration, or the latest
available version based on installation status when a version is not
included in the integration details URL.

Closes #93393
2021-06-28 15:53:19 -04:00
Tiago Costa 906b4fcc29
skip flaky suite (#103538) 2021-06-28 20:48:32 +01:00
Vadim Dalecky 82e32faf1a
Locator docs (#103129)
* feat: 🎸 add locator_examples plugin

* feat: 🎸 add example app in locator_examples

* feat: 🎸 add locator_explorer plugin

* chore: 🤖 remove url_generaotrs_* example plugins

* docs: ✏️ update share plugin readme

* docs: ✏️ add locators readme

* docs: ✏️ update docs link in example plugin

* docs: ✏️ update navigation docs

* fix: 🐛 make P extend SerializableState

* test: 💍 update test mocks

* fix: 🐛 use correct type in ingest pipeline locator

* test: 💍 add missing methods in mock

* test: 💍 update test mocks

* chore: 🤖 update plugin list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 21:44:11 +02:00
Steph Milovic 64df69890d
[RAC] [Cases] Push to 3rd party UI updates (#103418) 2021-06-28 13:31:48 -06:00
Melissa Alvarez 8a57c9dad5
[ML] Anomaly Detection: Visualize delayed - data Part 3 (#103150)
* move content from modal to flyout with message table below chart

* update file name from modal to flyout

* update messages endpoint for range to use with chart range

* add show in chart action for messages table

* add job messages title and make flyout smaller
2021-06-28 15:13:20 -04:00
Luke Elmers 928c4b8353
Convert image names to snake_case in RFC 0020. (#103536) 2021-06-28 14:00:26 -05:00
Yuliia Naumenko 73e8871be0
[Alerting][Docs] Support enablement documentation. (#101457)
* [Alerting][Docs] Support enablement documentation.

* additional docs

* fixed links

* Apply suggestions from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* fixed common issues

* Apply suggestions from code review

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* fixed due to comments

* fixed TM health api page

* fixed TM health api page 2

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed due to the comments

* fixed due to the comments

* fixed experimental flag

* fixed due to the comments

* Apply suggestions from code review

Co-authored-by: ymao1 <ying.mao@elastic.co>

* Update docs/user/alerting/alerting-troubleshooting.asciidoc

Co-authored-by: ymao1 <ying.mao@elastic.co>

* fixed due to the comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: ymao1 <ying.mao@elastic.co>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2021-06-28 11:57:17 -07:00
Byron Hulcher 043a2e2fe8
[App Search] New Precision Slider for Relevance Tuning (#103015)
* Precision is now a required param for search settings

* Made RelevanceTuningLogic aware of precision param

* New PrecisionSlider component

* Add PrecisionSlider to RelevanceTuning

* Fix types in test

* Fix imports for PrecisionSlider

* Slight panel and text adjustments.

* Comment out docs link

* Add commented out test for docs

* Can we just all agree not to talk about this commit

* Restore docs link

* Fix docs link again

* Clean-up step description logic

* Test for documentation link

* Moving the spacer to align titles.

* Missing test for updatePrecision

* Fix CSS for step description

* Remove containing EuiPanel

* Improve screen reader experience

Co-authored-by: Davey Holler <daveyholler@hey.com>
2021-06-28 14:50:32 -04:00
Wylie Conlon cfd836014d
[Vega] Allow faceted Vega-Lite charts to take correct size (#103352)
* [Vega] Allow faceted Vega-Lite charts to take correct size

* Add unit test

* Update autosize docs

* Add warning when autosize=none

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 14:41:06 -04:00
Jonathan Budzenski 3f0197e323 Revert "[Enterprise Search] Add beta notification (#103429)"
This reverts commit 60d1ef9f92.
2021-06-28 13:35:10 -05:00
Kevin Logan 73919aa766
[Security Solution] Add Windows and macOs option to dropdown for creating Exceptions from scratch (#103404) 2021-06-28 14:23:27 -04:00
Pierre Gayvallet 62e79ffaae
[RFC] Node.js clustering in Kibana (#94057)
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2021-06-28 12:22:49 -06:00
Constance d1c3183ca7
Update jest.sh file to strip leading './' dir (#103507) 2021-06-28 14:21:54 -04:00
Poff Poffenberger 9c2605398f
[Canvas] Improvements to datasource expressions including SQL parameter support and array leniency (#99549)
* Remove es sql strategy from behind Labs project, remove legacy essql code, remove last spot of legacy elasticsearch client from canvas

* clean up test

* fix es field test

* remove comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 13:19:22 -05:00
Dario Gieselaar b51af01adc
[APM] Support records in strict_keys_rt (#103391)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 20:03:30 +02:00
Dario Gieselaar 0f9b715dff
[APM] Invert tint fraction after polished upgrade (#103439)
Closes #103061. We use polished.tint() in several places to have a subdued highlight for an element. With the polished upgrade to 3.x from several weeks ago came a bug fix for tint() that applied the tint fraction in a different way. The fix for us to invert those fractions (eg 0.1 becomes 0.9).
2021-06-28 20:02:44 +02:00
Dmitry Shevchenko 706298d2bb
Fix 404 error on deleted rule alert view (#103491) 2021-06-28 19:58:10 +02:00
Constance 60d1ef9f92
[Enterprise Search] Add beta notification (#103429)
* Set up new BetaNotification component

* Update shared page template to append new beta notification item to side nav

NOTE: I'm mutating the array because:
- returning a new instance leads to a lot of really annoying type errors
- the side nav's we're getting are entirely static with predictable items & and always come from us anyway
- this is eventually going to get removed, and I'm optimizing for easy-to-remove code

* Add beta notification to error connecting state

- to help users/SDH cases where users cannot connect at all
2021-06-28 10:55:53 -07:00
Nathan L Smith ca42cf9269
Add @storybook/testing-react (#103004) 2021-06-28 12:34:43 -05:00
Spencer 99d3f8b768
[kbn/optimizer] fix optimizerCache creation (#103190)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 13:10:36 -04:00
Alison Goryachev 6b9c66ad24
[ILM] Update API integration test (#103495) 2021-06-28 13:05:37 -04:00
Ece Özalp 5f2392f87d
[CTI] Adds Threat Intel dashboard links to Overview page (#100423) 2021-06-28 13:02:18 -04:00
Larry Gregory af38aca3fd
Role Management: improve editing experience for DLS queries (#99977)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-28 12:55:55 -04:00
Luke Elmers d2690d8ac8
[migrations v2] Integration test for multi-node cluster. (#100957) 2021-06-28 12:49:38 -04:00
Nathan L Smith 6a2b968767
Observability side navigation for cases and alerts (#102556) 2021-06-28 11:48:32 -05:00
Greg Thompson bd32299c13
Upgrade EUI to v34.5.1 (#103297)
* eui to 34.5.0

* snapshot updates

* Fix some page layouts

* eui to 34.5.1

Co-authored-by: cchaos <caroline.horn@elastic.co>
2021-06-28 11:31:23 -05:00