Commit graph

1779 commits

Author SHA1 Message Date
Stacey Gammon 52ee65b8d5
Make owner attribute required on kibana.json (#108231)
* make owner attribute required

* Add owner properties in more places

* add test for owner attribute

* add error check too in the test

* Fix tests

* fix tests and update docs

* wip

* More test fixes

* Fix All The Errorz

* Adding more owner attributes

* Update x-pack/test/saved_object_api_integration/common/fixtures/saved_object_test_plugin/kibana.json

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* Update x-pack/test/ui_capabilities/common/fixtures/plugins/foo_plugin/kibana.json

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>

* commeeeooonnnn

* Update docs

* soooo many kibanajsons

* adjust plugin generator to add an owner

* Add owner to the plugin generator scripts

* update snapshot

* Fix snapshot

* review updates

Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-24 10:02:32 -04:00
Liza Katz 268a279930
[Data][Es Query] Use ES types in Filters (#108378)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* types for filters

* sec fixes

* filtersss

* typey type

* typey type

* comparator options

* test typescript

* test

* fixes

* test types

* test

* cr

* cleanup a bit more

* Jest fix + types

* Remove geo bounding box and geo polygon filters

* delete geo filters

* geo

* geo

* Fix tests \_0_/

* doc

* types and fixes

* jests

* ts

* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs

* ts

* plg ts

* types

* cast

* Update types.ts

* Update create_threat_signal.ts

* Update packages/kbn-es-query/src/es_query/migrate_filter.ts

Co-authored-by: Lukas Olson <olson.lukas@gmail.com>

* Code review

* revert change

* docs

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Lukas Olson <olson.lukas@gmail.com>
2021-08-24 11:28:22 +02:00
Tiago Costa 9a3e8ef054
chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler (#109442)
* chore(NA): moving @kbn/securitysolution-t-grid to babel transpiler

* chore(NA): fix package.json

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 15:54:15 +01:00
Tiago Costa 3128c99d54
chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler (#109426)
* chore(NA): moving @kbn/securitysolution-es-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-es-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

* chore(NA): finetunning package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 15:51:31 +01:00
Tiago Costa 9a7ebb7b2c
chore(NA): moving @kbn/securitysolution-hook-utils to babel transpiler (#109432)
* chore(NA): moving @kbn/securitysolution-hook-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-hook-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

* chore(NA): correct deps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-23 15:26:42 +01:00
Dario Gieselaar 6e3af2b524
[APM] Support multiple route paths in useApmParams (#109370)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 15:38:06 +02:00
Joe Portner 65e04b1380
Remove spacesOss plugin (#109258) 2021-08-23 15:10:09 +02:00
Yaroslav Kuznietsov 237fcac254
[Canvas] Expression tagcloud (#108036)
* Added `expression_tagcloud` plugin.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-23 06:52:19 -04:00
Tiago Costa e340ce61cc
chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler (#109423)
* chore(NA): moving @kbn/securitysolution-autocomplete to babel transpiler

* chore(NA): finetune package

* chore(NA): update deps

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-21 00:08:22 -04:00
Tiago Costa c4d1e7da4a
chore(NA): moving @kbn/alerts to babel transpiler (#109320)
* chore(NA): moving @kbn/alerts to babel transpiler

* chore(NA): finetune package

* chore(NA): miss dep

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 18:55:18 -04:00
Tiago Costa f4e18d47c0
chore(NA): moving @kbn/securitysolution-utils to babel transpiler (#109439)
* chore(NA): moving @kbn/securitysolution-utils to babel transpiler

* chore(NA): update packages/kbn-securitysolution-utils/.babelrc

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>

Co-authored-by: Frank Hassanabad <frankhassanabad@gmail.com>
2021-08-20 22:04:39 +01:00
Devon Thomson 95463f47f3
[Dashboard] Remove Legacy Dashboard Only Mode (#108103)
Remove all dashboard only mode code and tests. Align dashboard permissions to use showWriteControls only
2021-08-20 15:39:10 -04:00
Tiago Costa ec2d041638
chore(NA): moving @kbn/ui-shared-deps to babel transpiler (#109323)
* chore(NA): moving @kbn/ui-shared-deps to babel transpiler

* fix(NA): missing correct paths on package.json files

* chore(NA): update jest integration snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 17:12:08 +01:00
Tiago Costa 9fb152a92f
chore(NA): moving @kbn/logging to babel transpiler (#108702)
* chore(NA): moving @kbn/logging to babel transpiler

* chore(NA): fix imports for @kbn/logging

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 11:54:46 +01:00
Tiago Costa 9c24e8f70f
chore(NA): moving @kbn/interpreter to babel transpiler (#108512)
* chore(NA): moving @kbn/interpreter to babel transpiler

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 11:50:40 +01:00
Tiago Costa cfd5dad174
chore(NA): moving @kbn/optimizer to babel transpiler (#109231)
* chore(NA): adds 7.16 into  backportrc

* chore(NA): moving @kbn/optimizer to babel transpiler
2021-08-19 19:40:50 +01:00
Tiago Costa a7fe773bb8
chore(NA): moving @kbn/plugin-helpers to babel transpiler (#109085)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-19 19:13:33 +01:00
Spencer 7e2bd4fd54
[ftr] rework ciGroup validation to remove JOBS.yml and avoid duplication (#109149)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-19 11:40:23 -05:00
Mikhail Shustov 76eafd8803
exclude tsx test and mock files from test coverage (#109203) 2021-08-19 09:26:24 -05:00
Tiago Costa df112dd880
chore(NA): moving @kbn/plugin-generator to babel transpiler (#109083)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-19 12:27:42 +01:00
mgiota 8c8dca6ad2
[RAC] [Observability] Use simpler alert severity level mapping (#109068)
* [RAC][Observability] remove severity fields from mapping keep only ALERT_SEVERITY

* temporarily remove severity value occurences

* remove ALERT_SEVERITY_VALUE occurences, this value is not being read and shown in the Observability alerts table

* remove duplicate ALERT_SEVERITY identifier

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 16:29:24 -04:00
Tiago Costa 51c15945f2
chore(NA): moving @kbn/mapbox-gl to babel transpiler (#109082)
* chore(NA): moving @kbn/mapbox-gl to babel transpiler

* chore(NA): structure exports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 15:51:52 -04:00
Nathan Reese dd9dd52718
[maps] remove tile_map, region_map, and maps_legacy plugins (#105326)
* [maps] remove tile_map plugin

* initial bounds

* update embeddable query context

* start editor

* remove tile_map from tsconfig and i18n cleanup

* implement view in maps button

* tslint

* remove empty lines

* remove tileMap from limits.yml

* remove region_map and maps_legacy plugins

* region_map vis with Map embeddable

* make MapComponent

* lint

* clean up

* shorten text

* lint

* remove region_map from interpreter functional tests

* update docs

* add migration for removing ui_settings

* remove tile_map and region_map functional tests

* tslint

* call handlers.done when layers are loaded

* fix visualize create menu test

* eslint

* add owner comment to ui_settings/saved_objects/migrations.ts

* remove deleted plugins from codeowners

* review feedback

* use correct value for TILE_MAP_RENDER

* down select mapModules for getLayerDescriptors callback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 12:51:31 -06:00
Yara Tercero 9fa41d1aef
[Security Solution] - Updating UI to work with new kibana privileges abstraction on alerts (#108961)
## Summary

Holy moly. 

What is happening in this PR? 🤷🏽‍♀️ Let's break it down:
- Added a package `@kbn/alerts` - another one?! ...yes
  - This is meant to add shared hooks and components around alerts as data
  - `useGetUserAlertsPermissions` - accepts the Kibana capabilities object and returns whether the user has `read` and `crud` alerts privileges
  - `AlertsFeatureNoPermissions` - component displayed when user does not have alerts privileges
- UI changes for user with NO alerts privileges
  - `Alerts` tab hidden in security solution side navigation
  - `Alerts` tab hidden in rule details page  
- UI changes for user with alerts READ ONLY privileges
  - alerts checkboxes hidden in alerts table
  - alerts bulk actions hidden in alerts table
2021-08-18 14:48:31 -04:00
Liza Katz 6a1a1afd3a
[Data cleanup] Remove geo filters (#109097)
* Remove geo bounding box and geo polygon filters

* delete geo filters

* delete geo filters

* geo

* remove geo docs
2021-08-18 17:08:42 +02:00
Marshall Main 05d1e326a4
[RAC][Security Solution] Remove ALERT_RULE_ID in favor of ALERT_RULE_UUID (#108922)
* Remove ALERT_RULE_ID in favor of ALERT_RULE_UUID

* Update snapshot

* KEVINNN

* fix test

* Add back home.disableWelcomeScreen=true

* Only disable welcome screen in security solution cypress tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 10:37:14 -04:00
Tiago Costa 5d404fff6b
chore(NA): moving @kbn/legacy-logging to babel transpiler (#108703) 2021-08-17 22:24:48 +01:00
Dominique Clarke 15494cd25f
uptime - index default severity of warning for tls and monitor status alerts (#108731)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-17 12:10:00 -04:00
Mikhail Shustov 94f35087b0
fix another conflict in test file (#108905) 2021-08-17 15:29:02 +02:00
Mikhail Shustov 609bd90785
mute incorrect types in es-query (#108898)
* mute incorrect types in es-query

* fix another conflict
2021-08-17 15:21:14 +02:00
Liza Katz 9d1a8a87f8
[Data][Es Query] Use ES types in Kuery functions (#108367)
* es-query types

* jest and lint

* cc

* options

* type

* types for kuery FUNCTIONS

* doc

* sec fixes

* typey type

* test typescript

* test

* fixes

* test

* cr

* cleanup a bit more

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-17 11:49:16 +02:00
Tyler Smalley 689d974729
Removes supertest-as-promised dependency (#100486)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-08-16 18:01:34 -07:00
Kerry Gallagher 85e07662d8
[RAC] Disable RAC multi-tenancy (#108506)
* Disable RAC multi-tenancy
2021-08-16 20:01:27 +01:00
Dominique Clarke 024eeed3c3
[Uptime] adjust RAC RBAC and index settings (#108200)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 14:01:01 -04: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
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
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
Tiago Costa 79f1e18686
chore(NA): moving @kbn/io-ts-utils to babel transpiler (#108517)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-13 18:39:35 +01:00
Tiago Costa 560bd0b57b
chore(NA): moving @kbn/es-archiver to babel transpiler (#108370)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-13 18:38:56 +01:00
Dario Gieselaar a474a63a7f
[APM] Make environment & kuery required (#108338) 2021-08-13 09:50:14 -04:00
Caroline Horn ba14713623
[KibanaPageTemplate] Adding a noDataConfig for templated add data screens (#108293) 2021-08-12 20:01:54 -04:00
Liza Katz e91baea5dc
[Data][Es Query] Use ES types instead of DslQuery (#108290)
* es-query types

* jest and lint

* cc

* options

* type

* type
2021-08-12 21:23:33 +02:00
David Sánchez de9d784035
Adds new operatorsList prop in exceptions builder to allow pass a list of operators. Add this prop in event filters form (#108015)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-12 12:59:33 +02:00
Lukas Olson a2347b2d77
Add scoring support to KQL (#103727)
* Add ability to generate KQL filters in the "must" clause
Also defaults search source to generate filters in the must clause if _score is one of the sort fields

* Update docs

* Review feedback

* Fix tests

* update tests

* Fix merge error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 21:45:01 -07:00
Tiago Costa 7860c2aac3
chore(NA): moving @kbn/crypto to babel transpiler (#108189)
* chore(NA): moving @kbn/crypto to babel transpiler

* chore(NA): update configs
2021-08-12 03:09:50 +01:00
Spencer f236286b62
[kbn/es-archiver] fix flaky test (#108143)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-11 11:51:48 -07:00
Alejandro Fernández Haro def97bd734
[Status UI] Use the new output format of API GET /api/status (#107937) 2021-08-11 16:56:23 +01:00
Tiago Costa dfaf54082a
chore(NA): moving @kbn/rule-data-utils to babel transpiler (#107573)
* chore(NA): moving @kbn/rule-data-utils to babel transpiler

* chore(NA): update imports

* chore(NA): targetted imports for apm

* chore(NA): fix imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 15:59:21 +01:00
Yara Tercero cec5d3f27a
[RAC] - Update field names (#107857)
### Summary
### Fields used moving forward
`kibana.alert.rule.consumer` will refer to the context in which a rule instance is created. Rules created in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

`kibana.alert.rule.producer` will refer to the plugin that registered a rule type. Rules registered in:
- stack --> `alerts`
- security solution --> `siem`
- apm --> `apm`

So an `apm.error_rate` rule created in stack will have:
- consumer: `alerts` and producer: `apm`
 An `apm.error_rate` rule created in apm will have:
- consumer: `apm` and producer: `apm`

`kibana.alert.rule.rule_type_id` will refer to a rule's rule type id. Examples:
- `apm.error_rate`
- `siem.signals`
- `siem.threshold`

Also renamed the following because `rule.*` fields are meant to be ecs fields pulled from the source/event document, not refer to our rule fields.
`rule.name` --> `kibana.alert.rule.name` will refer to the rule's name.

`rule.category` --> `kibana.alert.rule.category` will refer to the rule's category.

`rule.id` --> `kibana.alert.rule.uuid` will refer to the rule's uuid.
2021-08-11 06:25:46 -04:00
spalger 441fb796e2 skip flaky test (#108043) 2021-08-10 23:49:47 -07:00