Commit graph

60 commits

Author SHA1 Message Date
Steph Milovic
335cd1f6fc
[Security Solution] [Cases] Move field mappings from actions to cases (#84587) 2020-12-15 07:06:11 -07:00
Christos Nasikas
ea4e2224a9
[Security Solution][Case] Sync cases with alerts (#84731) 2020-12-14 21:11:53 +02:00
Christos Nasikas
fcccb016f4
[Security Solution][Case] Add in-progress status to case (#84321) 2020-12-04 21:36:23 +02:00
Tyler Smalley
b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Mikhail Shustov
95861a0fb0
[DX] Prettier v2.2 (#83899)
* update prettier with ts version support

* mute type-error

* run prettier on codebase

* fix examples

* fix errors after master merged
2020-11-23 13:17:05 +01:00
Christos Nasikas
52c6b7b81b
[Security Solution][Case] Create comment types (#82715) 2020-11-20 21:03:05 +02:00
Christos Nasikas
01b1710eb7
[Security Solution][Case] Change case connector minimum required license to basic (#83401) 2020-11-16 15:34:40 +02:00
Gidi Meir Morris
3151e7e5e4
enables actions scoped within the stack to register at Basic license (#82931)
Enables actions scoped within the stack to register at Basic license
2020-11-12 17:31:44 +00:00
Christos Nasikas
7abb1e3033
[Security Solution][Case] Case action type (#80870)
* Init connector

* Add test

* Improve comment type

* Add integration tests

* Fix i18n

* Improve tests

* Show unknown when username is null

* Improve comment type

* Pass connector to case client

* Improve type after PR #82125

* Add comment migration test

* Fix integration tests

* Fix reporter on table

* Create case connector ui

* Add connector to README

* Improve casting on executor

* Translate name

* Improve test

* Create comment type enum

* Fix type

* Fix i18n

* Move README to cases

* Filter out case connector from alerting

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>

Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2020-11-04 12:07:17 +02:00
Thomas Watson
700225061a
Upgrade to hapi version 18 (#80468) 2020-11-02 13:18:00 +01:00
Christos Nasikas
30a0323d7a
[Seurity Solution][Case] Create case plugin client (#81018) 2020-10-27 21:01:36 +02:00
Christos Nasikas
ca8b03823b
[Security Solution][Cases] Fix bug with case connectors (#80642)
* Fix bug with case connectors

* Improve isCaseOwned function
2020-10-16 18:07:11 +03:00
Christos Nasikas
16e1598c05
[Security Solution][Case] Improve ServiceConnectorCaseParams type (#80109)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-13 16:12:03 +03:00
Christos Nasikas
85ad8a4f3d
[Security Solution][Case] Fix bug when changing connectors (#80002) 2020-10-09 09:25:47 +03:00
Christos Nasikas
287541891e
[Security Solutions][Case] Settings per case per connector (#77327)
Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 20:03:46 +03:00
Christos Nasikas
22b4e40ea0
[Alerting][Connectors] Refactor IBM Resilient: Generic Implementation (phase one) (#74357)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-11 10:24:46 +03:00
Christos Nasikas
db5652e020
[Alerting][Connectors] Refactor Jira: Generic Implementation (phase one) (#73778) 2020-09-09 16:17:11 +03:00
Mikhail Shustov
88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Christos Nasikas
1a81eb5c19
[SIEM][CASE] IBM Resilient Connector (#66385) 2020-07-10 02:23:20 +03:00
Yuliia Naumenko
57915e1641
ServiceNow push to Incident generic implementation (supporting both Case specific and generic Alerts) (#68464)
* Draft ServiceNow generic implementation

* simple working servicenow incident per alert

* fixed running times

* rely on externalId for update incident on the next execution

* Added consumer to the action type to be able to split ServiceNow for Cases and Alerts

* Added subActions support for ServiceNow action form

* Basic version for Alerts part for ServiceNow

* Keep Case ServiceNow functionality working

* Revert changes on app_router

* Fixed type checks

* Fixed language check issues

* Fixed actions unit tests

* Fixed functional tests

* Fixed jest tests

* fixed tests

* Copied case mappings to alerting plugin

* made consumer optional

* Cleanup tests

* more cleanup

* Fixed jest tests and type checks

* fixed tests

* fixed servicenow validation tests

* Added ServiceNow unit tests

* Removed consumer for actions

* fixed client side isCaseOwned support

* fixed failing tests

* fixed jest tests

* Fixed URL validation

* fixed due to comments

* fixed tests

* fixed jest tests

* Fixed due to comments. Moved ServiceNow filtering in case plugin to server side

* fixed mock for ServiceNow

* fixed consumer config

* fixed test

* fixed type check

* Fixed jest test

* fixed type check
2020-07-06 16:38:45 -07:00
Josh Dover
200957bb63
Add plugin API for customizing the logging configuration (#68704) 2020-06-23 14:45:47 -06:00
Pierre Gayvallet
9e8448fc06
HttpService: duplicate some APIs from setup to start and clean mocks. (#69021)
* add apis to http start contract and clean mocks

* add apis to http start contract and clean mocks

* add `getStartContract` method

* fix new calls

* remove isTlsEnabled

* deprecates HttpServiceSetup.auth
2020-06-18 15:55:47 +02:00
Pierre Gayvallet
d2006ea8a0
savedObjects: add score to repository.find results (#68894)
* add `score` to repository.find results

* update generated doc

* fix FTR result set

* remove score from exports

* fix FTR for find API

* fix label

* fix tsdoc
2020-06-18 11:39:25 +02:00
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
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
restrry
bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Mikhail Shustov
0cc5d133d9
lint import from restricted zones for export exressions (#66588)
* line restricted zones for export exressions

* more robust rule

* fix or mute eslint errors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-15 17:21:42 +02:00
Christos Nasikas
d17489790c
[SIEM][CASE] Fix bug when connector is deleted. (#65876) 2020-05-15 14:43:02 +03:00
Steph Milovic
edc8cb532b
bug fixing (#65387) 2020-05-05 21:08:04 -06:00
Christos Nasikas
7d15c2103c
[SIEM][CASE] Dynamic fields mapping based on connector (#64412) 2020-05-05 16:32:23 +03:00
Steph Milovic
ed641ed867
[SIEM] [Cases] External service selection per case (#64775) 2020-05-05 06:49:11 -06:00
Christos Nasikas
47b8ba5d5b
[SIEM][CASE] Refactor Connectors - Jira Connector (#63450) 2020-05-01 00:20:00 +03:00
Christos Nasikas
a145aa9d5e
[SIEM][CASE] Api Integration Tests: Configuration (#63948)
* Init

* Init get_connectors

* Test post_configuration

* Test patch_configuration

* Rename folder

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-23 22:42:22 +03:00
Christos Nasikas
698717173d
[SIEM][CASE] Server common constants (#63952) 2020-04-21 15:09:42 +03:00
Joe Portner
d72de0ea16
Refactor saved object types to use namespaceType (#63217)
Remove `namespaceAgnostic` field that was deprecated in #54605,
use `namespaceType` instead.
2020-04-16 14:37:55 -04:00
Christos Nasikas
10ccc0a2f2
[SIEM][CASE] Create comments sequentially (#63692) 2020-04-16 21:26:32 +03:00
Christos Nasikas
287d477f21
[SIEM][CASE] Tests for server's configuration API (#63099)
* Test utils

* Test get_configure

* Test post_configure

* Test get_connectors

* Test patch_configure

* Improve test

* Fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-14 22:09:03 +03:00
Steph Milovic
d275d7f4df
[SIEM] [Cases] Case container unit tests (#63376) 2020-04-14 12:25:54 -06:00
Steph Milovic
55a3cc4583
[SIEM] [Cases] Unit tests for case UI components (#63005) 2020-04-10 09:55:38 -06: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
Xavier Mouligneau
b1a39ce23c
[SIEM] CASES Bugs BC2 (#62170)
* fix persistence between filter

* Fix API filtering bug

* Show username if full name is empty

* fix user in avatar

* do not allow push to service now when connector is none

* fix types

* Show errors from actions

* update connector name in configure

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2020-04-01 16:33:51 -04:00
Xavier Mouligneau
4083d6682f
[SIEM] Cases clean up Phase II (#61750)
* allow case to work without security

* disable configure button + add call out if license does not match and if kibana config does not allow if

* add skeleton for crud in case

* fix link to timeline + disable action on case on read only + allow read only access to our saved object in siem + manage no x-pack.security + show msg when read-only + fix reporters bug

* add actions required in plugins

* review I

* review II

* review III

* review IV

* fix types

* review V
2020-03-31 00:20:11 -04:00
Christos Nasikas
3eb842fc97
[SIEM][CASE] Delete endpoints return noContent (#61721) 2020-03-28 19:01:29 +02:00
Xavier Mouligneau
327f5a099a
[SIEM] [CASES] bug/clean up phase I (#61354)
* clean up comments + add update_by/update_at  case when comment are added/updated + return all comments

* add refresh button + get a better interaction between user + fix bug with pushed data + fix three dot on detail page

* fix i18m

* review I

* review II
2020-03-26 20:09:58 -04:00
Xavier Mouligneau
81b3723633
[SIEM] [CASES] Build lego blocks case details view (#60864)
* modify API to get the total comments in _find + Add user action to track what user are doing + create _pushed api to know when case have been pushed

* fix rebase

* add connector name in case configuration saved object

* fix total comment in all cases

* totalComment bug on the API

* integrate user action API with UI

* fix merged issue

* integration APi to push to services with UI

* Fix bugs

* wip to show pushed service in ui

* finish the full flow with pushing to service now

* review about client discrepency

* clean up + review

* merge issue

* update error msgs to info

* add aria label + fix but on add/remove tags

* fix i18n

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
2020-03-23 19:26:49 -04:00
Steph Milovic
d5ed93ee63
[SIEM] [Cases] Case closed and add user email (#60463) 2020-03-19 10:27:41 -06:00
Steph Milovic
4fc89aeb0d
[SIEM] [Cases] Shell scripts and unit tests (#60183) 2020-03-18 11:42:08 -06:00
Christos Nasikas
70c1b69eb0
[SIEM][Case] Update connector through flyout (#60307)
* Move add flyout to parent

* Disable mapping

* Show edit flyout

* Do not update connectors throught cases API

* Fix uncontrolled input error

* Disable edit button

* Add comments

* Change undefined to null

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-18 14:04:25 +02:00
Larry Gregory
9318862f19
Allow kbn-config-schema to ignore unknown keys (#59560)
* allow kbn-config-schema to ignore unknown keys

* Consolidate unknown key configuration

* updates following merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-17 12:30:17 -04:00
Christos Nasikas
5fb747ee32
[SIEM][CASES] Configure cases: Final (#59358)
* Create action schema

* Create createRequestHandler util function

* Add actions plugins

* Create action

* Validate actionTypeId

* [SIEM][CASE] Add find actions schema

* Create find actions route

* Create HttpRequestError

* Support http status codes

* Create check action health types

* Create check action health route

* Show field mapping

* Leave spaces between sections

* Export CasesConfiguration from servicenow action type

* Create IdSchema

* Create UpdateCaseConfiguration interface

* Create update action route

* Add constants

* Create fetchConnectors api function

* Create useConnector

* Create reducer

* Dynamic connectors

* Fix conflicts

* Create servicenow connector

* Register servicenow connector

* Add ServiceNow logo

* Create connnectors mapping

* Create validators in utils

* Use validators in connectors

* Validate URL

* Use connectors from config

* Enable triggers_aciton_ui plugin

* Show flyout

* Add closures options

* cleanup configure api

* simplify UI + add configure API

* Add mapping to flyout

* Fix error

* add all plumbing and main functionality to get configure working

* Fix naming

* Fix tests

* Show error when failed

* Remove version from query

* Disable when loading connectors

* fix config update

* Fix flyout

* fix two bugs

* Change defaults

* Disable closure options when no connector is selected

* Use default mappings from lib

* Set mapping if empty

* Reset connector to none if deleted from settings

* Change lib structure

* fix type

* review with christos

* Do not patch connector with id none

* Fix bug

* Show icon in dropdown

* Rename variable

* Show callout when connectors does not exists

* Adapt to new error handling

* Fix rebase wrong resolve

* Improve errors

* Remove async

* Fix spelling

* Refactor hooks

* Fix naming

* Better translation

* Fix bug with different action type attributes

* Fix linting errors

* Remove unnecessary comment

* Fix translation

* Normalized mapping before updating connector

* Fix type

* Memoized capitalized

* Dynamic data-subj-test variable

* Fix routes

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2020-03-14 01:36:57 +02:00