kibana/docs/settings
Sergi Massaneda 6bba30f94c
[Security Solution] Tines connector (#143505)
## Summary

Issue: https://github.com/elastic/kibana/issues/140066
Doc:
https://docs.google.com/document/d/14BY-6CIin1CUH5bwJJgfrGl37hWO-CeNMdl_35agpvk/edit?usp=sharing

Create a new connector type that offers low friction/low effort approach
to augmenting Elastic capabilities with SOAR capabilities of Tines.

## Implementation

Tines connector implements subActionConnector. With 4 subActions
configured:

- **stories**: Retrieves the User available Story objects from Tines, to
render the Story selector options in the params form. It uses the
`email` and `token` authentication headers from the configuration.
It is requested only when the form opens and when the connector instance
changes.

- **webhooks**: Retrieves the Story available Webhooks objects from
Tines, to render the Webhook selector in the params form. It uses the
`email` and `token` authentication headers from the configuration and
the `story_id` parameter.
There is no filter for `type` in the actions (a.k.a. agents) endpoint,
so we have to request all actions and filter them by `type ===
'Agents::WebhookAgent'` on our side.
It is requested every time the selected story changes.

- **run**: The main action execution. It sends the alerts to the Tines
configured webhook, using webhook' `path` and `secret` values. There's
no template to render, the data coming from the execution is just pruned
(the `kibana` entry is removed from all `context.alerts`) and sent
directly using the same format to Tines.

- **test**: The test form execution. It ends up calling **run** but
using a parametrized body.

### Pagination
Both **stories** and **webhooks** subActions need pagination, since
Tines do not expose any search endpoint for them. The current hard limit
is 100 pages. The `paginatedRequest` function in the connector
implementation encapsulates this logic.

## Testing

1- Create a [Tines](https://www.tines.com/) free account.

2- Create a [new
Story](https://www.tines.com/docs/quickstart/simple-story) and attach a
[Webhook
Action](https://www.tines.com/docs/quickstart/creating-an-action) to
start receiving events.

3- Create an [API token](https://www.tines.com/api/authentication)

4- Configure the Tines Connector in Kibana using the Tines tenant URL
that has been generated in the Tines app, the email used to sign in, and
the API token generated.
[docs](https://github.com/semd/kibana/blob/140066_tines_connector/docs/management/connectors/action-types/tines.asciidoc#connector-configuration)

5- Attach the Tines Connector to a Detection Rule, selecting the Story
and Webhooks created.
[docs](https://github.com/semd/kibana/blob/140066_tines_connector/docs/management/connectors/action-types/tines.asciidoc#actions)

6- After each rule execution, events should appear in the Tines webhook
action.

## Screenshots

Configure a Tines connector


![tines_connector_selection](https://user-images.githubusercontent.com/17747913/196389019-820aff49-6ad6-442e-a69f-3c782cbd65e6.png)


![tines_connector_config](https://user-images.githubusercontent.com/17747913/198035138-e7f3bb25-ebd1-4cfd-9cc5-b0bfe434c25c.png)

Use the Tines connector 


![tines_rule_action](https://user-images.githubusercontent.com/17747913/196389010-c87045a4-2b74-4903-9a81-ccbcff09fbf1.png)


![tine_params_form](https://user-images.githubusercontent.com/17747913/198034501-7e9ad912-111e-48b6-8387-fcf6f0663511.png)

Tines events


![tines_events](https://user-images.githubusercontent.com/17747913/196734338-91e1a397-2d03-4ee6-8ad2-16cb39abe9bf.png)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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(https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
2022-11-14 13:04:47 +01:00
..
images docs: APM spaces (#132071) 2022-06-02 15:06:00 -04:00
alert-action-settings.asciidoc [Security Solution] Tines connector (#143505) 2022-11-14 13:04:47 +01:00
apm-settings.asciidoc [APM] Move service metric config to kibana advanced settings (#141147) 2022-09-21 11:12:52 +02:00
banners-settings.asciidoc [DOCS] Reformats the AleBanner settings tables into definition lists (#107966) 2021-08-20 10:03:51 -05:00
enterprise-search-settings.asciidoc [DOCS] Add settings for Enterprise Search (#126711) 2022-03-02 12:58:15 -08:00
fleet-settings.asciidoc [Fleet] Add docs for package verification GPG key (#144707) 2022-11-07 14:25:05 -05:00
general-infra-logs-ui-settings.asciidoc remove source config settings (#130931) 2022-04-27 09:41:51 -05:00
i18n-settings.asciidoc [i18n] a few docs updates (#127964) 2022-03-17 18:18:49 +02:00
infrastructure-ui-settings.asciidoc [DOCS] Edits titles in Setup section for consistency (#68451) 2020-06-08 14:46:26 -07:00
logging-settings.asciidoc Document rolling file appender numeric strategy max. (#134171) 2022-06-13 13:01:14 -04:00
logs-ui-settings.asciidoc [DOCS] Edits titles in Setup section for consistency (#68451) 2020-06-08 14:46:26 -07:00
monitoring-settings.asciidoc [Stack Monitoring] Add stale status reporting for Kibana (#132613) 2022-06-08 11:31:17 +02:00
reporting-settings.asciidoc Puppeteer v18.1 (#143485) 2022-10-19 13:52:33 -07:00
search-sessions-settings.asciidoc [Search Sessions] Optimize search session so updates (#142850) 2022-10-11 14:42:47 -04:00
security-settings.asciidoc Adding Global Access Agreement (#139217) 2022-09-06 11:54:57 -04:00
settings-xkb.asciidoc [Breaking] Remove deprecated enabled settings from plugins. (#113495) 2021-10-17 16:54:30 +01:00
spaces-settings.asciidoc update monitoring.allowedSpaces documentation (#120362) 2021-12-07 12:04:07 +01:00
task-manager-settings.asciidoc [ResponseOps][task manager] log event loop delay for tasks when over configured limit (#126300) 2022-03-23 10:28:43 -04:00
telemetry-settings.asciidoc [Telemetry] Make telemetry plugin non-disableable (#133205) 2022-06-27 16:21:37 +02:00
url-drilldown-settings.asciidoc [DOCS] Reformats settings in drilldown doc (#120299) 2021-12-06 11:52:40 -08:00