Commit graph

43099 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
Tiago Costa 9129887bb7
chore(NA): moving @kbn/monaco into bazel (#100709)
* chore(NA): moving @kbn/monaco into bazel

* chore(NA): update register globals definitions

* chore(NA): remove build script

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 18:55:28 +01: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
Devon Thomson b1e664ca40
[TSVB] By Value Migrations for 7.13 (#100746)
* Created common TSVB migrations. Registered them in serverside embeddable factory so that by value panels receive them

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2021-05-27 13:06:57 -04:00
Anton Dosov 1ceecd3958
[Index patterns] Default index pattern REST API (#100691) 2021-05-27 18:02:25 +02: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
Thomas Neirynck c298efe610
[Maps] Add package to codeowners (#100786) 2021-05-27 11:25:28 -04: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
Stratoula Kalafateli 7cfa0d2b06
[TSVB] Support triggers only for timeseries chart (#100323)
* [TSVB] Support triggers only for timeseries chart

* fix the type

* Fix type falure

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-27 16:18:15 +03: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
Spencer 77452e686b
[ftr] migrate "comboBox" service to FtrService class (#100592)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-27 14:16:02 +03: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
ymao1 aa32903440
[Alerting] Link to action config settings from connector docs (#100358)
* wip

* Adding section about connector networking config to all connectors

* Updating wording

* Changing header size

* Updating links

* Apply suggestions from code review

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

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 20:57:40 -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
Spencer f3c846cc4f
[ftr] migrate AppsMenuService to FtrService class (#100588)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-26 14:39:10 -07:00
Joe Portner b6d595268e
Bump dependencies (#100724) 2021-05-26 17:10:55 -04:00
Spencer af59f68e8b
[ftr] migrate "flyout" and "inspector" services to FtrService class (#100602)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 16:55:04 -04: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
Spencer dbd0ce761a
[ftr] migrate "toasts" service to FtrService class (#100613)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 21:41:05 +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
Spencer 7270c3bf40
[ftr] migrate management services to FtrService class (#100521)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 15:10:14 -04:00
Spencer c166dae31e
[ftr] migrate visualizations service to FtrService classes (#100522)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 15:01:31 -04:00
Spencer e682b55c87
[ftr] migrate dashboard services to FtrService class (#100519)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 14:40:02 -04:00
spalger 58f45eeeb3 include 7.13 as a possible base branch of renovate prs 2021-05-26 11:25:25 -07:00
spalger 04a3620ec9 enable es client renovate prs for 7.13 (#100645) 2021-05-26 11:24:49 -07:00
Jonathan Budzenski 507da3ee8b
[docker] Set server.shutdownTimeout to match default docker stop timeout (#100494) 2021-05-26 14:03:21 -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
Anton Dosov c5f8aeeb43
[Docs] Index patterns REST API docs (#100549) 2021-05-26 18:33:23 +02:00
Ignacio Rivas ae63fb1c17
[Ingest pipelines] add support for fingerprint processor (#100541) 2021-05-26 18:29:05 +02:00
Mikhail Shustov 7c7aba9b61
ping Core team when renovate bot bumps es client version (#100662)
* ping Core team on es client version upgrade

* use @elastic/kibana-core

* Revert "use @elastic/kibana-core"

This reverts commit fc8ac972a3.
2021-05-26 12:04:35 -04:00
Thomas Neirynck c5aa39835d
[Maps] Add draw wizard (#100278) 2021-05-26 11:21:38 -04:00
Lisa Cawley 639df23aa4
Use documentation link service for index pattern field editor (#100609) 2021-05-26 08:20:27 -07: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
Spencer 48d8c0098e
[ftr] migrate screenshots and snapshots services to FtrService class (#100514)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 10:28:05 -04: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
Alison Goryachev 78a7d896e3
update breaking changes template to incorporate ES deprecations (#100621) 2021-05-26 10:19:12 -04:00
Joe Reuter e7bc8831c2
improve default time ranges (#100536) 2021-05-26 15:17:03 +02:00
Stratoula Kalafateli 638ab8247b
[Gauge] Fixes wrong translations on ranges less than symbol (#100535) 2021-05-26 16:02:28 +03:00
Spencer 6d48a50c2a
[ftr] migrate "globalNav" service to FtrService class (#100604)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 14:18:13 +02:00
Spencer 2d6ee26223
[ftr] migrate "testSubjects" to FtrService class (#100512)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-05-26 06:48:41 -04:00