Commit graph

15978 commits

Author SHA1 Message Date
ymao1 71379b755a
[Alerting] Split alerting feature privilege between rules and alerts and handle subfeature privilege specification (#100127)
* WIP - creating alerting authorization client factory and exposing authorization client on plugin start contract

* Updating alerting feature privilege builder to handle different alerting types

* Passing in alerting authorization type to AlertingActions class string builder

* Passing in authorization type in each function call

* Passing in exempt consumer ids. Adding authorization type to audit logger

* Changing alertType to ruleType

* Changing alertType to ruleType

* Updating unit tests

* Updating unit tests

* Passing field names into authorization query builder. Adding kql/es dsl option

* Converting to es query if requested

* Fixing functional tests

* Removing ability to specify feature privilege name in constructor

* Fixing some types and tests

* Consolidating alerting authorization kuery filter options

* Cleanup and tests

* Cleanup and tests

* Initial commit with changes needed for subfeature privilege

* Throwing error when AlertingAuthorizationClientFactory is not defined

* Renaming authorizationType to entity

* Renaming AlertsAuthorization to AlertingAuthorization

* Fixing unit tests

* Changing schema of alerting feature privilege

* Changing schema of alerting feature privilege

* Updating feature privilege iterator

* Updating feature privilege builder

* Fixing types check

* Updating privilege string terminology

* Updating privilege string terminology

* Wip

* Fixing unit tests

* Unit tests

* Updating README and removing stack subfeature privilege changes

* Fixing README

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 14:59:02 -04:00
Jonathan Budzenski f0e11bcd1b
Automated package testing (#88900)
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 13:37:43 -05:00
Nathan Reese 8420605352
[Maps] timeslider (#99661)
* [Maps timeslider]

* just arrowLeft and arrowRight icons

* tslint

* color icon when timeslider is open, auto select first section on open

* increase width to prevent timeslider from changing sizes during interaction

* fix filters disappearing when timeslice advances

* use shorter date format for ticks

* review feedback

* do not show timeslider button when map is embedded

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 12:32:13 -06:00
Jonathan Budzenski 5dde07ff6f Revert "[Security solution][Endpoint] Add Host Isolation related data to the endpoint generator and test data loader (#100727)"
This reverts commit 57f59bd15d.
2021-05-27 12:21:48 -05:00
Paul Tavares 57f59bd15d
[Security solution][Endpoint] Add Host Isolation related data to the endpoint generator and test data loader (#100727)
* Generate random isolation values for endpoint metadata
* Generator for Fleet Actions
* Added creation of actions to the index test data loader
2021-05-27 11:55:50 -04:00
Georgii Gorbachev 7fd6539dca
[RAC] Rule monitoring: Event Log for Rule Registry (#98353)
**Needed for:** rule execution log for Security https://github.com/elastic/kibana/pull/94143
**Related to:**

- alerts-as-data: https://github.com/elastic/kibana/issues/93728, https://github.com/elastic/kibana/issues/93729, https://github.com/elastic/kibana/issues/93730
- RFC for index naming https://github.com/elastic/kibana/issues/98912

## Summary

This PR adds a mechanism for writing to / reading from / bootstrapping indices for RAC project into the `rule_registry` plugin. Particularly, indices for alerts-as-data and rule execution events. This implementation is similar to existing implementations like `event_log` plugin (see https://github.com/elastic/kibana/pull/98353#issuecomment-833045980 for historical perspective), but we're going to converge all of them into 1 or 2 implementations. At least we should have a single one in `rule_registry` itself.

In this PR I tried to incorporate most of the feedback received in the RFC (https://github.com/elastic/kibana/issues/98912), but if you notice I missed/forgot something, please let me know in the comments.

Done in this PR:

- [x] Schema-agnostic APIs for working with Elasticsearch.
- [x] Schema-aware log definition and bootstrapping API (creating hierarchical logs).
- [x] Schema-aware write API (logging events).
- [x] Schema-aware read API (searching logs, filtering, sorting, pagination, aggregation).
- [x] Support for Kibana spaces, space-aware index bootstrapping (either at rule creation or rule execution time).

As for reviewing this PR, perhaps it might be easier to start with:

- checking description of https://github.com/elastic/kibana/issues/98912
- checking usage examples https://github.com/elastic/kibana/pull/98353/files#diff-c049ff2198cc69bd50a69e92d29e88da7e10b9a152bdaceaf3d41826e712c12b
- checking public api https://github.com/elastic/kibana/pull/98353/files#diff-8e9ef0dbcbc60b1861d492a03865b2ae76a56ec38ada61898c991d3a74bd6268

## Next steps

Next steps towards rule execution log in Security (https://github.com/elastic/kibana/pull/94143):

- define actual schema for rule execution events
- inject instance of rule execution log into Security rule executors and route handlers
- implement actual execution logging in rule executors
- update route handlers to start fetching execution events and metrics from the log instead of custom saved objects

Next steps in the context of RAC and unified implementation:

- converge this implementation with `RuleDataService` implementation
  - implement robust index bootstrapping
  - reconsider using FieldMap as a generic type parameter
  - implement validation for documents being indexed
- cover the final implementation with tests
- write comprehensive docs: update plugin README, add JSDoc comments to all public interfaces
2021-05-27 18:28:19 +03:00
Shahzad 413132008b
[Uptime] Waterfall use different styling for number (#97216)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 17:01:52 +02:00
Felix Stürmer 06d276e060
[Logs UI] Add shared observability page template and navigation (#99380)
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 16:58:15 +02:00
Nathan L Smith 7fc4a1f80f
Add kibana.yml configuration for cases (#100583)
Make it so `xpack.observability.unsafe.alertingExperience.enabled` only shows and hides the Alerts page, and `xpack.observability.unsafe.cases.enabled` show and hides the Cases page.
2021-05-27 09:43:12 -05:00
Anton Dosov 806566c62e
[Index Patterns] Migrate tests to the new es client (#100760) 2021-05-27 15:47:30 +02:00
Candace Park 1c4d338668
[Security Solution][Endpoint][Host Isolation] User can unisolate host from alert details (#100401) 2021-05-27 09:32:32 -04:00
Joe Reuter f6266c431b
[Lens] Improve caching with more stable Elasticsearch requests (#100414) 2021-05-27 15:25:10 +02:00
Patrick Mueller 11b3ab167d
[alerting] add ignore_above to alerts params mappings to handle immense params (#100726)
resolves https://github.com/elastic/kibana/issues/100607

This fixes a problem when very large parameters (over 32K bytes) are saved with
an alert.  Before this fix, an error from elasticsearch would be thrown with
the following message, and a 400 returned from create (and presumably update).

    Document contains at least one immense term in field=\"alert.params\"
    (whose UTF8 encoding is longer than the max length 32766), all of which
    were skipped.

After the fix, alerts with immense params can be saved and executed.

Note that the immense params will not be searchable, since they won't be indexed,
but that seems both unavoidable, and not a severe issue.
2021-05-27 09:17:12 -04:00
Alejandro Fernández Gómez 83e5b6c689
[Fleet] Remove beats management plugin (#99789) 2021-05-27 11:30:15 +02:00
Thomas Neirynck 5da329a809
[Maps] Isolate mapbox-gl types and align downstream package versions. (#100610) 2021-05-26 21:09:38 -04:00
Tim Sullivan 417c06b9a1
[Reporting] Use the deprecations service to advise critical config changes (#100427)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 17:31:55 -07:00
Mikhail Shustov 881d89fba7
remove src/legacy and src/optimizer from configs (#100538)
* cleanup removed dirs

* delete removed folders from other places in the repo

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 22:01:33 +02:00
Justin Kambic b189d05bc3
[Uptime] Move uptime actions to Header Actions Menu (#100298)
* Move uptime actions to Kibana's HeaderActionsMenu.

* Delete a comment.

* Extract ActionMenu content to dedicated component to make testing easier.

* Add tests.

* Use `EuiHeaderLinks` instead of `EuiFlexItem`.

* Clean up tests.

* Prefer `getByRole` for a test.

* Fix copy mistake.

* Fix a test broken by the previous commit.

* Prefer `EuiHeaderSectionItem` over `EuiHeaderSectionLink` to avoid nesting `button`s within `buttons`.

* Reverse "Settings" and "Alerts" menu options to make them uniform with APM.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 15:31:15 -04:00
Jen Huang ba7c0275ca
[Fleet] Support browsing granular integrations (#99866)
* Manual cherry pick of work to support integration tiles and package-level vars

* Fix types

* Remove registry input group typings

* Show integration-specific readme, title, and icon in package details page

* Revert unnecessary changes

* Add package-level `vars` field to package policy SO mappings

* Fix types

* Fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 09:59:09 -07:00
Pete Harverson f77ff2d396
[ML] Adds functional tests for anomaly detection job custom URLs (#100455)
* [ML] Adds functional tests for anomaly detection job custom URLs

* [ML] Remove debug test tag from custom URL tests

* [ML] Update custom URL editor Jest snapshots

* [ML] Clean up in embeddables tests to fix dashboard test

* [ML] Delete test dashboard after test suites complete

* [ML] Edits to custom URL tests following review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 17:48:03 +01:00
Ignacio Rivas ae63fb1c17
[Ingest pipelines] add support for fingerprint processor (#100541) 2021-05-26 18:29:05 +02:00
Thomas Neirynck c5aa39835d
[Maps] Add draw wizard (#100278) 2021-05-26 11:21:38 -04:00
Nathan Reese e49db7127d
[Maps] filter dashboard by map extent (#99860)
* [Maps] filter dashboard by map extent

* clean up

* remove warning from filter pill

* tslint

* API doc updates, i18n fixes, tslint

* only show context menu option in edit mode

* add functional test

* review feedback

* do not use search session when filtering by map bounds

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 08:51:39 -06:00
Sandra Gonzales ce6f923bb4
fix anomaly functional test (#100504)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 10:25:39 -04:00
Stratoula Kalafateli 638ab8247b
[Gauge] Fixes wrong translations on ranges less than symbol (#100535) 2021-05-26 16:02:28 +03:00
Larry Gregory 5d5cc55b3a
Fix spaces test flakyness (#100605) 2021-05-26 06:47:28 -04:00
Ignacio Rivas 93acfb4d43
[Ingest pipelines] add support for ip type in convert processor (#100531)
* add ip option type to convert processor

* remove duped option

* small CR changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 11:36:06 +02:00
Mikhail Shustov f915b6fe73
[telemetry] report config deprecations (#99887)
* return the list of changes config keys during deprecation

* gather changed config keys in the core

* adjust Security plugin deprecations tests

* update docs

* update interface

* update telemetry schema

* update spaces tests

* update tests in other x-pack plugins

* remove testing instruction

* improve tests. get rid of snapshots
2021-05-26 10:57:01 +02:00
Yuliia Naumenko 5ebded2105
[triggersActionsUi] Reduce page load bundle to under 100kB (#97770)
* [triggersActionsUi] Reduce page load bundle to under 100kB

* removed old code

* removed fragment

* changed svg logo to lazy react components

* fixed type checks and translations

* fixed type checks

* fixed type checks

* fixed type checks

* fixed tests

* fixed tests

* fixed iconClass

* fixed due to comments

* added info about new IconType to readme file

* fixed key errors
2021-05-25 19:00:29 -07:00
Nathan Reese b30d96e7f2
[Maps] convert LayerPanel to typescript (#100481)
* [Maps] convert LayerPanel to typescript

* layer_errors

* style panel

* layer_panel component

* rename to EditLayerPanel

* clean up

* fix scss imports for rename

* one more scss path clean up

* fix EditLayerPanel errors
2021-05-25 13:25:18 -06:00
Alison Goryachev a0ddca8b07
[Upgrade Assistant] Address copy feedback (#99632) 2021-05-25 14:14:08 -04:00
Nathan L Smith e61c6660f7
Open/Closed filter for observability alerts page (#99217) 2021-05-25 12:40:14 -05:00
Frank Hassanabad 5dc85c69b7
One liner to expose the EQL query for debugging for users (#100565)
## Summary

Expose the EQL query in the Kibana logs for detections when they are being run when Kibana in debug mode.
2021-05-25 13:35:52 -04:00
Spencer 111e15a054
[ftr] implement FtrService classes and migrate common services (#99546)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 09:25:09 -07:00
Stratoula Kalafateli d8c2594789
[XY] [Lens] Adds opacity slider (#100453)
* [XY] Add opacity slider and dots size slider

* [Lens] Adds fill opacity slider

* Make the new sliders to appear fullwidth

* Change property name and fix unit tests

* Add a comment

* useDebouncedValue hook

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 18:56:29 +03:00
Jean-Louis Leysens 662fe74757
[Reporting] ILM policy for managing reporting indices (#100130)
* wip; added logic for creating ILM policy at start up

* added log when ilm policy is not created

* added test for start function

* updated ilm policy to not delete data

* actually update jest snapshots and remove unused import

* updated the ilm policy, removed the min_age for the hot phase

* update jest snapshot

* removed TODO comment

* debug log -> info log

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 17:02:48 +02:00
Thomas Neirynck 73b6048ba1
[Maps][Vega] Isolate mapbox-gl library into bazel package (#99931) 2021-05-25 09:51:57 -04:00
David Sánchez ca324c63be
Removes event filters feature flag and exposes this feature by default (#100389)
* Removes event filters feature flag and expose this feature by default

* Fixes manifest unit test

* Fixes functional test adding event filter list case

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 15:19:42 +02:00
Sandra Gonzales 60b5c842cd
[Metrics UI] use EuiTooltip to control tooltip component and simplify ConditionalTooltip (#99224)
* use EuiTooltip to control tooltip component

* fix style

* update unit tests

* add functional waffle map tooltip tests

* remove reload() from useEffect

* fix type

* update unit test
2021-05-25 08:51:24 -04:00
Sergi Massaneda 206a64fc4c
[Security Solution] Application register deepLinks instead of meta.searchDeepLinks (#100129)
* refactor meta.searchDeepLinks to deepLinks and remove meta

* remove comments

* obsolete snapshot removed

* documentation updated

* [deepLinks] refactor ml nav ids and translation keys

* flaky test fix attempt [sync with glo]

* default deepLinks navLinkStatus

* api_docs restored

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 14:49:51 +02:00
Frank Hassanabad aa2f5b535d
[Security Solution] Utilizes constants package and deletes duplicate code (#100513)
## Summary

Utilizes constants package and deletes duplicate code

* Renames the `securitysolution-constants` to be `securitysolution-list-constants` to be specific
* Deletes duplicated code found during cleanup
* Moves more tests into the packages found along the way with the duplicated code
* Moves `parseScheduleDates` from `@kbn/securitysolution-io-ts-types` to `@kbn/securitysolution-io-ts-utils`

### 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
2021-05-24 18:38:14 -06:00
Zacqary Adam Xeper 676d40ebbe
[Fleet] Add clear button to search input bars (#100476) 2021-05-24 17:30:18 -05:00
Zacqary Adam Xeper 71acd98082
[Fleet] Add color distinction between offline and inactive agents (#100490) 2021-05-24 17:30:06 -05:00
Zacqary Adam Xeper f95bbb38c9
[Fleet] Fix incomplete agent count message on policy tab (#100497) 2021-05-24 17:29:27 -05:00
Jen Huang cc9c5be022
[Fleet] Pass policy namespace to agent monitoring settings (#100500)
* Pass agent policy namespace to agent monitoring settings

* Adjust copy
2021-05-24 18:02:23 -04:00
ymao1 eb0deac8d0
[Alerting] Update README (#100478)
* Updating readme

* Updating readme

* Fix plugin list docs
2021-05-24 16:24:15 -04:00
Josh Dover c9f7ab3f72
Remove chrome.navLinks.update (#99633) 2021-05-24 13:00:45 -05:00
Quynh Nguyen 9793a8fefb
[ML] Fix missing selected-interval styling for Explorer anomaly charts and mismatched scheduled markers styling (#100272)
* [ML] Fix missing selected-interval sass

* [ML] Only show interval box in explorer page and not in dashboard

* [ML] Remove console

* [ML] Move showSelectedInterval up

* [ML] Update snapshot

* [ML] Update styling of scheduled events to match and to be visible

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-24 11:56:09 -05:00
Pete Hampton bb6c2ef3d0
Add remaining descriptions to security usage telemetry schema. (#100454) 2021-05-24 10:41:19 -06:00
Mikhail Shustov 95e8eed7d1
security solution and lists to TS incremental builds (#100447)
* lists to ts incremental builds

* security_solution to ts incremental

* import ResizeObserver explicitly as it is not declared in dom types
2021-05-24 16:34:29 +02:00