Commit graph

47318 commits

Author SHA1 Message Date
Jonathan Budzenski 65f3a8458a
Remove Angular (#115464)
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 10:08:53 -07:00
Ester Martí Vilaseca ffeadc5241
[Stack monitoring] Remove react migration feature flag (#115575) 2021-10-19 19:03:34 +02:00
Kevin Logan 9bc4865170
[Security Solution] Make new Add Data page more fine grained (#115016)
* [Security Solution] Make new Add Data page more fine grained
2021-10-19 13:02:00 -04:00
Corey Robertson 9d0bf40c25
Fix potential error from undefined (#115562) 2021-10-19 12:53:24 -04:00
Orhan Toy d78fa6c7d8
[App Search, Crawler] Fix validation step panel padding/whitespace (#115542)
* Remove padding override
* Move spacer to before action
2021-10-19 18:48:52 +02:00
Christos Nasikas 20b11c9f43
[Cases][Connectors] ServiceNow ITOM: MVP (#114125)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 12:39:51 -04:00
Aleh Zasypkin 83f12a9d82
Change default session idle timeout to 8 hours. (#115565) 2021-10-19 18:38:27 +02:00
Constance 498050e05b
Upgrade EUI to v39.1.1 (#114732)
* Upversion to EUI 39.1.0

* Update i18n_eui_mapping tokens

@see https://github.com/elastic/eui/blob/master/i18ntokens_changelog.json

* Merge refractor in yarn.lock

* Fix functional table filter selector

- Popover ID was removed in recent EUI a11y fix, so we're using child-position selection to target the Tags filter now

* Update snaphots

* Upgrade to 39.1.1 for extra bugfixes

* Update i18n mappings

* Fix i18n snapshot

* Attempt to harden flaky Security Cypress test

* More combobox entry hardening

- Got a flake on clicking the combobox dropdown on run 17/20 locally

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 09:15:38 -07:00
Jason Stoltzfus b7577b5695
[App Search] Wired up organic results on Curation Suggestions view (#114717) 2021-10-19 12:09:51 -04:00
Ahmad Bamieh 9caab5858d
[i18n] remove i18n html extractor (#115004) 2021-10-19 12:05:53 -04:00
Zacqary Adam Xeper adbb808893
[Logs/Metrics UI] Add deprecated field configuration to Deprecations API (#115103)
* [Logs/Metrics UI] Add deprecated field configuration to Deprecations API

* Add correction steps

* Add unit test for source config deprecations

* Apply suggestions from code review

Co-authored-by: Chris Cowan <chris@chriscowan.us>

* Lint fix

Co-authored-by: Chris Cowan <chris@chriscowan.us>
2021-10-19 10:02:32 -06:00
Dima Arnautov 2aaa515bbc
[Transform] Add alerting rules management to Transform UI (#115363)
* transform alert flyout

* fetch alerting rules

* show alerting rules indicators

* filter continuous transforms

* add alert rules to the expanded row

* edit alert rule from the list

* fix ts issues

* fix types

* update texts

* refactor using context, wip create alert from the list

* update unit test

* fix ts issue

* privilege check
2021-10-19 17:15:52 +02:00
DeDe Morton b306f8e2c3
Update UI links to Fleet and Agent docs (#115295)
* Update UI links to Fleet and Agent docs

* Update link service

* Fix merge problem

* Update link service

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 08:01:49 -07:00
James Gowdy 92e1cd25b7
[ML] Adding ability to change data view in advanced job wizard (#115191)
* [ML] Adding ability to change data view in advanced job wizard

* updating translation ids

* type and text changes

* code clean up

* route id change

* text changes

* text change

* changing data view to index pattern

* adding api tests

* text updates

* removing first step

* renaming temp variable

* adding permission checks

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 15:51:30 +01:00
Joe Portner e4fb118fee
Change deleteByNamespace to include legacy URL aliases (#115459) 2021-10-19 10:44:15 -04:00
Josh Dover 96c89e0fca
[Unified Integrations] Remove and cleanup add data views (#115424)
Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Dave Snider <dave.snider@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
2021-10-19 10:43:51 -04:00
Tim Roes e8663d4ea4
[Discover] Show ignored field values (#115040)
* WIP replacing indexPattern.flattenHit by tabify

* Fix jest tests

* Read metaFields from index pattern

* Remove old test code

* remove unnecessary changes

* Remove flattenHitWrapper APIs

* Fix imports

* Fix missing metaFields

* Add all meta fields to allowlist

* Improve inline comments

* Move flattenHit test to new implementation

* Add deprecation comment to implementation

* WIP - Show ignored field values

* Disable filters in doc_table

* remove redundant comments

* No, it wasn't

* start warning message

* Enable ignored values in CSV reports

* Add help tooltip

* Better styling with warning plus collapsible button

* Disable filtering within table for ignored values

* Fix jest tests

* Fix types in tests

* Add more tests and documentation

* Remove comment

* Move dangerouslySetInnerHTML into helper method

* Extract document formatting into common utility

* Remove HTML source field formatter

* Move formatHit to Discover

* Change wording of ignored warning

* Add cache for formatted hits

* Remove dead type

* Fix row_formatter for objects

* Improve mobile layout

* Fix jest tests

* Fix typo

* Remove additional span again

* Change mock to revert test

* Improve tests

* More jest tests

* Fix typo

* Change wording

* Remove dead comment

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 16:43:23 +02:00
David Roberts 9dcf5bf1b7
[ML] Stop reading the ml.max_open_jobs node attribute (#115524)
The ml.max_open_jobs node attribute is going away in
version 8, as the maximum number of open jobs has been
defined by a dynamic cluster-wide setting during the 7
series and there is no chance of version 8 needing to
run in a mixed version cluster with version 6.

The ml.machine_memory attribute will still be available,
so this can be checked instead as a way of detecting ML
nodes.
2021-10-19 15:42:49 +01:00
Matthias Wilhelm 6a1af300f5
[Discover] Improve doc viewer code in Discover (#114759)
Co-authored-by: Dmitry Tomashevich <39378793+Dmitriynj@users.noreply.github.com>
2021-10-19 16:35:40 +02:00
Frank Hassanabad c2c08be709
[Security Solutions] Adds security detection rule actions as importable and exportable (#115243)
## Summary

Adds the security detection rule actions as being exportable and importable.
* Adds exportable actions for legacy notification system
* Adds exportable actions for the new throttle notification system
* Adds importable but only imports into the new throttle notification system.
* Updates unit tests

In your `ndjson` file when you have actions exported you will see them like so:

```json
"actions": [
    {
      "group": "default",
      "id": "b55117e0-2df9-11ec-b789-7f03e3cdd668",
      "params": {
        "message": "Rule {{context.rule.name}} generated {{state.signals_count}} alerts"
      },
      "action_type_id": ".slack"
    }
  ]
```

where before it was `actions: []` and was not provided.

**Caveats**

If you delete your connector and have an invalid connector then the rule(s) that were referring to that invalid connector will not import and you will get an error like this:

<img width="802" alt="Screen Shot 2021-10-15 at 2 47 10 PM" src="https://user-images.githubusercontent.com/1151048/137554991-b3984be9-d2ad-488e-a309-29da656ca4ea.png">

This does _not_ export your connectors at this point in time. You have to export your connector through the Saved Object Management separate like so:
<img width="1545" alt="Screen Shot 2021-10-15 at 2 58 03 PM" src="https://user-images.githubusercontent.com/1151048/137555135-3f0bfd63-5d67-496b-8d5b-bdef01d6122f.png">

However, if remove everything and import your connector without changing its saved object ID and then go to import the rules everything should import ok and you will get your actions working.

**Manual Testing**:

* You can create normal actions on an alert and then do exports and you should see the actions in your ndjson file 
* You can create legacy notifications from 7.14.0 and then upgrade and export and you should see the actions in your ndjson file
* You can manually create legacy notifications by:

By getting an alert id first and ensuring that your `legacy_notifications/one_action.json` contains a valid action then running this command:
```ts
./post_legacy_notification.sh 3403c0d0-2d44-11ec-b147-3b0c6d563a60
```

* You can export your connector and remove everything and then do an import and you will have everything imported and working with your actions and connector wired up correctly.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added
2021-10-19 10:24:42 -04:00
Devin W. Hurley 1a917674a4
[Security Solution] [Platform] Migrate legacy actions whenever user interacts with the rule (#115101)
Migrate legacy actions whenever user interacts with the rule (#115101)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 10:07:45 -04:00
Thomas Neirynck 7420cc228c
[Fleet] Add telemetry for integration cards (#115413) 2021-10-19 09:59:29 -04:00
Marco Liberati 44d0150ae1
🐛 Fix single percentile case when ES is returning no buckets (#115214)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 15:58:59 +02:00
Jason Stoltzfus 5a0002fae8
[App Search] Update "overrides" badge (#115437) 2021-10-19 09:51:55 -04:00
Garrett Spong e5a918dc7d
[SecuritySolution][Detections] Enables Index Action and Connector for Detection Actions (#111813)
## Summary

This PR enables the [Index Connector and Action](https://www.elastic.co/guide/en/kibana/master/index-action-type.html) for the detection engine, addressing https://github.com/elastic/kibana/issues/110550. 

<details><summary>Action type available in list:</summary>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132774871-285ff387-eebe-44ee-9172-3143d0283b09.png" />
</p>
</details>

<details><summary>No Connector UI:</summary>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132774935-e7e71061-e3b6-40ae-bc77-4adb76132de0.png" />
</p>
</details>


<details><summary>Create Connector UI:</summary>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132774985-50980dcf-b022-4101-809a-a2d5a617a892.png" />
</p>
</details>

<details><summary>Connector Template:</summary>
<p>

``` json
{
    "rule_id": "{{context.rule.id}}",
    "rule_name": "{{context.rule.name}}",
    "alert_id": "{{alert.id}}",
    "context_message": "Threshold Results: {{#context.alerts}}{{#signal.threshold_result.terms}}{{value}}, {{/signal.threshold_result.terms}}{{/context.alerts}}"
}
```

<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132775311-3091ed5d-d7df-4dc1-89d6-c02a93c04779.png" />
</p>
</p>
</details>



<details><summary>Documents successfully written:</summary>
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132775457-128f0e62-0978-46a6-ae6e-bd951a1d6c96.png" />
</p>
</details>


---

If wanting to store the alert index timestamp, create index first with `timestamp` field and use `Define timefield for each document` option:


```
PUT .homemade-alerts-index
{
  "mappings" : {
    "dynamic": "true",
    "properties" : {
      "@timestamp": {
        "type": "date"
      }
    }
  }
}
```
<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132775842-ac6534a7-289d-426f-851b-f5f2c2bb5716.png" />
</p>

<p align="center">
  <img width="500" src="https://user-images.githubusercontent.com/2946766/132776120-2def172f-3bfa-4a7e-b041-155e817173ab.png" />
</p>




### Checklist

Delete any items that are not applicable to this PR.

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials (will need to update documentation if we proceed with this PR)
2021-10-19 07:43:43 -06:00
Robert Austin b402bea065
Disable the experimental metrics_entities plugin by default. (#115460)
This was default disabled in 7.15, but we needed a code change to maintain that (consistent) behavior.
2021-10-19 09:33:46 -04:00
Kevin Qualters 340271fba2
[Security Solution] Analyze event moved outside of overflow popover (#115478) 2021-10-19 08:34:15 -04:00
Diana Derevyankina 0e5f2524b4
Respect external URL allow list in TSVB (#114093)
* Respect external URL allow list in TSVB

* Remove showExternalUrlErrorModal and onContextMenu handler for table

* Update modal message

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 15:08:05 +03:00
Pete Harverson f8041e6005
[ML] Delete annotation directly from the index it is stored in (#115328)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 11:57:10 +01:00
Tre c1b0565acd
[QA][refactor] Use ui settings - sample data (#114530) 2021-10-19 11:56:35 +01:00
Sébastien Loix f6a9afea61
[Stack management apps] Deprecate "enabled" Kibana setting (#114768) 2021-10-19 11:33:57 +01:00
Josh Dover 5974fcfdb5
Allow elastic/fleet-server to call appropriate Fleet APIs (#113932) 2021-10-19 12:14:57 +02:00
Andrew Goldstein f9afe67f1e
[Security Solution] Improves the formatting of array values and JSON in the Event and Alert Details panels (#115141)
## [Security Solution] Improves the formatting of array values and JSON in the Event and Alert Details panels

This PR improves the formatting of array values and JSON in the Event and Alert details panels by:

- in the `Table` tab, formatting array values such that each value appears on a separate line, (instead of joining the values on a single line)
- in the `JSON` tab, displaying the raw search hit JSON, instead displaying a JSON representation based on the `Fields` API

### Table value formatting

In the Event and Alert details `Table` tab, array values were joined on a single line, as shown in the _before_ screenshot below:

![event-details-value-formatting-before](https://user-images.githubusercontent.com/4459398/137524968-6450cd73-3154-457d-b850-32a3e7faaab2.png)

_Above: (before) array values were joined on a single line_

Array values are now formatted such that each value appears on a separate line, as shown in the _after_ screenshot below:

![event-details-value-formatting-after](https://user-images.githubusercontent.com/4459398/137436705-b0bec735-5a83-402e-843a-2776e1c80da9.png)

_Above: (after) array values each appear on a separte line_

### JSON formatting

The `JSON` tab previously displayed a JSON representation based on the `Fields` API. Array values were previously represented as a joined string, as shown in the _before_ screenshot below:

![event-details-json-formatting-before](https://user-images.githubusercontent.com/4459398/137525039-d1b14f21-5f9c-4201-905e-8b08f00bb5a0.png)

_Above: (before) array values were previously represented as a joined string_

The `JSON` tab now displays the raw search hit JSON, per the _after_ screenshot below:

![event-details-json-formatting-after](https://user-images.githubusercontent.com/4459398/137437257-330c5b49-a4ad-418e-a976-923f7a35c0cf.png)

_Above: (after) the `JSON` tab displays the raw search hit_

CC @monina-n @paulewing
2021-10-19 06:10:14 -04:00
mgiota 5fe9a319c0
[RAC] [Metrics UI] Include group name in the reason message (#115171)
* [RAC] [Metrics UI] Include group name in the reason message

* remove console log

* fix i18n errors

* fix more i18n errors

* fix i18n & check errors and move group to the end of the reason text

* add empty lines at the end of translation files

* fix more i18n tests

* try to remove manually added translations

* Revert "try to remove manually added translations"

This reverts commit 6949af2f70.

* apply i18n_check fix and reorder values in the formatted reason

* log threshold reformat reason message and move group info at the end
2021-10-19 11:09:48 +02:00
Kevin Lacabane b9024c6ad5
timepicker-url sync functional test (#115173)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 11:08:20 +02:00
Georgii Gorbachev 04a61bfcd4
[Security Solution][Detections] Hide building block rules in "Security/Overview" (#105611)
* Hide building block rules in "Security/Overview"

* Add Cypress tests for alerts generated by building block rules

Co-authored-by: Dmitry Shevchenko <dmshevch@gmail.com>
2021-10-19 11:03:46 +02:00
Khristinin Nikita 1fb28dcc69
IM rule default interval timeout and lookback - 1h (#115185)
* Make 1h default value for IM rule interval and lookback time

* Fix test name

* Move value to cosntants

* Update lookback

* Change lookback to 5 minutes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 10:49:58 +02:00
Ryland Herrick 32e1fc2396
[Security Solution][Rules] Halt Indicator Match execution after interval has passed (#115288)
* Throw an error to stop execution if IM rule has exceeded its interval

* Extract and unit test our timeout validation

* Add integration test around timeout behavior

Configures a very slow rule to trigger a timeout and assert the
corresponding failure.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 04:23:27 -04:00
Dmitry Tomashevich 4d2f76974b
[Discover] Enable description for saved search modal (#114257)
* [Discover] enable description for saved search

* [Discover] remove i18n translations for removed description

* [Discover] apply Tim's suggestion

* [Discover] update snapshot

* [Discover] reorder top nav buttons in tests

* [Description] fix description save action

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 11:16:06 +03:00
Esteban Beltran db83469897
[Security Solution] Generate host isolation exceptions artifact (#115160)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 04:00:49 -04:00
Pablo Machado bfe648d496
Fix alerts Count table title overflow wraps prematurely (#115364) 2021-10-19 09:37:01 +02:00
Paul Tavares 533e5d8d39
[Security Solution][Endpoint] Change Trusted Apps to use item_id as its identifier and Enable Trusted Apps filtering by id in the UI (#115276)
* Add `item_id` to list of searchable fields
* trusted apps api changes to use `item_id` instead of SO `id`
* Change Policy Details Trusted App "View all details" action URL to show TA list filtered by the TA id
2021-10-19 03:36:46 -04:00
Pete Hampton fd4b85b1c6
Update heading on telemetry management section. (#115425) 2021-10-19 08:34:34 +01:00
Dario Gieselaar cb17ec7896
[APM] Add readme for @elastic/apm-generator (#115368) 2021-10-19 09:22:29 +02:00
Joey F. Poon 730df8852f
[Security Solution] fix endpoint list agent status logic (#115286) 2021-10-19 01:09:21 -04:00
Paul Tavares 57ff4a7172
[Security Solution][Endpoint] Adds additional endpoint privileges to the useUserPrivileges() hook (#115051)
* Adds new `canIsolateHost` and `canCreateArtifactsByPolicy` privileges for endpoint
* Refactor `useEndpointPrivileges` mocks to also provide a test function to return the full set of default privileges
* refactor useEndpointPrivileges tests to be more resilient to future changes
2021-10-19 00:43:12 -04:00
Frank Hassanabad e53f4d2f28
[Security Solutions] Makes legacy actions/notification system, legacy action status, and exception lists multiple space shareable (#115427)
## Summary

See https://github.com/elastic/kibana/issues/114548

Makes the following saved objects multiple-isolated:
* siem-detection-engine-rule-status
* exception-list
* siem-detection-engine-rule-actions

### Checklist

Delete any items that are not applicable to this PR.

- [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-10-19 00:37:00 -04:00
Frank Hassanabad fd0fc77062
Fixes console errors seen (#115448)
## Summary

During testing I encountered this error message:

```
[2021-10-18T13:19:07.053-06:00][ERROR][plugins.securitySolution] The notification throttle "from" and/or "to" range values could not be constructed as valid. Tried to construct the values of "from": now-null "to": 2021-10-18T19:19:00.835Z. This will cause a reset of the notification throttle. Expect either missing alert notifications or alert notifications happening earlier than expected.
```

This error was happening whenever I had a rule that was using an immediately invoked action and was encountering an error such as a non ECS compliant signal.  The root cause is that I was not checking everywhere to ensure we had a throttle rule to ensure scheduling.

This fixes that by adding an `if` statement/guard around the areas of code.

I also improve the error message by adding which ruleId the error is coming from.

### 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-10-19 00:24:20 -04:00
Caroline Horn ec3809658f
[Unified Integrations] Clean up empty states, tutorial links and routing to prefer unified integrations (#114911)
Cleans up the integrations view and redirects all links to the integration manager.
2021-10-18 23:56:00 -04:00
Ashokaditya d0bc10f896
[Security Solution][Endpoint]Activity Log API/UX changes (#114905)
* rename legacy actions/responses

fixes elastic/security-team/issues/1702

* use correct name for responses index

refs elastic/kibana/pull/113621

* extract helper method to utils

* append endpoint responses docs to activity log

* Show completed responses on activity log

fixes elastic/security-team/issues/1703

* remove width restriction on date picker

* add a simple test to verify endpoint responses

fixes elastic/security-team/issues/1702

* find unique action_ids from `.fleet-actions` and `.logs-endpoint.actions-default` indices

fixes elastic/security-team/issues/1702

* do not filter out endpoint only actions/responses that did not make it to Fleet

review comments

* use a constant to manage various doc types

review comments

* refactor `getActivityLog`

Simplify `getActivityLog` so it is easier to reason with.
review comments

* skip this for now

will mock this better in a new PR

* improve types

* display endpoint actions similar to fleet actions, but with success icon color

* Correctly do mocks for tests

* Include only errored endpoint actions, remove successful duplicates

fixes elastic/security-team/issues/1703

* Update tests to use non duplicate action_ids

review comments
fixes elastic/security-team/issues/1703

* show correct action title

review fixes

* statusCode constant

review change

* rename

review changes

* Update translations.ts

refs 74a8340b5e

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-18 23:27:12 -04:00