Commit graph

122 commits

Author SHA1 Message Date
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Yuliia Naumenko f6e93a19d3
Fixed pre-configured docs link points to the wrong page and functional tests configs (#68606)
* Fixed pre-configured docs link points to the wrong page and functional tests configs

* Fixed doc link
2020-06-09 07:00:31 -07:00
Aleh Zasypkin c6e2fed1c6
Register privileges in Kibana Platform Security plugin and remove legacy getUser API. (#65472) 2020-06-05 08:11:58 +02:00
Yuliia Naumenko ce45dad8b6
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE (#66838)
* Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE

* Changed alerting REST API to keep the pattern 'alerts/alert/{id}'

* fixed tests

* fixed tests

* Fixed jest tests

* Renamed plugin from alerting to alerts

* fixed tests

* fixed tests

* Fixed alert type check error

* Fixed find api

* fixed type checks

* fixed tests security issues

* Fixed view in app

* -

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 18:45:36 -07:00
Mikhail Shustov 53b95424fe
Deprecate es API exposed from setup contract (#67596)
* move elasticsearch client under legacy namespace

* update mocks and tests

* update platform code

* update legacy code

* update plugins using elasticsearch setup API

* update request handler context

* update docs

* rename remaining places

* address comments

* fix merge conflict error
2020-06-01 16:16:44 +02:00
Yuliia Naumenko d09bd63786
Changed actions API endpoints urls to follow Kibana STYLEGUIDE (#65936)
* Changed actions API endpoints urls to follow Kibana STYLEGUIDE

* Fixed tests

* fixed test

* fixed test

* resolved conflicts

* Fixed siem tests

* Fixed failing test

* fixed readme and test

* Changed actions api urls to follow the template 'api/{plugin}/{type}/{id}

* Fixed type checks

* Fixed tests and API

* fixed tests

* Fixed type checks

* fixed type check
2020-05-24 20:27:42 -07:00
Gidi Meir Morris def6526384
[Alerting] Hides the action and action_task_params SavedObjects types (#67109)
As part of the work towards adding RBAC & Feature Controls support in Alerting (https://github.com/elastic/kibana/issues/43994), we've decided that the ActionsClient will handle authorisation against Actions instead of relying on the SavedObjectsClient on its own.

To prevent (or at least, minimise the chances of) bypassing this auth model by using the SavedObjects client this PR makes the `action` and `action_task_params` SavedObject types  _hidden_ types and given the ActionsClient permission to interact with it.
2020-05-22 09:07:09 +01:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Gidi Meir Morris 65370c70d2
[Alerting] Hides the alert SavedObjects type (#66719)
* make alert saved object type hidden

* fix support for hidden alert type in alerting tests

* updated api docs

* fixed some missing types and unused imports

* fixed test broken by field rename

* added support for including hidden types in saved objects client

* fixed merge conflict

* cleaned up some test descriptions

* adds a getClient api to Encrypted Saved Objects

* fixed alerts fixture

* added missing plugin type in alerting

* removed unused field

* chaged ESO api to an options object as per Security teams request

* fixed usage of eso client

* fixed typos and oversights

* split alerts file into two - for actions and alerts
2020-05-21 11:00:15 +01:00
Gidi Meir Morris dfa22d17b9
[Saved Objects] adds support for including hidden types in saved objects client (#66879)
As part of the work needed for RBAC & Feature Controls support in Alerting (https://github.com/elastic/kibana/issues/43994) we've identified a need to make the Alert Saved Object type a _hidden_ type.

As we still need support for Security and Spaces, we wish to use the standard SavedObjectsClient and its middleware, but currently this isn't possible with _hidden_ types.

To address that, this PR adds support for creating a client which includes hidden types.
2020-05-20 09:55:02 +01:00
Yuliia Naumenko 5ed5fda832
Allow registered alert types to be non-editable (#65606)
* Allow registered alert types to be non-editable

* Fixed isUiEditEnabled values

* Fixed due to comments

* fixed failing tests

* Enable alert type selection per alert consumer, only 'alerting' consumer can display other consumers alert types, but in case if it isEditable

* fixed tests

* Removed consumer property from the client side alert type registry and added server side property producer which purpose is to manage a feature logic

* fixed type check

* Fixed tests and type checks

* Removed error message for non registered plugins

* Fixed failing tests

* Fixed due to comments

* fixed test

* -

* revert logic for requiresAppContext

* Added close toast after saving alert
2020-05-12 13:38:22 -07:00
Patrick Mueller 39427f5ed3
[Alerting] changes preconfigured actions config from array to object (#65397)
resolves https://github.com/elastic/kibana/issues/63171

Previously, preconfigured actions were specified as an array of action
properties.  This ended up being problematic when using the kibana keystore
for secrets, as you'd have to reference specific actions via index.

This changes preconfigured actions to be specified as an object, where the
property key is the id, and the body is the remainder of the action properties.

As access to preconfigured actions has leaked across the code base, it's
probably time to consider changing the internal representation from an array
to a Map, to provide easier access by action id.  For a future PR.
2020-05-07 15:12:01 -04:00
Gidi Meir Morris 94127d803a
[Alerting] migrates acceptance and functional test fixtures to KP (#64888)
This PR migrates the vast majority of Alerting legacy code to the Kibana Platform.

This includes:

1. Removed legacy Task Manager
2. Migrates Fixture plugins in Alerting, Triggers UI and Task Manager Perf

This does not includes:

1. The PagerDuty simulator due to a lack of support for custom responses in the platform. issue opened. https://github.com/elastic/kibana/issues/65045
2. The Webhooks simulator due to a lack of support for custom authorisation. Requires investigation.
2020-05-06 09:57:26 +01:00
Christos Nasikas 47b8ba5d5b
[SIEM][CASE] Refactor Connectors - Jira Connector (#63450) 2020-05-01 00:20:00 +03:00
Gidi Meir Morris 9fe7229357
[Alerting] migrates all remaining plugins to new platform (#64335)
Completes the migration of all Alerting Services plugins onto the Kibana Platform

It includes:

1. Actions plugin
2. Alerting plugin
3. Task Manager plugin
4. Triggers UI plugin

And touches the Uptime and Siem plugins as their use of the Task Manager relied on some of the legacy lifecycle to work (registering AlertTypes and Telemetry tasks after the Start stage has already began). The fix was simply to moves these registrations to the Setup stage.
2020-04-29 15:46:54 +01:00
Mike Côté db374fc950
Ability to get scoped call cluster from alerting and action executors (#64432)
* Initial work

* Rename to getScopedCallCluster

* Fix typecheck

* Fix more type check issues

* Add tests

* Add docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-27 13:46:04 -04:00
Yuliia Naumenko f7e1c17f28
Implemented do not return the config from the action APIs get and getAll (#64266) 2020-04-23 07:53:54 -07:00
Patrick Mueller 7677764c65
[Alerting] fixes to allow pre-configured actions to be executed (#63432)
resolves https://github.com/elastic/kibana/issues/63162

Most of the support for pre-configured actions has already been added
to Kibana, except for one small piece.  The ability for them to be
executed.  This PR adds that support.
2020-04-14 18:20:50 -04:00
Yuliia Naumenko 730dcbf638
Implemented actions server API for supporting preconfigured connectors (#62382)
* Implemented actions server API for supporting preconfigured connectors defined in kibana.yaml

* Fixed type check

* Fixed due to comments and extended functional tests

* Fixed tests and renamed connectors

* fixed jest tests

* Fixed type checks

* Fixed failing alert save

* Fixed alert client tests

* fixed type checks

* Fixed language check error

* Fixed jest tests

* Added missing comments and docs

* fixed due to comments

* Fixed json config for preconfigured

* fixed type check, reverted config

* config experiment with json stringify

* revert experiment

* Removed the spaces from connector names in config
2020-04-08 09:54:42 -07:00
Mikhail Shustov ab39ceba8f
Serve static assets from NP (#60490)
* add hapi.inert plugin to NP

* update tests

* move serving static assets

* update tests

* add functional tests

* fix type errors. Hapi.Request doesn't support typings for payload

* update docs

* remove comment

* move assets to NP

* update all assets references

* address Spencer's comments

* move ui settings migration to migration examples

* document legacy plugin spec

* move platform assets test to integration_tests

* address Spencer's comment p.2

* try to fix type errors

* fix merge commit

* update tests
2020-03-27 14:24:28 +01:00
Patrick Mueller aa73e2aee3
[Alerting] change index action config executionTimeField to nullable (#61127)
resolves https://github.com/elastic/kibana/issues/61056

When the index action params moved into config, the `schema.maybe()` on the
`executionTimeField` should have been changed to `schema.nullable()`, otherwise
you can never "unset" the field, once it's set.

Changes rippled down to the UI as well.

To be extra safe, we also check that the `executionTimeField` isn't an empty
string when trimmed, as ES will not accept a document with a property that is
the empty string.
2020-03-24 23:19:56 -04:00
Larry Gregory b82cc6ed4a
Support for sub-feature privileges (#60563)
* initial server-side support for sub-feature privileges (#57507)

* initial server-side support for sub-feature privileges

* start addressing PR feedback

* renaming interfaces

* move privilege id collision check to security plugin

* additional testing

* change featurePrivilegeIterator import location

* fix link assertions following rebase from master

* Initial UI support for sub-feature privileges (#59198)

* Initial UI support for sub-feature privileges

* Address PR feedback

* display deleted spaces correctly in the privilege summary

* additional testing

* update snapshot

* Enables sub-feature privileges for gold+ licenses (#59750)

* enables sub-feature privileges for gold+ licenses

* Address PR feedback

* address platform review feedback
2020-03-24 11:12:49 -04:00
Patrick Mueller 72bc0eae32
[Alerting] allow email action to not require auth (#60839)
resolves https://github.com/elastic/kibana/issues/57143

Currently, the built-in email action requires user/password properties to be
set in it's secrets parameters.  This PR changes that requirement, so they
are no longer required.
2020-03-23 19:02:28 -04:00
Patrick Mueller e73159281e
[Alerting] fix flaky test for index threshold grouping (#60792)
resolves https://github.com/elastic/kibana/issues/60744

This is a fairly complex test, with alerts that run actions that write to
an index which we then do queries over.  The tests didn't account for some
slop in all that async activity, but now should be about as flake-free as they
can be.
2020-03-20 20:00:47 -04:00
Patrick Mueller 5efd59b43f
[Alerting]: harden APIs of built-in alert index-threshold (#60702)
resolves https://github.com/elastic/kibana/issues/59889

The index threshold APIs - used by both the index threshold UI and the
alert executor - were returning errors (500's from http endpoints) when
getting errors from ES.

These have been changed so that the error is logged as a warning, and the
relevant API returns an "empty" result.

Another 500 response was found while experimenting with this.  Apparently
the date_range agg requires a date format to be passed in if the date format
in ES is not an ISO date.  The repro on this was to select the `.security`
alias (or it's index) within the index threshold alert UI, and then select
one of it's date fields.
2020-03-20 16:36:01 -04:00
Mike Côté 851b8a82a5
License checks for actions plugin (#59070)
* Define minimum license required for each action type (#58668)

* Add minimum required license

* Require at least gold license as a minimum license required on third party action types

* Use strings for license references

* Ensure license type is valid

* Fix some tests

* Add servicenow to gold

* Add tests

* Set license requirements on other built in action types

* Use jest.Mocked<ActionType> instead

* Change servicenow to platinum

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* Make actions config mock and license state mock use factory pattern and jest mocks (#59370)

* Add license checks to action HTTP APIs (#59153)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Add license checks within alerting / actions framework (#59699)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Verify action type before scheduling action task

* Make actions plugin.execute throw error if action type is disabled

* Bug fixes

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Stop action task from re-running when license check fails

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Fix confusing assertion

* Add comment explaining double mock

* Log warning when alert action isn't scheduled

* Disable action types in UI when license doesn't support it (#59819)

* Initial work

* Handle errors in update action API

* Add unit tests for APIs

* Verify action type before scheduling action task

* Make actions plugin.execute throw error if action type is disabled

* Bug fixes

* Make action executor throw when action type isn't enabled

* Add test suite for basic license

* Fix ESLint errors

* Stop action task from re-running when license check fails

* Fix failing tests

* Attempt 1 to fix CI

* ESLint fixes

* Return enabledInConfig and enabledInLicense from actions get types API

* Disable cards that have invalid license in create connector flyout

* Create sendResponse function on ActionTypeDisabledError

* Make disabled action types by config return 403

* Remove switch case

* Fix ESLint

* Disable when creating alert action

* Return minimumLicenseRequired in /types API

* Disable row in connectors when action type is disabled

* Fix failing jest test

* Some refactoring

* Card in edit alert flyout

* Sort action types by name

* Add tooltips to create connector action type selector

* Add tooltips to alert flyout action type selector

* Add get more actions link in alert flyout

* Add callout when creating a connector

* Typos

* remove float right and use flexgroup

* replace pixels with eui variables

* turn on sass lint for triggers_actions_ui dir

* trying to add padding around cards

* Add callout in edit alert screen when some actions are disabled

* improve card selection for Add Connector flyout

* Fix cards for create connector

* Add tests

* ESLint issue

* Cleanup

* Cleanup pt2

* Fix type check errors

* moving to 3-columns cards for connector selection

* Change re-enable to enable terminology

* Revert "Change re-enable to enable terminology"

This reverts commit b497dfd6b6.

* Add re-enable comment

* Remove unecessary fragment

* Add type to actionTypeNodes

* Fix EuiLink to not have opacity of 0.7 when not hovered

* design cleanup in progress

* updating classNames

* using EuiIconTip

* Remove label on icon tip

* Fix failing jest test

Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>

* Add index to .index action type test

* PR feedback

* Add isErrorThatHandlesItsOwnResponse

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
2020-03-20 10:49:37 -04:00
Patrick Mueller d5989e8baa
[Alerting] add functional tests for index threshold alertType (#60597)
resolves https://github.com/elastic/kibana/issues/58902
2020-03-19 18:29:26 -04:00
Christos Nasikas 3acbbcd2b0
Return incident's url (#60617) 2020-03-19 23:23:37 +02:00
Mike Côté bafd45fff2
Fix race condition in flaky alerting test (#60438)
* Fix race condition in flaky test

* Fix flakiness in test

* Fix more flakiness
2020-03-19 13:20:48 -04:00
Mike Côté 27045e0942
Make slack param validation handle empty messages (#60468) 2020-03-19 08:02:07 -04:00
Christos Nasikas 24534e832e
ServiceNow action improvements (#60052)
* Apply action types to fields

* Add information to each field

* Do not create or update comments when actionType is set to nothing

* Improve helpers tests

* Improve tests

* Refactor: Use transformers and pipes

* Better types

* Refactor tests to new changes

* Better error messages

* Improve field formatting and display

* Improve integration tests

* Make username mandatory field

* Translate transformers

* Refactor schema

* Translate appendInformationToField helper

* Improve intergration tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 20:46:05 +02:00
Yuliia Naumenko 2207e0ab26
Index Action - Moved index params fields to connector config (#60349)
* Moved index params fields to connector config

* Fixed type check issue

* Fixing functional tests

* Fixed due to comments

* Fixed functional tests

* Fixed tests and type check
2020-03-17 18:20:00 -07:00
spalger b71099d620 skip flaky suite (#58643) (#58991) 2020-03-17 08:13:32 -07:00
Patrick Mueller d5665921c7
resolves https://github.com/elastic/kibana/issues/58905 (#60120)
The current index threshold alert uses a `size` limit on term aggregation, when used, but does not sort the buckets, so it's just using descending count on the grouped buckets as the sort to determine what to return.

The watcher API for the index threshold notes this as "top N of", implying a sort.

This PR applies sorting when the using `groupBy: top`, and the `aggType != count`.  For count, ES is already sorting the way we want.

The sort is calculated as a separate agg beside the date_range aggregation, which is the same metrics agg specified in the query - `aggType(aggField)`.  This field is then referenced in a new `order` property in the terms agg, using 'asc' sorting for `min`, and `desc` sorting for `avg`, `max`, and `sum`.

This doesn't change the shape of the output at all, just changes which term buckets will be returned, if there are more term buckets than requested with the `termSize` parameter.
2020-03-17 00:29:33 -04:00
Patrick Mueller ce1836b2af
[Alerting] extend Alert Type with names/descriptions of action variables (#59756)
resolves https://github.com/elastic/kibana/issues/58529

This PR extends alertType with an `actionVariables` property, which
describes the properties of the context object passed when scheduling
actions, and the current state.  These property descriptions are used
by the web ui for the alert create and edit forms, to allow the properties
to be added to action parameters as mustache template variables.
2020-03-12 23:17:29 -04:00
Christos Nasikas e6327d32b0
[SIEM][CASE] ServiceNow executor (#58894)
* Refactor structure

* Init ServiceNow class

* Add constants

* Add configuration scheme

* Refactor configuration schema

* Refactor parameters schema

* Create new types

* Add supported source fields

* Create helpers

* Create ServiceNow lib

* Push incident

* Declare private methods

* Create UpdateIncident type

* Create updateIncident method

* Create executor actions

* Refactor response

* Test helpers

* Remove unnecessary validation

* Fix validation errors

* Throw error for unsupported actions

* Create mock incident

* Test executor

* Test ServiceNow lib

* Convert to camelCase

* Remove caller_id

* Refactor helpers

* Refactor schema

* Remove executorAction

* Test action handlers

* Refactor tests

* Create and update comments

* Remove closure option & change attribute name

* Fix tests

* Change lib structure

* Validate empty mapping

* Fix functional tests

* Fix type

* Change API to only add comments through incident's API

* Add instruction to README

* Change API version

* Test

* Test simulator

* Fix version on tests

* Remove SIEM reference in README
2020-03-11 16:01:07 +02:00
Patrick Mueller 7db4196164
[Alerting] add more alert properties to action parameter templating (#59718)
This is a pre-cursor to https://github.com/elastic/kibana/issues/58529

I realized a bit ago that we weren't making quite enough info available
in the action parameter templating that happens when alerts schedule
actions to execute.  Missing were alert name, tags, and spaceId.

For the index threshold alert, I had added them to it's context, but
then every other action would have to do the same if they also
wanted those values.

So I added these as additional top-level variables that can be
used in templates, along with the alert id, alert instance id,
context, and state.  The other bits in RawAlert didn't seem
that interesting, to be used as an action parameter.
2020-03-10 16:50:19 -04:00
Patrick Mueller 3f365a82f8
[Alerting] replace watcher http APIs used by index threshold Alerting (#59475)
Prior to this PR, the alerting UI used two HTTP endpoints provided by the
Kibana watcher plugin, to list index and field names.  There are now two HTTP
endpoints in the alerting_builtins plugin which will be used instead.

The code for the new endpoints was largely copied from the existing watcher
endpoints, and the HTTP request/response bodies kept pretty much the same.

resolves https://github.com/elastic/kibana/issues/53041
2020-03-09 19:30:20 -04: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
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
Patrick Mueller 388705509f
[Alerting]: get type-checking, tests, and ui working for index threshold (#59064)
This is a follow-on to https://github.com/elastic/kibana/pull/57030 ,
"[alerting] initial index threshold alertType and supporting APIs",
to get it working with the existing alerting UI.  The parameter shape
was different between the two, so the alertType was changed to fix
the existing UI shapes expected.
2020-03-03 08:28:31 -05:00
Patrick Mueller 5b7270541c
[alerting] initial index threshold alertType and supporting APIs (#57030)
Adds the first built-in alertType for Kibana alerting, an index threshold alert, and associated HTTP endpoint to generate preview data for it.

addresses the server-side requirements for issue  https://github.com/elastic/kibana/issues/53041
2020-02-28 11:48:28 -05:00
Yuliia Naumenko 1eb0176036
Added UI support for the default action group for Alert Type Model (#57603)
* Added UI support for the default action group for Alert Type Model

* Fixed set default on  alert type select

* Fixed type check

* Moved setting of default alert type to the server api

* Added default value for actionGroups if it is empty in register alert type functions

* Fixed type check

* Fixed due to comments	aed89377b9	Yuliia Naumenko <yuliia.naumenko@elastic.com>	Feb 20, 2020 at 12:40 PM

* Renamed defaultActionGroup to defaultActionGroupId

* Fixed failing tests
2020-02-21 13:58:54 -08:00
Yuliia Naumenko c07ff7174e
Alerting plugin migrate to Kibana platform (#57635)
* Moved alerting plugin to new platform

* Fixed type checks

* Fixed failing tests

* Fixed functional tests

* Fixed plugin context initialization

* small typo

* Fixed type checks

* Fixed create alert schema

* Moved alerting files to Kibana platform folder

* Fixed duration validation

* Fixed find page size

* Fixed type check

* Fixed due to comments

* Fixed merge issues

* Added missing

* Fixed alerting functional tests

* Fixed tests

* Fixed update schema validation

* Added throttle update

* Fixed failing tests

* test

* fixed setup alerting dependencies for siem and monitoring plugins

* Fixed siem setup dependancies
2020-02-18 09:05:56 -08:00
Patrick Mueller 5d3797ee0b
change id of x-pack event_log plugin to eventLog (#57612)
change id of x-pack event_log plugin to eventLog
2020-02-16 20:10:35 -05:00
Patrick Mueller 96c39a5a14
change slack action to only report on whitelisted host name (#57582)
Previously, when using the slack action with a url which was not whitelisted, the entire URL was reported in the error.  With this change, only the hostname is reported in the error.
2020-02-14 18:29:50 -05:00
Gidi Meir Morris fd193fdf59
[Alerting] make actionGroup name's i18n-able (#57404)
We want to make the Action Group i18n-able for display in the AlertDetails page, so instead of just a list of ids, the AlertType now registers an object where key is the id and value is the human readable, and translatable, value.
2020-02-13 10:21:48 +13:00
Mike Côté 62e3189c34
Fix update alert API to still work when AAD is out of sync (#57039)
* Ensure update API still works when AAD is broken

* Add API integration test

* Fix ESLint errors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-11 07:47:10 -05:00
Peter Schretlen bb7e152211
Webhook action - make user and password secrets optional (#56823) 2020-02-10 17:08:56 -05:00
Mike Côté a3dd282588
Make the update alert API key API work when AAD is out of sync (#56640)
* Make the update API key API work when AAD is out of sync

* Make updateAPIKey only load SOC where possible

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-10 14:48:29 -05:00