Commit graph

35229 commits

Author SHA1 Message Date
James Gowdy 10cbaf5ca1
[ML] Disabling ML if license feature is disabled (#73187)
* [ML] Disabling ML if license feature is disabled

* disabling UI feature

* removing unused import

* small refactor

* disabling ml using plugin updater

* function rename

* update comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 16:45:32 +01:00
James Gowdy 1b4d4d8a57
[ML] Fixing old _xpack style es endpoint paths (#73667)
* [ML] Fixing old _xpack style es endpoint paths

* test comment

* removing test comment
2020-07-29 16:44:40 +01:00
Kaarina Tungseth 71badc67de
[DOCS] [Lens] 7.9 docs refresh (#72301)
* [DOCS] Lens refresh for 7.9

* Clean up

* Review comments from Wylie
2020-07-29 10:40:53 -05:00
Melissa Alvarez 2dca40ab2f
[ML] DF Analytics results: ensure View link is only enabled when job has successfully completed (#73539)
* disable view link if job is incomplete or failed

* ensure hooks run before return to avoid react error
2020-07-29 11:19:53 -04:00
Matthias Wilhelm 4f8e7baa3e
Set timeRange to default to trigger the error message (#73629) 2020-07-29 16:57:34 +02:00
Robert Oskamp 754c3538ec
[ML] Functional tests - stabilize DFA navigation and index pattern handling (#73660)
This PR adds a few stability fixes around DFA creation and cloning.
2020-07-29 16:54:08 +02:00
Yulia Čech 34e70ef8dd
[ILM] Add links to "Snapshot and Restore" from ILM "wait for snapshot policy" (#72473)
* [ILM] Add links to "Snapshot and Restore" from ILM "wait for snapshot policy"

* [ILM] Fix jest tests

* [ILM] Fix jest integration tests

* [ILM] Fix eslint error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 16:32:13 +02:00
Clint Andrew Hall 719c292a0c
[kbn-storybook] Update Storybook to 5.3.19 (#73320)
Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-29 10:00:53 -04:00
Chris Cowan 631c17c6f2
[Metrics UI] Fix hasData call to ensure it has data not just indices (#72969)
* [Metrics UI] Fix hasData call to ensure it has data not just indices

* Fixing formatting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 06:56:25 -07:00
Andrew Cholakian 1580a2ef59
[Uptime] Use service.name to link from Uptime -> APM where available (#73618)
With https://github.com/elastic/beats/pull/19932 coming in 7.10 adding
the `service.name` ECS field is very easy. We should prefer this field
when cross linking to APM, hence this PR.

Resolves https://github.com/elastic/uptime/issues/220
2020-07-29 08:51:26 -05:00
Spencer 35d4bc67c1
allow others to update URL.revokeObjectURL property if needed (#73639)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 14:52:41 +02:00
Mikhail Shustov 1cb177f795
regen docs (#73650) 2020-07-29 13:02:16 +02:00
Marco Liberati 2d1939b145
[Visualize] Fix inspector download filename issue when saving in-place (#72605)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 12:53:46 +02:00
Liza Katz 14144156f6
[Data] Query Input String manager (#72093)
* improve test stability

* query string input manager (needed for search demo)

* docs

* dashboard

* Fix jest

* mock fix

* Allow restoring a saved query

* sync url

* Luke's fix to test

* cleanup

* lens jest tests

* docs

* use queryStringManager.getDefaultQuery
Don't sync query to global state

* Update app.test.tsx

lens mock

* jest fix

* jest

* use new api in the example

* Rename state param to query to match url state

* Apply changes to discover

* Update src/plugins/data/public/query/query_string/index.ts

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

* Improve query string state manager

* Cleanup dashboard code

* Handle refresh button

* Set initial dashboard state

* visualize state

* remove unused

* docs

* fix example

* fix jest

* fix filter app state in discover

* fix maps test

* jest

Co-authored-by: Anton Dosov <anton.dosov@elastic.co>
Co-authored-by: Anton Dosov <dosantappdev@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 10:48:23 +03:00
Christos Nasikas b729446c17
[Security Solutions] Add tooltips (#73436)
## Summary

This PR adds three tooltips. The first two are tooltips for the `attaching to a case` buttons. The third tooltip is for the `Upload value lists` button in the `Detections` page.

**Timeline:**
<img width="672" alt="Screenshot 2020-07-28 at 3 08 31 PM" src="https://user-images.githubusercontent.com/7871006/88664558-e79aee00-d0e5-11ea-9644-48480c194498.png">

<img width="673" alt="Screenshot 2020-07-28 at 3 08 38 PM" src="https://user-images.githubusercontent.com/7871006/88664552-e49ffd80-d0e5-11ea-8d9e-2910f58332d4.png">

**Detections:**

<img width="639" alt="Screenshot 2020-07-28 at 3 19 53 PM" src="https://user-images.githubusercontent.com/7871006/88664531-dce05900-d0e5-11ea-9dcd-7e336f215e40.png">


### 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] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)
- [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-07-29 00:35:37 -06:00
Ryland Herrick 4cc87e31a2
Do not render descriptionless actions within an EuiCard (#73611)
This updates the logic of EmptyPage to better handle these cases. Adds
snapshot tests to verify.
2020-07-28 23:58:47 -05:00
Ryland Herrick 36d5391acc
[Security Solution][Detections] Value Lists Modal supports multiple exports (#73532)
* Remove need for ValueListsTable

Modifying columns has revealed that they should be exposed as props, at
which point we have no real need for the table component.

* Unroll the ActionButton component

I thought this was useful when I wrote it!

* Handle multiple simultaneous exports on value lists modal

Instead of passing our export function to GenericDownloader, we now
manage the multiple exports ourselves, and when successful we pass the blob to
GenericDownloader.

* tracks a list of exporting IDs instead of single ID
* chains onto the export promise to set local state

* Port useful table tests over to modal tests

These verify that we've wired up our table actions to our API calls. A
little brittle/tied to implementation, but I'd rather have them than
not.

* WIP: Simpler version of GenericDownloader

* Replace use of GenericDownloader with simpler AutoDownload

This component takes a blob and downloads it in a
cross-browser-compatible manner.

* Handle error when uploading value lists

Converts to the try/catch/finally form as well.

* Fix failing cypress test

We lost this test subj during our refactor, oops

* More explicit setting of global DOM function

Our component fails due to this method being undefined, so we mock it
out for these tests. We do not need to reset the mock as it is assigned
fresh on every test.

* Fixes jest failures on CI

Defines a global static method in a more portable way, as the regular
assignment was failing on CI as the property was readonly.

* Simplify our export/delete clicks in jest tests

The less we assume about the UI, the more robust these'll be.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 23:19:36 -05:00
Jonathan Buttner 41c2967e08
[Security Solution][Resolver] Handle disabled process collection (#73592)
* Handling entity ids of empty string

* Tests for entity id being empty

* More comments

* entity test

* Renaming interface

* Removing unneeded test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 00:01:33 -04:00
Brent Kimmel 0b708e00d3
[Security_Solution][Bug] Fix user name/domain to ECS structure (#73530)
* The changes this tests are being ported separately to 7.9
2020-07-28 23:33:30 -04:00
Yara Tercero e645732319
[Security Solution][Exceptions] - Update rule.exceptions_list to include exception list list_id (#73349)
## Summary

This PR addresses the following:
- Adds `list_id` to `rule.exceptions_list` - this is needed in a number of features
- Updated `getExceptions` in `x-pack/plugins/security_solution/server/lib/detection_engine/signals/utils.ts` to use the latest exception item find endpoint that accepts an array of lists (previously was looping through lists and conducting a `find` for each)
- Updated prepackaged rule that makes reference to global endpoint list to include `list_id`
- Updates `formatAboutStepData` in `x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/create/helpers.ts` to include exception list `list_id`
2020-07-28 23:27:14 -04:00
Jonathan Budzenski 7059270ce9
[deb/rpm] fix config folder path (#73001)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-07-28 20:09:04 -07:00
Kevin Logan 7314c1ba8f
[SECURITY_SOLUTION] Task/add detections rule text (#73596) 2020-07-28 23:05:52 -04:00
Madison Caldwell 5a04909819
[Security Solution][Exceptions] Use semantic version for manifest version + Scaling Tweaks (#73388)
* Manifest version is semantic version

* Configurable task interval

* Use task interval over scheduled when provided

* Fix crash on download of large artifact

* Don't need to generate linux artifacts

* Configurable artifact validation

* Test fixes

* Test fixes

* Type/test fixes

* Final tweaks

* Remove linux endpoint exception generation from UI

* Fix paging so that we stop before 10k

* Fix pagination

* Fix pagination test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 22:43:40 -04:00
Ryland Herrick 3cc2293836
[Security Solution][Detections] Adds additional context to the "needs index permissions" prompt (#73547)
* Adds conditional context to the "needs index permissions" prompt

In an effort to assist the user in their configuration, this adds
additional context to this configuration prompt. We now distinguish
which indexes need configuration: signals, lists, or both.

* Use latin pluralization consistently

* Rename component file to be more accurate

* Refactor message construction to separate function

* Remove unused translations

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 21:38:47 -05:00
Davis Plumlee a0366aa32b
[Security Solution][Detections] Exception Modal UI improvements (#73546) 2020-07-28 22:36:18 -04:00
spalger e105bc514d skip flaky suite (#72339) 2020-07-28 18:53:31 -07:00
Robert Austin 9c08978cc9
[Resolver] Remove useless check that breaks when tree has no nodes (#73583) 2020-07-28 21:48:38 -04:00
Marshall Main a6a0937062
[Security Solution] Validate exception list size when adding new items (#73399)
* Validate exception list size when adding new items

* Update comment

* Extract list size validation and apply to endpoint route also

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 21:24:04 -04:00
Robert Austin fea3bfcebc
[Resolver] simulator and click through tests (#73310)
Write a few jest tests for resolver's react code.
2020-07-28 20:59:45 -04:00
Phillip Burch 78aa24dbd6
Make button appear clickable, change state of empty text (#73496)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:30:42 -05:00
Candace Park f1c08939ea
[SECURITY_SOLUTION][Administration] Task/remove policy tab (#73352) 2020-07-28 20:21:11 -04:00
Angela Chuang 774d3591c0
[Security Solution] Update security overview splash (#73050)
## Summary

https://github.com/elastic/endpoint-app-team/issues/591

How to verify:

1. go to: x-pack/test/security_solution_cypress/runner.ts 
2. comment line 20 (await esArchiver.load('auditbeat');) 
3. in line 25 change cypress:run for cypress:open
4. then in our directory run yarn cypress:run-as-ci when the cypress is open,
5. you can access the Kibana instance in port 5620 with username elastic and password changeme


<img width="1674" alt="Screenshot 2020-07-23 at 14 48 34" src="https://user-images.githubusercontent.com/6295984/88294333-04a17c80-ccf4-11ea-861b-75a85d2b8129.png">


### 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)
- [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~
- [ ] ~[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~
- [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~
- [ ] ~This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)~
- [ ] ~This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~

### For maintainers

- [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~
2020-07-28 18:03:45 -06:00
Michael Olorunnisola 17ec168c28
[Security Solution][Resolver] Undo origin panel update (#73501)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:58:58 -04:00
Michael Olorunnisola 14b2cbb155
[Security Solution][Resolver] Handle iso time strings (#73551)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:58:26 -04:00
John Schulz 89a392bd7c
[Ingest Manager] API sends 404 when package config id is missing (#73212)
* Add test to confirm missing config responds w/ 404

Currently failing with a 500 as in https://github.com/elastic/kibana/issues/66388

* Use after() to remove items added by test.

The test initally failed with a 500 when the `after` was added. Debugging narrowed it down to a missing default config.

getDefaultAgentConfigId errors if there isn't a default config.  The config is added by `setupIngestManager` which _was_ always called during plugin#start but is no longer.

We could add the setup call to the test/suite, but instead I changed AgentConfigService.delete to use ensureDefaultAgentConfig instead of getDefaultAgentConfigId.

ensureDefaultAgentConfig adds one if it's missing. The check in delete is to make sure we don't delete the default config. We can still do that and now we add a config if it wasn't already there (which seems like A Good Thing)

* Fix package config path in OpenApi spec

* Return 404 if package config id is invalid/missing

* Change test for error displayed text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:55:13 -04:00
Frank Hassanabad b399fb03d1
[SIEM][Detection Engine][Lists] Adds the ability to change the timeout limits from 10 seconds for loads for imports (#73103)
## Summary

By default the upload time limit for payloads is 10 seconds. This is really too short and we were getting internal QA bug reports that uploads are timing out on large value list importing. This PR adds the plumbing and unit tests to make the timeout configurable for routes.

* Adds a single timeout option for routes and then normalizes that through Hapi for the socket, payload, and server timeouts.
* Adds unit tests which test the various options
* Adds integration tests which test the various options
* Adds some NOTES about where there are odd behaviors/bugs within Hapi around validations and the timeouts
* Adds a configurable 5 minute timeout to the large value lists route

**Manual testing of the feature**

You can manually test this by adding a configurable option to your chrome network throttle like so below where you throttle upload by some configurable amount. I chose to use 300 kbs/s upload
<img width="556" alt="Screen Shot 2020-07-23 at 11 26 01 AM" src="https://user-images.githubusercontent.com/1151048/88318015-5ab3f700-ccd7-11ea-9d9b-7e3649ec65de.png">

And then run an import of large value lists using a large enough file that it will exceed 5 minutes:
![screen-shot-upload](https://user-images.githubusercontent.com/1151048/88318584-28ef6000-ccd8-11ea-90a1-8ca4aafabcb4.png)

After 5 minutes you should see this message within your server side messages if you have configured your kibana.dev.yml to allow for these messages:

```ts
server  respons [10:52:31.377] [access:lists-all] POST /api/lists/items/_import?type=keyword 408 318292ms - 9.0B
``` 

Note that it should show you that it is trying to return a `408` after `318292ms` the timeout period. Sometimes you will get the 408 in the browser and sometimes the browser actually will not respect the 408 and continue staying in a pending state forever. This seems to be browser side issue and not a client/user land issue. If you get the browser message it will be this error toaster

![timeout-message](https://user-images.githubusercontent.com/1151048/88318760-74a20980-ccd8-11ea-9b7b-0d27f8eb6bce.png)

### Checklist

- [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

### For maintainers

- [x] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
2020-07-28 17:47:41 -06:00
John Schulz b65ec4e07d
Get branch name from platform vs disk (#73534)
fa93a81ba6/src/core/server/plugins/types.ts (L280) & 27dbcb2796/src/core/server/config/types.ts (L25)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 19:44:30 -04:00
Clint Andrew Hall 7a3e800aaa
[Canvas][tech-debt] Kill Recompose:Pure - Part 1 (#73303)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 18:58:58 -04:00
Nicolas Chaulet 93d45fc6ff
[Ingest Manager] Update fleet instructions to run agent as a service (#73491) 2020-07-28 18:49:05 -04:00
Ahmad Bamieh e5fd1c4c7f
[i18n] explicit process.exit(); call for i18n_integrate cli command (#73495)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-29 01:29:48 +03:00
Frank Hassanabad d57a379aa9
Fixes cypress build by removing alerting version within the saved object that causes migration issue while the cypress tests run (#73550) 2020-07-28 15:03:41 -07:00
Clint Andrew Hall 3e63796611
[Canvas][tech-debt] Refactor Layout Annotations (kill recompose.pure Part 2) (#73305) 2020-07-28 17:49:17 -04:00
John Schulz 2622984552
Re-enable test for create package configI believe it was supposed to be enabled with https://github.com/elastic/kibana/pull/71727/files We'll see what CI thinks (#73220)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 17:39:52 -04:00
Nicolas Chaulet 87010a6907
[Ingest Manager] Fix enrollment key selection (#73062) 2020-07-28 17:12:57 -04:00
Zacqary Adam Xeper 48bb7c79c4
[Metrics UI] Fix filterQuery on Inventory alert preview (#73329)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 15:56:06 -05:00
Garrett Spong 0b3dab7318
[Security Solution][Detections] Fixes Risk Score and Severity mapping issues (#73233)
## Summary

Fixes the following issues around Risk Score/Severity mapping:
* Severity override option cannot be unselected during rule creation
* Risk score override option cannot be unselected during rule creation
* Cannot fill Critical Severity override at the first attempt
* Cannot create a rule with just a Critical severity override

Note: When editing rules there is the possibility of the mapping fields remaining `disabled` as they are locked to the 'isLoading' flag from the gql `useFetchIndexPatterns` call, which can sometimes not return/get stuck as loading. @patrykkopycinski has a draft PR to fix this here: https://github.com/elastic/kibana/pull/73199

cc @MadameSheema 


##### Severity Mapping Fixes:
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/88497829-b653de00-cf7e-11ea-8e14-c351117b4282.gif" />
</p>


Now distinguishes between empty string/value
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/88497776-94f2f200-cf7e-11ea-821e-3766b7bed3dc.png" />
</p>

##### Risk Score Mapping Fixes:
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/88497842-c075dc80-cf7e-11ea-8c41-606b20a6ac1c.gif" />
</p>


### 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
  * Working with @benskelker on API docs. This PR adds `risk_score` (can be `undefined`) to `risk_score.mapping` for future compatibility with mapping to specific risk score values.
- [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-28 14:25:32 -06:00
Patryk Kopyciński 5e624502f8
[Security Solution] Fix query fetchPolicy and deduplication (#73199) 2020-07-28 22:13:02 +02:00
Chris Cowan 2d8a41d367
[Metrics UI] Make composite size configurable to avoid max buckets (#72955)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 12:39:36 -07:00
Justin Kambic 86b60bbc63
Mock prototype in unit test to prevent relative date breaking snapshots. (#73531) 2020-07-28 11:52:12 -07:00
Jen Huang f61df05772
Fix long combo box items breaking out of flex item width (#73351) 2020-07-28 10:57:38 -07:00