Commit graph

30134 commits

Author SHA1 Message Date
Frank Hassanabad 7eb88c4d13
[SIEM][Detection Engine] Import/Export REST endpoints (#54332)
## Summary

* Adds Import and Export REST endpoints
* Fixes minor misc issues with types
* Changes camel case from bulk api to become snake_case

For the API and testing it is very similar to the saved objects API

For import:

```ts
POST /api/detection_engine/rules/_import
```

With a ndjson body of:

```ts
{"created_at":"2020-01-09T01:38:00.740Z","updated_at":"2020-01-09T01:38:00.740Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"6688f367-1aa2-4895-a5a8-b3701eecf57d","immutable":false,"interval":"5m","rule_id":"query-rule-id-1","language":"kuery","output_index":".siem-signals-frank-hassanabad-default","max_signals":100,"risk_score":1,"name":"Query with a rule id Number 1","query":"user.name: root or user.name: admin","references":[],"severity":"high","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1}
{"created_at":"2020-01-09T01:38:00.745Z","updated_at":"2020-01-09T01:38:00.745Z","created_by":"elastic_kibana","description":"Query with a rule_id that acts like an external id","enabled":true,"false_positives":[],"from":"now-6m","id":"7a912444-6cfa-4c8f-83f4-2b26fb2a2ed9","immutable":false,"interval":"5m","rule_id":"query-rule-id-2","language":"kuery","output_index":".siem-signals-frank-hassanabad-default","max_signals":100,"risk_score":2,"name":"Query with a rule id Number 2","query":"user.name: root or user.name: admin","references":[],"severity":"low","updated_by":"elastic_kibana","tags":[],"to":"now","type":"query","threats":[],"version":1}
{"exported_count":2,"missing_rules":[],"missing_rules_count":0}
```

If you want to overwrite existing objects you can use the overwrite query parameter like so:

```ts
POST /api/detection_engine/rules/_import?overwrite=true
```

See and run the scripts of:
```ts
import_rules.sh
import_rules_no_overwrite.sh
```

For exporting everything:

```ts
POST /api/detection_engine/rules/_export
```

For exporting just a handful of things you would send a body like so:

```ts
POST /api/detection_engine/rules/_export
{
  "objects": [
    {
      "rule_id": "query-rule-id-1"
    },
    {
      "rule_id": "query-rule-id-2"
    }
  ]
}
```

To change either the filename of the file that gets downloaded or to remove the extra appended export details you can do the following:

```ts
POST /api/detection_engine/rules/_export?exclude_export_details=true&file_name=my_file.ndjson"
```

See the scripts of:
```ts
export_rules.sh
export_rules_by_rule_id.sh
export_rules_by_rule_id_to_file.sh
export_rules_to_file.sh
```

### Checklist

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~

~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~

~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~

- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

### For maintainers

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~

- [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-01-09 17:16:45 -07:00
debadair 299df2dae7
[DOCS] Updated links to snapshot-restore docs. (#52151) 2020-01-09 16:12:15 -08:00
Patrick Mueller 5853360d75
pass more alert info into alert executor (#54035)
resolves https://github.com/elastic/kibana/issues/50522

The alert executor function is now passed these additional alert-specific
properties as parameters:

- spaceId
- namespace
- name
- tags
- createdBy
- updatedBy
2020-01-09 18:14:53 -05:00
Phillip Burch 32e61592ec
Remove graphql types (#54176)
* Fix server types

* Remove graphql types from the frontend

* More type cleanup

* Replace more types. Delete unused files

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 17:09:57 -06:00
Justin Kambic 6826368842
Add separate describe blocks for different functional test data sources. (#54395) 2020-01-09 16:26:35 -05:00
Nick Partridge 73c3e53183
[TSVB] Add domain fit option to 0 opacity tsvb line charts (#54314)
- Line charts is TSVB will no again fit to the data and provide a padding when away from the zero baseline
2020-01-09 14:28:57 -06:00
Matthew Kime f3f8f80010
Management chrome - fix page boundary widths (#54360)
* add classes to management chrome, use EuiPageSideBar
2020-01-09 14:21:46 -06:00
Chris Roberson dfac5d894e
[Monitoring] Ensure setup mode work in a ccs environment (#54361)
* Ensure setup mode work in a ccs environment

* Missed this file
2020-01-09 13:14:05 -05:00
Marta Bondyra 982df2e5a0
fix: Table visualization shows total for duration, percentage… (#54240) 2020-01-09 19:11:15 +01:00
Joe Portner 719ff259fc
Add support for certificates in PKCS#12 (P12) key stores (#53810)
Kibana now supports the usage of PKCS#12 (P12) key stores and trust stores for certificates and keys.
2020-01-09 13:03:16 -05:00
Chris Cowan a6605f21cc
[Metrics UI & Logs UI] Deprecate the override fields in settings (#54206) 2020-01-09 10:59:16 -07:00
Lisa Cawley daffda7286
[DOCS] Adds licence expiry details (#54081) 2020-01-09 09:28:08 -08:00
Shahzad 31a0bfd540
[Uptime] Monitor details page left side title (#53529)
* update API

* update query

* hide layer control and added loc tags

* update test

* remove unused comment

* update API

* remove capitalization

* style fix

* update types

* added location status number on details page

* useref instead of createRef

* update interface

* update import

* removed redundant file

* fix header for empty data

* refactor for most recent check

* remove redundant code

* remone unused translation

* update status bar

* update styling

* update snaps

* added API tests

* fix types

* fixing integration tests and a typo

* remove unused translations

* update tests

* fixed PR feedback

* update feedback

* update messaging

* update snap

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 18:23:44 +01:00
Tim Sullivan c2362d4807
[Reporting] Update some runtime validations (#53975)
* [Reporting] Update some runtime validations

* fix unit test

* i18n

* make warning logging of encryptionKey possible

* update snapshot

* revert unrelated config change
2020-01-09 10:13:22 -07:00
Tre' Seymour df89abd5a6 Merge branch 'master' of github.com:elastic/kibana 2020-01-09 10:04:57 -07:00
Pedro Luiz Cabral Salomon Prado 599a470f54 Added space char (#49997)
added space to improve readability

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 10:10:55 -06:00
Marta Bondyra d4f584e0cb
Fix eslint rule for vis_type_metric `jsx-a11y/click-events-hav… (#54279) 2020-01-09 17:07:44 +01:00
cachedout 459cad534c
[Monitoring] h1 elements for accessibility (#52276)
* Add header element to indices page for WCAG

* Add h1 element for WCAG to node page

* Add h1 element for WCAG to stack monitoring overview page

* Add h1 to advanced nodes page in stack monitoring

* Add h1 to nodes page in stack monitoring

* Add h1 header for index advanced page in stack monitoring

* Standarize more on ide for h1 tag

* Give heading element to beats overview

* Update Beats listing page for H1 compat with WAVE

* Modified beat page to comply with heading rules from WCAG

* Kibana instance listing page updated for header WCAG

* Add WCAG header fix to logstash listing page

* Added headings for WCAG to logstash overview page

* Update pipeline listing page for WCAG A headings

* Fix WCAG heading problems in pipeline viewer

* Fix screen reader heading for APM overview page

* Update APM instances page for screen reader headings

* Update APM instance page for screen reader heading

* Update ccr page for screen reader headings

* More a11y fixes for headings in stack monitoring

* Fixup

* Consistant captalization per review

* Removed help text per review comment

* Include Elasticsearch node into screen reader message, per review feedback

* Update snapshots

* Linting

* Implement review suggestion for i8n compat

* Revert back to just plain string

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 15:30:58 +00:00
James Gowdy 36abed3496
[ML] Categorization wizard (#53009)
* [ML] Categorization wizard

* fixing js prettier issues

* adding basic category field validation

* adding rare or count selection

* fixing types

* category examples changes

* improving results search

* adding analyzer editing

* improving callout

* updating callout text

* fixing import path

* resetting cat analyser json on flyout open

* disabling model plot by default

* minor refactoring

* fixing types

* hide estimate bucket span

* setting default bucket span

* removing ml_classic workaround

* changing style of detector selection

* fixing convert to advanced issue

* removing sparse data checkbox

* changes based on review

* use default mml

* fixing job cloning

* changes based on review

* removing categorization_analyzer from job if it is same as default

* fixing translations

* disabling model plot for rare jobs

* removing console.error in useResolver
2020-01-09 15:21:40 +00:00
Nathan L Smith 9befff1236
[APM] Fix service map license check and controls (#54286)
* Check for a trial license as well as platinum when loading the map
* Increase the z-index of the controls so clicking on them works
* Rename the styled component to `ControlsContainer` from `Container` to make a less ambiguous class name on the element
2020-01-09 09:03:50 -06:00
Brian Seeders 12bfd3bf77
Fix number of executions per agent in flaky test job (#54311) 2020-01-09 09:48:22 -05:00
Andrew Cholakian 2d15b8c82b
[Uptime] Improve query performance with Heartbeat 7.6+ data. (#52433)
This PR optimizes both the snapshot component and the monitor list on the overview page by using the new monitor.timespan field from elastic/beats#14778. Note that the functionality here will work with heartbeats lacking that patch, but the performance improvements will be absent.

This PR adapts the snapshot tests to use synthetically generated data which should be easier to maintain. As a result some of that code is refactored as well.

See #52433 parent issue as well.
2020-01-09 08:36:31 -06:00
Mikhail Shustov a8c2d5cd58
[NP] Add lifecycle timeout (#54129)
* add promise timeout decorator

* crash Kibana if lifecycle takes > 30sec

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-09 17:19:56 +03:00
DeFazio 4466059327
[ML] Updates Anomaly Detection job wizard button styles, page panel and titles (#53340)
* Update button styles, page panel and page title

* Add getJobCreatorTitle function for human readable job type name

* Add formatMessage to Create job title

* Fix translation test

* Update tests
2020-01-09 08:46:46 -05:00
Matthias Wilhelm 58f792cee3
Remove eslint overwrite for src/legacy/core_plugins/kibana (#54222)
* Cleanup code 
* Remove eslint overwrite
2020-01-09 11:56:14 +01:00
Daniil Suleiman ecddfd8842
[Vis: Default editor] Reactify the timelion editor (#52990)
* Reactify timelion editor

* Change translation ids

* Add @types/pegjs into renovate.json5

* Add validation, add hover suggestions

* Style fixes

* Change plugin setup, use kibana context

* Change plugin start

* Mock services

* Fix other comments

* Build renovate config

* Fix some classnames and SASS file structure

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2020-01-09 11:00:30 +03:00
Marco Vettorello d5939c4af8 [Discover] fix histogram min interval (#53979)
- Fixes issues involving min intervals for leap years and DST
2020-01-08 20:41:24 -06:00
Ahmad Bamieh a27c4c4a4e
[Telemetry] [Monitoring] Only retry fetching usage once monito… (#54309)
* fix interval and add tests

* Update x-pack/legacy/plugins/monitoring/server/kibana_monitoring/bulk_uploader.js

Co-Authored-By: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2020-01-09 02:55:17 +02:00
Brandon Morelli 0e46b240bb
[docs][APM] Add runtime index config documentation (#53907) 2020-01-08 16:44:56 -08:00
Xavier Mouligneau 1e2cbb3710
[SIEM] Detection engine timeline (#53783)
* change create to only have only one form to be open at the same time

* add tick to risk score

* remove compressed

* fix select in schedule

* fix bug to not  allow more than one step panel to be open at a time

* Add a color/health indicator to severity selector

* Move and reword tags placeholder to bottom helper text

* fix ux on the index patterns field

* Reorganize MITRE ATT&CK threat

* add url validation + some cleaning to prerp work for UT

* add feature to get back timeline + be able to disable action on timeline modal

* Add option to import the query from a saved timeline.

* wip

* Add timeline template selector

* fix few bugs from last commit

* review I

* fix unit test for timeline_title

* ui review

* fix truncation on timeline selectable
2020-01-08 19:32:10 -05:00
Nathan Reese 404c42f955
Filter scripted fields preview field list to source fields (#53826)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 18:49:17 -05:00
Matthew Kime 9282f19bf5
Management - New platform api (#52579)
* implement management new platform api
2020-01-08 17:43:10 -06:00
Phillip Burch e1e1d964c6
Reset region and Account when switching inventory (#54287) 2020-01-08 16:37:37 -06:00
Steph Milovic 303e4842ea
[SIEM] [Case] Case workflow api schema (#51535) 2020-01-08 14:28:29 -07:00
Dmitry Lemeshko 26ce6104a9
Code coverage setup on CI (#49003)
* running code coverage in CI

* apply review feedback

* add custom function to upload merged coverage reports

* fix artifacts upload without coverage

* add file extension to fix validation

* Check code_coverage is set

* run oss tests via grunt task

* review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 21:08:48 +01:00
Melissa Alvarez e93c6b8d1a
[ML] DF Analytics Results: adds link to docs (#54189)
* add doc links to evaluate panel for analytics jobs

* fix confusion matrix dataGrid label

* internationalize link text
2020-01-08 15:07:14 -05:00
Joe Portner bbe700d797
Update schemas boolean, byteSize, and duration to coerce strings (#54177)
* Update Duration to coerce number strings to numbers (in millis)

* Coerce in a way that's consistent with kbn-config-schema

* Update ByteSizeValue to coerce strings to numbers

* Update Boolean to coerce strings to boolean values

* Fix Jest test

* Address PR review feedback

* Whoops

* Whoops 2

* Whoops 3
2020-01-08 14:48:00 -05:00
Zacqary Adam Xeper 8edb53ddbc
[Metrics UI] Pass relevant shouldAllowEdit capabilities into SettingsPage (#49781)
* [Metrics UI] Pass relevant shouldAllowEdit capabilities into SettingsPage

* Split settings pages in two; add loading screen to settings page

* Restore timestamp field to metrics screen

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 13:46:01 -06:00
Corey Robertson 89e4daf5bd
[Canvas] Fixes bugs with autoplay and refresh (#53149)
* Fixes bugs with autoplay and refresh

* Fix typecheck

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 14:16:31 -05:00
Melissa Alvarez fc948a0c8e
[ML] DF Analytics Classification: ensure confusion matrix can be fetched (#53629)
* check depVar field type before adding keyword suffix for evaluate endpoint

* update indexPattern type and use FIELD types

* add keyword suffix if field type is keyword

* keyword suffix added if depVar is of type keyword AND text
2020-01-08 13:38:34 -05:00
Tim Roes 7ffe38569e
Fix Vega react eslint errors (#54259) 2020-01-08 18:19:20 +01:00
Tim Roes 53d1c96a4a
Remove non existing codeowners (#54274)
* Remove non existing codeowners

* Add TSVB to Kibana App codeowners
2020-01-08 18:10:26 +01:00
Mikhail Shustov 26a4ec4117
use correct type (#54244) 2020-01-08 19:46:10 +03:00
Maja Grubic bc640bdcba
[Dashboard] Removing 100% as dshDashboardViewport height (#54263) 2020-01-08 16:26:56 +00:00
Anton Dosov 513428af44
add examples/ to no-restricted-path config (#54252) 2020-01-08 19:20:07 +03:00
gchaps 1ffd30eb85
[DOCS][Spaces] Adds example of of using default route setting (#54201)
* Added defaultRoute examples

Added `Examples: /app/monitoring, /app/ml, /app/kibana#/dashboards`

* [DOCS] Adds default route example to Spaces docs

Co-authored-by: ErnestoBezanilla <ErnestoBezanilla@users.noreply.github.com>
2020-01-08 08:08:51 -08:00
patrykkopycinski 8e0e4948d5
[SIEM] Fix columns in timeline do not resize (#51816) 2020-01-08 16:33:51 +01:00
Aleh Zasypkin 63ac99b3aa
Re-enable OIDC API integration test. (#54111) 2020-01-08 15:59:06 +01:00
Justin Kambic a93c23cd56 Reorganize structure of component render to avoid errors. (#54251) 2020-01-08 15:53:49 +01:00
Court Ewing 16b217a11b
[DOCS] consolidate telemetry settings to core (#52634)
* docs: consolidate telemetry settings to core

Telemetry is no longer part of monitoring.

* docs: revise telemetry settings text

* docs: tweak telemetry setting text
2020-01-08 09:32:58 -05:00