Commit graph

38232 commits

Author SHA1 Message Date
Devin W. Hurley b3c334a1d9
[Security Solution] [Detections] Adds scripts to create users + roles based on specific privileges (#81866)
* shell scripts for creating roles + users for testing

* update readme's and updated privilege requirements based on testing with the users and inferring what the roles are supposed to do

* update role privileges based on feedback meeting yesterday

* updated scripts to accept filepath to role / user, added a test to ensure upload value list button is disabled

* updated role scripts to be parameterized

* adds login with role function and adds a sample test with a role to test that a t1 analyst user cannot upload a value list

* add object with corresponding roles

* fix spacing

* parameterize urls for basic auth with roles + users

* forgot to change the cy.visit string

* add KIBANA_URL env var for cli runner

* add env vars for curl script execution

* second script

* update readme's for each role and remove create_index from lists privilege for the soc manager role

* remove 'manage' cluster privilege for rule author

* remove 'create_index' privilege from soc_manager role since that is not parity with the security workflows spreadsheet

* update the login function logic with glo's feedback

* replace SIEM with Security Solution in markdown files

* make role param optional not just undefined

* remove unused file

* add copyright to scripts files

* update top-level README for roles scripts

* remove reference to internal spreadsheet and reference readme for this pr

* remove unnecessary -XPOST and remove verbose mode from post_detections_user script

* adds utils for running integration tests with other users and adds two sample tests showing example usage

* minor type updates and small refactor

* fix x-pack/test types

* use enum types instead of custom type

* fix path to json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2020-11-19 16:02:03 -05:00
Spencer 45d3861219
Revert lmdb-store upgrade (#83830)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 13:10:58 -07:00
ymao1 e45b76c1b2
[Alerting] Add alert.updatedAt field to represent date of last user edit (#83784)
* Adding alert.updatedAt field that only updates on user edit

* Updating unit tests

* Functional tests

* Updating alert attributes excluded from AAD

* Fixing test

* PR comments

* Unskipping tests and updating es archiver data
2020-11-19 14:52:16 -05:00
Scotty Bollinger ad5cf9e78b
[Workplace Search] Migrate AddSource tree (#83799)
* Initial copy/paste of components

Changes for pre-commit hooks were:

- Linting
- Lodash imports
- changed enum names in add_source because there were collistions with component names. So SaveConfig becomes SaveConfigStep because there is a component by the same name
- replaced apostrophe’s with ‘&apos;’ per lint rule

Finally, the linter didn’t like this expression:

asOauthRedirect ? onOauthFormSubmit() : onCredentialsFormSubmit();

… so I changed it to:

const onSubmit = hasOauthRedirect
  ? onOauthFormSubmit
  : onCredentialsFormSubmit;

 onSubmit();

* Add route helper

* Remove AppView, Sidebar navigation and FlashMessages

Sidebar copy and breadcrumbs will be recreated at the top level in a separate PR

* Update component paths

* Use Kibana’s hasPlatinumLicense over minimumPlatinumLicense

* Various TypeScript lint fixes

* Fix index paths

* Remove in-page breadcrumbs and move sidebar copy

In Kibana, breadcrumbs will be at the top-level and not in the view

Also, we have no sidebar with contextual copy. The Figma designs call for this copy to be above the main content. For now I am placing this in the existing ViewContentHeader component.

This will be slightly broken because of the structure of ViewContentHeader but that is expected for now since it cannot be rendered in the browser yet to fix

* Temporarily add parseQueryParams

This is a placeholder until https://github.com/elastic/kibana/pull/83750 lands

* Remove optional from isOrganization

Looks like the value is always passed

* Remove ‘!!’
2020-11-19 13:32:29 -06:00
Søren Louv-Jansen 3d0770ffb0
[APM] Make route tags required (#83801) 2020-11-19 19:51:12 +01:00
Phillip Burch f793d9b719
[Metrics UI] Add metrics to node details (#83357)
* Add charts to the metrics tab

* Add timepicker, i18n, polish

* Fix copyrite

* Update x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/tabs/metrics/chart_header.tsx

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>

* Style changes

* More pr feedback

* Fix lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
2020-11-19 12:50:06 -06:00
Scotty Bollinger 40d4787620
[Enterprise Search] Add parseQueryParams helper (#83750)
* [Enterprise Search] Add parseQueryParams helper

This PR migrates part of the ent-search queryParams util, `parseQueryParams` for use in Workplace Search.

`setQueryParams` was no a part of this PR because it is only used one time in App Search and a better alternative might be available for that use-case

* Remove mock

* Actually test functionality of query-string

* Add test for array

* Better test name
2020-11-19 12:47:37 -06:00
Jonathan Budzenski 6c23302b36
[cli] Add bin/kibana-encryption-keys (#82838)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Tyler Smalley <tylersmalley@me.com>
2020-11-19 12:41:48 -06:00
Larry Gregory 7f962e5839
Removing circular dependency between spaces and security (#81891)
* Removing circular dependency between spaces and security

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* Tests refactor

- Reorganize top level describes into 3 space-based blocks into based on spaces:
  - space disabled
  - spaces plugin unavailable
  - space enabled (most previous tests go under this new block) with new beforeEach

- wrote new tests for uncovered lines 58, 66-69

* Review1: address PR feedback

* changing fake requests for alerts/actions

* Fixing tests

* fixing more tests

* Additional testing and refactoring

* Apply suggestions from code review

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* Review 2: Address feedback

* Make ESLint happy again

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Constance Chen <constance.chen.3@gmail.com>
2020-11-19 13:41:13 -05:00
Christos Nasikas 1d5701d209
[Security Solution][Detections] Enable new actions (#83781)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 19:50:52 +02:00
Jen Huang 51359197af
Adjust suggestions list label and description widths (#83739) 2020-11-19 09:23:23 -08:00
Chris Roberson a24606d035
Fix small issue with detecting missing monitoring data from APM (#83646)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 12:16:19 -05:00
Jonathan Budzenski f220313edb skip "Dashboards linked by a drilldown are both copied to a space" (#83824) 2020-11-19 11:08:37 -06:00
Patrick Mueller f83e06f718
[alerts] adds action group and date to mustache template variables for actions (#83195)
resolves: https://github.com/elastic/kibana/issues/67389

Adds new variables to the existing set of variables that can be used in mustache templates to be used in action parameters when creating alerts.

- `alertActionGroup` - the action group associated with the alert scheduling actions
- `date` - the current date, in ISO format
2020-11-19 12:01:44 -05:00
Tiago Costa 5211dfe990
skip flaky suite (#79389) 2020-11-19 16:52:26 +00:00
Kaarina Tungseth 57b7702314
[DOCS] Reallocates limitations to point-of-use (#79582)
* [DOCS] Reallocates limitations to point-of-use

* KQL changes

* Removed limitations file

* Review comments
2020-11-19 10:49:27 -06:00
Constance 44eba4f953
[Enterprise Search] Engine overview layout stub (#83756)
* Set up Overview file

* Finish Overview page logic, stub out empty/metric views

* Stub in basic empty engine overview
- Minus document creation button & API code example

* Stub out EngineOverviewMetrics and unavailable empty prompt

* Stub out EngineOverMetrics components (stats, charts, logs)

* [Refactor] Pull out some document creation i18n strings to constants

- They're repeated/reused by the DocumentCreationPopover component

* PR feedback: Drop the regex

* PR feedback: RecentLogs -> RecentApiLogs

* PR feedback: Copy

* PR feedback: Copy, sentence-casing

* I forgot to rebase against my own PR :dead_inside:
2020-11-19 08:21:40 -08:00
Corey Robertson 235cef7d14
Disable exporting/importing of templates. Optimize pitch images a bit (#83098)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 11:16:43 -05:00
Kaarina Tungseth 02cda96229
[DOCS] Consolidates plugins (#83712) 2020-11-19 09:44:17 -06:00
James Gowdy 78d7bfdf97
[ML] Space management UI (#83320)
* [ML] Space management UI

* fixing types

* small react refactor

* adding repair toasts

* text and style changes

* handling spaces being disabled

* correcting initalizing endpoint response

* text updates

* text updates

* fixing spaces manager use when spaces is disabled

* more text updates

* switching to delete saved object first rather than overwrite

* filtering non ml spaces

* renaming file

* fixing types

* updating list style

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 15:26:01 +00:00
Lee Drengenberg 441b473f8e
test just part of the message to avoid updates (#83703) 2020-11-19 09:21:40 -06:00
Daniil b263145ba2
[Data Table] Remove extra column in split mode (#83193)
* Fix extra column in split table

* Update table exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-19 18:02:40 +03:00
Dario Gieselaar 5d05eeaab9
Improve snapshot error messages (#83785) 2020-11-19 15:58:15 +01:00
Tiago Costa 25c3b4c95e
skip flaky suite (#83773) 2020-11-19 14:56:34 +00:00
Tiago Costa 2cff5aad3c
skip flaky suite (#83771) 2020-11-19 14:51:45 +00:00
Tiago Costa ca52649597
skip flaky suite (#65278) 2020-11-19 14:48:51 +00:00
Tiago Costa 3a870bf24f
skip flaky suite (#83793) 2020-11-19 14:45:36 +00:00
Gidi Meir Morris 3b0215c26b
[Task Manager] Ensures retries are inferred from the schedule of recurring tasks (#83682)
This addresses a bug in Task Manager in the task timeout behaviour. When a recurring task's `retryAt` field is set (which happens at task run), it is currently scheduled to the task definition's `timeout` value, but the original intention was for these tasks to retry on their next scheduled run (originally identified as part of https://github.com/elastic/kibana/issues/39349).

In this PR we ensure recurring task retries are scheduled according to their recurring schedule, rather than the default `timeout` of the task type.
2020-11-19 14:37:28 +00:00
Matthew Kime 4009edc3dd
[index patterns] improve index pattern cache (#83368)
* cache index pattern promise, not index pattern
2020-11-19 07:45:45 -06:00
Nicolas Chaulet 1b6cfe819d
[Fleet] Rename ingestManager plugin ID fleet (#83200) 2020-11-19 08:43:14 -05:00
Gidi Meir Morris ffdc507668
fixed pagination in connectors list (#83638)
Ensures we specify the page on the EuiTable so that pagination is retain after rerenders.
2020-11-19 12:50:26 +00:00
John Schulz 514b50e4c2
Forward any registry cache-control header for files (#83680)
closes #83631 

### Problem
Assets are served with a `cache-control` header that prevents any caching
<img src="https://user-images.githubusercontent.com/640/99534379-517d2300-2975-11eb-8c05-4fb3f127c52b.png"/>

### Root cause
Likely from this code 2a365ff632/src/core/server/http/http_tools.ts (L40-L43)

Also based on these tests, it seems this is default/expected behavior

b3eefb97da/src/core/server/http/integration_tests/router.test.ts (L510-L520)

### Proposed solution
Set the header via the response handler as shown in this test:
b3eefb97da/src/core/server/http/integration_tests/router.test.ts (L522-L536)

### This PR
If this registry response contains a `cache-control` header, that value is included in the EPM response as well

In `master`, which points to `epr-snapshot`
<img width="742" alt="Screen Shot 2020-11-18 at 12 33 47 PM" src="https://user-images.githubusercontent.com/57655/99568352-4fc75580-299d-11eb-962f-6ff28fa9510d.png">
which matches https://epr-snapshot.elastic.co/package/apache/0.2.6/img/logo_apache.svg

or using `epr.elastic.co`, 
<img width="781" alt="Screen Shot 2020-11-18 at 12 31 56 PM" src="https://user-images.githubusercontent.com/57655/99568350-4fc75580-299d-11eb-966e-f3489c13edb5.png">
which matches https://epr.elastic.co/package/apache/0.2.6/img/logo_apache.svg
2020-11-19 07:19:41 -05:00
Ying Mao 6a2c415a98 Revert "[Alerting] Add alert.updatedAt field to represent date of last user edit (#83578)"
This reverts commit acc3e2f443.
2020-11-19 06:08:56 -05:00
Christos Nasikas 893b2961c0
[Security Solution][Detections] Fix adding an action to detection rules (#83722) 2020-11-19 10:24:38 +02:00
Dario Gieselaar 3a8ea2993f
Make expectSnapshot available in all functional test runs (#82932)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-11-19 08:38:51 +01:00
Tyler Smalley 8d9e383980 Skip failing cypress test
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-11-18 22:29:11 -08:00
Robert Oskamp f2ad337fef
Increase bulk request timeout during esArchiver load (#83657)
This PR fixes some timeouts during esArchive load by increasing the request timeout.
2020-11-19 07:05:10 +01:00
Lukas Olson 9b30de41b6
[data.search] Server-side background session service (#81099)
* [Search] Add request context and asScoped pattern

* Update docs

* Unify interface for getting search client

* [WIP] [data.search] Server-side background session service

* Update examples/search_examples/server/my_strategy.ts

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>

* Review feedback

* Fix checks

* Add tapFirst and additional props for session

* Fix CI

* Fix security search

* Fix test

* Fix test for reals

* Add restore method

* Add code to search examples

* Add restore and search using restored ID

* Fix handling of preference and order of params

* Trim & cleanup

* Fix types

* Review feedback

* Add tests and remove handling of username

* Update docs

* Move utils to server

* Review feedback

* More review feedback

* Regenerate docs

* Review feedback

* Doc changes

Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-18 22:04:26 -07:00
Nathan Reese d97ddcd4da
[maps] convert VectorStyleEditor to TS (#83582)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-18 18:42:37 -07:00
spalger 92acf4586e Revert "[App Search] Engine overview layout stub (#83504)"
This reverts commit 71f972dc83.
2020-11-18 18:35:36 -07:00
Bill McConaghy 5375ea4135
Adding documentation for global action configuration options (#83557)
* Adding documentation for global action configuration options

* Update docs/user/alerting/defining-alerts.asciidoc

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>

* incorporating PR feedback

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2020-11-18 20:19:13 -05:00
Chris Cowan a04cb37f2b
[Metrics UI] Optimizations for Snapshot and Inventory Metadata (#83596)
* [Metrics UI] Add time range to inventory metadata request

* Adding optimizations for snapshot request

* Adding sorting to dataset request

* Only query inventory metadata for AWS

* moving check inside getCloudMetadata

* removing unused deps
2020-11-18 18:14:22 -07:00
Tiago Costa f2d97a9fe2
chore(NA): update lmdb store to v0.8.15 (#83726)
* chore(NA): upgrade lmdb-store to v0.8.15

* chore(NA): remove unused ts-error statements
2020-11-19 00:08:50 +00:00
Constance 71f972dc83
[App Search] Engine overview layout stub (#83504)
* Set up Overview file

* Finish Overview page logic, stub out empty/metric views

* Stub in basic empty engine overview
- Minus document creation button & API code example

* Stub out EngineOverviewMetrics and unavailable empty prompt

* Stub out EngineOverMetrics components (stats, charts, logs)

* [Refactor] Pull out some document creation i18n strings to constants

- They're repeated/reused by the DocumentCreationPopover component

* PR feedback: Drop the regex

* PR feedback: RecentLogs -> RecentApiLogs

* PR feedback: Copy

* PR feedback: Copy, sentence-casing
2020-11-18 15:53:45 -08:00
Scotty Bollinger b819287ce3
[Workplace Search] Update SourceIcon to match latest changes in ent-search (#83714)
* Move source icons into subfolder

* Copy over new icons

* Update SourceIcon to account for full bleed images

* Remove unused file

* Fix broken icon path
2020-11-18 16:50:14 -06:00
Constance 640a7b9b7f
[Enterprise Search] Rename React Router helpers (#83718)
* Rename EUI React Router components

- Instead of bogarting the EUI component names, use EuiLinkTo instead of EuiLink

Other misc renaming
- eui_link.tsx to eui_components.tsx for clearer file name
- EuiReactRouterHelper to ReactRouterHelper, to make the distinction between EUI and React Router clearer (in theory you could use this helper for non-EUI components)
- other misc type renaming

* Update simple instances of previous EUI RR components to Eui*To

* Clean up complex/renamed instances of Eui*To
(hopefully much more straightforward now)

- unfortunately side_nav requires an eslint disable
2020-11-18 14:49:14 -08:00
Aaron Caldwell a7670518cc
[Maps] Add 'crossed' & 'exited' events to tracking alert (#82463) 2020-11-18 15:43:26 -07:00
Brandon Kobel 8ede715869
Updating code-owners to use new core/app-services team names (#83731)
* Updating code-owners to use new core/app-services team names

* And the comment as well
2020-11-18 14:26:25 -08:00
Yulia Čech 47d6612bae
Add Managed label to data streams and a view switch for the table (#83049)
* Add Managed label to data streams and a view switch for the table

* Fix i18n errors

* Updated some wording and made filter function easier (managed data streams)

* Update x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Renamed view to include (managed data streams)

* Update x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Update x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Update x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_table/data_stream_table.tsx

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-11-18 23:16:18 +01:00
Aaron Caldwell 0546f98070
[Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries (#80871)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-18 14:47:46 -07:00