Commit graph

43996 commits

Author SHA1 Message Date
Alejandro Fernández Gómez 16ae487a5f
[Fleet] Warn when trying to unenroll agents with fleet server (#103671) 2021-06-29 12:16:03 -04:00
Oliver Gupte bfd801078f
[APM] Migrate to data streams - Fleet on Cloud (#102682)
* [APM] Adds migration to fleet-managed APM server in APM UI Settings (#100657)

* adds useStrictParams option to apm server routes to allow unknown record type in param.bopy

* Adds checks for required roles, policies, and config before allowing user to initiate migration

* refactored and cleaned up server-side code

* i18n and link to Fleet

* fixes linting issues and unit tests

* updates the apm package policy to 0.3.0 and adds some missing config mappings

* PR feedback

* Handles case where the cloud policy doesn't exist

* Reverts the addition of the useStrictParams option since strictKeysRt now supports records

* fixes default input var values and uses correct published package version

* displays reasons the switch to data streams is disabled

* Store apm-server schema with the internal saved objects client
2021-06-29 12:03:54 -04:00
Annalisa Valente 06eb881781
[Uptime][User Experience] Updating labels in sidenav (#103336)
* [Uptime][User Experience] Updating labels in sidenav

* Updating translations script

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 17:00:43 +01:00
Pete Hampton 096ee92f3b
Remove <7.14 EP Metrics from Security Solution usage collector (#103632)
* Remove <7.14 EP Metrics from Security Solution usage collector.

* Update telemetry schema.

* Fix reworked method signature.
2021-06-29 16:53:11 +01:00
Jonathan Buttner cdfc90ca30
Removing the title edit icon for read only (#103540)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 11:48:11 -04:00
Aurélien FOUCRET f1719af2d6
Fix crawler URL in the landing page. (#103479) 2021-06-29 08:46:43 -07:00
Ester Martí Vilaseca 46402538d2
[Monitoring] Enable out of the box alerts modal (#101565)
* Remove api call to create alerts

* Add enable alerts modal

* Update modal title

* Add simple alerts dropdown

* change alerts modal design

* refactor alerts modal provider

* Add alerts dropdown

* Show toast after alert creation and add error handling

* Do not show alerts modal if alerts already exist

* Fix stack monitoring test

* Fix more stack monitoring tests and types

* Fix tests after merge

* Attempt to fix stack monitoring tests

* remove console.log

* Change text

* Remove commented comment

* Update docs for stack monitoring alerts

* Fix docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 17:35:37 +02:00
Alison Goryachev e387d3d98f
[Snapshot + Restore] Set snapshots response size limit (#103331) 2021-06-29 11:32:41 -04:00
Angela Chuang 2f4b9f5916
revert cypress (#103658) 2021-06-29 11:24:30 -04:00
Alexey Antonov 0ba4153d4b
[TSVB] fix wrong labels, for values that are implicitly cast to false (#103631)
* [TSVB] fix wrong labels, for values that are implicitly cast to false

* getMeaningfulValueOrEmpty  -> getValueOrEmpty

* fix CI
2021-06-29 18:14:48 +03:00
Pablo Machado 6ee79558ab
[Security Solution][Detections] Fix Investigation guide format issues (#101609)
* Fix 'Detection' / 'Investigation Guide' UI broken when it contains long words

* Fix investigation guide is not formatted under Alert details flyout

* Add LineClamp to investigation guide field
* It enhances LineClamp to support a react node instead of only text

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 11:00:30 -04:00
Jonathan Budzenski 24661fe208 Revert "[build] Remove OSS builds (#100577)"
This reverts commit b2d76a6cd3.
2021-06-29 09:51:11 -05:00
Vadim Yakhin 51767e7cb9
Use the user-provided source name in SourceInfoCard (#103542) 2021-06-29 10:39:04 -04:00
gchaps a416e81b49
[DOCS] Fixes formatting in settings doc (#103519) 2021-06-29 07:38:50 -07:00
Dmitry Tomashevich 6c3019dfe2
[Discover] Replace doc viewer table with EuiInMemoryTable (#102149)
* [Discover] replace legacy table with euiInMemoryTable

* [Discover] update styles, add badge

* fix font in badge and adjust line height

* add tooltip

* [Discover] update unit tests, return actions column to left side

* [Discover] update field name test snapshot

* [Discover] update wording

* [Discover] handle pagination, return formatting value styles

* [Discover] fix failing stylelint error

* [Discover] return responsive prop, update classes

* [Discover] update test and meet formatting rules

* improve table view on medium

* remove extra file

* [Discover] fix unit test

* [Discover] align top vertically field name and action cells, disable table responsive design

* [Discover] adjust styles for cross browser compatibility

* [Discover] remove pagination optimize styles, update test

* [Discover] fix eslint

* [Discover] clean up styles

* [Discover] fix single doc view

* [Discover] add check lack of multifieldBadge

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 17:36:04 +03:00
Jonathan Budzenski b2d76a6cd3
[build] Remove OSS builds (#100577)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 09:21:58 -05:00
Esteban Beltran a2f9e94fc0
[Security Solution] Remove extra spaces below TakeActionDropdown alert flyout (#103618) 2021-06-29 16:03:29 +02:00
Tiago Costa 75fa47cdcf
chore(NA): moving @kbn/test-subj-selector into bazel (#103562)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 14:59:38 +01:00
David Sánchez 480ccd5c98
[Security solution][Endpoint] Endpoint list columns are too compressed after new side bar (#103487)
* Adjusts columns width after adding new side nav bar

* Resize columns width
2021-06-29 15:48:18 +02:00
Pete Harverson 0f79872219
[ML] Sets max height and preserve whitespace in categorization wizard examples (#103637)
* [ML] Sets max height and preserve whitespace in categorization wizard examples

* [ML] Edit following review
2021-06-29 14:36:41 +01:00
Sergi Massaneda 85709925cc
[Security Solutions] Side Navigation phase 2 (#103275)
* [SecuritySolutions] [Navigation] Prepare new routing and migrate overview (#101733)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* [Security Solution][Navigation] Migrate Security Solutions 'explore' tab group to deep link navigation (#102306)

* Update navigateToApp and getUrlForApp to provide the deepLinkId
* Update Hosts and Network routes to start from /hosts and /network
* Add Hosts and Network to side nav menu under "Explore" menu group
* Delete Hosts and Network old menu code
* Fix broken tests

* [SecuritySolution] Add detections subplugin to deeplink (#101791)

* prepare new routing and migrate overview

* init nav deeplink

* split detections into rules and alerts

* init exception link

* init detections

* link to rules creation page

* link to rules creation page

* rename detections to alerts

* fix unit tests

* fix rules creation page

* remove console

* fix lint error

* fix unit tests

* fix unit tests

* isolating rules and exceptions page

* replace history push with navigateToApp

* fix unit test

* temporary fix for createCoreStartMock

* update cypress

* skip failing cypress

* skip failing cypress

Co-authored-by: semd <sergi.massaneda@elastic.co>

* Migrate "Investigate" tab group to new side navigation (#102705)

* Migrate "Investigate" tab group to new side navigation

It includes:
* Timelines
* Cases

* Quick fix useFormatUrl and HeaderPage navigation

* [Security Solutions] Management navigation (#102685)

* prepare new routing and migrate overview

* test fix and todo comments identified

* telemetry using app views

* navigation groups implemented

* cleaning

* export subplugin routes as route props array

* breadcrumbs changes and sidenav generation improvements

* jest tests for breadcrumbs and navigation changes

* retrocompatibility for sections that are not yet migrated to deepLinks

* management deepLinks and plugin refactoring

* home navigation changes

* management navigation migrated to deeplinks

* jest tests fixed

* header page back link improved and tests fixed

* type errors fixes

* improve home navigation encapsulation

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Fix type checking

* export header page

* fix padding

* add redirect routes

* unskip detection cypress

* fix i18n

* fix create your own rules btn

* fix cancel button on rules creation page

* test fixes

* fix breadcrumbs for rules pages

* unit test fixes

* additional fixes

* [Security Solutions] Navigation usage tracker and general changes (#103271)

* [Security Solutions] use of currentAppId$ migrated. and some small fixes

* unused constants removed

* remove unused constant

* test fix and types

* fix cypress

* fix cypress tests

* Fix case navTab permission and tests

* Revert 'timeline.isOpen' breadcrumb code that was deleted during merge

* Fix useInsertTimeline test by removing '/'

* change global navigation visible deeplinks

* fix /admininstration top level redirect to

* fix global search icon, nav order and overview hosts link

* update start a new case link

* fix rules link in exception list table

* unskip cypress tests

* update rules link

* fix full screen timeline

* fixing broken links and administration telemetry split

* remove unused comments

* remove timeline z-index and cleanup global header component

* some minor fixes

* add unit tests for detections breadcrumbs

* remove case to  global/search nav when cases is none

* rename test scenario

* fix side_panel flyout

* fix cases use cases between search/gobal nav

* timeline snapshot regenerated and cypres test fixed

* rollback management tracking split as it causes unexpected errors on the telemetry component

Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-06-29 15:00:05 +02:00
Cauê Marcondes 3b5bd02347
[APM] Fleet: Add secret_token to agent instructions in legacy Getting Started guide (#102669)
* Register tutorial on APM plugin

* using files from apm

* removing tutorial from apm_oss

* removing export

* fixing i18n

* adding fleet section

* adding fleet information on APM tutorial

* adding fleet typing

* fixing i18n

* adding fleet information on APM tutorial

* checks apm fleet integration when pushing button

* adding fleet information on APM tutorial

* refactoring

* registering status check callback

* addin custom component registration function

* fixing TS issue

* addressing PR comments

* fixing tests

* adding i18n

* fixing issues

* adding environment credencials

* refactoring

* adjusting size

* adding unit test

* adding unit test

* refactoring

* addressing PR comments

* refactoring eui component

* adding unit test

* fixing TS issue

* fixing TS issue

* adding help text

* renaming

* moving tutorial to a common directory

* moving files

* updating apm int version

* adding storybook

* adding storybook

* refactoring

* removing commented code

* fixing unit tests

* addressing PR comments

* fixing lint errors

* changing to url

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 08:55:30 -04:00
Jason Stoltzfus af62b05e3a
Dont record analytics when showing curations (#103558) 2021-06-29 08:24:51 -04:00
Shahzad 5aa8305279
[Exploratory vie] Added synthetics metrics (#103482) 2021-06-29 14:14:18 +02:00
Justin Kambic 0c8d5e8f89
[Synthetics] Support synthetics dedupe strategy in Uptime app (#101678)
* Add new runtime types for parsing on client/server.

* Add more runtime types.

* Remove dead code.

* Mark parameter as unused.

* Improve typing for failed journey request function.

* Add new API functions, improve typing in a few others.

* Modify API calls to work with new screenshot_ref data.

* Fix untested refactor error.

* Add required fields to runtime type.

* Update typing in failed steps component.

* Adapt client to work with old screenshots as well as new screenshot_ref.

* Refactor composite code to reusable hook.

* Implement screenshot blocks endpoint.

* Define runtime types for full-size screenshots.

* Delete dedicated screenshot and ref queries.

* Optimize screenshot endpoint by combining queries.

* Handle parsing error.

* Clean up screenshot/ref typings.

* Remove dead types. DRY a type out.

* Simplify types.

* Improve typing in step screenshot components.

* Prefer PNG to JPG for canvas composite op.

* Simplify and clean up some code.

* Remove reliance on `Ping` type, clean up types.

* Add a comment.

* Add a comment.

* Fix typing for `FailedStep` component.

* Standardize loading spinner sizes.

* Add comments to composite code.

* Remove unnecessary optional chaining.

* Reformat error string.

* Remove unneeded key from request return object.

* Add a comment to a return object explaining very large cache value.

* Make type annotation more accurate.

* Resolve some type and test errors.

* Clean up remaining type errors.

* Move type definitions to simplify imports.

* Simplify `PingTimestamp` interface.

* Refactor failing unit test to use RTL and actually test things.

* Add tests for new helper functions.

* Add a comment.

* Test `PingTimestamp` for screenshot ref data.

* Test `StepImageCaption` for ref data.

* Improve typing for step list column definitions.

* Harden a test.

* Extract code to avoid repeated declarations.

* Create centralized mock for `useCompositeImage`.

* Add test for ref to `StepScreenshotDisplay`.

* Add tests for `getJourneyDetails`.

* Extract search results wrapper to helper lib.

* Add tests for `getJourneyFailedSteps`.

* Add support for aggs to result helper wrapper.

* Write tests for `getJourneyScreenshot` and simplify type checking.

* Write tests for `getJourneyScreenshotBlocks`.

* Simplify prop types for `FailedStep`.

* Remove unused type.

* Fix regression in step navigating for new style screenshots.

* Implement PR feedback.

* Implement PR feedback.

* Implement PR feedback.

* Reduce limit of screenshot block queries from 10k to 1k.

* Remove redundant field selection from ES query.

* Implement PR feedback.

* Fix regression that caused "Last successful step" to not show an image.

* Delete unused props from `Ping` runtime type.

* More precise naming.

* Naming improvements. Add `useCallback` to prevent callback re-declaration.

* Prefer explicit props to `{...spread}` syntax.

* Remove redundant type checking.

* Delete obsolete unit tests.

* Fix a regression.

* Add effect to `useEffect`.
2021-06-29 08:08:52 -04:00
Yulia Čech 39ba747728
[ILM] Add missing a11y tests (#102887)
* [ILM] Added missing a11y tests

* Fixed ILM functional tests, added after tests cleanup

* Added review suggestions

* Fixed section header renaming

* Fixed section header renaming

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 13:01:36 +02:00
Aaron Caldwell 436ddef784
[Maps] Only allow feature deletion when in delete-mode 2021-06-29 12:43:58 +02:00
Ahmad Bamieh 6e308a2a1e
[Migrations V2] Unskip migration_7.7.2_xpack_100k (#103435) 2021-06-29 13:28:40 +03:00
James Gowdy 2e00e9c11b
[ML] Rare anomaly detection job wizard (#100390)
* [ML] Rare anomaly detection job wizard

* fixing fields selection

* small improvements

* adding event rate chart to summary step

* [ML] Changes UI text for rare wizard.

* improving detector summary

* fixing translations

* removing comments

* fixing field selection

* fixing advanced wizard

* updating detector text

* fixing bucketspan estimator

* bug fixes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2021-06-29 11:02:17 +01:00
James Gowdy 824463ace5
[ML] Fixing categorization tokens for multi-line messages (#103007)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 10:28:51 +01:00
Pete Hampton b774e37ea1
Update security telemetry allowlist. (#103471) 2021-06-29 10:22:11 +01:00
Shahzad 409a0f21cc
[Exploratory view] use percentages in distribution chart (#103080) 2021-06-29 11:21:07 +02:00
Marco Liberati 5c87807da1
[Lens] Remove reference tooltip in Formula panel when the popup is open (#103283)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-29 10:47:45 +02:00
Joe Reuter ce2fabe420
add formula telemetry (#103451) 2021-06-29 10:31:41 +02:00
Joe Reuter 4f63abc1e5
[Lens] Do not persist time zone (#102735) 2021-06-29 10:19:50 +02:00
Esteban Beltran ac17ab1436
Add signal and abort controller to agent metadata and TakeAction button (#103217) 2021-06-29 08:58:37 +02:00
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