Commit graph

33531 commits

Author SHA1 Message Date
Christos Nasikas
92237517be
[SIEM] Update cypress to 4.5.0 (#67961) 2020-06-02 20:01:39 +03:00
Ryland Herrick
332a92d3d5
[SIEM][Detections] Allow synchronous rule actions to be updated via PATCH (#67914)
* Update synchronous actions in patchRules

This method was typed to accept actions, but it was not doing anything
with them. This was mainly a "bug by omission" so I'm simply adding
unit tests for regression purposes.

* Allow synchronous actions to be patched either individually or in bulk

Now that patchRules uses this field, we simply need to pass it.

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 11:56:55 -05:00
Shahzad
13c24b0d81
[Uptime] Fix ping io ts type (#66926)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 18:43:13 +02:00
Alejandro Fernández
77e7e0bb49
[Logs UI] Ensure live stream always gets latest entries (#67935)
LogPositionState doesn't always reevaluate the value of `endTimestamp`
when live stream is on. The [dependencies][1] for it to change rely on the
scroll position to update. If there's less than one scroll page or the
previous API call didn't return any entries, the `endTimestamp` would
not update.

We force `Date.now()` as an `endTimestamp` on the API call to ensure it
always gets the latest entries possible, regardless of the state. This
introduces some inconsistency that will be fixed once work beings on #65493.

[1]: fe4c164681/x-pack/plugins/infra/public/containers/logs/log_position/log_position_state.ts (L160-L173)
2020-06-02 17:36:47 +02:00
Corey Robertson
ce7940adc2
Allow functions to return falsy values (#67796)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 11:31:30 -04:00
Andrew Goldstein
52c518a6ae
[SIEM] Fixes column drag and drop in timeline-based views (#67799)
## Summary

Fixes a bug in timeline-based views, (e.g. the Host Events table), where a column would revert back to it's original position after being dragged and dropped to a new position.

Only timeline-based views were effected, not the timeline itself.

To reproduce:

1) On the SIEM Overview page, click the `View events` button

2) Drag and drop any column in the Events table to a new position

**Expected Result**

- The column is relocated to the position where it was dropped

**Actual Result**

- The column reverts to it's original position

## Testing

- This PR adds a Cypress test for this scenario
  - The new test was successfully run (at least) 10 times via `node x-pack/plugins/siem/scripts/loop_cypress_tests.js`

- This fix was desk tested in:
  - Chrome `83.0.4103.61`
  - Firefox `76.0.1`
  - Safari `13.1`
2020-06-02 08:57:11 -06:00
Chris Roberson
a1a1d5d2f7
Ensure we query for more than 10 (#67172) 2020-06-02 10:41:04 -04:00
Nathan Reese
d550131b9e
[Maps] fix mapbox glyphs error when EMS access is turned off (#67427)
* [Maps] fix mapbox glyphs error when EMS access is turned off

* santize range parameter

* add api test

* clean up mapbox view

* add jest test for getGlyphsUrl

* add license file

* remove unneeded font files

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 08:38:25 -06:00
Pierre Gayvallet
a091124fab
Move application.applications$ to public contract (#67463)
* expose applications$ on public contract

* review comments
2020-06-02 15:15:21 +02:00
Sandra Gonzales
7d0ffb53bc
install default packages in parallel (#67893) 2020-06-02 08:32:24 -04:00
Kevin Logan
7da774ff5a
[Endpoint] add new policy fields (#67323) 2020-06-02 07:26:22 -04:00
Stratoula Kalafateli
8373eb8680
Fix bug in tsvb metric add color rules (#67763)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-02 12:47:13 +03:00
patrykkopycinski
e2ddf8bc2d
[SIEM] Fix draft timeline can be attached to a case (#67844) 2020-06-02 11:28:25 +02:00
Yuliia Naumenko
ce45dad8b6
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE (#66838)
* Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE

* Changed alerting REST API to keep the pattern 'alerts/alert/{id}'

* fixed tests

* fixed tests

* Fixed jest tests

* Renamed plugin from alerting to alerts

* fixed tests

* fixed tests

* Fixed alert type check error

* Fixed find api

* fixed type checks

* fixed tests security issues

* Fixed view in app

* -

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 18:45:36 -07:00
Nathan L Smith
78d5026fbd
APM-specific Jest configuration (#67858)
Update the x-pack `createJestConfig` function to take the `rootDir` as an argument, which allows for easier overriding of the Jest configuration for a specific directory.

Previously we would run Jest in development from the x-pack directory by running something like:

```
node scripts/jest.js --testPathPattern=plugins/apm --watch
```

Currently (for me anyway) this is failing with:

```
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)
```

and it would sometimes not correctly test only the changed files when a change in APM was made. It was also difficult to configure correctly with the [VSCode Jest extension](https://marketplace.visualstudio.com/items?itemName=Orta.vscode-jest).

Add a jest.config.js for APM. This makes running with `--watch` better about which files it chooses to re-run and makes the VSCode extension work (including coverage mapping) with minimal configuration.
2020-06-01 20:38:53 -05:00
Frank Hassanabad
0dca28b6dd
[SEIM][Detection Engine] Moves the io-ts schemas to the common folder from the server side
## Summary

This moves the io-ts schemas from the common folder from the server side up to the common folder.

### Checklist

- [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-01 16:30:28 -06:00
Lisa Cawley
571b3de667
[DOCS] Replace docdir attribute with kib-repo-dir (#67907) 2020-06-01 15:25:20 -07:00
Tiago Costa
071f7ef20b
skip flaky suite (#67821) 2020-06-01 22:57:44 +01:00
Wylie Conlon
b061d85f9a
[Lens] Warn if leaving with unsaved visualization (#67689)
* [Lens] Warn if leaving with unsaved visualization

* Made confirmation logic more robust and add title

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 15:05:27 -04:00
Brian Seeders
add5b11611
[CI] Fix packer cache node_modules references 2020-06-01 14:41:30 -04:00
Yara Tercero
279b11b78d
[SIEM][Exceptions] - Update exceptions hooks to include _find filtering (#67435)
### Summary 

- Updates exception list hooks to include filtering options and updates corresponding unit tests.
- Adds refreshList callback to hook that fetches the list and its items
- Updates hooks tests to test onError callback
- Updates tests to use type checking more effectively per feedback from @FrankHassanabad (thanks!)
2020-06-01 14:32:42 -04:00
Shahzad
cdbcb9720b
[Uptime] Use date histogram in monitor states (#67558)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 19:53:16 +02:00
Tiago Costa
5a6c77226c
skip flaky suite (#67833) 2020-06-01 18:37:56 +01:00
Wylie Conlon
be51ca6041
[Lens] Allow visualizations to provide a dimension editor (#67560)
* [Lens] Allow visualizations to provide a dimension editor

* Update to tab style

* Remove table update

* Update class name

* typecheck fix

* Add test

* Require each dimension group to enable editor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@elastic.co>
2020-06-01 13:33:23 -04:00
Brandon Kobel
ce47ef5d24
Updating the licensed feature usage API response format (#67712)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 10:09:07 -07:00
Quynh Nguyen
daf26b9066
[ML] Add minor refresh button to DFA and AD Job Messages tabs (#67750)
* [ML] Add minor refresh button to DFA and AD Job Messages tabs

* [ML] Update refresh logic for DFA

[ML] Update refresh logic for DFA

* [ML] Update fetchMessages callback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 11:13:59 -05:00
Quynh Nguyen
f31330a01b
[ML] Add ability to delete target index & index pattern when deleting DFA job (#66934)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 10:53:33 -05:00
Sandra Gonzales
cf2aebf67a
[Ingest Manager] Optimize installation of integration (#67708)
* call getArchiveInfo once first, pass paths to template

* pass paths to installPreBuiltTemplates

* pass paths to installILMPolicy

* pass paths to ingest pipeline creation

* use correct package key for cache

* pass paths to kibana assets

* cache other installed packages

* create function for ensuring packages are cached

* remove unused imports

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 11:02:46 -04:00
Mikhail Shustov
53b95424fe
Deprecate es API exposed from setup contract (#67596)
* move elasticsearch client under legacy namespace

* update mocks and tests

* update platform code

* update legacy code

* update plugins using elasticsearch setup API

* update request handler context

* update docs

* rename remaining places

* address comments

* fix merge conflict error
2020-06-01 16:16:44 +02:00
Larry Gregory
afbbafb0cf
Fix support for xpack.spaces.maxSpaces (#67846) 2020-06-01 09:36:52 -04:00
Alison Goryachev
773a44defa
[Component templates] Server side (#66596) 2020-06-01 08:44:38 -04:00
Alison Goryachev
df4615a392
[ILM] Fix fetch policies query (#67827) 2020-06-01 08:43:36 -04:00
Jean-Louis Leysens
6753b1d36b
Added autocompletion for update by query (#67741)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 14:34:53 +02:00
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