Commit graph

33698 commits

Author SHA1 Message Date
Frank Hassanabad 96e0e911ea
[SIEM][Lists] Adds test mocks and README.md to the lists plugin
## Summary

* https://github.com/elastic/kibana/issues/67675
* Adds README.md to the lists plugin
* Adds the mocks to the server side of the lists plugin
* Changes out the SIEM code to use the mocks now that they are within the plugin

### Checklist

Delete any items that are not applicable to this PR.

- [x] 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)
- [x] [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
2020-05-30 18:52:01 -06:00
Joe Reuter 6a8b07fe8e
Fix visualize and lens telemetry (#67749) 2020-05-30 21:22:42 +02:00
MadameSheema 96ef01828c
[SIEM] Covers 'Import query from saved timeline' functionality with Cypress (#67459)
* modifies 'Creates and activates a new custom rule' test to cover 'import query from saved timeline' functionality

* adds missing files

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-30 09:51:07 +02:00
Tiago Costa d0aeadf13e
chore(NA): use env var to point config folder on os_packages built with fpm (#67433)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-30 01:01:59 +01:00
Joel Griffith 39902870c8
[Reporting]: Move router + license checks to new platform (#66331)
* WIP: Move routes to new API, license and other checks inbound

* Move license checks over to np licensing observable

* Fix license checks + remove older modules

* Fixing check_license tests, move to TS/Jest

* Fix licensing setup for mocks

* Move job.test.ts over to np

* WIP: move user checks to higher-order func

* Move more handler logic over to Response factory vs Boom

* Major refactor to consolidate types, remove facades, and udpate helpers

* Fix validation for dates in immediate exports

* Linter fix on check license test

* Fix job generation tests

* Move deps => setupDeps

* fix api test

* fix jobs test

* authorized_user_pre_routing and tests

* Fixing duplicate identifiers

* Fix licensing implementation changes

* WIP: Moving license over to async/observables

* Fix disabled-security case

* finish auth_user_pre_routing cleanup - no more license check

* WIP: Fixing final api tests

* Trying to get schema differences in alignment

* Reverting back to previous generation handler

* Fix final API tests

* Final API test fixes, few more hardening tests and better error messages

* Simplify lower-level module implementation (core only interface) + test updates

* Push some core logic into plugin

* Move some core logic up to plugin

* Marking private setupDeps + downstream fixes

* revert logger as a param

Co-authored-by: Timothy Sullivan <tsullivan@elastic.co>
2020-05-29 15:31:17 -07:00
Lisa Cawley 3c40b97794
[DOCS] Link machine learning settings to advanced settings (#67572) 2020-05-29 15:24:04 -07:00
Spencer 402018856e
[kbn/optimizer] update public path before imports (#67561)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-05-29 14:21:14 -07:00
Lisa Cawley 87c34cf10f
[DOCS] Identifies cloud settings for ML (#67573) 2020-05-29 13:50:33 -07:00
spalger a63adabd38 skip flaky suite (#66976) 2020-05-29 12:15:05 -07:00
Brian Seeders 81d55f8822
[CI] Bump chromedriver and use DETECT_CHROMEDRIVER_VERSION (#67642) 2020-05-29 14:58:40 -04:00
Søren Louv-Jansen fbb5f31698
[APM] Don’t run eslint on cypress snapshots (#67451)
* [APM] Don’t run eslint on cypress snapshots

* ignore cypress videos

* Fix interactive command

* Fix gitignore

* Use echo everywhere

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-29 20:00:33 +02:00
Spencer 6288096f62
[kbn/optimizer] use execa to fork workers (#67730)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-05-29 10:34:58 -07:00
nnamdifrankie 6b7b0cbc44
[Endpoint]EMT: temporarily skip test till package update. (#67778)
[Endpoint]EMT: temporarily skip test till package update.
2020-05-29 13:33:46 -04:00
Yuliia Naumenko 1d5933b9a6
Changed AlertsClient to use ActionsClient instead of direct interaction with the action saved objects (#67562) 2020-05-29 09:40:46 -07:00
Joe Reuter 761465bc77
clean up kibana-app ownership (#67780) 2020-05-29 18:22:43 +02:00
Eric Beahan 8f6bef1012
Update table of contents to reflect current content (#66835) 2020-05-29 09:59:58 -05:00
Michail Yasonik fce016ccdb
Refactoring nav links and header components (#66685)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-05-29 09:26:00 -05:00
Paul Tavares ae724f1035
[SIEMDPOINT][WIP] Add Management section and move Policy related views (#67417)
* Add Management top-level nav tab item
* Move of Policy related views to `management`
* Enhance PageView component to support sub-tabs
2020-05-29 10:12:51 -04:00
Christos Nasikas 0712741bb3
[SIEM][CASE] Fix callout messages appearance (#67303)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-29 17:07:45 +03:00
Dario Gieselaar d9ac0489a3
[APM] Correctly format url when linking to other apps (#67446)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-29 14:07:58 +02:00
Marta Bondyra 84ed5096f3
[Lens] Fix empty values filtering (#67594) 2020-05-29 09:38:07 +02:00
Marta Bondyra 9c28661449
perf: drag and drop performance improvement for field list (#67455) 2020-05-29 09:34:55 +02:00
Stratoula Kalafateli cc83cfa3c7
Fix bug on vis metric regarding applying the light theme when thebg is dark (#67481) 2020-05-29 10:14:29 +03:00
Matthias Wilhelm b9d1cec7fd
[Discover] Improve a11y test when switching to context (#67363) 2020-05-29 06:33:17 +02:00
Nathan Reese e28028b36c
[Maps] Fix fit to bounds requests not getting canceled (#67629)
* rename data request constants

* register cancel callback

* clean up
2020-05-28 18:36:11 -06:00
Xavier Mouligneau 043ecaca1a
[SECURITY] bug 667 (#67674)
* bug 667

* update snapshot
2020-05-28 19:59:32 -04:00
Nathan L Smith 92d5fcdc1c
[APM] Ensure loading indicator stops in Safari (#67695)
The combination of using object destructuring and numeric object keys in the reducer for LoadingIndicatorContext caused it so the loading indicator would not disappear in 7.8 in Safari even though there were no more loading statuses.

Optimization changes between 7.8 and master may be why this is only appears on 7.8.

Update this reducer to stringify the key and `lodash.pick` only the true values so the only pairs in the object are ones with `true` as the value.

Fixes #67334.
2020-05-28 17:46:43 -05:00
Frank Hassanabad 957915b7e5
[SIEM][Lists] Adds circular dependency checker for lists plugin
## Summary

* Added dependency checker for the public and common folders for lists
2020-05-28 16:45:29 -06:00
Brian Seeders 7f2e32475a
[CI] Add new intake worker size with 2x memory, and move workspace to memory (#67676)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-28 17:25:52 -05:00
Kaarina Tungseth 05675602ee
[DOCS] Updates to Lens docs (#67694)
* [DOCS] Updates to Lens docs

* Fixed image

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Update docs/visualize/lens.asciidoc

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>

* Comment from Wylie

Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
2020-05-28 16:39:16 -05:00
Nathan Reese 7118e750a0
[Maps] allow adding multiple layers (#67544)
* [Maps] allow adding multiple layers

* update RenderWizardArguments arguments

* fix toc_entry jest test

* fix tslint error

* cleanup

* remove __transientLayerId from store signature

* rename setSelectedLayerToFirstPreviewLayer

* revert changes to es_search_source/create_source_editor.js
2020-05-28 15:14:39 -06:00
Kaarina Tungseth 067a810a4a
[DOCS] Bumps up the Share dashboard page (#67696) 2020-05-28 15:56:16 -05:00
Devin W. Hurley 177cda42bd
[SIEM] [Detection Engine] Incorporate large lists to rule execution. (#65372)
* introduce lists plugin for use by executor

* adds getListClient function on setup

* refactors searchAfterBulkCreate to integrate with the lists plugin so we only generate signals from events not in the list

* fixes type check issues

* fixes unit tests, adds field and other parameters for using lists in executor.

* cleaning up types and exports, updates to match new contracts with lists client from master

* prior to this commit the refactored while loop was doing more search after loops than it needed to and this fixes two bugs in the list filter function where we were returning the wrong count, and we were not accessing the right field on the event

* exception lists are optional

* use exceptions list format, this works with given sample query in scripts

* updates tests and fixes type issues

* updates README doc in detection engine with example for rule with list exception

* adds one test and removes commented out code

* fix sample rule json from 30s to 5m

* fix sample rule json from 30s to 5m

* remove unused import

* more cleanup

* e2e test for prepackaged rules was failing because lists was undefined in the siem plugin and was preventing the registration of the rule alert type. I removed this but once lists is ready for prime time we should consider adding the null check back

* can't reuse the same env var since the tests are setting the ELASTIC_XPACK_SIEM_LISTS_FEATURE env var to true without enabling the lists plugin

* fixes from pr review, still needs more TLC

* exports listspluginsetup type from top-level in lists plugin, fixes logic for empty exceptions list, updates types

* utilize type.is to remove as casting, also do null checks and throw an error when exceptionItem is malformed. This will change in the very near future once the new json format for exception lists is incorporated

* fix type issues after merging master into branch

* update mock

* remove bad null check for ml plugin before registering rule alert type in siem plugin

* prettier linting

* adds test for filter events with list

* pr comments

* adds logic for included vs excluded and updates tests

* update test cases for search after bulk create to default to included for exception lists

* filter out non-list exception items from the loop
2020-05-28 15:45:46 -04:00
Poff Poffenberger ea12008ab0
Fix canvas fullscreen when nav is docked (#67625) 2020-05-28 14:44:16 -05:00
Larry Gregory 639dbbeb19
Migrate audit logging to KP (#67381)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-28 14:46:42 -04:00
Frank Hassanabad 19fe3461f4
[SIEM][Lists] Adds _find to value lists
## Summary

Adds the REST and API routes for find and filter for exception lists and value lists 

* Fixes bugs with string parameters for the _find with exception lists
* Adds the _find for the value based lists
* More scripts for how to filter things for both list values and exception lists
* Misc type script fixes
* Adds a cursor to move from the previous page to the next page 
* Adds name space 'agnostic' vs. 'single' feature for exception_lists

**REST API's:**

```ts
POST /api/lists/_find
POST /api/lists/items/_find
POST /api/exception_lists/_find
POST /api/exception_lists/items/_find
```

**Parameters you can send:**

* sort
* sort_order
* filter
* page
* per_page 
* list_id (for list items only and required)
* cursor (for finding the next page or advancing to deep pages)

**See test scripts below:**
```sh
find_exception_list_items_by_filter.sh
find_exception_lists_by_filter.sh
find_list_items.sh
find_list_items_with_cursor.sh
find_list_items_with_sort.sh
find_list_items_with_sort_cursor.sh
find_lists.sh
find_lists_with_cursor.sh
find_lists_with_filter.sh
find_lists_with_sort.sh
find_lists_with_sort_cursor.sh
```

### Checklist

Note: Unit tests are left out as this is blocking people but I will be adding tests as this is being reviewed unless someone needs these features now. This is still all behind a feature flag and considered to be in the area of proof of concept and not production ready until more tests and end to tests are added.  

- [ ] [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-05-28 12:35:24 -06:00
Kerry Gallagher 6643b9c191
[Logs UI] [Alerting] Fix time state bug (#67630)
* Read from alertParams state only for timeSize and timeUnit

* Typecheck
2020-05-28 19:31:36 +01:00
Mikhail Shustov 79a61d026f
Populate RequestHandlerContext with start API only (#67579)
* use start API to populate request context

* remove client creation from uiSettings service setup API

* remove __internals.uiSettings

* update ui_settings mixin tests
2020-05-28 19:46:09 +02:00
Tiago Costa d431b3cf0b
chore(NA): add support for accessibility test group on jenkins flaky test runner (#67652) 2020-05-28 18:31:42 +01:00
James Gowdy cae6b9e35a
[ML] Using mlClient callAsInternalUser in job validation (#67609) 2020-05-28 18:04:16 +01:00
James Gowdy 321a10d1df
[ML] Renaming mlSearch to mlAnomalySearch (#67602) 2020-05-28 18:02:50 +01:00
Mike Côté 642b6bd36a
Update wording (#67486) 2020-05-28 12:19:29 -04:00
Matthew Kime f546fc3b2f
Index pattern field - add unit tests (#67549)
* add unit tests to index pattern fields
2020-05-28 10:56:58 -05:00
gchaps 0302a45664
Updates Management doc to reflect new navigation (#67506)
* [DOCS] Updates Management page to reflect new navigation

* [DOCS] Adds link to security doc

* [DOCS] Incorporates review comments
2020-05-28 08:55:49 -07:00
Nathan Reese 57345e092e
[Maps] convert HeatmapLayer dependencies to TS (#66823)
* [Maps] convert HeatmapLayer and dependencies to TS

* heatmap_style_editor snapshots

* eslint

* fix merge problems

* eslint cleanup

* revert rename of getOrdinalMbColorRampStops

* eslint

* tslint

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-28 08:54:44 -06:00
Luke Elmers 17573f1a0b
Add unit tests for filters agg. (#67229) 2020-05-28 08:48:49 -06:00
Corey Robertson 81a69480a9
[Canvas] Reduce Bundle Size (#66099)
* Move some code around to reduce bundle size

* prettier

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-28 09:29:10 -04:00
Robert Oskamp e492cf138d
[ML] Functional tests - add validation messages (#67583)
This PR adds validation messages to all ML and Transform services in order to make it easier to debug test failures.
2020-05-28 15:19:25 +02:00
James Gowdy dcca06bad2
[ML] Update job service id schema (#67462) 2020-05-28 11:50:56 +01:00
Joe Reuter a5e717c032
fix reporting link (#67440) 2020-05-28 11:19:06 +02:00