Commit graph

44 commits

Author SHA1 Message Date
Bryan Clement a04fa3b919
don't stop an update if the id is unchanged (#106483) 2021-07-21 19:58:03 -04:00
Liza Katz a6af9d5050
[Es query] Move to package (#103530)
May the forces of bootstrapping helps us 🙏🏻 😉
2021-07-21 17:10:55 +02:00
Bryan Clement dd159f1c9e
[Osquery] 7.14 bug squash (#105387) 2021-07-20 13:21:39 +02:00
Patryk Kopyciński ef06cf7ec0
[Osquery] Revert fix Saved Query mapping (#105503) 2021-07-13 18:10:08 -04:00
Patryk Kopyciński c88213b095
[Osquery] Fix Saved Query mapping (#105398) 2021-07-13 20:07:23 +02:00
Patryk Kopyciński dcc468c2f4
[Osquery] Fix live query form saved queries picker bug (#105308) 2021-07-12 18:08:47 -04:00
Patryk Kopyciński 3e5ed77470
[Osquery] Fix 7.14 live query history view (#105211) 2021-07-12 17:55:06 +02:00
Patryk Kopyciński fe6eb09936
[Osquery] Fix 7.14 UX issues (#104257) 2021-07-08 19:39:46 -04:00
Patryk Kopyciński b17ad5d316
[Osquery] Fix issue with plugin initialization (#100208) 2021-07-06 17:59:40 -04:00
Kyle Pollich 059ed0821a
[Integrations UI] Add support for custom asset definitions in Integration assets tab (#103554)
* Add UI extension logic for assets + set up custom log views

* Add endpoint security UI extension

* Add synthetics ui extension

* Address PR feedback

- Remove default filter for log stream url
- Fix missing basePath prepend on asset urls
- Expand accordion by default on assetless integrations

* Fix type errors

* Add initial APM extension setup

* Fix missing ExtensionWrapper for enrollment extension

* Fix custom logs asset extension

* Fix type errors

* Add new hook for enrollment flyout ui extensions

* Address PR review + refactor UI extension usage for flyout

* Update limits.yml via script

* Fix type errors

* Add tests for custom assets UI extensions

* Update tests for flyout

* Remove unused import

* Fix type errors in ui extension tests

* Skip view data tests and link to issue

* Use RedirectAppLinks + fix synthetics link

* Use constants for app ID's where possible

* Revert limits.yml

* Fix lazy imports for custom asset components

* Update endpoint custom assets link + description

* Add translation for custom assets UI

* Address PR review in APM

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-01 18:41:17 -04:00
Patryk Kopyciński ccf42c0b80
[Osquery] Add Saved queries (#100965) 2021-06-28 21:19:02 -04:00
Bryan Clement 5e898734d5
[Asset management] Osquery app bug squashing (#102406)
* only display healthy agents to query

* updated toasts to clear on update

* null checking aggBuckets

* properly display expired actions

* clear the error toasts on success

* review comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-24 09:31:57 -07:00
Gloria Hornero b7aaa1fb91
Cypress baseline for osquery (#102265)
* Cypress baseline for osquery

* fix types

* Update visual_config.ts

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-23 13:59:35 +02:00
Nicolas Chaulet a6bef93225
[OsQuery] fix usage collector when .fleet indices are empty (#102977) 2021-06-23 11:15:12 +02:00
Bryan Clement 4c700aba8a
Osquery telemetry usage bug (#102762)
* guard for null metrics query

* added some tests for the beat usage metric extraction function
2021-06-21 13:47:15 -04:00
Bryan Clement 62f3a55cd8
[Asset Management] Osquery telemetry updates (#100754)
* first pass of basic osquery usage stats collection

* updates, linting

* updated exported metrics

* clean up comments, add description fields to metric fields

* reworked types

* actually use the updated types

* added tests around the route usage recoder functions

* review comments

* update aggregate types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-17 14:53:27 -04:00
Kyle Pollich 4a94156550
[Fleet + Integrations UI] Migrate Fleet UI to new tabbed layout (#101828)
* WIP: Migrate fleet to new page layout system

* Add 'Add Agent' button to agents table

* Fix flyout import in search and filter bar

* Place settings/feedback in header

* Move actions to top nav

* Fix i18n + types + unit test failures

* Remove unused props in DefaultLayout

* Fix background height in Fleet layout

This is fixed through a hack for now, because Kibana's layout doesn't
allow apps to flex the top-level wrapper via `flex: 1`. The same
behavior reported in the original issue (#101781) is present in all
other Kibana apps.

Fixes #101781

* Use euiHeaderHeightCompensation for min-height calc

* Move settings portal to app component

* Fix agent details URL in failing unit test

* Remove unreferenced overview files + update functional tests

* Remove unneeded fragment

* Remove beta badges in Fleet + Integrations

Fixes #100731

* Fix i18n

* Fix page path reference

* Fix failing tests

* Re-fix i18n post merge

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 10:29:38 -07:00
Liza Katz 8abb656d7f
[Kuery] Move json utils (#102058)
* Move JSON utils to utils package

* Imports from tests

* delete

* split package

* docs

* test

* test

* imports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-16 18:15:47 +03:00
Patryk Kopyciński 35cc59b571
[Osquery] Add support for platform and version fields (#101835) 2021-06-15 19:52:20 +02:00
Mikhail Shustov d920682e4e
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>
2021-06-08 15:06:06 +02:00
Larry Gregory 907203d68e
Ban use of lodash.template (#100277)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-19 10:06:52 -04:00
Patryk Kopyciński ec66797c7c
[Osquery] Fix Osquery plugin initialization (#99591) 2021-05-10 19:44:01 +02:00
Frank Hassanabad 92da1059bd
Added deprecation to all the io-ts types and copies of them (#99260)
## Summary

Adds deprecation to all the io-ts types and copies of them found in the code base.

Phase 1 (Completed): Copy all the utilities to the `packages/kbn-securitysolution-io-ts-utils`
Phase 2: Add all the deprecation messages about them to the code base
Phase 3+: Teams and others will eventually remove/replace them with the utils from `kbn-securitysolution-io-ts-utils`
2021-05-04 17:00:45 -06:00
Patryk Kopyciński 3f39f5e275
[Osquery] Fix Live query form errors handling (#99015) 2021-05-03 18:50:07 +02:00
Bryan Clement b94f712f8c
[Asset management] Text updates (#98192)
* updated scheduled query activation toggle text and interval header in query group

* added id validation for schedule queries

* fixed up agent resolution to ignore inactive agents, and properly pull all agents

* nixed unused file

* more validation for query fields

* added status table to the results data tab, added more validation

* updated wording

* added error notifications for failed queries

* pr feedback and cleanup

* fix up last hook

* use the pluralize macro, removed rbac tags

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-28 22:54:09 -04:00
Anton Dosov bd4f461c70
[Search] Unify search plugin step 1 (#95811)
Remove the defaultStrategy override
Move async search strategy to data
Move EQL search strategy to data
Move rest of common/search/session data (Moving whole search/session is blocked by security and taskManager)
2021-04-21 14:23:49 +02:00
Bryan Clement f0c4014793
[Asset Management] Osquery agent picker tests/fixes. (#97580)
* general refactoring, tests, and fixes around host data munging

* fix kql, pull and display offline agents in search
2021-04-20 15:49:06 -04:00
Patryk Kopyciński f0a05e8c81
[Asset management] Fix UI capabilities validation (#97663) 2021-04-20 13:42:02 -04:00
Patryk Kopyciński 2e7e682023
[Asset Management] Enable osquery plugin (#97422) 2021-04-20 04:20:08 -04:00
Patryk Kopyciński 64f30a224e
[Asset Management] Add live query history table (#94536) 2021-04-19 20:10:34 +02:00
Bryan Clement e0da8b2e96
[Asset Management] Agent picker follow up (#97357) 2021-04-17 06:42:49 -04:00
Mikhail Shustov e457f212c4
Revert "TS Incremental build exclude test files (#95610)" (#96223)
This reverts commit b6e582c53e.
2021-04-05 11:59:26 -07:00
Mikhail Shustov b6e582c53e
TS Incremental build exclude test files (#95610)
* add base config for all the TS projects

* all the project use new tsconfig.project.json

* compile test files in the high-level tsconfig.json

* fix TS error in maps plugin

* fix TS error in infra plugin

* exclude mote test and test until folders

* uptime. do not import test code within prod code

* expressions. do not import test code within prod code

* data: export mocks from high level folder

* task_manager: comply with es client typings

* infra: remove unused enzyme_helpers

* check_ts_project requires "include" key

* ts_check should handle parent configs

* all ts configs should extend base one

* exclude test folders from plugins

* update patterns to fix ts_check errors

* Apply suggestions from code review

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

* uptime: MountWithReduxProvider to test helpers

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-01 14:40:47 +02:00
Bryan Clement e365396810
[Asset Management] Osquery agent picker (#94541)
* first pass of osquery host picker

* passes type checking and linting

* reworked everything

* fixed the policy query and pill colors

* fix i18n test failures

* refactor server side logic

* more clean up

* address pr comments

* fix types, await the parsed agents on the server side

* primitive is spelled with an i

* agents come in as list rather than agents

* added more helpers tests, added some edge case guarding

* unwrap agents off response in useAllAgents

* used proper types for aggregations

* translations for more ui text

* fix linting errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-31 04:13:19 -04:00
Bryan Clement d6370f4e51
updated osquery autocomplete to v4.7.0 schema (#95741)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-30 12:09:23 -07:00
Tomas Della Vedova 238791b942
ES client : use the new type definitions (#83808)
* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

Co-authored-by: John Schulz <github.com@jfsiii.org>

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
2021-03-25 04:47:16 -04:00
Bryan Clement ce7a0bb8fc
[Asset Management] Osquery autocomplete (#94255)
* added osquery mode to autocomplete

* clean up and formatting

* arm wrestling with the compiler

* more fighting with ace types

* Delete v4.5.0.json

removed unused schema file

* playing the hokey pokey with import statements

* lazy load the schema file

* remove include rule now that we are lazy loading schema json

* update out of date comment

* reduce schema file to what is currently being used, add script for formatting generated api files

* added a readme, and points the compiler at the scripts directory

* swip-swapped the argument order, fixed linting complaints

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-15 08:18:36 -07:00
Patryk Kopyciński ed2a1bfb1f
[Asset Management] Add support for Live queries in Osquery (#89889) 2021-03-09 13:25:47 +01:00
Madison Caldwell 5b0e283bcc
[Security Solution][Detections][Threshold Rules] Threshold multiple aggregations with cardinality (#90826)
* Remove unnecessary spreads

* Layout, round 1

* Revert "Layout, round 1"

This reverts commit b73b34acd5.

* Make threshold field an array

* Add cardinality fields

* Fix validation schema

* Query for multi-aggs

* Finish multi-agg aggregation

* Translate to multi-agg buckets

* Fix existing tests and add new test skeletons

* clean up

* Fix types

* Fix threshold_result data structure

* previous signals filter

* Fix previous signal detection

* Finish previous signal parsing

* tying up loose ends

* Fix timeline view for multi-agg threshold signals

* Fix build_bulk_body tests

* test fixes

* Add test for threshold bucket filters

* Address comments

* Fixing schema errors

* Remove unnecessary comment

* Fix tests

* Fix types

* linting

* linting

* Fixes

* Handle pre-7.12 threshold format in timeline view

* missing null check

* adding in follow-up pr

* Handle pre-7.12 filters

* unnecessary change

* Revert "unnecessary change"

This reverts commit 3edc7f2f2a.

* linting

* Fix rule schemas

* Fix tests

Co-authored-by: Marshall Main <marshall.main@elastic.co>
2021-02-17 23:07:26 -05:00
Mikhail Shustov a1490d46f4
TS config cleanup (#90492)
* exclude all the plugins from src/plugins

* move all the used fixtures to discover

* remove src/fixtures alias

* remove unused fixtures

* cleanup x-pack/tsconfig.json

* dont compile apm/scripts

* fix tests

* dont include infra in xpack/tsconfig.json

* update list of includes
2021-02-11 12:34:25 -05:00
Patryk Kopyciński c058d9b024
[Asset Management] Migrate Osquery plugin to TS project references (#90916) 2021-02-10 17:48:42 +01:00
Pierre Gayvallet 3b3327dbc3
Migrate most plugins to synchronous lifecycle (#89562)
* first pass

* migrate more plugins

* migrate yet more plugins

* more oss plugins

* fix test file

* change Plugin signature on the client-side too

* fix test types

* migrate OSS client-side plugins

* migrate OSS client-side test plugins

* migrate xpack client-side plugins

* revert fix attempt on fleet plugin

* fix presentation start signature

* fix yet another signature

* add warnings for server-side async plugins in dev mode

* remove unused import

* fix isPromise

* Add client-side deprecations

* update migration examples

* update generated doc

* fix xpack unit tests

* nit

* (will be reverted) explicitly await for license to be ready in the auth hook

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* restore await on on promise contracts

* Revert "(will be reverted) explicitly await for license to be ready in the auth hook"

This reverts commit fdf73feb

* Revert "restore await on on promise contracts"

This reverts commit c5f2fe51

* add delay before starting tests in FTR

* update deprecation ts doc

* add explicit contract for monitoring setup

* migrate monitoring plugin to sync

* change plugin timeout to 10sec

* use delay instead of silence
2021-02-08 10:19:54 +01:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Patryk Kopyciński d7028e1a5f
[Security Solution] Init Osquery plugin (#87109) 2021-01-28 08:24:55 +01:00