Commit graph

15164 commits

Author SHA1 Message Date
Kibana Machine 1591f39070
[es-archiver] Use alias for Kibana mappings (#101537) (#101626)
In 7.x, when saved objects point to an index and not an alias it will
assume it's pre-6.8 and perform a legacy migration. This causes issues
with the removal of oss builds. This update prevents that from happening
by using an alias.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-08 12:21:54 -07:00
Christos Nasikas f2a5c47484
[Cases] Performance and RBAC improvements (#101465) (#101652)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 15:05:37 -04:00
Spencer 11ecb4e6fc
[ts] migrate x-pack/test to composite ts project (#101441) (#101651)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	x-pack/test/functional/page_objects/gis_page.ts
#	x-pack/test/functional/page_objects/index.ts
#	x-pack/test/functional/page_objects/reporting_page.ts
2021-06-08 15:04:53 -04:00
Angela Chuang 8855123b86
disable Add to favorites button for Elastic templates (#101471) (#101645)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 14:51:54 -04:00
Lisa Cawley ab28c88c3d
[ML] Add popover help in Single Metric Viewer (#101446) (#101643) 2021-06-08 14:46:15 -04:00
Kibana Machine 93ca47b1f0
[App Search] Updated Search UI to new URL (#101320) (#101644)
Co-authored-by: Jason Stoltzfus <jastoltz24@gmail.com>
2021-06-08 14:44:41 -04:00
Kibana Machine cb04ed22ae
[Logs UI] Fix applying a filter from the log entry detail flyout (#101011) (#101641)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2021-06-08 14:32:48 -04:00
Kibana Machine 436132496c
[Maps] fix EMS Boundaries with joins not rendering (#101604) (#101636)
* [Maps] fix EMS Boundaries with joins do not rendering

* make newData required

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
2021-06-08 14:21:13 -04:00
Kibana Machine 3b027da7e0
[Security Solution][Endpoint] Set Endpoint.configuration and Endpoint.state optional in endpoint Metadata (#101592) (#101634)
* make `Endpoint.configuration` and `Endpoint.state` optional in the Host Metadata
* Set types in generator to also be optional

Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
2021-06-08 18:17:09 +00:00
Kibana Machine 647a849d55
Add ssl instructions to example alerting plugin (#101529) (#101624)
* Update documentation.tsx

* Update documentation.tsx

* Update documentation.tsx

* fix type issue

* Noticed a lack of a space in the screenshot

Co-authored-by: Stacey Gammon <gammon@elastic.co>
2021-06-08 17:50:24 +00:00
Caroline Horn b118e40753
[Stack Management] Converted to use KibanaPageTemplate (sort of) (#101335) (#101617)
* Just replace the old wrapper and uses the `solutionNav` prop
* Examples of: Empty Page, Error state, Page Header, and Split Panel
2021-06-08 13:28:27 -04:00
Sergi Massaneda ecc3a30556
[Core][Navigation] Chrome nav display application deepLinks (#100590) (#101615)
* chrome nav allows deepLinks

* docs updated

* use ChromeNavLink.url to call navigateToUrl

* to_nav_link test cases added for deepLink parameter

* snapshots updated

* deep nav links functional test added

* AppNavOptions type encapsulation

* docs updated

* docs for AppNavOptions

* implement navigateToApp deepLinkId option

* app searchable flag implementation

* code cleaning and test case added

* use explicit type

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 13:16:24 -04:00
Kibana Machine c2c1ea0d31
[Fleet] Fix packages being upgraded accidentally after adding to policy (#101542) (#101614)
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
2021-06-08 16:59:29 +00:00
Yuliia Naumenko ae9780003a
[Alerting UI] Fixed broken ES Index action type validation. (#101504) (#101612)
* [Alerting UI] Fixed broken ES Index action type validation.

* Revert unnecesary changes
2021-06-08 12:58:16 -04:00
Kibana Machine 2b980e4ab6
[ML] Fix missing overflowY in Anomaly charts embeddable (#101404) (#101608)
* [ML] Add requestAnimationFrame and dd back overflowY auto

* [ML] Remove request

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
2021-06-08 12:27:30 -04:00
Mikhail Shustov 100394cfb6
[7.x] Update @elastic/elasticsearch to 8.0.0-canary13 (#98266) (#101595)
* Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)

* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
# Conflicts:
#	package.json
#	src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts
#	test/common/services/saved_object_info.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/repositories.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/snapshots.ts
#	yarn.lock

* revert  @ts-expect-error changes in infra plugin

* update docs
2021-06-08 12:21:59 -04:00
Marco Vettorello 770ff8c81a
Update dependency @elastic/charts to v30 (master) (#101409) (#101606)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: nickofthyme <nick.ryan.partridge@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 12:10:58 -04:00
Kibana Machine e09bc40c1b
Collect additional fields for alert telemetry. (#101578) (#101602)
Co-authored-by: Pete Hampton <pjhampton@users.noreply.github.com>
2021-06-08 16:00:24 +00:00
Kibana Machine d6b7e38672
[APM] Update ESLint and tsc commands in APM readme (#101207) (#101596)
* [APM] Change typescript command in readme

* Update eslint command

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-06-08 11:48:53 -04:00
Kibana Machine 4f71f1fbad
[Enterprise Search] Refactor Role mappings landing pages for both products (#101534) (#101588)
* Add constants and type

* Add RoleMappingsHeading component

I toyed with trying to make a shared component between the Role mappings and Users sections since they both have the same layout, but the need to have all of the conditional copy and button text just seemed too messy, so I opted to share this component between the two products and will make a UsersHeading component in a future PR

* Remove action from table

This is now in the RoleMappingsHeading component from the previous commit

* Remove empty states

Also removed the add mapping button since it is in the heading component

* Remove page headings in favor of table headings

* Remove a bunch of constants and translations

* Update placeholder to match mockup

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-06-08 11:12:00 -04:00
Kibana Machine d8abad0f47
Updates to APM alert annotations (#101106) (#101586)
Make alert annotations on the latency chart show a line annotation at the beginning and have a tooltip.

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-06-08 11:01:17 -04:00
Yulia Čech c48f2fdd99
Unskip the test (#101414) (#101567)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-08 09:19:02 -04:00
Shahzad 4970fa3106
[User Experience] Move ux app to new nav (#101005) (#101575) 2021-06-08 09:15:48 -04:00
Christos Nasikas 919eb94814
[Cases] Get connector's information from actionsTypeRegistry (#101279) (#101570)
Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>

Co-authored-by: Yuliia Naumenko <yuliia.naumenko@elastic.com>
2021-06-08 08:52:49 -04:00
Matthias Wilhelm 8064639fd9
[Discover] Deangularize discover controller (#96766) (#101566)
Co-authored-by: Tim Roes <mail@timroes.de>

Co-authored-by: Tim Roes <mail@timroes.de>
2021-06-08 07:29:14 -04:00
Kibana Machine d117ba7faf
[APM] Add Obs side nav and refactor APM templates (#101044) (#101559)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-06-08 06:28:10 -04:00
Domenico Andreoli 73d3612067
[7.x] Add CCS integration test for security rules (#101508)
* [7.x] Add CCS integration test for security rules

* [7.x] More precise alerts matching

* Split out test preparation and cleanup

* Load data on the remote cluster

* Update the rule to the new (remote) data

Backport of #99042 and #99820.
2021-06-08 09:35:41 +02:00
Kibana Machine b89ff202a8
[maps] fix map embeddable using separate refresh interval timer from container (#97298) (#101522)
* [maps] remove refresh interval timer from MapContainer

* tslint

* use redux store to determine when loading is finished

* tslint

* tslint

* tslint

* apm tslint

* security_solution tslint

* review feedback

* remove unused file

* tslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
2021-06-07 22:11:12 +00:00
Devon Thomson f6f02aec8d
[Dashboard] Rebuild State Management (#97941) (#101524)
* Rebuilt dashboard state management system with RTK.
2021-06-07 17:14:44 -04:00
Kibana Machine 1f5609567e
Adds 'event' handler for canvas expression renderers (#101502) (#101517)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Corey Robertson <corey.robertson@elastic.co>
2021-06-07 15:49:40 -04:00
Yulia Čech a900693f03
[ILM] Split edit policy test helpers into separate files (#100807) (#101514)
* Refactored edit policy actions into separate files

* Fixed types errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-07 15:32:37 -04:00
Jonathan Buttner 43092adc4a
[7.x] [Cases] RBAC (#95058) (#101488)
* [Cases] RBAC (#95058)

* Adding feature flag for auth

* Hiding SOs and adding consumer field

* First pass at adding security changes

* Consumer as the app's plugin ID

* Create addConsumerToSO migration helper

* Fix mapping's SO consumer

* Add test for CasesActions

* Declare hidden types on SO client

* Restructure integration tests

* Init spaces_only integration tests

* Implementing the cases security string

* Adding security plugin tests for cases

* Rough concept for authorization class

* Adding comments

* Fix merge

* Get requiredPrivileges for classes

* Check privillages

* Ensure that all classes are available

* Success if hasAllRequested is true

* Failure if hasAllRequested is false

* Adding schema updates for feature plugin

* Seperate basic from trial

* Enable SIR on integration tests

* Starting the plumbing for authorization in plugin

* Unit tests working

* Move find route logic to case client

* Create integration test helper functions

* Adding auth to create call

* Create getClassFilter helper

* Add class attribute to find request

* Create getFindAuthorizationFilter

* Ensure savedObject is authorized in find method

* Include fields for authorization

* Combine authorization filter with cases & subcases filter

* Fix isAuthorized flag

* Fix merge issue

* Create/delete spaces & users before and after tests

* Add more user and roles

* [Cases] Convert filters from strings to KueryNode (#95288)

* [Cases] RBAC: Rename class to scope (#95535)

* [Cases][RBAC] Rename scope to owner (#96035)

* [Cases] RBAC: Create & Find integration tests (#95511)

* [Cases] Cases client enchantment (#95923)

* [Cases] Authorization and Client Audit Logger (#95477)

* Starting audit logger

* Finishing auth audit logger

* Fixing tests and types

* Adding audit event creator

* Renaming class to scope

* Adding audit logger messages to create and find

* Adding comments and fixing import issue

* Fixing type errors

* Fixing tests and adding username to message

* Addressing PR feedback

* Removing unneccessary log and generating id

* Fixing module issue and remove expect.anything

* [Cases] Migrate sub cases routes to a client (#96461)

* Adding sub cases client

* Move sub case routes to case client

* Throw when attempting to access the sub cases client

* Fixing throw and removing user ans soclients

* [Cases] RBAC: Migrate routes' unit tests to integration tests (#96374)

Co-authored-by: Jonathan Buttner <jonathan.buttner@elastic.co>

* [Cases] Move remaining HTTP functionality to client (#96507)

* Moving deletes and find for attachments

* Moving rest of comment apis

* Migrating configuration routes to client

* Finished moving routes, starting utils refactor

* Refactoring utilites and fixing integration tests

* Addressing PR feedback

* Fixing mocks and types

* Fixing integration tests

* Renaming status_stats

* Fixing test type errors

* Adding plugins to kibana.json

* Adding cases to required plugin

* [Cases] Refactoring authorization (#97483)

* Refactoring authorization

* Wrapping auth calls in helper for try catch

* Reverting name change

* Hardcoding the saved object types

* Switching ensure to owner array

* [Cases] Add authorization to configuration & cases routes (#97228)

* [Cases] Attachments RBAC (#97756)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Addressing PR comments

* Reducing operations

* [Cases] Add RBAC to remaining Cases APIs (#98762)

* Starting rbac for comments

* Adding authorization to rest of comment apis

* Starting the comment rbac tests

* Fixing some of the rbac tests

* Adding some integration tests

* Starting patch tests

* Working tests for comments

* Working tests

* Fixing some tests

* Fixing type issues from pulling in master

* Fixing connector tests that only work in trial license

* Attempting to fix cypress

* Mock return of array for configure

* Fixing cypress test

* Cleaning up

* Working case update tests

* Addressing PR comments

* Reducing operations

* Working rbac push case tests

* Starting stats apis

* Working status tests

* User action tests and fixing migration errors

* Fixing type errors

* including error in message

* Addressing pr feedback

* Fixing some type errors

* [Cases] Add space only tests (#99409)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* [Cases] Add security only tests (#99679)

* Starting spaces tests

* Finishing space only tests

* Refactoring createCaseWithConnector

* Fixing spelling

* Addressing PR feedback and creating alert tests

* Fixing mocks

* Starting security only tests

* Adding remainder security only tests

* Using helper objects

* Fixing type error for null space

* Renaming utility variables

* Refactoring users and roles for security only tests

* Adding sub feature

* [Cases] Cleaning up the services and TODOs (#99723)

* Cleaning up the service intialization

* Fixing type errors

* Adding comments for the api

* Working test for cases client

* Fix type error

* Adding generated docs

* Adding more docs and cleaning up types

* Cleaning up readme

* More clean up and links

* Changing some file names

* Renaming docs

* Integration tests for cases privs and fixes (#100038)

* [Cases] RBAC on UI (#99478)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* Fixing case ids by alert id route call

* [Cases] Fixing UI feature permissions and adding UI tests (#100074)

* Integration tests for cases privs and fixes

* Fixing ui cases permissions and adding tests

* Adding test for collection failure and fixing jest

* Renaming variables

* Fixing type error

* Adding some comments

* Validate cases features

* Fix new schema

* Adding owner param for the status stats

* Fix get case status tests

* Adjusting permissions text and fixing status

* Address PR feedback

* Adding top level feature back

* Fixing feature privileges

* Renaming

* Removing uneeded else

* Fixing tests and adding cases merge tests

* [Cases][Security Solution] Basic license security solution API tests (#100925)

* Cleaning up the fixture plugins

* Adding basic feature test

* renaming to unsecuredSavedObjectsClient (#101215)

* [Cases] RBAC Refactoring audit logging (#100952)

* Refactoring audit logging

* Adding unit tests for authorization classes

* Addressing feedback and adding util tests

* return undefined on empty array

* fixing eslint

* [Cases] Cleaning up RBAC integration tests (#101324)

* Adding tests for space permissions

* Adding tests for testing a disable feature

Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/cases/server/client/client.ts
#	x-pack/plugins/cases/server/client/mocks.ts
#	x-pack/plugins/cases/server/client/types.ts
#	x-pack/plugins/cases/server/index.ts
#	x-pack/plugins/cases/server/plugin.ts
#	x-pack/plugins/security_solution/server/endpoint/endpoint_app_context_services.ts
#	x-pack/plugins/security_solution/server/endpoint/mocks.ts
#	x-pack/plugins/security_solution/server/endpoint/routes/actions/isolation.ts

* Fixing type errors

* Addressing plugin type errors
2021-06-07 15:27:45 -04:00
Kibana Machine 0c6ef06f6e
[Enterprise Search] Fix edge case UI issues in Role Mapping flyouts (#101436) (#101510)
* Add invalidation to Attribute Value field when empty

Also added some missed i18n strings for the form row labels

* Disable forms if attribute value is invalid

* Move error from saving role mapping to inline form error

Flash message was rendering behind flyover.
*Best to view this commit with whitespace changes hidden

* Fix i18n

Copy/Paste FTW

* Attempt at fixing lint issue

My local linter seems to be broken

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
2021-06-07 15:10:41 -04:00
Kibana Machine f221a555ed
Adds css class to EuiDescriptionListDescription in order to break word on exception details card (#101481) (#101496)
Co-authored-by: David Sánchez <davidsansol92@gmail.com>
2021-06-07 13:12:11 -04:00
Kibana Machine ea2ff28062
[Lens] Increase timings for drag and drop tests (#101380) (#101494)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-06-07 13:03:21 -04:00
Kyle Pollich 484305d1f7
[Fleet] Move integrations to a separate app (#99848) (#101493)
* WIP: Re-create separation of integrations app

* Fix breadcrumbs

* Fix add integration button/routing

* Fix integrations test paths

* Fix failing policy tab tests

* Fix type errors

* Fix more type errors

* Fix integrations home page redirect

* Fix circular import

* Fix i18n errors

* Fix FTR paths

* Fix more deep fleet import paths

* Remove unneeded state set

* Fix more type errors

* Fix failing security_solutions tests

* Address redirect back path todo

* Fix page path in FTR

* Fix type error

* 🤞 Fix FTR failures

* Fix package details path in endpoint tests

* Fix test import

* Fix add integration route + breadcrumbs

* Fix missing layout for create package policy page

* Fixup Kibana feature declaration + fix app registry arrays

* Fix Kibana startup error from feature registration

* Fix telemetry schema

* Remove integrations from privilege tests

* Increase Fleet bundle limit by 20kb to fix CI error

* Use correct updated Fleet bundle limit

* Update limits.yml via script

* Address design feedback

* Fix i18n error

* Fix failing security solution tests

* Fix type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
2021-06-07 12:59:19 -04:00
Kibana Machine 12cd2e1ad9
[Lens] Fix editor react error on configuration panel (#101367) (#101491)
* 🐛 Fix react error

* 👌 Apply feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2021-06-07 12:52:39 -04:00
Frank Hassanabad d41ca07e8c
[Security Solution][Detection Engine] Test cases for alias failure test cases where we don't copy aliases correctly (#101437) (#101490)
## Summary

Test cases for signals and aliases, including a failure of where we do not copy alias data at the moment even if the target is an ECS compatible field.

For example with this mapping:

```json
{
  "dynamic": "strict",
  "properties": {
    "@timestamp": {
      "type": "date"
    },
    "host": {
      "properties": {
        "name": {
          "type": "alias",
          "path": "host_alias.name"
        }
      }
    },
    "host_alias": {
      "properties": {
        "name": {
          "type": "keyword"
        }
      }
    }
  }
}
```

If we detect this as a signal hit we should be copying over both:
* `host_alias.name` -> `host.name`
* `host_alias.name` -> `host_alias.name`

to the target signal index, but we only copy:
* `host_alias.name` -> `host_alias.name`

### 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-06-07 12:32:51 -04:00
Kibana Machine bf35480e48
[Lens] Value in legend (#101353) (#101477)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2021-06-07 09:54:09 -04:00
Jean-Louis Leysens 826ec54bec
Revert "[Reporting] ILM policy for managing reporting indices (#100130)" (#101358) (#101475)
This reverts commit 662fe74757.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/reporting/server/lib/store/store.ts
2021-06-07 09:35:17 -04:00
Kibana Machine 99edd5271c
[Exploratory View] Refactor series storage (#100571) (#101462)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
2021-06-07 09:53:29 +00:00
Kibana Machine 06351df401
[Fleet] Show callout & CTA in add agent flyout if no enrollment keys (#100599) (#101445)
## Summary
Fixes https://github.com/elastic/kibana/issues/91454

### If there are no enrollment tokens for a policy, show help text & button to create one.

https://user-images.githubusercontent.com/57655/119555390-ce95b480-bd6b-11eb-8333-ce7b50c9fccd.mov


### Clicking "Create enrollment token" button in Agents list view now opens a modal instead of a flyout

https://user-images.githubusercontent.com/57655/119556503-1e28b000-bd6d-11eb-8952-1da8e80e976e.mov



### Checklist

- [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/master/packages/kbn-i18n/README.md)
- [ ] [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

Co-authored-by: John Schulz <john.schulz@elastic.co>
2021-06-04 21:00:50 -04:00
Kibana Machine 918294134f
[Event Log] Adding type_id to saved object array in event log (#100939) (#101444)
* Adding new fields to event log mapping

* Populating new event log fields when executing rules and actions

* Fixing functional tests

* Adding actionTypeId

* Putting type ids into saved object array

* Fixing functional tests

* Cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: ymao1 <ying.mao@elastic.co>
2021-06-05 00:50:08 +00:00
Tim Sullivan 6818dc7194
[Reporting] Add location.url info to console message logs (#101427) (#101442) 2021-06-04 17:48:39 -07:00
Kibana Machine cc47864b5e
[Security Solutions][Detection Engine] Fixes timestamp bugs within source indexes when the formats are not ISO8601 format (#101349) (#101440)
## Summary

We have a few bugs where when the source index for detections is not `"strict_date_optional_time"` it is possible that we will misinterpret the format to be epoch milliseconds when it could be epoch seconds or another ambiguous format or blow up when trying to write out the signals index. This fixes it to where we query for the source index format as an ISO8601 and when we copy the date time format we copy it back out as ISO8601 and insert it into the signal index as ISO8601.

See this [gist](https://gist.github.com/FrankHassanabad/f614ec9762d59cd1129b3269f5bae41c) for more details of how this was accidentally introduced when we added support for runtime fields and the general idea of the fix.

* Removes `docvalue_field` and we now only use `fields` in detection engine search requests
* Splits out the timestamp e2e tests into their own file for `timestamps` file
* Adds more tests to ensure we copy what we expect and we are converting to ISO8601 in the signals
* Removes `ts-expect-error` in a lot of areas including tests and then I fix the types and issues once it is removed. 

### 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-06-04 20:14:35 -04:00
John Dorlus d99697866a
[7.x] Changed Upgrade Assistant test to reflect hiding the UI (#96714) (#100099)
* Changed Upgrade Assistant test to reflect hiding the UI (#96714)

* Added test to verify the UI changes for hiding the app.

* Running tests on repeat.

* Tests passed. Removing only clause to allow full suite to run.

* Skipping firefox.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/test/functional/apps/upgrade_assistant/upgrade_assistant.ts

* Changed placement of test suite due to it being destructive and causing other suites to fail.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-04 20:06:57 -04:00
Kibana Machine c017c18cdb
[Security Solution] Truncate long policy name in admin tab (#101105) (#101433)
Co-authored-by: Joey F. Poon <joey@kaijudev.com>
2021-06-04 18:29:31 -04:00
Kibana Machine eed0eeca80
Improve Task Manager instrumentation (#99160) (#101434)
* Instrument task manager

* Don't refresh after SO updates

* Update snapshot test, remove beforeRun instrumentation

* Revert "Don't refresh after SO updates"

This reverts commit 54f848dc0c.

* Fix task_store unit test

* Adding tests and updating ConcreteTaskInstance interface with traceparent

* Reverting unnecessary changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ying Mao <ying.mao@elastic.co>

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: Ying Mao <ying.mao@elastic.co>
2021-06-04 18:21:30 -04:00
Kibana Machine 3aca2cb9f7
[Security Solutions][Detection Engine] Adds e2e tests for constant_keyword data type (#101234) (#101431)
## Summary

Adds e2e tests for the `constant_keyword` regular `keyword` to compare between the two. Bugs found with these is one where we do not copy `constant_keyword` fields into signals which I added `.skip` to the tests now.

Tested these rule types:
* KQL
* EQL
* Threshold

For the mappings of the `constant_keyword` I use both the `constant_keyword` and the field `alias` like so:

```json
{
  "properties": {
    "@timestamp": {
      "type": "date"
    },
    "data_stream": {
      "properties": {
        "dataset": {
          "type": "constant_keyword",
          "value": "dataset_name_1"
        },
        "module": {
          "type": "constant_keyword",
          "value": "module_name_1"
        }
      }
    },
    "event": {
      "properties": {
        "category": {
          "type": "keyword"
        },
        "dataset": {
          "type": "alias",
          "path": "data_stream.dataset"
        },
        "module": {
          "type": "alias",
          "path": "data_stream.module"
        }
      }
    }
  }
}
``` 

To ensure we can detect against fields. I also mix them with regular const keyword fields in another index to ensure they work also in mixed use cases.

### 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

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-06-04 17:57:10 -04:00
Tim Sullivan 810c4067b1
Reporting/Chromium: restore Mac build scripts (#101238) (#101428)
* Reporting/Chromium: restore Mac build scripts

* fix accuracy of the readme

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-04 17:25:14 -04:00