Commit graph

34577 commits

Author SHA1 Message Date
Jonathan Budzenski
94ef03dbd3
Move kibana-keystore from data/ to config/ (#57856)
* Move kibana-keystore from data/ to config/

This is a breaking change to move the location of kibana-keystore.
Keystores in other stack products live in the config directory, so this
updates our current path to be consistent.

Closes #25746

* add breaking changes

* update comment

* wip

* fix docs

* read from both keystore locations, write priority to non-deprecated

* note data directory fallback

* add tests for get_keystore

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 10:56:25 -05:00
Thomas Neirynck
c44f019790
[Maps] Show joins disabled message (#70826)
Show feedback in the layer-settings when the scaling-method does not support Term-joins.
2020-07-13 11:55:36 -04:00
Jonathan Budzenski
2c19feb55f
[os packages] local permission adjustments (#66614)
* outline permissions

* rm keystore setup

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 10:51:30 -05:00
Tiago Costa
b435d46080
skip flaky suite (#71361) 2020-07-13 16:43:40 +01:00
Nicolas Chaulet
17dc0439e2
[Ingest Manager] Add UI to enroll standalone agent (#71288) 2020-07-13 11:33:51 -04:00
Tiago Costa
24edc804c9
Node options from cfg file for production (#62468)
* chore(NA): load NODE_OPTIONS from options files across environments

* chore(NA): move node.ci.options to config folder

* docs(NA): update docs to explain how to set node options from the cfg fil

* chore(NA): removed test npm scripts

* fix(NA): typo on setup script for CI

* chore(NA): add debug info

* chore(NA): export options on CI

* chore(NA): remove debug info

* chore(NA): support for configurable config folder using env var

* chore(NA): add node.options file into docker img

* fix(NA): use calculated config dir on node options for ci

* chore(NA): node bin scripts bootstrap and node_with_options implementation for bash

* chore(NA): complete node_with_options scripts with bat version

* chore(NA): add bin/node dev script and remove cli for run_with_node_options

* chore(NA): increase default maxBuffer

* chore(NA): remove run with options script from package.json

* chore(NA): include kbn-node script and underlying usage of it

* chore(NA): remove change on eslint

* chore(NA): correct typo on kbn node script comment

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): correct typo on kbn node script comment

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): add line to describe each option should be specified in a separated line

* chore(NA): remove node options from dev and ci env

* chore(NA): remove changes from package.json

* chore(NA): fix docker image build

* chore(NA): change value for example of --max-old-space-size in the node.options file

Co-authored-by: Tyler Smalley <tylersmalley@me.com>

* chore(NA): remove --no-warnings from node.options and force it in the bin scripts

* chore(NA): prevent 'The system cannot find the file' error message

* chore(NA): introduce slash when building path for %DIR%

* chore(NA): read options from file only if it exists

Co-authored-by: Jonathan Budzenski <jbudz@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2020-07-13 16:30:03 +01:00
Søren Louv-Jansen
327fed87bb
[APM] Improvements to the ML Settings page (#71309) 2020-07-13 17:21:22 +02:00
spalger
8a4d0d06a5 add old .chromium to gitignore to prevent it from being accidentally committed 2020-07-13 08:16:26 -07:00
Jen Huang
82f6c6a1df
[Ingest Manager] Simplify add/edit package config (integration) form (#71187)
* Match add integration page with designs

* Clean up package config layout code

* Match edit integration config page with designs

* Fix typing and i18n issues

* Add back data test subj

* Add loading UI for second step; code clean up

* Fix limited packages incorrect response

* Add ability to create agent config when selecting config to add integration to

* Add error count to input-level panel; memoize children components

* Add error count next to all advanced options toggles

* Move general form error to bottom bar

* #69750 Auto-expand inputs with required & empty (invalid) vars

* #68019 Enforce unique package config names, per agent config

* Fix typing

* Fix i18n

* Fix reloading when new agent config _wasn't_ created

* Memoize edit integration and fix fields not collapsing on edit

* Really fix types
2020-07-13 08:12:53 -07:00
Luke Elmers
4925a4983a
Ensure Other bucket works on scripted fields. (#71329) 2020-07-13 09:11:11 -06:00
Oliver Gupte
ae231feef7
[APM] Anomaly detection setup link with alert if job doesn't exist (#71229)
* Closes #70440 by adding a setup link to anomaly detection setting in the home header

* PR feedback and type error fix

* Code cleanup and PR feedback

* Modified getEnvironmentUiFilterES return type from `ESFilter | undefined` to `ESFilter[]` for ease of use.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:09:55 -07:00
Oliver Gupte
f0c9915280
[APM] Anomaly detection integration with transaction duration chart (#71230)
* Reintroduces the previous anomaly detection ML integration back into the
transaction duration chart in the service details screen. Support the
latest APM anoamly detection by environment jobs.

* PR feedback

* Code improvements from PR feedback

* handle errors thrown when fetching ml job for current environment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:09:04 -07:00
Jean-Louis Leysens
f0d744e865
inclusive language (#71438) 2020-07-13 17:03:41 +02:00
Nicolas Chaulet
a906c732b0
[Ingest Manager] During fleet setup create an enrollment for every config (#71308) 2020-07-13 11:00:58 -04:00
Stacey Gammon
0a516cfbb9
Improvements to our developer guide (#67764)
* contributing guide -> asciidoc

* Update docs/developer/contributing/index.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update CONTRIBUTING.md

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update docs/developer/best-practices/stability.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* Update docs/developer/contributing/index.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* address code review comments

* Update docs/developer/contributing/development-documentation.asciidoc

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>

* review comment updates

* fix bad ref

Co-authored-by: Peter Schretlen <peter.schretlen@gmail.com>
2020-07-13 10:47:01 -04:00
MadameSheema
ddd3a9defd
[SIEM][Detections] Fixes index patterns order (#71270)
* fixes alphabetical order for index patterns

* fixes cypress tests adding the new index pattern

* fixes jest tests

* fixes jest tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 16:03:54 +02:00
Phillip Burch
4bdd31e9c9
[Metrics + Logs UI] Add test for logs and metrics telemetry (#70858)
* Add test for logs and metrics telemetry

* wait before you go

* Remove kubenetes

* Fix type check

* Add back kubernetes test

* Remove kubernetes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:57:42 -05:00
Jorge Sanz
4b9902987f
[Maps] Inclusive language (#71427) 2020-07-13 15:46:07 +02:00
Felix Stürmer
ba195bad36
[Logs UI] Unskip log highlight api integration test (#71058)
This unskips one log highlighting API test, which was skipped due to changes in the Elasticsearch highlighting behavior.
2020-07-13 15:37:10 +02:00
Brent Kimmel
0f9c80d590
[Security_Solution][Resolver] Style adjustments per UX (#71179)
* SQUASH

* WIP 2

* add block formatting on time to related list as well

* M. Sherrier review: untranslate timestamp / remove top border on panel

* redo dep

* CI: replace missing import with type

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 09:26:43 -04:00
Stratoula Kalafateli
06847519f1
[Functional test] Increase the timeout to click new vis function (#71226)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 16:26:33 +03:00
Matthias Wilhelm
84edc361f1
[Discover] Migrate async import of embeddable factory to actual embeddable (#70920) 2020-07-13 15:22:21 +02:00
Joe Reuter
b4737e8185
fix overflow (#70723) 2020-07-13 14:59:16 +02:00
Anton Dosov
f4b4dc5faa
[uiActions] Improve context menu keyboard support (#70705)
* Improves position resolution logic by also tracking last clicked element.
* Adds ownFocus prop, so can pick menu item with keyboard.
* Also track if target element was removed from DOM. In that case tries to use previous element. won't work all the time, but works nicely in case context menu trigger by item in other context menu.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 14:55:11 +02:00
Paul Tavares
a7d3b6d344
[Security Solution][Endpoint] Policy Details handling saving over version changes (http 409) (#71386)
* Handle applying update on latest Package Config if 1st update generated 409
* Unit Tests to cover the handling of http 409
2020-07-13 08:51:36 -04:00
Marco Liberati
4e9d9812c7
Fix TSVB table trend slope value (#71087)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 14:27:48 +02:00
Alejandro Fernández Haro
5ccc7e9a54
Usage collection speed improvements (#71317)
* Usage collection speed improvements

* Remove commented code
2020-07-13 13:14:04 +01:00
Søren Louv-Jansen
3a17e81626
Bump backport to 5.5.1 (#71408) 2020-07-13 13:59:13 +02:00
MadameSheema
cd2d1b8053
[SIEM][Detections] Fixes text layout in Schedule step (#71306)
* fixes text layout in schedule step

* Removes unused import

Co-authored-by: Garrett Spong <spong@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 13:00:44 +02:00
Liza Katz
3fc8c7af25
Validate incoming url timerange (#70948)
* validate incoming url timerange

* adjust discover test

* fix tests

* stabilize tests

* oops

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 13:47:12 +03:00
Uladzislau Lasitsa
639f8b7ca2
Migrated agg table karma tests to jest (#71224)
* Migrated karma tests to jest

* Add comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 13:28:42 +03:00
Joe Portner
60032b81ca
Bump lodash package version (#71392) 2020-07-13 05:03:25 -04:00
Vadim Dalecky
0c04d98206
refactor: 💡 use allow-list in AppArch codebase (#71400) 2020-07-13 10:53:31 +02:00
Liza Katz
79df8e01ad
improve bugfix 7198 test stability (#71250)
* improve test stability

* reenabled test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 09:26:34 +03:00
Madison Caldwell
e1253ed047
[Security Solution][Ingest Manager][Endpoint] Optional ingest manager (#71198) 2020-07-10 18:23:51 -04:00
Zacqary Adam Xeper
66c531d903
[Metrics UI] Round metric threshold time buckets to nearest unit (#71172)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-10 16:26:57 -05:00
Madison Caldwell
3fc54e7c55
[Security Solution][Endpoint] Policy creation callback fixes + Improved error handling in user manifest loop (#71269)
* Clean up matcher types

* Rework promise and error-handling in ManifestManager

* Write tests for ingest callback and ensure policy is returned when errors occur

* More tests for ingest callback

* Update tests

* Fix tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-10 15:53:34 -04:00
patrykkopycinski
b24632da54
[Security Solution] Allow to configure Event Renderers settings (#69693) 2020-07-10 15:05:07 +02:00
Jean-Louis Leysens
12ec1bef3a
Fix a11y keyboard overlay (#71214)
- reinclude styling for the keyboard overlay (copied from legacy)
- refactor the exports of es_ui_shared to follow new pattern

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-10 12:40:30 +02:00
Brandon Morelli
005128c223
[APM] UI text updates (#71333) 2020-07-10 12:07:49 +02:00
Alejandro Fernández
c00359ec96
[Logs UI] Limit extendDatemath to valid ranges (#71113)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-10 11:55:56 +02:00
Angela Chuang
cb4020f3fc
[SIEM] fix tooltip of notes (#71342)
* fix tooltip of notes

* fix unit test

* update notes tooltip

* fix unit test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-10 10:34:45 +01:00
Alison Goryachev
781220e071
address index templates feedback (#71353) 2020-07-09 21:29:57 -07:00
Greg Thompson
9537a823eb
Upgrade EUI to v26.3.1 (#70243)
* eui to 26.1.0

* Breadcrumb -> EuiBreadcrumb

* keyCode -> key

* src snapshot updates

* update header variables file location

* keyCode -> key in tests

* x-pack simple snapshot updates

* euitooltip updates

* euioverlaymask updates

* testbed keycode -> key

* fixed header sass mixin

* euidatagrid test workaround

* euioverlapmask mock

* euipaginationbutton markup

* nav snapshot update

* eui to 26.3.0

* flyout z-index fix

* euiflyout snapshot updates

* style snapshot updates

* table actions have machine readable text

* table actions have machine readable text

* core api docs update

* table actions snapshot update

* eui to 26.3.1

* update table actions type

* mock issue links; timeout done

* breadcrumb -> euibreadcrumb

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 19:51:45 -07:00
Tyler Smalley
afe785b43a
[build] Creates Linux aarch64 archive (#69165)
- Updates Linux Chromium builds to accept architecture argument (defaults to x64) for arm64 support.
  - Example: `python ~/chromium/build_chromium/build.py 312d84c8ce62810976feda0d3457108a6dfff9e6 arm64`
- Updates all Chromium builds to include architecture in filename. 
  - `chromium-312d84c-linux_arm64.zip` _(new)_
  - `chromium-312d84c-linux.zip` > `chromium-312d84c-linux_x64.zip`
- Moves Chromium install from data directory to `x-pack/plugins/reporting/chromium`
- Moves Chromium download cache from `x-pack/plugins/reporting/.chromium` to `.chromium`
- Installs Chromium during build (closes #53664)
- Updates build to be architecture aware (x64 and aarch64)
- Removed Chromium debug logs, they were not helpful and can not be written inside the Kibana root. If we were to keep them, we would need to write to `logging.dist`.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-09 19:42:48 -07:00
Frank Hassanabad
d8e9327db4
[SIEM][Detection Engine] Fixes skipped tests (#71347)
## Summary

* https://github.com/elastic/kibana/issues/69632
* Adds a retry loop in case of a network outage/issue which should increase the chances of success
* If there is still an issue after the 20th try, then it moves on and there is a high likelihood the tests will continue without issues.
* Adds console logging statements so we know if this flakiness happens again a bit more insight into why the network is behaving the way it is.
* Helps prevent the other tests from being skipped in the future due to bad networking issues. 

The errors that were coming back from the failed tests are in the `afterEach` and look to be network related or another test interfering:

```ts
1) detection engine api security and spaces enabled
01:59:54         find_statuses
01:59:54           "after each" hook for "should return a single rule status when a single rule is loaded from a find status with defaults added":
01:59:54       ResponseError: Response Error
01:59:54        at IncomingMessage.response.on (/dev/shm/workspace/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:287:25)
01:59:54        at endReadableNT (_stream_readable.js:1145:12)
01:59:54        at process._tickCallback (internal/process/next_tick.js:63:19)
01:59:54  
01:59:54               └- ✖ fail: "detection engine api security and spaces enabled find_statuses "after each" hook for "should return a single rule status when a single rule is loaded from a find status with defaults added""
01:59:54               │
01:59:54               └-> "after all" hook
01:59:54             └-> "after all" hook
01:59:54         │
01:59:54         │42 passing (2.0m)
01:59:54         │1 failing
```

So this should fix it to where the afterEach calls try up to 20 times before giving up and then on giving up they move on with the hope a different test doesn't fail.


### 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-07-09 20:36:51 -06:00
Frank Hassanabad
f5b77cd709
[SIEM][Detection Engine][Lists] Adds read_privileges route for lists and list items
## Summary

* Adds a read_privileges for the list and list items.

Run the script:
get_privileges.sh

API:

```ts
GET /api/lists/privileges

{
  "listItems": {
    "username": "yo",
    "has_all_requested": false,
    "cluster": {
      "monitor_ml": true,
      "manage_ccr": true,
      "manage_index_templates": true,
      "monitor_watcher": true,
      "monitor_transform": true,
      "read_ilm": true,
      "manage_api_key": true,
      "manage_security": true,
      "manage_own_api_key": false,
      "manage_saml": true,
      "all": true,
      "manage_ilm": true,
      "manage_ingest_pipelines": true,
      "read_ccr": true,
      "manage_rollup": true,
      "monitor": true,
      "manage_watcher": true,
      "manage": true,
      "manage_transform": true,
      "manage_token": true,
      "manage_ml": true,
      "manage_pipeline": true,
      "monitor_rollup": true,
      "transport_client": true,
      "create_snapshot": true
    },
    "index": {
      ".lists-frank-default": {
        "all": true,
        "manage_ilm": true,
        "read": true,
        "create_index": true,
        "read_cross_cluster": true,
        "index": true,
        "monitor": true,
        "delete": true,
        "manage": true,
        "delete_index": true,
        "create_doc": true,
        "view_index_metadata": true,
        "create": true,
        "manage_follow_index": true,
        "manage_leader_index": true,
        "write": true
      }
    },
    "application": {}
  },
  "lists": {
    "username": "yo",
    "has_all_requested": false,
    "cluster": {
      "monitor_ml": true,
      "manage_ccr": true,
      "manage_index_templates": true,
      "monitor_watcher": true,
      "monitor_transform": true,
      "read_ilm": true,
      "manage_api_key": true,
      "manage_security": true,
      "manage_own_api_key": false,
      "manage_saml": true,
      "all": true,
      "manage_ilm": true,
      "manage_ingest_pipelines": true,
      "read_ccr": true,
      "manage_rollup": true,
      "monitor": true,
      "manage_watcher": true,
      "manage": true,
      "manage_transform": true,
      "manage_token": true,
      "manage_ml": true,
      "manage_pipeline": true,
      "monitor_rollup": true,
      "transport_client": true,
      "create_snapshot": true
    },
    "index": {
      ".lists-frank-default": {
        "all": true,
        "manage_ilm": true,
        "read": true,
        "create_index": true,
        "read_cross_cluster": true,
        "index": true,
        "monitor": true,
        "delete": true,
        "manage": true,
        "delete_index": true,
        "create_doc": true,
        "view_index_metadata": true,
        "create": true,
        "manage_follow_index": true,
        "manage_leader_index": true,
        "write": true
      }
    },
    "application": {}
  },
  "is_authenticated": true
}
```

### Checklist

We currently have not ported over patterns for the routes so we do not have sanity checks against this or other routes and no end point tests which is why the check box is not checked below at this point in time. We are implementing those tests during the feature freeze (hopefully)

- [ ] [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-07-09 20:36:20 -06:00
Spencer
fa93a81ba6
[kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911)
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 18:43:17 -07:00
Davis Plumlee
c1b26651bd
[Security Solution][Exceptions] - Exceptions modal pt 2 (#70886)
* makes comment updates

* adds tests

* adds back non ecs data to timeline

* comments

* fixes jest tests

* fixes typo
2020-07-09 20:59:46 -04:00
Melissa Alvarez
87c8de8c7d
[ML] DF Analytics: stop status polling when job stopped (#71159)
* clear interval if job stopped

* ensure analysisFieldsTable error messages up to date

* use shared constant for job state
2020-07-09 20:37:32 -04:00