Commit graph

9168 commits

Author SHA1 Message Date
Brandon Kobel e616935d0b
Using re2 for Timelion regular expressions (#67416)
* Revert "Revert "Using re2 for Timelion regular expressions (#55208)""

This reverts commit c90293d03f.

* Updating re2 to 1.14.0. Still need to update build patching

* Extract the gzip to the destination, supporting multiple extract methods

* Adding 'node' to jest's moduleFileExtensions

'node' is in the defaults, not sure why we aren't using the defaults...
https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 09:55:42 -07:00
Clint Andrew Hall 713f323447
[Canvas] Fixes for expected prop-types, Shape Arg UI, and i18n strings (#68304)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 11:30:36 -05:00
Joe Reuter 8d1a319472
keep custom labels (#68498) 2020-06-10 18:29:22 +02:00
Joe Reuter 497ecf8164
[Lens] Add description property and check duplicate title on save (#68219) 2020-06-10 18:28:00 +02:00
Tyler Smalley 8a5a7c3032
[eslint] Prevents importing of public code into server (#67149)
We should not be allowing importing of public into server. Any shared code should reside in a common directory. After #66506, this will not even be possible as we will no longer be transpiling public code into commonjs.

Blocks #66506

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-06-10 08:39:52 -07:00
Garrett Spong 3b4fa6ade6
[Security] Updates Cypress README.md to show how to run-as-ci with Cypress UI [skip ci] (#68728)
## Summary

Updates Cypress README.md to show how to `run-as-ci` with the Cypress UI. 

##### Updates: 
> Note: To `run-as-ci` with the Cypress UI, update [x-pack/test/security_solution_cypress/runner.ts](https://github.com/elastic/kibana/blob/master/x-pack/test/security_solution_cypress/runner.ts#L25) from 
> ``` ts
>args: ['cypress:run'],
>```
>to 
>``` ts
>args: ['cypress:open'],
>```
>This is helpful for debugging specific failed tests from CI without having to run the entire suite.
2020-06-10 09:19:32 -06:00
Quynh Nguyen 9bc0936311
[ML] Transforms: Add ability to delete dest index & index pattern when deleting transform job (#67922) 2020-06-10 10:11:46 -05:00
Frank Hassanabad 8118b13ff7
[SIEM][Detection Engine] Follow up issues from PR 68127 (#68612)
## Summary

* Smaller follow ups and bug fixes from: https://github.com/elastic/kibana/pull/68127
* Added unknown to `findDifferencesRecursive`
* Added linter rule to catch NodeJS code in the common folders for both `lists` and `security_solution`
* Removed the Hapi server type from the common folder of lists

### Checklist

* Added unknown to the correct locations

- [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
2020-06-10 08:54:27 -06:00
Joe Reuter a462e2c7b0
[Lens] Keep global filters, time range and refresh interval on refresh (#68075) 2020-06-10 15:44:59 +02:00
Alison Goryachev d7d9544a6f
[IM] Refactor component templates API integration tests (#68282)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 09:25:49 -04:00
Steph Milovic c21c475694
[Security] [Timeline] Fix filter manager bug (#68708) 2020-06-10 07:09:58 -06:00
MadameSheema dab193fa46
Renames detections missing parts (#68408)
* renames SIEM for Security

* changes from 'Security advanced settings' to 'Security Solution advanced settings'

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 15:08:16 +02:00
Chris Cowan 951114d66b
[Metrics UI] Fix fatal error when no data is available for Metric Threshold Alerts (#68678)
* [Metrics UI] Fix fatal error when no data is available for Metric
Threshold Alerts

* Adding i18n support for error message

* Adding test
2020-06-10 05:47:04 -07:00
Yara Tercero 83771811e0
[SIEM][Detections Engine] - Exceptions viewer cleanup (#68651)
### Summary

This PR is a follow up to #68027 where some feedback didn't make it in. It cleans up the and_or_badge component, updates some css, and cleans up stories.
2020-06-10 08:08:57 -04:00
MadameSheema 3eced03bb1
[SIEM] Fixes flyout flaky test (#68683)
* fixes flaky test

* Update x-pack/plugins/security_solution/cypress/integration/timeline_flyout_button.spec.ts

Co-authored-by: patrykkopycinski <contact@patrykkopycinski.com>

Co-authored-by: patrykkopycinski <contact@patrykkopycinski.com>
2020-06-10 12:01:13 +02:00
MadameSheema 028c19e7b4
[SIEM] Cypress renaming (#68659)
* updates naming in integration

* updates naming in objects

* updates naming in screens

* updates naming in support

* updates naming in tasks

* fixes failing test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-10 12:00:40 +02:00
Aleh Zasypkin 204977c6ce
Partial revert of "Sync Kerberos + Anonymous access tests with the latest security/_authenticate API (user roles now include roles of anonymous user)." (#68624) 2020-06-10 09:10:23 +02:00
Oliver Gupte cac9018f81
[APM] Service maps - Fix missing ML status for services with jobs but no anomalies (#68486)
* Closes #68485 by:
  - use the ML plugin to query for all APM jobs
  - inspect the ml job groups to find all jobs related to a particular service
  - use the mlAnomalySearch client to get ml job buckets with the max anomaly score
  - query for the model_plot buckets to obtain actual/median values for the ML description
  - return the relevant ML job with the max anomaly score for a service
  - indicate to the user that no anomalies were found for a service with an ml job

* - Use the anomalyDetectorsProvider jobs API rather than the search endpoint directly
- Defines a specific return type for the ml jobs api
- Update the empty anomaly data message

* Code and types cleanup

* Return to using record result type on anomaly queries. These are the
same values used in the anomaly explorer and it includes actual &
typical values which greatly improve performance of the previous query.

* - If anomaly data is missing show a gray border around node

* - moved AnomalyDetection out of service map Contents into own component

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 20:58:46 -07:00
Tyler Smalley d00e91a2e5 [skip test] apis Kerberos security Kerberos authentication finishing SPNEGO should properly set cookie and authenticate user
https://github.com/elastic/kibana/issues/68720

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-06-09 20:06:50 -07:00
Yara Tercero 80958568e7
[SIEM][Exceptions] - ExceptionsViewer UI component part 2 (#68294)
### Summary 

This PR is a follow up to #68027 . It brings it all together to complete the exceptions viewer component. This component is meant to display all exception items and allow a user to create, edit, delete, and search these exception items.

- Moves ExceptionItem (from part 1) into its own folder
- Adds exceptions_viewer_header component that includes the search, list toggle, and add exception buttons
- Adds actual ExceptionViewer component
- Updates the useExceptionList hook refresh function logic. Noticed that the previous version was creating some issues
2020-06-09 21:37:37 -04:00
CJ Cenizal aec0b97615
Surface data streams in Index Management. (#67806) 2020-06-09 16:05:48 -07:00
Jen Huang 4f2c199f0e
Fix edit datasource not working following changes in #67234 (#68583) 2020-06-09 15:05:50 -07:00
Felix Stürmer 938771a537
[Logs + Metrics UI] Clean up async plugin initialization (#67654)
This refactors the browser-side plugin bootstrap code such that the eagerly loaded bundle `infra.plugin.js` is minimal and the rest of the logs and metrics app bundles are loaded only when the apps are visited.
2020-06-09 23:37:26 +02:00
Nathan L Smith 2e3578602f
APM Storybook fixes (#68671)
* Resolve core legacy assets in @kbn/storybook webpack configuration
* Ignore stories in Jest coverage
* Combine effects in Cytoscape component so handlers are always added before events are triggered
* Add mock context to ErrorRateAlertTrigger stories
* Disable TransactionDurationAlertTrigger stories

Changing the Cytoscape effect behavior is necessary because the layout was not being triggered when the final set of elements is provided as props to the component. When this is used in Kibana we're always starting with empty elements and fetching them, but in the Storybook we're starting out with the full elements.
2020-06-09 16:17:28 -05:00
Greg Thompson 0306c7a8cf
Upgrade EUI to v24.1.0 (#68141)
* eui to 24.1.0

* src snapshot updates

* x-pack snapshot updates

* euiPaletteColorBlind param updates

* euiPaletteColorBlind ts-ignore

* fix collapsibleNav close button click for functional testing

* await focus

* increase legacy sass build timeout value

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 15:07:40 -06:00
Melissa Alvarez 696d71e13a
[ML] DF Analytics: Creation wizard part 2 (#68462)
* Add ability to clone job

* remove deprecated creation form code

* ensure excludes cloned correctly and update clone action jest test

* remove unused translations

* update helper function name
2020-06-09 16:37:03 -04:00
Andrew Cholakian ccb607303b
[Uptime] Fix race on overview page query (#67843)
Fixes https://github.com/elastic/kibana/issues/67842 by requerying
during the refine phase to see if a newer matching doc has come in.
2020-06-09 15:16:14 -05:00
Steph Milovic 5260c32706
[Security] [Cases] Attach timeline to existing case (#68580) 2020-06-09 12:50:33 -06:00
Alison Goryachev ee5284e7fd
[Component templates] Table view (#68031) 2020-06-09 14:24:47 -04:00
Shahzad a3df86d627
[Uptime] Added relative date info in cert status column (#67612)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 19:54:30 +02:00
Paul Tavares 14410e0c79
[Endpoint] Re-enable Functional test case for Endpoint related pages (#68445)
* Improve Policy test service provider
  - Added `getFullAgentConfig()` to Endpoint Policy Test data provider service
* enable Policy List functional tests
* Added Policy Details Tests
* Add test ids to policy detail Max and Linux forms
* Added page objects utilities and moved `clickOnEuiCheckbox` there
2020-06-09 13:47:00 -04:00
Clint Andrew Hall 91e4fd46f4
Enable exhaustive-deps; correct any lint warnings (#68453)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 11:54:37 -05:00
Clint Andrew Hall 7c0f838aaf
[pre-req] Convert Workpad Config and state to TS (#68615) 2020-06-09 11:48:37 -05:00
Dima Arnautov 1160d08857
[ML] Transforms: Support sub-aggregations (#68306)
* [ML] WIP UI support for the sug-aggs

* [ML] extract sug-aggs from es config

* [ML] fix for range filter

* [ML] delete sub-aggregation

* [ML] isConfigInvalid

* [ML] fix actions, support parent agg

* [ML] update getAggConfigFromEsAgg

* [ML] unit tests

* [ML] SubAggsSection

* [ML] fix snapshot, add validation

* [ML] fix label capping

* [ML] rename Filter query label

* [ML] fix updateSubAggregation validation

* [ML] fix state update warning

* [ML] increase MAX_NESTING_SUB_AGGS

* [ML] functional tests for sub-aggregations

* [ML] change the tooltip message

* [ML] update functional tests

* [ML] fix typo
2020-06-09 16:13:01 +02:00
Yuliia Naumenko f6e93a19d3
Fixed pre-configured docs link points to the wrong page and functional tests configs (#68606)
* Fixed pre-configured docs link points to the wrong page and functional tests configs

* Fixed doc link
2020-06-09 07:00:31 -07:00
Jen Huang bc6aadd0fa
[Ingest Manager] Update queries from stream.* to dataset.* (#68322)
Resolves #67672

Part of https://github.com/elastic/package-registry/issues/491

See https://github.com/elastic/package-registry/pull/492 for package registry changes.

Updates existing queries to use `dataset.*` fields. from `stream.*` fields.

I looked at the EPM code paths for asset installation, and did not find anything that would need to be changed based on the above package registry changes. We don't hardcode anything specific for field names. The package information (i.e. [nginx package info](https://epr.elastic.co/package/nginx/0.1.2/)) is not affected by the current package registry changes.
2020-06-09 15:42:12 +02:00
CJ Cenizal 41af396259
Enable Watcher by default to fix bug in which Watcher doesn't render in the side nav (#68602) 2020-06-09 06:38:32 -07:00
CJ Cenizal 605b79e8ca
Convert Index Templates API routes to snakecase. (#68463)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 06:36:56 -07:00
Devin W. Hurley 994dba102c
[SECURITY SOLUTION] [Detections] Add / Update e2e tests to ensure initial rule runs are successful (#68441)
* adds/modifies e2e tests to ensure find_status returns succeeded after rules are created, instead of just 'going to run'

* add documentation around newly created e2e tests explaining bug and specific regression to be on the lookout for if these start failing
2020-06-09 08:41:37 -04:00
John Schulz 974dcab917
[Ingest] OpenAPI spec file (#68323)
* All(?) routes
Lots have one or more things wrong but it's a start

* Some Agent-related models & routes.

Plus some examples for request and responses

* Ignore rule requring PascalCase interfaces
It's not an option to change interface name, afaict
lowercase matches the OpenAPI spec/key name

* Remove generated specs

* Fix misplaced schema

Response shape was listed as a request body

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-09 08:23:07 -04:00
Tiago Costa bebbd6d2c4
chore(NA): skip apis Endpoint plugin Endpoint policy api (#68638) 2020-06-09 12:24:30 +01:00
Angela Chuang 88f252ac50
[SIEM] Add create template button (#66613)
* add template btn

* rename file

* unit test

* replace connector with useDispatch

* comments

* add disableTemplate

* rename flag

* fix types

* remove snapshot

* fix types

* add fix action

* move disableTemplate flag into constants

* fix types

* Fix timelineType

* button style

* unit test

* unit test

* fix types

* Update x-pack/plugins/siem/public/timelines/components/timeline/properties/create_timeline_btn.tsx

Co-authored-by: patrykkopycinski <contact@patrykkopycinski.com>

* fix unit test

* add unit test

* add unit test

* fix types

* fix tests

* fix unit

* fix i18n key

* remove snapshot

* fix crud

* fix crud

* fix unit

* fix tag

* fix unit

* disable template timeline

* Update use_create_timeline.tsx

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
2020-06-09 11:20:36 +01:00
Robert Oskamp 004df98c87
[ML] Sample data modules - use event.dataset instead of index name (#68538)
This PR adds event.dataset to the Kibana ecommerce sample data and makes the ML modules for ecommerce and weblog sample data use event.dataset to recognize the modules and also as the corresponding datafeed query instead of looking for the index name.
2020-06-09 11:30:15 +02:00
Robert Oskamp 0b3391a8fd
[ML] Functional tests - fix job validation API test with maxModelMemoryLimit (#68501)
This PR fixes the job validation API integration test for the scenario that the test environment has xpack.ml.max_model_memory_limit set.
2020-06-09 11:28:43 +02:00
Robert Oskamp 5377dbb758
[ML] Functional tests - stabilize DFA job creation (#68495)
This PR stabilizes the classification and regression creation tests.
2020-06-09 11:25:59 +02:00
Tiago Costa e74440b138
chore(NA): skip apis Endpoint plugin Endpoint alert API when data is in elasticsearch (#68613) 2020-06-09 03:50:27 +01:00
Tiago Costa bc5d8c20c1
chore(NA): skip endpoint Endpoint Alert Page: when es has data and user has navigated to the page (#68596) 2020-06-09 03:36:12 +01:00
Frank Hassanabad d99cf75814
[SIEM][Detection Engine] Converts from joi to use io-ts and moves the types to common (#68127)
## Summary
* https://github.com/elastic/siem-team/issues/646
* Converts the detection rules and REST to use io-ts
* Removes their joi counterparts
* Updates all tests to use it
* Fixes a bug with the risk_score that was being sent in as a string from the UI instead of a number
* Fixes a bug within the exactCheck validating where it can now accept null value types for optional body messages.
* Fixes a bug in the FindRoute where it did not send down fields from REST
* Changes the lists plugin to utilize the io-ts types from siem rather than having them duplicated.
* Makes some stronger validations
* Adds a lot of codecs

**Things to look out for:**

* Generic testing to ensure I didn't break something that was not part of the tests.
* Fix for the risk_score from string to number is in:
```
x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.test.tsx
```
* Fix for the exact check (unit tests are written and added)
```
x-pack/plugins/security_solution/public/alerts/components/rules/step_about_rule/index.test.tsx
```
* Within all the types I added are there any misspelled things or copy-pasta mistakes with strings:
x-pack/plugins/security_solution/common/detection_engine/schemas/types
* Fix for `find_rules_route.ts:58`
```
x-pack/plugins/security_solution/server/lib/detection_engine/routes/rules/find_rules_route.ts
```

**Follow on things that this PR doesn't do we need to:**
* Add linter rule to forbid NodeJS code within common section
* The `[object Object]` formatter issues seen in the code such as:
```
// TODO: Fix/Change the formatErrors to be better able to handle objects
'Invalid value "[object Object]" supplied to "note"',
```
* Formatter issues such as: `'Invalid value "" supplied to ""'`
* Remove the hapi server object from lists plugin

### Checklist

Delete any items that are not applicable to this PR.

- [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
2020-06-08 19:54:09 -06:00
Tiago Costa e49888f2ec
chore(NA): skip apis Endpoint plugin test metadata api POST /api/endpoint/metadata when index is not empty (#68586) 2020-06-09 01:31:33 +01:00
Jen Huang 299a6026fd
[Ingest Manager] Copy fixes (#68325)
* #68153 Change Elastic integrations to Integrations

* Fix copy casing

* #68152 Update create data source CTA copy

* #68166 Remove icon next to top-level navigation when user is on new Kibana navigation style

* Fix i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-08 17:16:30 -07:00