Commit graph

43867 commits

Author SHA1 Message Date
Kibana Machine 923bf4090b
convert ftr runners into TS (#110057) (#110139)
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2021-08-25 18:31:33 -04:00
Kibana Machine bc8bbd9580
Update dependency @elastic/charts to v34.2.1 (master) (#109678) (#110134)
* Update dependency @elastic/charts to v34.2.1


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
2021-08-25 17:57:17 -04:00
Tim Sullivan 5e313f8330
[Reporting] Add SavedReport class (#109568) (#110131)
* [Reporting] Add SavedReport class

* add unit test

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-25 17:49:10 -04:00
spalger 91bf123af0 skip failing suite (#110153)
(cherry picked from commit 562c3cc67c)
2021-08-25 14:46:20 -07:00
Kibana Machine d39268d52d
[Security Solution] Bugfix for disable state of External Alert context menu (#109914) (#110129)
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
2021-08-25 17:16:17 -04:00
Kibana Machine 5280e3523d
Open in dev tools button for request inspector (#109923) (#110123)
Add a "Open in Dev Tools" link to the request inspector.

Allow the dev tools to open data uris that are lz-string encoded (the same method used by TypeScript Playground, which are a lot shorter than a base64 encoded string.)

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-08-25 17:06:29 -04:00
spalger d01f7a7dab skip flaky suite (#106650)
(cherry picked from commit 2849b31d28)
2021-08-25 13:35:35 -07:00
Kibana Machine 15e6d9202c
[RAC][Rule Registry] Implement versioning and backing indices (#109276) (#110126)
**Ticket:** https://github.com/elastic/kibana/issues/109293

🚨 **This PR is critical for Observability 7.15** 🚨

## Summary

This PR fixes the indexing implementation in `rule_registry`. It implements the suggestions for backwards compatibility described in the ticket:

- changes the naming scheme and introduces the concept of "backing indices", so that names of the concrete ("backing") indices != names of their aliases
- adds versioning based on the current Kibana version

TODO:

- [x] Change index naming (implement the concept of backing indices)
- [x] Include Kibana version into the index template metadata
- [x] Include Kibana version into the document fields
- [x] Remove `version` from `IndexOptions` (parameters provided by solutions/plugins when initializing alerts-as-data indices)
- [x] Fix CI

### Checklist

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [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

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2021-08-25 16:27:01 -04:00
CJ Cenizal 7d786c3f41
Provide guidance on how to retrieve current cloudId. (#109935) (#110119) 2021-08-25 16:12:57 -04:00
Brandon Morelli 1177ab422e
docs: remove tabbed widget code (#109944) (#110140) 2021-08-25 16:11:59 -04:00
Kibana Machine 62a1417b59
change windowSize (#110083) (#110121)
Co-authored-by: Marius Dragomir <marius-dr@users.noreply.github.com>
2021-08-25 16:04:22 -04:00
Kibana Machine 53ed133ed0
[Security Solution][Endpoint][Host Isolation] Fixes bug where Isolate Host option is missing from alert details take actions menu (#109991) (#110106)
Co-authored-by: Candace Park <56409205+parkiino@users.noreply.github.com>
2021-08-25 15:32:33 -04:00
Kibana Machine 132a67cd8f
[ML] Fix bytes formatting and default message in the Anomaly detection jobs health rule type (#110069) (#110111)
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-08-25 15:27:57 -04:00
Kibana Machine 0360fc13d0
[Fleet] Do not show upgrade available on latest version of package (#110066) (#110102)
* fix: use package policy ID when checking hasUpgrade

* fix: latest package version broken link

* refactor: use set for collecting unique namespace values

Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
2021-08-25 19:14:17 +00:00
Kibana Machine 807f647b87
Small improvements around Reason field and AlertCountTable draggable fields (#109239) (#109630)
* Make count table field and alert table event renderer undraggable

* Remove tooltip from alert count table

* Remove DefaultDraggable wrapper from reason field

* Fix unit test and remove unused props

I am not 100% sure, but apparently, the test was broken due to a long import chain loop.
I cut the import chain by extracting some constants to a file.

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

Co-authored-by: Pablo Machado <pablo.nevesmachado@elastic.co>
2021-08-25 19:07:19 +00:00
Kaarina Tungseth 0b627d891c
[DOCS] Fixes Get Task Manager health API formatting (#109541) 2021-08-25 13:52:44 -05:00
Corey Robertson 0a7b8cad18
[Canvas] Fix reports embeddables (#93482) (#109952)
* wip

* WIP

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-25 14:42:45 -04:00
Kibana Machine 0897999f91
[Uptime/UX] Fixes page template wrapper (#110058) (#110092)
Co-authored-by: Casper Hübertz <casper@elastic.co>
2021-08-25 18:40:40 +00:00
Kibana Machine 121d28c589
Remove unused deprecated api (#109921) (#110089)
* remove unused deprecated apis

* Update legacy docs

Co-authored-by: Stacey Gammon <gammon@elastic.co>
2021-08-25 14:28:50 -04:00
Kibana Machine 624058b935
[ML] Telemetry for the Anomaly detection jobs health rule type (#110052) (#110086)
* [ML] add mappings for the new rule type

* [ML] add telemetry for enabled health checks

* [ML] update xpack_plugins.json

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-08-25 18:15:40 +00:00
Kibana Machine 0ff10856ac
[Security Solution][Endpoint] Additional Endpoint Activity log tests (#109776) (#110075)
* move activity log paging method close to call api method

refs 417d093a29

* add middleware additional activity log tests

* add a more specific server side test for activity log actions and responses

refs elastic/kibana/pull/101032

* remove obsolete server side audit log index mock method

refs elastic/kibana/pull/101032

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

Co-authored-by: Ashokaditya <am.struktr@gmail.com>
2021-08-25 13:17:29 -04:00
Jonathan Budzenski a36bab718d
[7.x] Bump lmdb-store to 1.6.6 (#109939) (#110078) 2021-08-25 13:11:40 -04:00
Kibana Machine c0badda756
[buildkite] Move some functionality to a shared library (#102228) (#110071)
Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
2021-08-25 16:53:10 +00:00
Kibana Machine 8db2bc1374
[RAC] Fix index names used by RBAC, delete hardcoded map of Kibana features to index names (#109567) (#110068)
**Ticket:** https://github.com/elastic/kibana/issues/102089

🚨 **This PR is critical for Observability 7.15** 🚨

## Summary

This PR introduces changes that fix the usage of alerts-as-data index naming in RBAC. It builds on top of https://github.com/elastic/kibana/pull/109346 and replaces https://github.com/elastic/kibana/pull/108872.

TODO:

- [x] Address https://github.com/elastic/kibana/pull/109346#pullrequestreview-735158370
- [x] Make changes to `AlertsClient.getAuthorizedAlertsIndices()` so it starts using `RuleDataService` to get index names by feature ids.
- [x] Delete the hardcoded `mapConsumerToIndexName` where we had incorrect index names.
- [x] Close https://github.com/elastic/kibana/pull/108872

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2021-08-25 16:50:18 +00:00
Maja Grubic aa7680e3c1
[Discover] Hide multifields from doc table (#109242) (#110064)
* [Discover] Hide multifields from doc table

* Fix failing type check

* Fix eslint

* Fix faulty logic

* Fix linting error

* Add memoization to the function

* Move getFieldsToShow a bit higher up

* Extracting getFieldsToShow logic higher up

* Fix linting error / table logic

* Move fieldsToShow to doc_table_wrapper

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-25 12:38:31 -04:00
Kibana Machine a0fd8e2089
[Actions] Use references in action_task_params saved object (#108964) (#110056)
* Extracting saved object references before saving action_task_params saved object

* Injecting saved object ids from references when reading action_task_param

* Adding migration

* Adding unit test for migrations

* Not differentiating between preconfigured or not

* Adding functional test for migration

* Skip extracting action id if action is preconfigured

* Only migrating action task params for non preconfigured connectors

* Simplifying related saved objects

* Fixing functional test

* Fixing migration

* Javascript is sometimes magical

* Updating functional test

* PR feedback

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

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-08-25 15:51:45 +00:00
Kibana Machine 66ed66ae8b
[ML] Fixing missing final new line character issue (#109274) (#110050)
* [ML] Fixing missing final new line character issue

* adding tests

* tiny refactor

* test fixes based on review

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

Co-authored-by: James Gowdy <jgowdy@elastic.co>
2021-08-25 15:20:32 +00:00
Michael Dokolin 1d6ca80c7e
[Data] Fix CIDR mask to avoid using big integers (#109789) (#110045) 2021-08-25 11:01:24 -04:00
Kibana Machine d4514a50d3
[ML] Fix form layout of the Anomaly jobs health rule type (#110017) (#110040)
* [ML] adjust paddings the flyout form

* [ML] add beta badge

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-08-25 10:54:56 -04:00
Kibana Machine a5a96ab920
[ML] Fix colours in the Anomaly swim lane and Annotations chart (#110001) (#110034)
* [ML] use current theme

* [ML] use current theme in annotations chart

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
2021-08-25 09:51:03 -04:00
Kibana Machine 8ebbac7860
fix empty actions popover button (#110015) (#110031)
Co-authored-by: Sergi Massaneda <sergi.massaneda@elastic.co>
2021-08-25 09:32:09 -04:00
Kibana Machine 229d735fee
[IndexPatterns] Clean up StubIndexPattern (#108555) (#110026)
Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
2021-08-25 08:55:33 -04:00
Kibana Machine 18b31701e3
[APM] update policy editor with additional config values (#109516) (#109975)
* refactoring apm integration sections

* adding agent auth section

* refactoring

* adding some unit tests

* fixing ts issue

* removing unnecessary section

* hide fields

* removing suggestions when combo

* fixing apm migration

* addressing PR comments

* addressing PR changes

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

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2021-08-25 08:52:15 -04:00
Diana Derevyankina f274289504
Chore(TSVB): Replace aggregations lookup with map (#109424) (#110022)
* Chore(TSVB): Replace aggregations lookup with map

* Fix types, update test expected data and remove unused translations

* Correct typo and refactor condition in std_metric

* Fix metric type

* Fix CI and label for Bucket Script

* Update agg_utils.test expected data

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-25 08:23:27 -04:00
Kibana Machine abcf965ac3
Bump apm agent versions (#109877) (#110014)
* bump nodejs agent version

* bump APM RUM agent version

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2021-08-25 07:14:58 -04:00
Jean-Louis Leysens 74b21340df
fix check for security and added jest test (#109429) (#110009) 2021-08-25 07:03:48 -04:00
Kibana Machine 36b923d964
Remove UI actions any types (#109797) (#110011)
* remove any in trigger registry

* improve comments

* remove all anys from ui_actions plugin

* fix formatting suggestions

Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com>
2021-08-25 11:03:39 +00:00
Kibana Machine a4f4a202a5
fix check for security and added jest test (#109429) (#110013)
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
2021-08-25 11:03:16 +00:00
Kibana Machine 4ea7a0cf40
Don't use hash query for agent logs URL state (#109982) (#110004)
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
2021-08-25 06:42:21 -04:00
Kibana Machine c72f1d8acf
[Home] Use unified API to show/hide the Welcome interstitial (#109650) (#110000)
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2021-08-25 06:04:44 -04:00
Kibana Machine 16c7fb7b55
[APM] Separate useUrlParams hooks for APM/Uptime (#109579) (#109997)
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-08-25 05:03:33 -04:00
Kibana Machine e126836429
[RAC] [o11y] add permission in alerts table from kibana privilege/consumer (#109759) (#109989)
* add alert permission in o11y

* review I

* review II

* fix selection all when checkbox disabled

* fix selected on bulk actions

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-08-25 01:54:44 -04:00
Kibana Machine 9a2ce68c9e
[RAC] [TGrid] Use EuiDataGridColumn schemas (for sorting) (#109983) (#109986)
## Summary

Updates the `TGrid` to use `EuiDataGrid` [schemas](https://eui.elastic.co/#/tabular-content/data-grid-schemas-and-popovers/) as suggested by @snide in the following issue: <https://github.com/elastic/kibana/issues/108894>

## Desk testing

1) In the `Security Solution`, navigate to `Security > Rules` and enable multiple detection rules that have different `Risk Score`s

**Expected result**

- The Detection Engine generates alerts (when the rule's criteria is met) that have different risk scores

2) Navigate to the `Security > Alerts` page

**Expected results**

As shown in the screenshot below:

- The alerts table is sorted by `@timestamp` in descending (Z-A) order, "newest first"
- The `@timestamp` field in every row is newer than, or the same time as the row below it
- The alerts table shows a non-zero count of alerts, e.g. `20,600 alerts`

![alerts-table-at-page-load](https://user-images.githubusercontent.com/4459398/130700525-343d51af-7a3a-475c-b3b4-b429bc212adf.png)

_Above: At page load, the alerts table is sorted by `@timestamp` in descending (Z-A) order, "newest first"_

3) Observe the count of alerts shown in the header of the alerts table, e.g. `20,600 alerts`, and then change the global date picker in the KQL bar from `Today` to `Last 1 year`

**Expected results**

- The golbal date picker now reads `Last 1 year`
- The count of the alerts displayed in the alerts table has increased, e.g. from `20,600 alerts` to `118,709 alerts`
- The `@timestamp` field in every row is (still) newer than, or the same time as the row below it

4) Click on the `@timestamp` column, and choose `Sort A-Z` from the popover, to change the sorting to ascending, "oldest first", as shown in the screenshot below:

![click-sort-ascending](https://user-images.githubusercontent.com/4459398/130701250-3f229644-2a78-409e-80ff-f88588562190.png)

_Above: Click `Sort A-Z` to sort ascending, "oldest first"_

**Expected results**

As shown in the screenshot below:

- The alerts table is sorted by `@timestamp` in ascending (A-Z) order, "oldest first"
- The `@timestamp` field in every row is older than, or the same time as the row below it
- `@timestamp` is older than the previously shown value, e.g. `Aug 3` instead of `Aug 24`

![timestamp-ascending-oldest-first](https://user-images.githubusercontent.com/4459398/130702221-cc8cf84f-c044-4574-8a93-b9d35c14c890.png)

_Above: The alerts table is now sorted by `@timestamp` in ascending (A-Z) order, "oldest first"_

5) Click on the `Risk Score` column, and choose `Sort A-Z` from the popover, to add `Risk Score` as a secondary sort in descending (Z-A) "highest first" order, as shown in the screenshot below:

![sort-risk-score](https://user-images.githubusercontent.com/4459398/130702599-e4c0d74a-8775-435b-a263-5b6b278f6dfd.png)

_Above: Click `Sort A-Z` to add `Risk Score` as a secondary sort in descending (Z-A) "highest first" order_

**Expected results**

- The alerts table re-fetches data
- The alerts table shows `2 fields sorted`

6) Hover over the alerts table and click the `Inspect` magnifiing glass icon

**Expected result**

- The `Inspect` modal appaers, as shown in the screenshot below:

![inspect](https://user-images.githubusercontent.com/4459398/130702849-1189f32e-eb03-4d9d-b248-6c6f0b5665fa.png)

_Above: the `Inspect` modal_

7) Click the `Request` tab, and scroll to the `sort` section of the request

**Expected result**

Per the JSON shown below:

- The request is sorted first by `@timestamp` in ascending (A-Z) order, "oldest first"
- The request is sorted second by `signal.rule.risk_score` descending (Z-A) "highest first" order

```json
  "sort": [
    {
      "@timestamp": {
        "order": "asc",
        "unmapped_type": "date"
      }
    },
    {
      "signal.rule.risk_score": {
        "order": "desc",
        "unmapped_type": "number"
      }
    }
  ],
```

8) Click `Close` to close the `Inspect` modal

9) Click `2 fields sorted` to display the sort popover

10) Use the drag handles to, via drag-and-drop, update the sorting such that `Risk Score` is sorted **before** `@timestamp`, as shown in the screenshot below:

![sort-by-risk-score-first](https://user-images.githubusercontent.com/4459398/130704159-523effa2-21ef-4599-a939-964fc523f9ec.png)

_Above: Use the drag handles to, via drag-and-drop, update the sorting such that `Risk Score` is sorted **before** `@timestamp`_

**Expected results**

As shown in the screenshot below:

- The table is updated to be sorted first by the higest risk score, e.g. previously `47`, now `73`
- The alerts table is sorted second by `@timestamp` in ascending (A-Z) order, "oldest first", and *may* have changed, e.g. from `Aug 3` to `Aug 12`, depending on the sample data in your environment

![highest-risk-score](https://user-images.githubusercontent.com/4459398/130704878-163a2427-fc7a-4755-9adc-a06b0d7b8e43.png)

_Above: The alerts table is now sorted first by highest risk score_

11) Once again, hover over the alerts table and click the `Inspect` magnifiing glass icon

12) Once again, click the `Request` tab, and scroll to the `sort` section of the request

**Expected result**

Per the JSON shown below:

- The request is sorted first by `signal.rule.risk_score` in descending (Z-A) "highest first" order
- The request is sorted second by `@timestamp` in ascending (A-Z) order, "oldest first"

```json
  "sort": [
    {
      "signal.rule.risk_score": {
        "order": "desc",
        "unmapped_type": "number"
      }
    },
    {
      "@timestamp": {
        "order": "asc",
        "unmapped_type": "date"
      }
    }
  ],
```

Co-authored-by: Andrew Goldstein <andrew-goldstein@users.noreply.github.com>
2021-08-25 01:30:13 -04:00
Steph Milovic e028409a98
[7.x] [Security Solution] [Bugfix] Fix analyzer missing from alert table (#109183) (#109727)
* resolve conflicts

* rm whoops

* actually fix whoops

* fix type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-24 22:05:33 -04:00
Kibana Machine 764690d9b2
[canvas][nit] Kill dead, ugly error handler (#109771) (#109981)
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2021-08-24 21:59:39 -04:00
Kibana Machine 24a2963122
Fix text size for DLP callout (#109964) (#109978)
Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-08-24 21:55:39 -04:00
Kibana Machine bd5b648997
[Cases][Observability] Disabling sync alerts for observability (#109929) (#109973)
* Disabling sync alerts for observability

* Adding unit tests

Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
2021-08-24 20:27:34 -04:00
CJ Cenizal 7c79a81b25
Change copy references of 'deprecation issues' to 'deprecation warnings'. (#109963) 2021-08-24 17:03:01 -07:00
Kibana Machine 276824ae5d
ensure all kibana.json files have owners and they are consistent (#109731) (#109969)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-24 19:48:18 -04:00
Corey Robertson dd8866cf9f
[Presentation] Adds owner to presentation team plugin kibana.json. Updated CODEOWNERS (#108408) (#109962)
* Adds owner to presentation team plugin kibana.json. Updated CODEOWNERS

* Adds a few more owners for presentation
# Conflicts:
#	.github/CODEOWNERS
#	src/plugins/dashboard/kibana.json
2021-08-24 19:08:47 -04:00