Commit graph

14482 commits

Author SHA1 Message Date
Scotty Bollinger
5788a6bd78
[Workplace Search] Role Mappings to Kibana (#93123)
* Add routes for role mapings

* Initial copy/paste

* Update RoleMappingsRouter

- Update all paths
- Change router to use children instead of render props
- Remove legacy app chrome

* Update RoleMappings

- Update all paths
- Use global flash messages

* Update RoleMapping

- Update all paths
- Use global flash messages
- Add types to fix errors
- Use React Router Hooks instead of legacy withRouter HOC

* Fix path in index and add route helper

* Update paths in RoleMappingsLogic

* Remove history in favor of KibanaLogic.navigateToUrl

* Add Role type

* Remove ID prop

This is not needed because the ID is actually passed in the URL itself and is not a requirement in the body of the request

* Replace contextual flash messages with global

It appeared that the server sometimes sent flash messages with the API response, but I checked the Rails server code and there is no `flashMessages` sent back from the server so I am omitting that from the `RoleMappingsServerDetails` interface as well.

* Replace Rails http with kibana http

* Fix route path

* Add route and update global navigation

* Add breadcrumb/page title

* Update flash messages in RoleMapping

I did this for RoleMappings but forgot this one

* Use explicit AttributeName type instead of string

* Add i18n

* Fix type issue

Because the shared role mapping components work for both App Search and Workplace Search, the more generic string is used here because App Search has different role names.

* Add tests for components and router

* Add optional to interface

In the case of a new role mapping, the server is called at the ‘/new’ route and the server responds without a roleMapping prop, as it has not yet been created.

* Add tests for RoleMappingsLogic

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 11:22:20 -06:00
John Schulz
1702cf98f0
[Fleet] Use type-only imports where possible (#92979)
## Summary

Use [type-only `import`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export) to differentiate between runtime values and (erasable) TS types.

<img width="1499" alt="Screen Shot 2021-02-27 at 6 34 46 PM" src="https://user-images.githubusercontent.com/57655/109403323-84e32c80-792a-11eb-94b7-854d0e5c3e99.png">

Allows Babel and `tsc` to make some optimizations since it can be sure what can be erased.

It can also be helpful in situations like below which highlights that even though `KibanaAssetType` and `KibanaSavedObjectType` are named a certain way and from `common/types`, they are JS values _not_ TS types. They are `enum`s which means they are JS objects at runtime; not eliminated at runtime.

d92a1a08d8/x-pack/plugins/fleet/common/types/models/epm.ts (L41-L63)
2021-03-02 12:10:39 -05:00
Marco Liberati
92134cb88e
[Lens] Set pie chart slices sorted clockwise (#92617)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 17:34:46 +01:00
Byron Hulcher
3d065739ea
[App Search] Migrate Create Meta Engine View (#92127)
* New empty MetaEngineCreation component

* Added MetaEngineCreation to AppSearchConfigured router

* Empty MetaEngineCreationLogic

* Add rawName value and setRawName action to MetaEngineCreationLogic

* Add indexedEngineNames value and setIndexedEngineNames action to MEtaEngineCreationLogic

* Add selectedIndexedEngineNames value and setIndexedEngineNames action to MetaEngineCreationLogic

* Add description to MetaEngineCreation

* Add name selector to MetaEngineCreationLogic

* Added MetaEngineCreationNameInput to MetaEngineCreation

* Add fetchIndexedEngineNames listener to MetaEngineCreationLogic

* Call fetchIndexedEngineNames when MetaEngineCreation first renders

* Add EuiComboBox for selectedEngineNames to MetaEngineCreation

* WIP Add meta engine source engine limit warning to MetaEngineCreation

* Add submitEngine listener to MetaEngineCreationLogic

* Add onEngineCreationSuccess to MetaEngineCreationLogic

* Fixing tests for MetaEngineCreationLogic

* Fix tests for MetaEngineCreation

* Add Create a meta engine button to EnginesOverview

* Use DEFAULT_META for fetching indexed engine names in MetaEngineCreationLogic

* Copy fixes

* Updating POST /api/engines tests

* Add noItemsMessage prop to EnginesTable

* Add empty prompt to Meta Engines table in EnginesOverview

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Better form functionality in MetaEngineCreation

* Fix errors from github

* More MetaEngineCreation coverage

* Meta MetaEngineCreationLogic coverage

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/meta_engine_creation/meta_engine_creation_logic.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* Update x-pack/plugins/enterprise_search/public/applications/app_search/components/engines/constants.ts

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-03-02 08:20:27 -08:00
Jean-Louis Leysens
cce6861b89
[ILM] Allow multiple searchable snapshot actions (#92789)
* remove logic that disables SS action in cold if no rollover and always show replicas field

* update test coverage to be consistent with new form behaviour and expand hot phase without rollover test

* only licensing can disable searchable snapshot field

* clean up i18n

* remove ss field callout

* update error reporting logic to include causes chain, also update UI to show causes

* updated searchable snapshot field in hot phase callout

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 16:00:11 +01:00
Larry Gregory
5cc480a375
Improve consistency for display of management items (#92694)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 09:54:43 -05:00
Tiago Costa
b33ea364af
skip flaky suite (#93152) 2021-03-02 14:34:27 +00:00
Tiago Costa
a8adbbf800
skip flaky suite (#93152) 2021-03-02 14:29:48 +00:00
Yulia Čech
bf9517ed7b
[ILM] Refactor edit_policy client integration tests into separate feature files (#92826)
* Refactor edit_policy client integration tests into separate feature files

* Fixed merge conflicts with master

* Updated rollover tests to match master branch code

* Split reactive_form into smaller files

* Renamed flyout tests file
2021-03-02 15:28:12 +01:00
Angela Chuang
356d4609e8
[Security Solution] Case ui enhancement (#91863)
* ui enhancement

* fix actions

* unit test

* update row actions

* add case status all

* update find status

* fix type

* remove all case count from dropdown

* fix type error

* fix unit test

* disable bulk actions on status all

* clean up

* fix types

* fix cypress tests

* review

* review

* update status is only available for individual cases

* update available actions on status all

* fix unit test

* remove lodash get

* rename status all

* omit status if it is set to all

* do not sent status if itis set to all

* Remove all status from the backend

* Hide actions on all status

* fix unit test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2021-03-02 09:13:55 -05:00
Devin W. Hurley
1bdf0022ee
[Security Solution] [Detections] Updates warning message when no indices match provided index patterns (#93094)
* updates warning messages and modifies warning message when endpoint security rule is missing index pattern

* fix integration test text
2021-03-02 09:10:59 -05:00
Sonja Krause-Harder
ca25e5162c
Collect agent telemetry even when fleet server is disabled. (#93198) 2021-03-02 15:09:36 +01:00
Marco Liberati
547600b9b1
[Lens] Fix runtime validation error message (#93195) 2021-03-02 14:51:54 +01:00
Marta Bondyra
4077718a2a
[Lens] Remove warning about ordinal x-domain (#93049) 2021-03-02 14:49:32 +01:00
Andrew Goldstein
5a09a296d1
[Security Solution] Fixes the Customize Event Renderers modal by removing the EuiOverlayMask (#93150)
* ## [Security Solution] Fixes the Customize Event Renderers modal by removing the EuiOverlayMask

Fixes [this issue](https://github.com/elastic/kibana/issues/92798), introduced when [the EUI modal implementation changed](https://github.com/elastic/eui/pull/4480), such that it's no longer necessary to wrap modals in an `EuiOverlayMask`. The mask is now built-in to `EuiModal`.

The change above became effective throughout Kibana when it was upgraded to use a newer version of EUI via [this commit on Feb 16](8126488021 (diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519)).

This PR resolves the issue by removing the `EuiOverlayMask` around the `Customize Event Renderers modal`, shown in the `After` screenshot below:

### Before

![before](https://user-images.githubusercontent.com/59917825/109154007-b2e23880-7793-11eb-83bb-4774df77c5d6.png)

### After

![after](https://user-images.githubusercontent.com/4459398/109561954-0c4fad80-7a9b-11eb-9283-51d50ec8ea26.png)

### Desk testing

Desk-tested on a 16" 2019 MBP, and on the desktop with the following browser versions:

- Chrome `88.0.4324.192`
- Firefox `86.0`
- Safari `14.0.3`

* - force precommit git hooks to run

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 08:45:47 -05:00
Joe Portner
6ecffcc57c
Cleanup Security plugin imports (#93056) 2021-03-02 08:42:01 -05:00
Michael Olorunnisola
3c4a3b833e
[Security Solution] - Bug fixes (#92294)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 08:37:30 -05:00
Jason Stoltzfus
16a3780021
Updated doc links (#92968) 2021-03-02 07:39:04 -05:00
Walter Rafelsberger
8201d4fd01
[ML] Transforms: Fixes chart histograms for runtime fields. (#93028)
Fixes chart histograms for runtime fields. The runtime field configurations were not passed on to the endpoint to fetch the charts data, so charts ended up being empty with a 0 documents legend.
2021-03-02 13:37:29 +01:00
Alejandro Fernández Haro
c0535abc06
[chore] Enable core's eslint rule: @ts-expect-error (#93086)
* [chore] Enable core's eslint rules

* Change comment from platform-team to core-team
2021-03-02 05:53:36 -05:00
Marco Liberati
03cc5cc0c2
[Lens] Introduces new chart switcher (#91844)
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 11:25:35 +01:00
Marta Bondyra
657c273866
[Lens] fix selection when dragging (#93034) 2021-03-02 11:08:18 +01:00
Christiane (Tina) Heiligers
d7cac22ba2
Converts usage collection README to .mdx (#92982)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-02 09:40:43 +00:00
Xavier Mouligneau
2903844dd1
[SECURITY SOLUTIONS] Bug case connector (#93104)
* bring back case connector to design

* disable connector sir in collection

* missing to only create collection type

* fix fields connector when you need to hide service-now sir
2021-03-01 22:46:22 -05:00
Steph Milovic
90976ee119
[Security Solution] [Timeline] Bugfix to include unmapped fields in the timeline event details JSON (#92025) 2021-03-01 21:40:54 -06:00
Yuliia Naumenko
7a1944a5a0
[Alerting][Docs] Changed alerting documentation to point to a single source of explaining the configurations. (#92942)
* [Alerting][Docs] Changed alerting documentation to poin to a single source of explaining the configurations.

* fixed due to comments

* fixed due to comments

* Apply suggestions from code review

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

* fixed due to comments

Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
2021-03-01 19:34:27 -08:00
Oliver Gupte
6897a4ac0b
[APM] Fix hidden search bar in error pages while loading (#84476) (#93139) 2021-03-01 18:39:32 -08:00
Yara Tercero
fb1394812d
[Security Solution][Detections] -Fixes rule edit flow bug with max_signals (#92748)
### Summary

Fixes a bug where max_signals was being reverted to it's default value when the rule was edited via the UI.
2021-03-01 20:35:21 -05:00
Christos Nasikas
aa62a130ee
[SecuritySolution][Case] Disable cases on detections in read-only mode (#93010)
* Disable cases on detetions on read-only mode

* Add cypress tests
2021-03-01 17:38:49 -05:00
Jonathan Buttner
4739eab490
[Security Solution][Case][Bug] Prevent closing collection when pushing (#93095)
* Prevent closing collection when pushing

* Fixing translations
2021-03-01 17:11:47 -05:00
Madison Caldwell
cb053f4672
[Security Solution][Detections][7.12] Critical Threshold Rule Fixes (#92667)
* Threshold cardinality validation

* Remove comments

* Fix legacy threshold signal dupe mitigation

* Add find_threshold_signals tests

* remove comment

* bug fixes

* Fix edit form value initialization for cardinality_value

* Fix test

* Type and test fixes

* Tests/types

* Reenable threshold cypress test

* Schema fixes

* Types and tests, normalize threshold field util

* Continue cleaning up types

* Some more pre-7.12 tests

* Limit cardinality_field to length 1 for now

* Cardinality to array

* Cardinality to array

* Tests/types

* cardinality can be null

* Handle empty threshold field in bulk_create_threshold_signals

* Remove cardinality_field, cardinality_value
2021-03-01 17:10:22 -05:00
Jason Stoltzfus
892d44cafd
[App Search] Implement various Relevance Tuning states and form actions (#92644) 2021-03-01 16:49:57 -05:00
Patrick Mueller
ff546a1af4
[actions] for simplistic email servers, set rejectUnauthorized to false (#91760)
resolves https://github.com/elastic/kibana/issues/91686

The poor email action has not had great success in setting TLS options
correctly.  Prior to 7.11, it was basically always setting `rejectUnauthorized`
to false, so was never validating certificates.  Starting in 7.11.0, it
started respecting TLS certificates, but there are some simple/test servers
in use that use self-signed certificates.

The real fix for this will be the resolution of issue
https://github.com/elastic/kibana/issues/80120 , but until then, this PR
does a special-case check if the `secure` option is off (so the email client
connects with a plain socket and then upgrades to TLS via STARTTLS) and both
the user and password for the server are not set, then it will use
`rejectUnauthorized: false`.  Otherwise, it uses the global configured value
of this setting.

This also changes some other cases, where `secure: true` often did not
set any `rejectUnauthorized` property at all, and so did not get verified.
Now in all cases, `rejectUnauthorized` will be set, and the value will
correspond to the globally configured value, except for the special case
checked here, and when a proxy is in use (that logic did not change).

So it is possible this would break customers, who were using insecure servers
and email action worked, but with this fix the connections will be rejected.
They should have been rejected all this time though.

The work-around for this problem, if we don't implement a fix like this, is
that customers will need to set the global `rejectUnauthorized` to `false`,
which means NONE of their TLS connections for any actions will be verified.
Which seems extreme.
2021-03-01 16:30:21 -05:00
Christos Nasikas
31889a589d
[Security Solution][Case] Migrate category & subcategory fields of ServiceNow ITSM connector (#93092) 2021-03-01 16:21:00 -05:00
Nathan L Smith
0320f1afb7
Hide instances latency distribution chart (#92869)
...until #88852 and #92631 are resolved.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 15:16:29 -06:00
Nathan Reese
59c0380de0
[Maps] fix MapboxDraw import from pointing to dist just pointing to folder (#93087) 2021-03-01 14:11:39 -07:00
Nathan Reese
08c40955a4
[Maps] fix results trimmed tooltip message doubles feature count for line and polygon features (#92932)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:11:18 -07:00
Ryland Herrick
a55d8b60ea
[Security Solution][Detecttions] Indicator enrichment tweaks (#92989)
* Update copy of rule config

* Encode threat index as part of our named query

* Add index to named query, and enrich both id and index

We still need mappings and to fix integration tests, but this generates
the correct data.

* Update integration tests with new enrichment fields

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:57:35 -06:00
Nathan Reese
d02294cb98
[Maps] fix fit to data on heatmap not working (#92697)
* [Maps] fix fit to data on heatmap not working

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 13:42:14 -07:00
Candace Park
1a3bbbf917
[Security Solution][Endpoint][Admin] Fixes policy sticky footer save test (#92919)
* commented code to close out toast
2021-03-01 15:31:05 -05:00
Candace Park
33b24c5d89
[Security Solution][Endpoint][Admin] Fixes 7.12 ransomware migration and mac bug (#92639) 2021-03-01 15:27:02 -05:00
Jonathan Buttner
d9043c1c46
[Security Solution][Case][Bug] Removing empty collections when filtering on status (#92048)
* Removing empty collections when not filtering on status

* Fixing add comment response

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 14:47:38 -05:00
Frank Hassanabad
1a7709541c
Changes out the default arrays and adds types (#93063)
## Summary

Follow up from: 
https://github.com/elastic/kibana/pull/92928

Removes the default arrays and adds typing to the rule schema in order to see which ones require default arrays vs. which ones can/should be defaulted as `undefined`. Updates unit tests.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-03-01 12:09:39 -07:00
Alejandro Fernández Haro
f44916b6aa
[Telemetry] Full schema definition (#90273)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 18:30:51 +00:00
Tim Sullivan
40fa961d53
[Reporting] Remove unused priority field (#92552)
* [Reporting] Remove unused priority field

* fix test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 10:41:08 -07:00
Tim Sullivan
348472cd59
[Reporting] Clean up test helpers and mocks (#92550)
* [Reporting] Clean up logger instances and mocks

* revert logging changes, just keep test changes

* remove fluff

* clean up too much logger.clone

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 10:19:13 -07:00
Jonathan Buttner
b5cd44e7ac
[Security Solution][Case][Bug] Only add rule object for alert comments (#92977)
* Adding test for alert rule fields migration

* Fixing directory issue

* Add more descriptive message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 11:14:14 -05:00
Christos Nasikas
4ab91daa2d
[Security Solution][Case] Show the current connector name in case view (#93018) 2021-03-01 18:09:09 +02:00
Angela Chuang
1fa774cfe9
[Security Solution] Remove unused mock data (#92357)
* update mocked index

* update mocked index

* update mocked index

* remove unused mock data

* update mock data

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 15:25:12 +00:00
Frank Hassanabad
4b42574846
Adds mapping to the signals for the indicator rules that were missing (#92928)
## Summary

Indicator rules were missing the mappings and the copy code for when they were being created. This fixes that.

**Manual testing instructions**

Add an indicator rule:
<img width="1075" alt="Screen Shot 2021-02-25 at 3 33 05 PM" src="https://user-images.githubusercontent.com/1151048/109229217-37c35700-7780-11eb-9988-573d53f2c076.png">

Then after it fires check that it shows up in the timeline and tables and also check that it is queryable:
<img width="473" alt="Screen Shot 2021-02-25 at 3 31 48 PM" src="https://user-images.githubusercontent.com/1151048/109229261-4a3d9080-7780-11eb-808b-06fb0e9e4099.png">
<img width="509" alt="Screen Shot 2021-02-25 at 3 32 12 PM" src="https://user-images.githubusercontent.com/1151048/109229269-4c075400-7780-11eb-96bd-2464a7ac555e.png">
<img width="1390" alt="Screen Shot 2021-02-25 at 3 39 20 PM" src="https://user-images.githubusercontent.com/1151048/109229290-545f8f00-7780-11eb-982c-4506552973df.png">

### Checklist
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-03-01 08:43:43 -06:00