Commit graph

45591 commits

Author SHA1 Message Date
Frank Hassanabad
9fa62bfd20
[Security Solution][Detection Engine] Fixes agnostic type bug (#108610)
## Summary

Fixes agnostic type bug where in part 1 (#108225), I incorrectly used the same saved object type for both `single` and `agnostic`.

Before the references for SO's were:

```json
"references" : [
  {
    "name" : "param:exceptionsList_0",
    "id" : "endpoint_list",
    "type" : "exception-list" <--- This should have been "exception-list-agnostic" type
  },
  {
    "name" : "param:exceptionsList_1",
    "id" : "50e3bd70-ef1b-11eb-ad71-7de7959be71c",
    "type" : "exception-list"
  }
],
```

After:
```json
"references" : [
  {
    "name" : "param:exceptionsList_0",
    "id" : "endpoint_list",
    "type" : "exception-list-agnostic" <--- This should now be the "exception-list-agnostic" type
  },
  {
    "name" : "param:exceptionsList_1",
    "id" : "50e3bd70-ef1b-11eb-ad71-7de7959be71c",
    "type" : "exception-list"
  }
],
```

Manual testing: Add a new `security_solution` alert and exception list as well as an endpoint list to it. Then save it
<img width="1581" alt="Screen Shot 2021-08-13 at 5 00 39 PM" src="https://user-images.githubusercontent.com/1151048/129425847-78025aba-6d7a-4a5a-9d4f-950ec664596c.png">
<img width="1571" alt="Screen Shot 2021-08-13 at 5 00 47 PM" src="https://user-images.githubusercontent.com/1151048/129425848-42018331-cac6-4411-8153-3441a8af6f34.png">


Do this query in dev tools:
```json
GET .kibana-hassanabad19/_search
{
  "query": {
    "terms": {
      "alert.alertTypeId": [
        "siem.signals"
      ]
    }
  },
  "size": 10000
}
```

And check to ensure that the references look like the after picture where type has : `"type" : "exception-list-agnostic"` if we have an agnostic list. Ensure that on a page reload that the exception types are still there on the rule. Ensure that there are no errors in the console about not finding the correct SO type or anything else odd. 

### 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-08-16 13:25:02 -04:00
Joey F. Poon
ac4b305023
[Security Solution] bump isolation timeout to 5 minutes (#108568) 2021-08-16 13:24:41 -04:00
Oliver Gupte
2456803f9c
[APM] APM agent instrumentation instructions in Fleet (#108242)
* [APM] APM Agent instrumentation instructions in Fleet integration (#106440)

* moves agent/server instructions to common dir

* fix misspelling of accordion

* more spelling fixes

* fixes missing i18n

* fixes linting errors and missing key

* fixes restricted import issue
2021-08-16 13:22:13 -04:00
Scotty Bollinger
f26eb12728
Remove license badge for platinum users (#108596)
This PR remove license badge for platinum users on the custom source confirmation page
2021-08-16 13:17:13 -04:00
Greg Thompson
f26591fd13
Upgrade EUI to v37.1.1 (#108210)
* eui to 37.1.0

* i18n tokens

* license checker

* disabled prop

* i18n shapshot

* date title snapshots

* date title formatting

* date title formatting

* Revert "disabled prop"

This reverts commit 68a48c4352.

* date title formatting

* eui to 37.2.0

* trial: outsideClickCloses

* Revert "trial: outsideClickCloses"

This reverts commit 4da2299e4f.

* eui to 37.1.1

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 12:15:44 -05:00
Jonathan Budzenski
f3f3e10274
[uuid] Cleanup fs error message (#108574)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 13:09:08 -04:00
Kevin Qualters
1de67c7c80
Prevent observability table actions from ever wrapping (#108704) 2021-08-16 13:07:16 -04:00
Cauê Marcondes
512ab2d82f
[OBS] Editing navigation docs adding badge information (#108530)
* Adding badge description

* apm-new-badge_docs

* adding warning

* addressing PR comments

* changing i18n

* adjusting docs

* addressing PR comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 12:44:45 -04:00
Mikhail Shustov
7b03175395
disable execution_context service by default (#108534)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 17:43:20 +01:00
Pablo Machado
e2c7313781
Add empty tag validation to cases (#108699) 2021-08-16 12:12:34 -04:00
Cauê Marcondes
0eea6f7ca3
[APM] Refactoring service inventory loading status (#108531) 2021-08-16 11:17:38 -04:00
Annalisa Valente
edb62eed1e
[User Experience] Page title update (#108067)
* Update title User Experience app

* Second rev.

* Modify breadcrumb to say "Dashboard" instead of "Overview".

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
2021-08-16 11:16:10 -04:00
Robert Oskamp
a672fd7988
[ML] Functional tests - stabilize delete annotation test (#108686)
This PR stabilizes the delete annotation UI test by increasing the timeout while waiting for annotation table changes.
2021-08-16 17:04:59 +02:00
Ashokaditya
a4ba1c9274
[Security Solution][Endpoint] Adjust Activity log date picker alignments (#108504)
* set max width on date picker

going with 350px instead of the 250px in the mock in order to fully show the placeholder text for now.

see elastic/security-team/issues/1571

* pad date picker to align with activity log content

see elastic/security-team/issues/1571

* use padding sizes instead

review comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 16:20:49 +02:00
Tiago Costa
29b1fc3030
chore(NA): moving @kbn/docs-utils to babel transpiler (#108190)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 10:20:33 -04:00
Tiago Costa
3ab852f213
Revert "[RAC] integrating rbac search strategy with alert flyout (#108375)"
This reverts commit c6c24e4392.
2021-08-16 15:15:19 +01:00
Dario Gieselaar
cd3cc29133
[APM] Query transaction metrics for alerts (#108167)
Closes #78122.
2021-08-16 09:53:43 -04:00
Katrin Freihofner
a80243aab2
Adjusts panel styling in metrics and logs settings (#108412)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 09:10:59 -04:00
Rudolf Meijering
b96648ca0c
Handle index not found during bulk index action (#108544)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 15:10:10 +02:00
Angela Chuang
c6c24e4392
[RAC] integrating rbac search strategy with alert flyout (#108375)
* add alert consumers for useTimelineEventDetails

* set entityType to events

* rename to AlertConsumers

* set entityType to alerts

* send entity type to search strategy

* fix import

* fix import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 08:58:27 -04:00
Alison Goryachev
650f45b823
[Upgrade Assistant] Create new status endpoint (#105998) 2021-08-16 08:50:36 -04:00
Tre
8a571c2f7d
[QA][SO INFO SVC] Add cli (#108353)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 13:36:22 +01:00
Ashokaditya
a5e97fc21e
[Security Solution][Endpoint] Update endpoint middleware to load data correctly (#108551)
* update endpoint middleware to load data correctly

fixes kibana/issues/108497
modifies changes done in elastic/kibana/pull/107632
and elastic/kibana/pull/108330

* await results

fixes elastic/kibana/issues/108497

* review comments

* Add a test to cover this case

fixes elastic/kibana/issues/108497

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 14:08:23 +02:00
Angela Chuang
fe0322ac1f
[Security Solution] flyout UI adjustment (#108192)
* styling

* fix hover actions

* init overflow button for flyout

* init overflow button

* topN btn

* remove popover from topN

* fix tests

* fix unit test

* add use hover action items hook

* fix for code review

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 08:02:42 -04:00
Katrin Freihofner
7f5c1b43ad
Change orientation of the ML setup form (#108339)
Co-authored-by: Alejandro Fernández Gómez <alejandro.fernandez@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 08:01:26 -04:00
Tiago Costa
e276554739
skip flaky suite (#95614) 2021-08-16 12:52:35 +01:00
Tiago Costa
b20ccd9514
skip flaky suite (#108352) 2021-08-16 12:43:55 +01:00
Tiago Costa
2c7548ed7c
skip flaky suite (#106651) 2021-08-16 12:38:55 +01:00
Alexey Antonov
49735477d0
[TSVB] Fix UI issue with padding on showing annotations (#108205)
* [TSVB] Fix UI issue with padding on showing annotations

* try to fix CI

* move 19 to constant

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 14:30:57 +03:00
Angela Chuang
fc3b3cc2bd
Fix expand hover action in data grid (#108616)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 11:51:49 +01:00
Pablo Machado
c2d5d1b6c2
Improve security alerts t-grid loading and empty state (#108527) 2021-08-16 06:15:21 -04:00
Uladzislau Lasitsa
cb4069272f
Reduce calling canFilter significantly (#108515)
* Reduce calling canFIlter

* Fix lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 13:01:14 +03:00
Matthias Wilhelm
45ec64f99e
[Discover][Context] Add functional test, convert to TypeScript (#108481) 2021-08-16 11:39:20 +02:00
Anton Dosov
72742d0d50
[FieldFormats] Example plugin (#108070) 2021-08-16 05:18:34 -04:00
Angela Chuang
7888c9cf5f
[Security Solution] Add reason field (#108449)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-15 22:27:54 -04:00
Michael Olorunnisola
565276a90d
[Security Solution][RAC] - Enable tGrid by default (#108632) 2021-08-15 22:10:24 -04:00
Patryk Kopyciński
c347a7e5e5
[Osquery] Add ECS mapping editor (#107706) 2021-08-16 01:17:07 +02:00
Kevin Qualters
0828788b66
[RAC][Security Solution][Observability] Add the add to new case and add to existing case actions to observability alerts table (#108502)
* [RAC][Security Solution][Observability] Add the add to new case and add to existing case actions to observability alerts table

* Remove fake data and make features work with observability data format

* Remove console.log and unused translations

* Remove commented out code

* Remove unneeded copy pasta id, create initializeStore function in timelines

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-15 13:27:28 -04:00
Matthew Kime
2e68ce1a05
Developer guide - index patterns key concepts (#96017)
* add index patterns key concepts
2021-08-15 08:48:51 -05:00
Georgii Gorbachev
2ee11db1fa
[RAC][Rule Registry] Improve RuleDataService API and index bootstrapping implementation (#108115)
**Addresses:** https://github.com/elastic/kibana/issues/106421, https://github.com/elastic/kibana/issues/106428, https://github.com/elastic/kibana/issues/102089, https://github.com/elastic/kibana/issues/106433

## Summary

This PR focuses on consolidation of indexing implementations in `rule_registry` (https://github.com/elastic/kibana/issues/101016). It addresses some of the sub-tasks of the parent ticket.

- [x] Encapsulate index bootstrapping logic in a new improved API exposed by `RuleDataService`.
- [x] Enforce allowed values for the `datasetSuffix` on the API level.
- [x] Migrate plugins using the existing `RuleDataService` API to the improved one.
- [x] Make sure index names comply with design architecture.
    - https://github.com/elastic/kibana/issues/102089
- [x] Improve the API of `RuleDataClient`.
- [x] Enhance index bootstrapping: support custom ILM policy per index (`{registrationContext}.{datasetSuffix}`).
- [x] Enhance index bootstrapping: create index template per namespace and support rollovers properly
    - based on https://github.com/elastic/kibana/pull/107700
- [x] Enhance index bootstrapping: support secondary aliases
    - based on https://github.com/elastic/kibana/pull/107700
- [x] Remove `EventLogService` implementation
    - https://github.com/elastic/kibana/issues/106433

This will be addressed in follow-up PRs:

- [ ] Enhance index bootstrapping: implement suggestions for backwards compatibility (naming scheme for alias and backing indices; versioning).
- [ ] Enhance index bootstrapping: implement upgrades of existing index templates.
- [ ] Make index bootstrapping logic more robust. This _is partially addressed_ in this PR, but more improvements are needed.
- [ ] Change the way index prefix works.
- [ ] Add support for optional TS schema (static typing).
- [ ] Update `README` in `rule_registry`.

### Checklist

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [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-08-15 14:52:44 +02:00
liza-mae
ee07d710d4
Update infra visual test (#108621) 2021-08-14 14:37:08 -06:00
Ece Özalp
aa8ce39e03
[CTI] adds Range Picker to Threat Intel Tab (#107234) 2021-08-14 16:30:35 -04:00
Patryk Kopyciński
9d0a7b8394
[Osquery] Add Osquery tab to node details tabs (#104272) 2021-08-14 07:25:24 -04:00
Ryland Herrick
a9844db461
[Security Solution][CTI] Update legacy CTI signals to latest ECS threat fields (#107988)
* WIP: Adding integration test

* Replace threat.indicator mappings with threat.enrichments mappings

The nested threat.indicator mappings were experimental, and replaced by
threat.enrichmentsin ECS 1.10. While these fields are also experimental,
they fix the conflict between CTI data's normal threat.indicator
mappings.

* Add threat.enrichments mappings to our signals template mappings

event.* is no longer nested within here; it was determined that event
fields were not relevant to enrichment. All relevant ECS fieldsets
(file, pe, etc) are now nested under threat.enrichments.

* Update snapshot with newest threat.enrichments mappings

This test is a snapshot of the actual mappings applied by our templates. Looks good to me!

* Update ECS types to match latest

We now have two threat fields we care about for CTI, for legacy and
official ECS.

* Add a basic test for behavior of legacy enriched signals.

They're still queryable by threat.indicator, meaning that any existing
dashboards will still work.

* WIP: First pass at a data migration for CTI signals

* Defines reindex script to move things around
* Adds integration tests to make sure the migration and new mappings
  work
* Need to test a few more things and verify corner cases
* Need to extract some helpers from tests

* Bump our template version to ensure devs roll over

Marshall bumped to 55, giving us 10 versions for 7.14.x updates.
However, devs would not otherwise roll over and get my mapping updates
without destroying their signals index and rebuilding (which is also not
the same thing, exactly), so this trades having one higher signals
version for a more streamlined dev workflow.

* More robust guard against data migration

We only attempt to migrate legacy enrichments if the document:

* is a signal from an indicator match rule
* has a `threat.indicator` field
* does not have a `threat.enrichments` field

* Minor reorder of operations to make logic clearer

* Add more assertions around our signals data migration

Tests a few more pieces of the resulting document, giving more
confidence that it's the correct transformation (and mappings).

This also modifies/anonymizes the data that was originally generated on
a work machine.

* Remove outdated note

This was for when these tests were driven via the UI; the API is more
responsive and now synchronization is currently needed here, beyond the
200 responses.

* Fix typo in comment

These fields are in ECS 1.11.

* Update snapshot test

We bumped the version previously, causing this test to become outdated.

* Update ECS typings in timelines plugin

These were copied from the security_solution plugin. I updated those,
but neglected to update these.

Until there's a better mechanism for deduplication here, I'm going to
kick the can and update both for now.

* Update enrichments logic to read/write from threat.enrichments

* indicator match rule logic
  * we now simply copy from the specified indicator path, and place that
    in `threat.enrichments.indicator`
* event enrichment API logic
  * We were previously returning fields from `indicator.*`, we now
    include the `indicator.*` suffix in order to be more consistent with
    the sibling `matched.*` fields
* row renderer logic
  * removal of dataset
  * updates relevant to API changes above

* Fix logical error in generating links from indicator fields

We want to link the reference field, not a `first_seen` field.

* Always include the indicator prefix in first-party indicator fields

Prior to this change we would display e.g. `threatintel.indicator.foo`
for investigation enrichment fields. Now that the structure has changed
slightly and we return both `indicator.*` and `matched.*` fields for
existing enrichents, we want to display investigation enrichment
similarly.

* Update indicator match rule integration tests

Now that we've updated our enrichment logic, we need to update our
enrichment tests.

* Remove unused translation

* Update example row renderer data for enriched alerts

* Update parallel CTI constants to get our CTI row renderer working

We were not requesting the necessary fields for our row renderer, since
these constants (specifically CTI_ROW_RENDERER_FIELDS) now exist in both
security_solution and the timelines plugin. I had updated the former,
but only the latter is actually used.

* Update CTI enrichment UI tests

* Update prepackaged threat timeline template with new threat fields

Also bumps the timelineTemplateVersion.

* Update Indicator Match rule tests

These needed three things:

* Update to timeline template (see previous commit)
* Changing expectations from `threat.indicator` to `threat.enrichments`
* Update row renderer expectation to exclude dataset

* Update mock data with newest CTI enrichment fields

* Fix assertion on our threat details

These fields are prefixed with `indicator` now because:

1. This data pertains to the indicator, not the match per se
2. The actual field is prefixed with indicator (or, it at least
   specifies an indicator in the case of a custom threat index (via
   threat_indicator_path))

* Update test data and tests for our field parsing helpers

* Update more event-parsing tests

Ths one involved updating a mock in another package.

* Modify our helper function to support old filebeat indicators

When we query indicators for enrichment matches, the current expectation
is that we'll be querying 7.14 filebeat modules, which have an indicator
path of 'threatintel.indicator'. The only place that matters on the UI
is on the threat intel panel, where these indicators come back with such
a prefix.

This change has one behavior: it brings back the `provider` field on the
Alert summary tab for queried enrichments from filebeat modules.

* Update variable and method names to be more consistent with internal terminology

Indicators come from a CTI index. Enrichments are the application of
indicator data to other documents, and contain both indicator fields and
matched context.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-14 01:57:23 -04:00
Davis Plumlee
5f947c2531
[Security Solution][Detections] Moves last updated info inline with status filter (#108096) 2021-08-14 01:24:00 -04:00
Yara Tercero
94d16f8882
[Security Solution] - remove alerts subfeature UI from behind feature flag (#108450)
### Summary
This removes the feature flag check for showing the alerts subfeature under security solution Kibana roles UI.
2021-08-14 00:12:31 -04:00
Sergi Massaneda
a7661a553c
[TGrid] Alerts status update use RAC api (#108092)
Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
2021-08-13 22:11:53 -04:00
liza-mae
78e7e40b77
Update map visual test (#108593)
* Update map visual test

* Up to latest
2021-08-13 19:35:01 -06:00
Caroline Horn
e33cdc29c6
[Enterprise Search] Updated product_selector to match new No Data screens (#108592)
And updated product selector images to match new Kibana UI
2021-08-13 20:29:10 -04:00
CJ Cenizal
bfea4a1c2b
Add EuiCodeEditor to ES UI Shared. (#108318)
* Export EuiCodeEditor from es_ui_shared and consume it in Grok Debugger. Remove warning from EuiCodeEditor.
* Lazy-load code editor so it doesn't bloat the EsUiShared plugin bundle.
* Refactor mocks into a shared jest_mock.tsx file.
2021-08-13 16:49:55 -07:00