Commit graph

31260 commits

Author SHA1 Message Date
Mikhail Shustov 5c436534d6
Add an optional authentication mode for HTTP resources (#58589)
* add authRequred: 'optional'

* expose auth status via request context

* update security plugin to use notHandled auth outcome

* capabilities service uses optional auth

* update tests

* attach security headers only to unauthorised response

* add isAuthenticated tests for 'optional' auth mode

* security plugin relies on http.auth.isAuthenticated to calc capabilities

* generate docs

* reword test suit names

* update tests

* update test checking isAuth on optional auth path

* address Oleg comments

* add test for auth: try

* fix

* pass isAuthenticted as boolean via context

* remove response header from notHandled

* update docs

* add redirected for auth interceptor

* security plugin uses t.redirected to be compat with auth: optional

* update docs

* require location header in the interface

* address comments #1

* declare isAuthenticated on KibanaRequest

* remove auth.isAuthenticated from scope

* update docs

* remove unnecessary comment

* do not fail on FakrRequest

* small improvements
2020-03-07 11:55:20 +01:00
Matthew Kime 74f9b448f7
Implement embeddable drilldown menu options (#59232)
* Implement embeddable drilldown menu options
2020-03-06 20:58:24 -06:00
Andrea Del Rio 55fa3d6f42
[Alerting] "Create alert" graph visualization design improvements (#59399) 2020-03-06 18:29:17 -08:00
Yuliia Naumenko b960c6aff7
Alerting update route throttle property is missing (#59580)
* Added throttle property to update method of alertClient

* Fixed failing snapshot

* Fixed type check errors

* Fixed null update for siem throttle
2020-03-06 17:21:21 -08:00
MadameSheema 9ab4aa027c
[SIEM] Adds 'Load prebuilt rules' Cypress test (#59529)
* adds 'load prebuilt rules'

* fixes typecheck issue

* updates jest snapshot
2020-03-06 22:41:05 +01:00
Liza Katz 5db1b0a18d
Show error if field is not found during filter rendering (#59298)
* Show error if field is not found

* Errored filter state

* Design adjustments

* Fixing class names and making look similar to disabled

* code review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
2020-03-06 23:32:42 +02:00
Brian Seeders ac9c192234
Navigate back to discover app during test, because the saved search from the preceding test has major performance problems when used with this test (#59571) 2020-03-06 16:04:11 -05:00
Brian Seeders dd9999bf5d
Check for alert dialog when doing a force logout (#59329) 2020-03-06 16:03:41 -05:00
Spencer 76c205cd1e
ensure fs deletes are not cwd dependent (#59570)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-06 11:54:49 -07:00
Nathan L Smith 0d3dd97691
Empty message for APM service map (#59518)
When only one node is displayed, show an empty message.

Also:

* Start adding a basic Jest test for the ServiceMap component
* Fix bug where EuiDocsLink was rendering "children" instead of the actual children

Closes #59326.
Closes #59128.
2020-03-06 12:54:28 -06:00
Anton Dosov 3c4cf56008
[Drilldowns] <ActionWizard/> Component (#59032) 2020-03-06 19:46:47 +01:00
Tim Sullivan fbbb3f8091
[Reporting] Improve the page exit error messages (#59351)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 11:43:15 -07:00
Brian Seeders 8fa9962641
Ensure logged out starting state for tests that need it (#59322) 2020-03-06 12:16:06 -05:00
Pierre Gayvallet 45fb6f38b8
Hide input value from kbn-config-schema error messages (#58843)
* use inline snapshots instead of snapshots

* hide input value from error messages

* update core snapshots

* update xpack snapshots

* fix ftr assertions

* fix new snapshots

* hide values for byte_size and duration

* update new snapshots

* remove another byte_size value reference

* fix yet another value references in error messages

* update xpack snapshots

* update xpack ftr assertions
2020-03-06 17:47:28 +01:00
Walter Rafelsberger f4f956dfeb
[ML] Transforms: Migrate client plugin to NP. (#59443)
Migrates the client side plugin of transforms to NP.
- Gets rid of the last parts of the shim (http, documentation links)
- Moves the plugin from x-pack/legacy/plugins/transform/public to x-pack/plugins/transform
- Creates a custom mock for appDependencies based on NP services
- Fixes jest tests to get rid of all act() related warnings
2020-03-06 17:44:35 +01:00
Robert Oskamp 708d92a00e [ML] Disable failing functional tests 2020-03-06 16:55:57 +01:00
Andrew Goldstein 060b9fb10e
[SIEM] Update Timeline to use the latest euiFlyoutBody style (#59524)
## [SIEM] Update Timeline to use the latest euiFlyoutBody style

[A recent update to EUI](https://github.com/elastic/eui/pull/2837) requires an update to Timeline to restore its original padding, per the before / after screenshots below:

### Before

The previous code, which was using the `euiFlyoutBody__overflow` style, has extra padding (before this PR):

![timeline-padding-before-chrome](https://user-images.githubusercontent.com/4459398/76060425-81e37500-5f3e-11ea-8083-a58297afee85.png)

### After Chrome `80.0.3987.132`

The new code in this PR uses `euiFlyoutBody__overflowContent`, which restores the Timeline's original padding:

![timeline-paddng-after-chrome-default-theme](https://user-images.githubusercontent.com/4459398/76060436-8b6cdd00-5f3e-11ea-80d6-9ff0e74722c3.png)

![timeline-padding-after-chrome-dark-theme](https://user-images.githubusercontent.com/4459398/76060601-dedf2b00-5f3e-11ea-8a46-1008d7defe09.png)

### After Firefox `73.0.1`

![timeline-padding-after-firefox](https://user-images.githubusercontent.com/4459398/76060692-18b03180-5f3f-11ea-8277-31b6f9dbf211.png)

### After Safari `13.0.5`

![timeline-padding-after-safari](https://user-images.githubusercontent.com/4459398/76060744-38475a00-5f3f-11ea-9b04-cdd45fa41702.png)
2020-03-06 08:45:08 -07:00
Alex Holmansky 07757eae84
Temporarily remove the project mappings for PR labels (#59493)
* Use diagnostics-enable action in the workflow. Issue: #56526

* Update workflow to use v1.0.2 of the action

* Adding a new test workflow that uses a personal access token

* Remove an extra coma

* Updated project-assigner action version and access key

* Deleted the test workflow

* Temporarily commenting out project mappings while we debug the permissions issues

* Temporarily commenting out project mappings while we debug the permissions issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 10:31:47 -05:00
Patrick Mueller ba40d25d46
[Alerting] replace index threshold graph usage of watcher APIs with new API (#59385)
Changes the alerting UI to use the new time series query HTTP endpoint provided by the builtin index threshold alertType; previously it used a watcher HTTP endpoint.

This is part of the ongoing index threshold work tracked in https://github.com/elastic/kibana/issues/53041
2020-03-06 10:26:52 -05:00
Dima Arnautov d969c08a00
[ML] Show view series link in anomalies table for machine_learning_user role (#59549) 2020-03-06 16:19:03 +01:00
Corey Robertson 9a3d0a5229
Move build_embeddable_filters into public (#59087)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 10:12:05 -05:00
Jonathan Buttner 2e41a27c46
[Endpoint] Unifying the test index name for resolver and alerts (#59073)
* Unifying the test index name for resolver and alerts

* Endpoint isn't sending the agent field so check for it

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 09:43:52 -05:00
Marta Bondyra 4977e57a3e
[Lens] Remove warnings in tests in EditorFrame (#59447)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 13:06:41 +01:00
Joe Reuter 44a35ecdbd
Move timelion app hiding to new platform (#58740) 2020-03-06 12:40:57 +01:00
Dima Arnautov 3a53fe8e45
[ML] Use Kibana's HttpHandler for HTTP requests (#59320)
* [ML] use kibana http

* [ML] fromHttpHandler

* [ML] remove __LEGACY, update asSystemRequest header

* [ML] transform with NP http
2020-03-06 11:34:19 +01:00
Cauê Marcondes 2817d6e3a8
[APM] Create settings page to manage Custom Links (#57788)
* creating custom action index

* reverting service form to service section

* creating useForm hooks and fields section

* adding react-hook-form

* refactoring

* validating filters

* fixing imports

* refactoring to NP and creating save custom action

* creating basic apis for custom actions

* refactoring

* changing custom action filters type

* adding delete option

* removing useForm

* fixing flyout view

* filters are invalid when selecting the default value

* ui fixes

* ui fixes

* fixing typescript

* fixing typescript

* fixing labels and adding space btw components

* refactoring filters structure

* removing reach-hook-form

* removing reach-hook-form

* adding unit tests

* adding unit tests

* create custom action index

* adding filter option

* refactoring create index, creating filter links

* creating list api

* rename custom action to custom link

* fixing unit tests

* adding unit tests

* refactoring callApmApi

* removing useCallApmApi hook

* Rename Flyoutfooter.tsx to FlyoutFooter.tsx

* removing unused import

* fixing typescript errors

* fixing duplicate messages

* removing filters

* fixing save functionality

* fixing pr comments

* fixing pr comments
2020-03-06 11:06:16 +01:00
Jean-Louis Leysens 651d0a9739
[Upgrade Assistant] Server-side batch reindexing (#58598)
* Added server side logic for handling batch reindex

* Remove literal string interpolation from translation

* Refactor return value of batch endpoint

"sucesses" does not communicate accurately what has happened.
"started" more closely reflects what has happened.

* First iteration of batch queues

* Single queue

Changed the batchqueues implementation to only using a single queue
 - since there is only one ES that it is interacting with.

Before continuing with this work, just making sure that these pre-
cautions are necessary!

* Clean up old batch queue implementation

* Slight refactor

* Revert batch queues implementation

* Introduction of QueueSettings

Queue settings can be set on a reindex operation and set a
timemstamp value on the reindex operation for the scheduler
to use down the line for ordering operations and running them
in series

* Updated worker logic to handle items in queue in series

* Refactor /batch endpoint response to "enqueued" not "started"

* Fixed jest tests

* Refactor worker refresh operations for readability

Created a new file op_utils where logic repsonsible for sorting
and ordering reindex operation saved objects is.

* Add batch API integration test

Also assert that reindexing is happening in the expected order

* Added a new endpoint: GET batch/queue

This allows users of the API to see what the current queue state
is for visibility. Using the queue endpoint int he API integration
tests for batch too.

* Reset the queuedAt timestamp on resume

If a reindexOperation is being resumed and put in a queue we
also need to reset the queuedAt timestamp to respect the new
batch queue ordering.

* Fix jest test

Added 'undefined' as the second optional param to
resumeIndexOperation call.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 10:18:21 +01:00
MadameSheema 8220999c12
completes navigation test (#59141)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 08:42:18 +01:00
Andrew Goldstein 4db7f49608
[SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload (#59476)
## [SIEM] Fixes dragging entries to the Timeline while data is loading may trigger a partial page reload

The `react-beautiful-dnd` library, upgraded during the `7.6` stack release from
`10.0.1` to `12.2.0`, includes a breaking change to the way [errors are handled](https://github.com/atlassian/react-beautiful-dnd/blob/v12.0.0/docs/guides/setup-problem-detection-and-error-recovery.md)
and recovered. As a result of this change, an uncaught error may trigger a
an effect that feels (from the perspective of a user) like a partial page
reload.

The most common condition where this can occur is when dragging entries to the
Timeline while data is loading, per the animated gif below:

![refresh-error](https://user-images.githubusercontent.com/4459398/76016029-59755f80-5ed9-11ea-858d-cb1189d22ea9.gif)

## Reproduction steps

1. Navigate to the Hosts page
2. Open the Timeline
3. Drag a host to the Timeline
4. While data is still loading, drag a different host to the Timeline to create an `or` query

**Expected Results**
* The page does not appear to reload
* In development mode, a single error is logged to the JS console

**Actual Results**
* The page appears to reload
* In development mode, two errors are logged to the JS console

**Error 1**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
    in Draggable (created by ConnectFunction)
    in ConnectFunction (created by PrivateDraggable)
    in PrivateDraggable (created by PublicDraggable)
    in PublicDraggable (created by Droppable)
    in Droppable (created by ConnectFunction)
    in ConnectFunction
```

**Error 2**
```
react-beautiful-dnd
Invariant failed: Cannot find droppable entry with id [droppableId.content.event-details-value-default-draggable-plain-column-renderer-formatted-field-value-timeline-1-kLGooXABOOUskGlPiQw5-@timestamp-1583260131000]👷<200d> This is a development only message. It will be removed in production builds.
    in ErrorBoundary (created by DragDropContext)
    in DragDropContext (created by Anonymous)
    in Anonymous
```

### Desk testing

Tested locally in:
* Chrome `80.0.3987.122`
* Firefox `73.0.1`
* Safari `13.0.5`

Fixes https://github.com/elastic/kibana/issues/59466
2020-03-05 23:08:56 -07:00
Tim Sullivan 893d8da1d8
[Reporting/Screenshots] Handle page setup errors and capture the page, don't fail the job (#58683)
* [Reporting] Handle error if intercepted request could not be continued

* [Reporting/Screenshots] Handle page setup errors and capture the page with errors shown

* show warnings in UI

* i18n todos

* Cleanup an old troubleshooting task

* set the default for all new timeout settings to 30 seconds

* fix some tests

* update error strings

* Cleanup 2

* fix tests 2

* polish the job info map status items

* More error message updating

* Log the error that was caught

* Oops fix ts

* add documentation

* fix i18n

* fix mocha test

* use the openUrl timeout as the default for navigation

* fix comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 22:26:36 -07:00
Xavier Mouligneau c29ef14656
[SIEM] [CASES] API with io-ts validation (#59265)
* refactor to use io-ts, to be able to have ressource with sub, add total comments via comment_ids, be able to delete multiple cases/comments

* fix test

* adapt UI to refactor of the API

* put it back the way it was

* clean up to get cases

* review I

* review II - bring back url  parameter

* fix merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 23:29:55 -05:00
Lukas Olson f511afa729
Use camelCase rather than snakeCase for plugin name (#59461) 2020-03-05 20:46:45 -07:00
Nathan Reese 578137fb20
[Maps] top term percentage field property (#59386)
* [Maps] top term percentage property

* populate percentage in feature properties

* TS work

* clean up TS

* fix all type errors

* unit test for esAggFieldsFactory

* clean up

* i18n cleanup

* do not show decimal place for perentage

* fix jest expects

* fix eslint errors

* tslint errors

* handle empty top bucket aggregation

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 19:58:22 -07:00
Yuliia Naumenko 5ff13ada6b
Add custom action to registry and show actions list in siem (#58395)
* Add custom action to registry and show actions list in siem

* Exposed action form as reusable component

* Fixed few small bugs

* Fixed red ci

* Fixed type checks

* Fixed failed tests

* Fixed due to comments

* Fixed type check errors

* Fixed plugin check

* Rebalancing CI groups according to #58930

* Fixed merge issues
2020-03-05 17:47:08 -08:00
Lukas Olson c4b385dfd5
[Search service] Add enhanced ES search strategy (#59224)
* Add async search strategy

* Add async search

* Fix async strategy and add tests

* Move types to separate file

* Revert changes to demo search

* Update demo search strategy to use async

* Add async es search strategy

* Return response as rawResponse

* Poll after initial request

* Add cancellation to search strategies

* Add tests

* Simplify async search strategy

* Move loadingCount to search strategy

* Update abort controller library

* Bootstrap

* Abort when the request is aborted

* Add utility and update value suggestions route

* Fix bad merge conflict

* Update tests

* Move to data_enhanced plugin

* Remove bad merge

* Revert switching abort controller libraries

* Revert package.json in lib

* Move to previous abort controller

* Add support for frozen indices

* Fix test to use fake timers to run debounced handlers

* Revert changes to example plugin

* Fix loading bar not going away when cancelling

* Call getSearchStrategy instead of passing  directly

* Add async demo search strategy

* Fix error with setting state

* Update how aborting works

* Fix type checks

* Add test for loading count

* Attempt to fix broken example test

* Revert changes to test

* Fix test

* Update name to camelCase

* Fix failing test

* Don't require data_enhanced in example plugin

* Actually send DELETE request

* Use waitForCompletion parameter

* Use default search params

* Add support for rollups

* Only make changes needed for frozen indices/rollups

* Fix tests/types

* Don't include skipped in loaded/total

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 16:47:45 -07:00
Felix Stürmer 1a548a1e42
[Logs UI] Speed up stream rendering using memoization (#59163)
This aims to be a quick performance improvement by memoizing the LogEntryRow component.
2020-03-06 00:19:32 +01:00
Spencer 5408f45b52
expand max-old-space-size for xpack jest tests (#59455)
* expand max-old-space-size for xpack jest tests

* turns out we are already at 4GB

* limit to 6GB for now
2020-03-05 15:59:33 -07:00
Yuliia Naumenko e869695d73
Added possibility to embed connectors create and edit flyouts (#58514)
* Added possibility to embed connectors flyout

* Fixed type checks and removed example from siem start page

* Fixed jest tests

* Fixed failing tests

* fixed type check

* Added config for siem tests

* Fixed failing tests

* Fixed due to comments

* Added missing documentation
2020-03-05 14:57:32 -08:00
Alex Holmansky c3f8647c3e
Revert "Temporarily disabling PR project mappings (#59485)" (#59491)
This reverts commit 75dabc5dce.
2020-03-05 17:23:48 -05:00
Alex Holmansky 75dabc5dce
Temporarily disabling PR project mappings (#59485)
* Use diagnostics-enable action in the workflow. Issue: #56526

* Update workflow to use v1.0.2 of the action

* Adding a new test workflow that uses a personal access token

* Remove an extra coma

* Updated project-assigner action version and access key

* Deleted the test workflow

* Temporarily commenting out project mappings while we debug the permissions issues

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 17:21:23 -05:00
marshallmain d5497d99b2
[Endpoint] Fix alert list functional test error (#59357)
* fix the functional test error

* fix linting

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 16:35:54 -05:00
Josh Dover 944be80091
Rename status_page to statusPage (#59186) 2020-03-05 14:16:37 -07:00
Spencer 4bc9e8b4a8
Fix visual baseline job (#59348)
* Establish Percy baselines

* move Jenkinsfile changed back to `.ci` directory

* rename xpack workers

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 13:01:42 -07:00
Yuliia Naumenko 26aed8dc30
Extended AlertContextValue with metadata optional property (#59391)
* Extended AlertContextValue with metadata optional property

* Made metadata generic
2020-03-05 11:55:30 -08:00
gchaps 2f97b4c06a
[DOCS] Updates Snapshot and Restore doc (#59451)
* [DOCS] Updates Snapshot and Restore doc

* [DOCS] Incorporates review comment
2020-03-05 11:32:32 -08:00
Chandler Prall 096dda6f34
Upgrade EUI to v20.0.2 (#59199)
* Updated EUI to 20.0.1; updated typescript usage

* snapshots

* Upgrade to eui 20.0.2, fix one more type

* PR feedback

* Update EUI icon usage to the correct types

* Updated with master
2020-03-05 12:27:52 -07:00
Lee Drengenberg e0022be6d3
wait for any text in dialog (#59352)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-05 13:08:29 -06:00
Steph Milovic 91a5b17cfd
[SIEM] [Case] All cases page design updates (#59248) 2020-03-05 11:29:44 -07:00
Thomas Neirynck 46738cfa0a
[Maps] Add field and style-meta types (#58766) 2020-03-05 12:26:28 -05:00
Luke Elmers 87a3d02d44
Remove schemas from agg configs (#58462) 2020-03-05 10:18:12 -07:00