From e9fd052ef1262990cefa650e4e35cb896085fd5e Mon Sep 17 00:00:00 2001 From: Robert Oskamp Date: Wed, 6 Nov 2024 13:38:31 +0100 Subject: [PATCH 01/16] Code owners - sort generated entries (#198901) ## Summary This PR adds sorting by path to the code owners generation. This improves readability and also avoid problems where ownership entries for nested test plugins (e.g. `x-pack/test/alerting_api_integration/common/plugins/alerts @elastic/response-ops`) are overridden with the empty top level test package entry (`x-pack/test`) when it's placed further down in the code owners file. --- .github/CODEOWNERS | 1082 ++++++++--------- .../src/commands/codeowners_command.ts | 5 + 2 files changed, 546 insertions(+), 541 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 43a315646772d..6dc2aa32a79a9 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -5,126 +5,61 @@ ## `node scripts/generate codeowners`. #### -x-pack/test/alerting_api_integration/common/plugins/aad @elastic/response-ops -x-pack/plugins/actions @elastic/response-ops -x-pack/test/alerting_api_integration/common/plugins/actions_simulators @elastic/response-ops -packages/kbn-actions-types @elastic/response-ops -src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management -x-pack/packages/kbn-ai-assistant @elastic/search-kibana -x-pack/packages/kbn-ai-assistant-common @elastic/search-kibana -src/plugins/ai_assistant_management/selection @elastic/obs-knowledge-team -x-pack/packages/ml/aiops_change_point_detection @elastic/ml-ui -x-pack/packages/ml/aiops_common @elastic/ml-ui -x-pack/packages/ml/aiops_components @elastic/ml-ui -x-pack/packages/ml/aiops_log_pattern_analysis @elastic/ml-ui -x-pack/packages/ml/aiops_log_rate_analysis @elastic/ml-ui -x-pack/plugins/aiops @elastic/ml-ui -x-pack/packages/ml/aiops_test_utils @elastic/ml-ui -x-pack/test/alerting_api_integration/packages/helpers @elastic/response-ops -x-pack/test/alerting_api_integration/common/plugins/alerts @elastic/response-ops -x-pack/packages/kbn-alerting-comparators @elastic/response-ops -x-pack/examples/alerting_example @elastic/response-ops -x-pack/test/functional_with_es_ssl/plugins/alerts @elastic/response-ops -x-pack/plugins/alerting @elastic/response-ops -x-pack/packages/kbn-alerting-state-types @elastic/response-ops -packages/kbn-alerting-types @elastic/response-ops -packages/kbn-alerts-as-data-utils @elastic/response-ops -packages/kbn-alerts-grouping @elastic/response-ops -x-pack/test/alerting_api_integration/common/plugins/alerts_restricted @elastic/response-ops -packages/kbn-alerts-ui-shared @elastic/response-ops -packages/kbn-ambient-common-types @elastic/kibana-operations -packages/kbn-ambient-ftr-types @elastic/kibana-operations @elastic/appex-qa -packages/kbn-ambient-storybook-types @elastic/kibana-operations -packages/kbn-ambient-ui-types @elastic/kibana-operations -packages/kbn-analytics @elastic/kibana-core -packages/analytics/utils/analytics_collection_utils @elastic/kibana-core -test/analytics/plugins/analytics_ftr_helpers @elastic/kibana-core -test/analytics/plugins/analytics_plugin_a @elastic/kibana-core -packages/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam -x-pack/plugins/observability_solution/apm_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team -packages/kbn-apm-data-view @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/apm/ftr_e2e @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/apm @elastic/obs-ux-infra_services-team -packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team -packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team -packages/kbn-apm-types @elastic/obs-ux-infra_services-team -packages/kbn-apm-utils @elastic/obs-ux-infra_services-team -test/plugin_functional/plugins/app_link_test @elastic/kibana-core -x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core -x-pack/test/security_api_integration/plugins/audit_log @elastic/kibana-security -packages/kbn-avc-banner @elastic/security-defend-workflows -packages/kbn-axe-config @elastic/kibana-qa -packages/kbn-babel-preset @elastic/kibana-operations -packages/kbn-babel-register @elastic/kibana-operations -packages/kbn-babel-transform @elastic/kibana-operations -x-pack/plugins/banners @elastic/appex-sharedux -packages/kbn-bazel-runner @elastic/kibana-operations -packages/kbn-bfetch-error @elastic/appex-sharedux examples/bfetch_explorer @elastic/appex-sharedux -src/plugins/bfetch @elastic/appex-sharedux -packages/kbn-calculate-auto @elastic/obs-ux-management-team -packages/kbn-calculate-width-from-char-count @elastic/kibana-visualizations -x-pack/plugins/canvas @elastic/kibana-presentation -packages/kbn-capture-oas-snapshot-cli @elastic/kibana-core -x-pack/test/cases_api_integration/common/plugins/cases @elastic/response-ops -packages/kbn-cases-components @elastic/response-ops -x-pack/plugins/cases @elastic/response-ops -packages/kbn-cbor @elastic/kibana-operations -packages/kbn-cell-actions @elastic/security-threat-hunting-explore -src/plugins/chart_expressions/common @elastic/kibana-visualizations -packages/kbn-chart-icons @elastic/kibana-visualizations -src/plugins/charts @elastic/kibana-visualizations -packages/kbn-check-mappings-update-cli @elastic/kibana-core -packages/kbn-check-prod-native-modules-cli @elastic/kibana-operations -packages/kbn-ci-stats-core @elastic/kibana-operations -packages/kbn-ci-stats-performance-metrics @elastic/kibana-operations -packages/kbn-ci-stats-reporter @elastic/kibana-operations -packages/kbn-ci-stats-shipper-cli @elastic/kibana-operations -packages/kbn-cli-dev-mode @elastic/kibana-operations +examples/content_management_examples @elastic/appex-sharedux +examples/controls_example @elastic/kibana-presentation +examples/data_view_field_editor_example @elastic/kibana-data-discovery +examples/developer_examples @elastic/appex-sharedux +examples/discover_customization_examples @elastic/kibana-data-discovery +examples/embeddable_examples @elastic/kibana-presentation +examples/error_boundary @elastic/appex-sharedux +examples/eso_model_version_example @elastic/kibana-security +examples/esql_ast_inspector @elastic/kibana-esql +examples/esql_validation_example @elastic/kibana-esql +examples/expressions_explorer @elastic/kibana-visualizations +examples/feature_control_examples @elastic/kibana-security +examples/feature_flags_example @elastic/kibana-core +examples/field_formats_example @elastic/kibana-data-discovery +examples/files_example @elastic/appex-sharedux +examples/grid_example @elastic/kibana-presentation +examples/guided_onboarding_example @elastic/appex-sharedux +examples/hello_world @elastic/kibana-core +examples/locator_examples @elastic/appex-sharedux +examples/locator_explorer @elastic/appex-sharedux +examples/partial_results_example @elastic/kibana-data-discovery +examples/portable_dashboards_example @elastic/kibana-presentation +examples/preboot_example @elastic/kibana-security @elastic/kibana-core +examples/resizable_layout_examples @elastic/kibana-data-discovery +examples/response_stream @elastic/ml-ui +examples/routing_example @elastic/kibana-core +examples/screenshot_mode_example @elastic/appex-sharedux +examples/search_examples @elastic/kibana-data-discovery +examples/share_examples @elastic/appex-sharedux +examples/state_containers_examples @elastic/appex-sharedux +examples/ui_action_examples @elastic/appex-sharedux +examples/ui_actions_explorer @elastic/appex-sharedux +examples/unified_doc_viewer @elastic/kibana-core +examples/unified_field_list_examples @elastic/kibana-data-discovery +examples/user_profile_examples @elastic/kibana-security +examples/v8_profiler_examples @elastic/response-ops +packages/analytics/utils/analytics_collection_utils @elastic/kibana-core packages/cloud @elastic/kibana-core -x-pack/plugins/cloud_integrations/cloud_chat @elastic/kibana-core -x-pack/plugins/cloud_integrations/cloud_data_migration @elastic/kibana-management -x-pack/plugins/cloud_defend @elastic/kibana-cloud-security-posture -x-pack/plugins/cloud_integrations/cloud_experiments @elastic/kibana-core -x-pack/plugins/cloud_integrations/cloud_full_story @elastic/kibana-core -x-pack/test/cloud_integration/plugins/saml_provider @elastic/kibana-core -x-pack/plugins/cloud_integrations/cloud_links @elastic/kibana-core -x-pack/plugins/cloud @elastic/kibana-core -x-pack/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture -x-pack/packages/kbn-cloud-security-posture/common @elastic/kibana-cloud-security-posture -x-pack/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture -x-pack/plugins/cloud_security_posture @elastic/kibana-cloud-security-posture -packages/shared-ux/code_editor/impl @elastic/appex-sharedux -packages/shared-ux/code_editor/mocks @elastic/appex-sharedux -packages/kbn-code-owners @elastic/appex-qa -packages/kbn-coloring @elastic/kibana-visualizations -packages/kbn-config @elastic/kibana-core -packages/kbn-config-mocks @elastic/kibana-core -packages/kbn-config-schema @elastic/kibana-core -src/plugins/console @elastic/kibana-management packages/content-management/content_editor @elastic/appex-sharedux packages/content-management/content_insights/content_insights_public @elastic/appex-sharedux packages/content-management/content_insights/content_insights_server @elastic/appex-sharedux -examples/content_management_examples @elastic/appex-sharedux packages/content-management/favorites/favorites_public @elastic/appex-sharedux packages/content-management/favorites/favorites_server @elastic/appex-sharedux -src/plugins/content_management @elastic/appex-sharedux packages/content-management/tabbed_table_list_view @elastic/appex-sharedux packages/content-management/table_list_view @elastic/appex-sharedux packages/content-management/table_list_view_common @elastic/appex-sharedux packages/content-management/table_list_view_table @elastic/appex-sharedux packages/content-management/user_profiles @elastic/appex-sharedux -packages/kbn-content-management-utils @elastic/kibana-data-discovery -examples/controls_example @elastic/kibana-presentation -src/plugins/controls @elastic/kibana-presentation -src/core @elastic/kibana-core packages/core/analytics/core-analytics-browser @elastic/kibana-core packages/core/analytics/core-analytics-browser-internal @elastic/kibana-core packages/core/analytics/core-analytics-browser-mocks @elastic/kibana-core packages/core/analytics/core-analytics-server @elastic/kibana-core packages/core/analytics/core-analytics-server-internal @elastic/kibana-core packages/core/analytics/core-analytics-server-mocks @elastic/kibana-core -test/plugin_functional/plugins/core_app_status @elastic/kibana-core packages/core/application/core-application-browser @elastic/kibana-core packages/core/application/core-application-browser-internal @elastic/kibana-core packages/core/application/core-application-browser-mocks @elastic/kibana-core @@ -191,14 +126,12 @@ packages/core/feature-flags/core-feature-flags-browser-mocks @elastic/kibana-cor packages/core/feature-flags/core-feature-flags-server @elastic/kibana-core packages/core/feature-flags/core-feature-flags-server-internal @elastic/kibana-core packages/core/feature-flags/core-feature-flags-server-mocks @elastic/kibana-core -test/plugin_functional/plugins/core_history_block @elastic/kibana-core packages/core/http/core-http-browser @elastic/kibana-core packages/core/http/core-http-browser-internal @elastic/kibana-core packages/core/http/core-http-browser-mocks @elastic/kibana-core packages/core/http/core-http-common @elastic/kibana-core packages/core/http/core-http-context-server-internal @elastic/kibana-core packages/core/http/core-http-context-server-mocks @elastic/kibana-core -test/plugin_functional/plugins/core_http @elastic/kibana-core packages/core/http/core-http-request-handler-context-server @elastic/kibana-core packages/core/http/core-http-request-handler-context-server-internal @elastic/kibana-core packages/core/http/core-http-resources-server @elastic/kibana-core @@ -248,19 +181,6 @@ packages/core/notifications/core-notifications-browser-mocks @elastic/kibana-cor packages/core/overlays/core-overlays-browser @elastic/kibana-core packages/core/overlays/core-overlays-browser-internal @elastic/kibana-core packages/core/overlays/core-overlays-browser-mocks @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_a @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_appleave @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_b @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_chromeless @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_deep_links @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_deprecations @elastic/kibana-core -test/plugin_functional/plugins/core_dynamic_resolving_a @elastic/kibana-core -test/plugin_functional/plugins/core_dynamic_resolving_b @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_execution_context @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_helpmenu @elastic/kibana-core -test/node_roles_functional/plugins/core_plugin_initializer_context @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_route_timeouts @elastic/kibana-core -test/plugin_functional/plugins/core_plugin_static_assets @elastic/kibana-core packages/core/plugins/core-plugins-base-server-internal @elastic/kibana-core packages/core/plugins/core-plugins-browser @elastic/kibana-core packages/core/plugins/core-plugins-browser-internal @elastic/kibana-core @@ -273,7 +193,6 @@ packages/core/plugins/core-plugins-server-mocks @elastic/kibana-core packages/core/preboot/core-preboot-server @elastic/kibana-core packages/core/preboot/core-preboot-server-internal @elastic/kibana-core packages/core/preboot/core-preboot-server-mocks @elastic/kibana-core -test/plugin_functional/plugins/core_provider_plugin @elastic/kibana-core packages/core/rendering/core-rendering-browser-internal @elastic/kibana-core packages/core/rendering/core-rendering-browser-mocks @elastic/kibana-core packages/core/rendering/core-rendering-server-internal @elastic/kibana-core @@ -340,32 +259,6 @@ packages/core/user-profile/core-user-profile-server-mocks @elastic/kibana-core packages/core/user-settings/core-user-settings-server @elastic/kibana-security packages/core/user-settings/core-user-settings-server-internal @elastic/kibana-security packages/core/user-settings/core-user-settings-server-mocks @elastic/kibana-security -x-pack/plugins/cross_cluster_replication @elastic/kibana-management -packages/kbn-crypto @elastic/kibana-security -packages/kbn-crypto-browser @elastic/kibana-core -x-pack/plugins/custom_branding @elastic/appex-sharedux -packages/kbn-custom-icons @elastic/obs-ux-logs-team -packages/kbn-custom-integrations @elastic/obs-ux-logs-team -src/plugins/custom_integrations @elastic/fleet -packages/kbn-cypress-config @elastic/kibana-operations -x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation -src/plugins/dashboard @elastic/kibana-presentation -x-pack/packages/kbn-data-forge @elastic/obs-ux-management-team -src/plugins/data @elastic/kibana-visualizations @elastic/kibana-data-discovery -x-pack/plugins/data_quality @elastic/obs-ux-logs-team -test/plugin_functional/plugins/data_search @elastic/kibana-data-discovery -packages/kbn-data-service @elastic/kibana-visualizations @elastic/kibana-data-discovery -packages/kbn-data-stream-adapter @elastic/security-threat-hunting-explore -x-pack/plugins/data_usage @elastic/obs-ai-assistant @elastic/security-solution -src/plugins/data_view_editor @elastic/kibana-data-discovery -examples/data_view_field_editor_example @elastic/kibana-data-discovery -src/plugins/data_view_field_editor @elastic/kibana-data-discovery -src/plugins/data_view_management @elastic/kibana-data-discovery -packages/kbn-data-view-utils @elastic/kibana-data-discovery -src/plugins/data_views @elastic/kibana-data-discovery -x-pack/plugins/data_visualizer @elastic/ml-ui -x-pack/plugins/observability_solution/dataset_quality @elastic/obs-ux-logs-team -packages/kbn-datemath @elastic/kibana-data-discovery packages/deeplinks/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations packages/deeplinks/devtools @elastic/kibana-management packages/deeplinks/fleet @elastic/fleet @@ -379,167 +272,115 @@ packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-pr packages/default-nav/devtools @elastic/kibana-management packages/default-nav/management @elastic/kibana-management packages/default-nav/ml @elastic/ml-ui +packages/home/sample_data_card @elastic/appex-sharedux +packages/home/sample_data_tab @elastic/appex-sharedux +packages/home/sample_data_types @elastic/appex-sharedux +packages/kbn-actions-types @elastic/response-ops +packages/kbn-alerting-types @elastic/response-ops +packages/kbn-alerts-as-data-utils @elastic/response-ops +packages/kbn-alerts-grouping @elastic/response-ops +packages/kbn-alerts-ui-shared @elastic/response-ops +packages/kbn-ambient-common-types @elastic/kibana-operations +packages/kbn-ambient-ftr-types @elastic/kibana-operations @elastic/appex-qa +packages/kbn-ambient-storybook-types @elastic/kibana-operations +packages/kbn-ambient-ui-types @elastic/kibana-operations +packages/kbn-analytics @elastic/kibana-core +packages/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam +packages/kbn-apm-data-view @elastic/obs-ux-infra_services-team +packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +packages/kbn-apm-types @elastic/obs-ux-infra_services-team +packages/kbn-apm-utils @elastic/obs-ux-infra_services-team +packages/kbn-avc-banner @elastic/security-defend-workflows +packages/kbn-axe-config @elastic/kibana-qa +packages/kbn-babel-preset @elastic/kibana-operations +packages/kbn-babel-register @elastic/kibana-operations +packages/kbn-babel-transform @elastic/kibana-operations +packages/kbn-bazel-runner @elastic/kibana-operations +packages/kbn-bfetch-error @elastic/appex-sharedux +packages/kbn-calculate-auto @elastic/obs-ux-management-team +packages/kbn-calculate-width-from-char-count @elastic/kibana-visualizations +packages/kbn-capture-oas-snapshot-cli @elastic/kibana-core +packages/kbn-cases-components @elastic/response-ops +packages/kbn-cbor @elastic/kibana-operations +packages/kbn-cell-actions @elastic/security-threat-hunting-explore +packages/kbn-chart-icons @elastic/kibana-visualizations +packages/kbn-check-mappings-update-cli @elastic/kibana-core +packages/kbn-check-prod-native-modules-cli @elastic/kibana-operations +packages/kbn-ci-stats-core @elastic/kibana-operations +packages/kbn-ci-stats-performance-metrics @elastic/kibana-operations +packages/kbn-ci-stats-reporter @elastic/kibana-operations +packages/kbn-ci-stats-shipper-cli @elastic/kibana-operations +packages/kbn-cli-dev-mode @elastic/kibana-operations +packages/kbn-code-owners @elastic/appex-qa +packages/kbn-coloring @elastic/kibana-visualizations +packages/kbn-config @elastic/kibana-core +packages/kbn-config-mocks @elastic/kibana-core +packages/kbn-config-schema @elastic/kibana-core +packages/kbn-content-management-utils @elastic/kibana-data-discovery +packages/kbn-crypto @elastic/kibana-security +packages/kbn-crypto-browser @elastic/kibana-core +packages/kbn-custom-icons @elastic/obs-ux-logs-team +packages/kbn-custom-integrations @elastic/obs-ux-logs-team +packages/kbn-cypress-config @elastic/kibana-operations +packages/kbn-data-service @elastic/kibana-visualizations @elastic/kibana-data-discovery +packages/kbn-data-stream-adapter @elastic/security-threat-hunting-explore +packages/kbn-data-view-utils @elastic/kibana-data-discovery +packages/kbn-datemath @elastic/kibana-data-discovery packages/kbn-dev-cli-errors @elastic/kibana-operations packages/kbn-dev-cli-runner @elastic/kibana-operations packages/kbn-dev-proc-runner @elastic/kibana-operations -src/plugins/dev_tools @elastic/kibana-management packages/kbn-dev-utils @elastic/kibana-operations -examples/developer_examples @elastic/appex-sharedux packages/kbn-discover-contextual-components @elastic/obs-ux-logs-team @elastic/kibana-data-discovery -examples/discover_customization_examples @elastic/kibana-data-discovery -x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery -src/plugins/discover @elastic/kibana-data-discovery -src/plugins/discover_shared @elastic/kibana-data-discovery @elastic/obs-ux-logs-team packages/kbn-discover-utils @elastic/kibana-data-discovery packages/kbn-doc-links @elastic/docs packages/kbn-docs-utils @elastic/kibana-operations packages/kbn-dom-drag-drop @elastic/kibana-visualizations @elastic/kibana-data-discovery packages/kbn-ebt-tools @elastic/kibana-core -x-pack/packages/security-solution/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore -x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore packages/kbn-elastic-agent-utils @elastic/obs-ux-logs-team -x-pack/packages/kbn-elastic-assistant @elastic/security-generative-ai -x-pack/packages/kbn-elastic-assistant-common @elastic/security-generative-ai -x-pack/plugins/elastic_assistant @elastic/security-generative-ai -test/plugin_functional/plugins/elasticsearch_client_plugin @elastic/kibana-core -x-pack/test/plugin_api_integration/plugins/elasticsearch_client @elastic/kibana-core -x-pack/plugins/embeddable_enhanced @elastic/kibana-presentation -examples/embeddable_examples @elastic/kibana-presentation -src/plugins/embeddable @elastic/kibana-presentation -x-pack/examples/embedded_lens_example @elastic/kibana-visualizations -x-pack/plugins/encrypted_saved_objects @elastic/kibana-security -x-pack/plugins/enterprise_search @elastic/search-kibana -x-pack/plugins/observability_solution/entities_data_access @elastic/obs-entities -x-pack/packages/kbn-entities-schema @elastic/obs-entities -x-pack/test/api_integration/apis/entity_manager/fixture_plugin @elastic/obs-entities -x-pack/plugins/entity_manager @elastic/obs-entities -examples/error_boundary @elastic/appex-sharedux packages/kbn-es @elastic/kibana-operations packages/kbn-es-archiver @elastic/kibana-operations @elastic/appex-qa packages/kbn-es-errors @elastic/kibana-core packages/kbn-es-query @elastic/kibana-data-discovery packages/kbn-es-types @elastic/kibana-core @elastic/obs-knowledge-team -src/plugins/es_ui_shared @elastic/kibana-management packages/kbn-eslint-config @elastic/kibana-operations packages/kbn-eslint-plugin-disable @elastic/kibana-operations packages/kbn-eslint-plugin-eslint @elastic/kibana-operations packages/kbn-eslint-plugin-i18n @elastic/obs-knowledge-team @elastic/kibana-operations packages/kbn-eslint-plugin-imports @elastic/kibana-operations packages/kbn-eslint-plugin-telemetry @elastic/obs-knowledge-team -examples/eso_model_version_example @elastic/kibana-security -x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security -src/plugins/esql @elastic/kibana-esql packages/kbn-esql-ast @elastic/kibana-esql -examples/esql_ast_inspector @elastic/kibana-esql -src/plugins/esql_datagrid @elastic/kibana-esql packages/kbn-esql-editor @elastic/kibana-esql packages/kbn-esql-utils @elastic/kibana-esql packages/kbn-esql-validation-autocomplete @elastic/kibana-esql -examples/esql_validation_example @elastic/kibana-esql -test/plugin_functional/plugins/eui_provider_dev_warning @elastic/appex-sharedux packages/kbn-event-annotation-common @elastic/kibana-visualizations packages/kbn-event-annotation-components @elastic/kibana-visualizations -src/plugins/event_annotation_listing @elastic/kibana-visualizations -src/plugins/event_annotation @elastic/kibana-visualizations -x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops -x-pack/plugins/event_log @elastic/response-ops packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations packages/kbn-expect @elastic/kibana-operations @elastic/appex-qa -x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-management-team -src/plugins/expression_error @elastic/kibana-presentation -src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations -src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations -src/plugins/expression_image @elastic/kibana-presentation -src/plugins/chart_expressions/expression_legacy_metric @elastic/kibana-visualizations -src/plugins/expression_metric @elastic/kibana-presentation -src/plugins/chart_expressions/expression_metric @elastic/kibana-visualizations -src/plugins/chart_expressions/expression_partition_vis @elastic/kibana-visualizations -src/plugins/expression_repeat_image @elastic/kibana-presentation -src/plugins/expression_reveal_image @elastic/kibana-presentation -src/plugins/expression_shape @elastic/kibana-presentation -src/plugins/chart_expressions/expression_tagcloud @elastic/kibana-visualizations -src/plugins/chart_expressions/expression_xy @elastic/kibana-visualizations -examples/expressions_explorer @elastic/kibana-visualizations -src/plugins/expressions @elastic/kibana-visualizations packages/kbn-failed-test-reporter-cli @elastic/kibana-operations @elastic/appex-qa -examples/feature_control_examples @elastic/kibana-security -examples/feature_flags_example @elastic/kibana-core -x-pack/test/plugin_api_integration/plugins/feature_usage_test @elastic/kibana-security -x-pack/plugins/features @elastic/kibana-core -x-pack/test/security_api_integration/plugins/features_provider @elastic/kibana-security -x-pack/test/functional_execution_context/plugins/alerts @elastic/kibana-core -examples/field_formats_example @elastic/kibana-data-discovery -src/plugins/field_formats @elastic/kibana-data-discovery packages/kbn-field-types @elastic/kibana-data-discovery packages/kbn-field-utils @elastic/kibana-data-discovery -x-pack/plugins/fields_metadata @elastic/obs-ux-logs-team -x-pack/plugins/file_upload @elastic/kibana-presentation @elastic/ml-ui -examples/files_example @elastic/appex-sharedux -src/plugins/files_management @elastic/appex-sharedux -src/plugins/files @elastic/appex-sharedux packages/kbn-find-used-node-modules @elastic/kibana-operations -x-pack/plugins/fleet @elastic/fleet packages/kbn-flot-charts @elastic/kibana-presentation @elastic/stack-monitoring -x-pack/test/ui_capabilities/common/plugins/foo_plugin @elastic/kibana-security packages/kbn-formatters @elastic/obs-ux-logs-team -src/plugins/ftr_apis @elastic/kibana-core packages/kbn-ftr-common-functional-services @elastic/kibana-operations @elastic/appex-qa packages/kbn-ftr-common-functional-ui-services @elastic/appex-qa packages/kbn-ftr-screenshot-filename @elastic/kibana-operations @elastic/appex-qa -x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops -x-pack/examples/gen_ai_streaming_response_example @elastic/response-ops packages/kbn-generate @elastic/kibana-operations packages/kbn-generate-console-definitions @elastic/kibana-management packages/kbn-generate-csv @elastic/appex-sharedux packages/kbn-get-repo-files @elastic/kibana-operations -x-pack/plugins/global_search_bar @elastic/appex-sharedux -x-pack/plugins/global_search @elastic/appex-sharedux -x-pack/plugins/global_search_providers @elastic/appex-sharedux -x-pack/test/plugin_functional/plugins/global_search_test @elastic/kibana-core -x-pack/plugins/graph @elastic/kibana-visualizations -examples/grid_example @elastic/kibana-presentation packages/kbn-grid-layout @elastic/kibana-presentation -x-pack/plugins/grokdebugger @elastic/kibana-management packages/kbn-grouping @elastic/response-ops packages/kbn-guided-onboarding @elastic/appex-sharedux -examples/guided_onboarding_example @elastic/appex-sharedux -src/plugins/guided_onboarding @elastic/appex-sharedux packages/kbn-handlebars @elastic/kibana-security packages/kbn-hapi-mocks @elastic/kibana-core -test/plugin_functional/plugins/hardening @elastic/kibana-security packages/kbn-health-gateway-server @elastic/kibana-core -examples/hello_world @elastic/kibana-core -src/plugins/home @elastic/kibana-core -packages/home/sample_data_card @elastic/appex-sharedux -packages/home/sample_data_tab @elastic/appex-sharedux -packages/home/sample_data_types @elastic/appex-sharedux packages/kbn-i18n @elastic/kibana-core packages/kbn-i18n-react @elastic/kibana-core -x-pack/test/functional_embedded/plugins/iframe_embedded @elastic/kibana-core -src/plugins/image_embeddable @elastic/appex-sharedux packages/kbn-import-locator @elastic/kibana-operations packages/kbn-import-resolver @elastic/kibana-operations -x-pack/plugins/index_lifecycle_management @elastic/kibana-management -x-pack/plugins/index_management @elastic/kibana-management -x-pack/packages/index-management/index_management_shared_types @elastic/kibana-management -test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery -x-pack/packages/ml/inference_integration_flyout @elastic/ml-ui -x-pack/packages/ai-infra/inference-common @elastic/appex-ai-infra -x-pack/plugins/inference @elastic/appex-ai-infra -x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team -x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team -x-pack/plugins/ingest_pipelines @elastic/kibana-management -src/plugins/input_control_vis @elastic/kibana-presentation -src/plugins/inspector @elastic/kibana-presentation -x-pack/plugins/integration_assistant @elastic/security-scalability -src/plugins/interactive_setup @elastic/kibana-security -test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security packages/kbn-interpreter @elastic/kibana-visualizations -x-pack/plugins/observability_solution/inventory/e2e @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/inventory @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/investigate_app @elastic/obs-ux-management-team -x-pack/plugins/observability_solution/investigate @elastic/obs-ux-management-team packages/kbn-investigation-shared @elastic/obs-ux-management-team packages/kbn-io-ts-utils @elastic/obs-knowledge-team packages/kbn-ipynb @elastic/search-kibana @@ -547,137 +388,42 @@ packages/kbn-item-buffer @elastic/appex-sharedux packages/kbn-jest-serializers @elastic/kibana-operations packages/kbn-journeys @elastic/kibana-operations @elastic/appex-qa packages/kbn-json-ast @elastic/kibana-operations -x-pack/packages/ml/json_schemas @elastic/ml-ui -test/health_gateway/plugins/status @elastic/kibana-core -test/plugin_functional/plugins/kbn_sample_panel_action @elastic/appex-sharedux -test/plugin_functional/plugins/kbn_top_nav @elastic/kibana-core -test/plugin_functional/plugins/kbn_tp_custom_visualizations @elastic/kibana-visualizations -test/interpreter_functional/plugins/kbn_tp_run_pipeline @elastic/kibana-core -x-pack/test/functional_cors/plugins/kibana_cors_test @elastic/kibana-security packages/kbn-kibana-manifest-schema @elastic/kibana-operations -src/plugins/kibana_overview @elastic/appex-sharedux -src/plugins/kibana_react @elastic/appex-sharedux -src/plugins/kibana_usage_collection @elastic/kibana-core -src/plugins/kibana_utils @elastic/appex-sharedux -x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture -x-pack/packages/kbn-langchain @elastic/security-generative-ai packages/kbn-language-documentation @elastic/kibana-esql -x-pack/examples/lens_config_builder_example @elastic/kibana-visualizations packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team @elastic/kibana-visualizations packages/kbn-lens-formula-docs @elastic/kibana-visualizations -x-pack/examples/lens_embeddable_inline_editing_example @elastic/kibana-visualizations -x-pack/plugins/lens @elastic/kibana-visualizations -x-pack/plugins/license_api_guard @elastic/kibana-management -x-pack/plugins/license_management @elastic/kibana-management -x-pack/plugins/licensing @elastic/kibana-core -src/plugins/links @elastic/kibana-presentation packages/kbn-lint-packages-cli @elastic/kibana-operations packages/kbn-lint-ts-projects-cli @elastic/kibana-operations -x-pack/plugins/lists @elastic/security-detection-engine -examples/locator_examples @elastic/appex-sharedux -examples/locator_explorer @elastic/appex-sharedux packages/kbn-logging @elastic/kibana-core packages/kbn-logging-mocks @elastic/kibana-core -x-pack/plugins/observability_solution/logs_data_access @elastic/obs-knowledge-team @elastic/obs-ux-logs-team -x-pack/plugins/observability_solution/logs_explorer @elastic/obs-ux-logs-team -x-pack/plugins/observability_solution/logs_shared @elastic/obs-ux-logs-team -x-pack/plugins/logstash @elastic/logstash packages/kbn-managed-content-badge @elastic/kibana-visualizations packages/kbn-managed-vscode-config @elastic/kibana-operations packages/kbn-managed-vscode-config-cli @elastic/kibana-operations packages/kbn-management/cards_navigation @elastic/kibana-management -src/plugins/management @elastic/kibana-management packages/kbn-management/settings/application @elastic/kibana-management packages/kbn-management/settings/components/field_category @elastic/kibana-management packages/kbn-management/settings/components/field_input @elastic/kibana-management packages/kbn-management/settings/components/field_row @elastic/kibana-management packages/kbn-management/settings/components/form @elastic/kibana-management packages/kbn-management/settings/field_definition @elastic/kibana-management -packages/kbn-management/settings/setting_ids @elastic/appex-sharedux @elastic/kibana-management packages/kbn-management/settings/section_registry @elastic/appex-sharedux @elastic/kibana-management +packages/kbn-management/settings/setting_ids @elastic/appex-sharedux @elastic/kibana-management packages/kbn-management/settings/types @elastic/kibana-management packages/kbn-management/settings/utilities @elastic/kibana-management packages/kbn-management/storybook/config @elastic/kibana-management -test/plugin_functional/plugins/management_test_plugin @elastic/kibana-management packages/kbn-manifest @elastic/kibana-core packages/kbn-mapbox-gl @elastic/kibana-presentation -x-pack/examples/third_party_maps_source_example @elastic/kibana-presentation -src/plugins/maps_ems @elastic/kibana-presentation -x-pack/plugins/maps @elastic/kibana-presentation -x-pack/packages/maps/vector_tile_utils @elastic/kibana-presentation -x-pack/plugins/observability_solution/metrics_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team -x-pack/packages/ml/agg_utils @elastic/ml-ui -x-pack/packages/ml/anomaly_utils @elastic/ml-ui -x-pack/packages/ml/cancellable_search @elastic/ml-ui -x-pack/packages/ml/category_validator @elastic/ml-ui -x-pack/packages/ml/chi2test @elastic/ml-ui -x-pack/packages/ml/creation_wizard_utils @elastic/ml-ui -x-pack/packages/ml/data_frame_analytics_utils @elastic/ml-ui -x-pack/packages/ml/data_grid @elastic/ml-ui -x-pack/packages/ml/data_view_utils @elastic/ml-ui -x-pack/packages/ml/date_picker @elastic/ml-ui -x-pack/packages/ml/date_utils @elastic/ml-ui -x-pack/packages/ml/error_utils @elastic/ml-ui -x-pack/packages/ml/field_stats_flyout @elastic/ml-ui -x-pack/packages/ml/in_memory_table @elastic/ml-ui -x-pack/packages/ml/is_defined @elastic/ml-ui -x-pack/packages/ml/is_populated_object @elastic/ml-ui -x-pack/packages/ml/kibana_theme @elastic/ml-ui -x-pack/packages/ml/local_storage @elastic/ml-ui -x-pack/packages/ml/nested_property @elastic/ml-ui -x-pack/packages/ml/number_utils @elastic/ml-ui -x-pack/packages/ml/parse_interval @elastic/ml-ui -x-pack/plugins/ml @elastic/ml-ui -x-pack/packages/ml/query_utils @elastic/ml-ui -x-pack/packages/ml/random_sampler_utils @elastic/ml-ui -x-pack/packages/ml/response_stream @elastic/ml-ui -x-pack/packages/ml/route_utils @elastic/ml-ui -x-pack/packages/ml/runtime_field_utils @elastic/ml-ui -x-pack/packages/ml/string_hash @elastic/ml-ui -x-pack/packages/ml/time_buckets @elastic/ml-ui -x-pack/packages/ml/trained_models_utils @elastic/ml-ui -x-pack/packages/ml/ui_actions @elastic/ml-ui -x-pack/packages/ml/url_state @elastic/ml-ui -x-pack/packages/ml/validators @elastic/ml-ui packages/kbn-mock-idp-plugin @elastic/kibana-security packages/kbn-mock-idp-utils @elastic/kibana-security packages/kbn-monaco @elastic/appex-sharedux -x-pack/plugins/monitoring_collection @elastic/stack-monitoring -x-pack/plugins/monitoring @elastic/stack-monitoring -src/plugins/navigation @elastic/appex-sharedux -src/plugins/newsfeed @elastic/kibana-core -test/common/plugins/newsfeed @elastic/kibana-core -src/plugins/no_data_page @elastic/appex-sharedux -x-pack/plugins/notifications @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux packages/kbn-object-versioning-utils @elastic/appex-sharedux -x-pack/plugins/observability_solution/observability_ai_assistant_app @elastic/obs-ai-assistant -x-pack/plugins/observability_solution/observability_ai_assistant_management @elastic/obs-ai-assistant -x-pack/plugins/observability_solution/observability_ai_assistant @elastic/obs-ai-assistant -x-pack/packages/observability/alert_details @elastic/obs-ux-management-team -x-pack/packages/observability/alerting_rule_utils @elastic/obs-ux-management-team -x-pack/packages/observability/alerting_test_data @elastic/obs-ux-management-team -x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops -x-pack/packages/observability/get_padded_alert_time_range_util @elastic/obs-ux-management-team -x-pack/plugins/observability_solution/observability_logs_explorer @elastic/obs-ux-logs-team -x-pack/packages/observability/logs_overview @elastic/obs-ux-logs-team -x-pack/plugins/observability_solution/observability_onboarding/e2e @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team -x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team -x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team -x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui -x-pack/packages/observability/synthetics_test_data @elastic/obs-ux-management-team -x-pack/packages/observability/observability_utils @elastic/observability-ui -x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security -test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team packages/kbn-openapi-bundler @elastic/security-detection-rule-management packages/kbn-openapi-common @elastic/security-detection-rule-management packages/kbn-openapi-generator @elastic/security-detection-rule-management packages/kbn-optimizer @elastic/kibana-operations packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations packages/kbn-osquery-io-ts-types @elastic/security-asset-management -x-pack/plugins/osquery @elastic/security-defend-workflows -examples/partial_results_example @elastic/kibana-data-discovery -x-pack/plugins/painless_lab @elastic/kibana-management packages/kbn-panel-loader @elastic/kibana-presentation packages/kbn-peggy @elastic/kibana-operations packages/kbn-peggy-loader @elastic/kibana-operations @@ -686,28 +432,10 @@ packages/kbn-picomatcher @elastic/kibana-operations packages/kbn-plugin-check @elastic/appex-sharedux packages/kbn-plugin-generator @elastic/kibana-operations packages/kbn-plugin-helpers @elastic/kibana-operations -examples/portable_dashboards_example @elastic/kibana-presentation -examples/preboot_example @elastic/kibana-security @elastic/kibana-core -packages/presentation/presentation_containers @elastic/kibana-presentation -src/plugins/presentation_panel @elastic/kibana-presentation -packages/presentation/presentation_publishing @elastic/kibana-presentation -src/plugins/presentation_util @elastic/kibana-presentation -x-pack/packages/ai-infra/product-doc-artifact-builder @elastic/appex-ai-infra -x-pack/plugins/observability_solution/profiling_data_access @elastic/obs-ux-infra_services-team -x-pack/plugins/observability_solution/profiling @elastic/obs-ux-infra_services-team packages/kbn-profiling-utils @elastic/obs-ux-infra_services-team -x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations packages/kbn-react-field @elastic/kibana-data-discovery packages/kbn-react-hooks @elastic/obs-ux-logs-team -packages/react/kibana_context/common @elastic/appex-sharedux -packages/react/kibana_context/render @elastic/appex-sharedux -packages/react/kibana_context/root @elastic/appex-sharedux -packages/react/kibana_context/styled @elastic/appex-sharedux -packages/react/kibana_context/theme @elastic/appex-sharedux -packages/react/kibana_mount @elastic/appex-sharedux packages/kbn-recently-accessed @elastic/appex-sharedux -x-pack/plugins/remote_clusters @elastic/kibana-management -test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core packages/kbn-repo-file-maps @elastic/kibana-operations packages/kbn-repo-info @elastic/kibana-operations packages/kbn-repo-linter @elastic/kibana-operations @@ -716,97 +444,35 @@ packages/kbn-repo-path @elastic/kibana-operations packages/kbn-repo-source-classifier @elastic/kibana-operations packages/kbn-repo-source-classifier-cli @elastic/kibana-operations packages/kbn-reporting/common @elastic/appex-sharedux -packages/kbn-reporting/get_csv_panel_actions @elastic/appex-sharedux packages/kbn-reporting/export_types/csv @elastic/appex-sharedux packages/kbn-reporting/export_types/csv_common @elastic/appex-sharedux packages/kbn-reporting/export_types/pdf @elastic/appex-sharedux packages/kbn-reporting/export_types/pdf_common @elastic/appex-sharedux packages/kbn-reporting/export_types/png @elastic/appex-sharedux packages/kbn-reporting/export_types/png_common @elastic/appex-sharedux +packages/kbn-reporting/get_csv_panel_actions @elastic/appex-sharedux packages/kbn-reporting/mocks_server @elastic/appex-sharedux -x-pack/plugins/reporting @elastic/appex-sharedux packages/kbn-reporting/public @elastic/appex-sharedux packages/kbn-reporting/server @elastic/appex-sharedux packages/kbn-resizable-layout @elastic/kibana-data-discovery -examples/resizable_layout_examples @elastic/kibana-data-discovery -x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution -packages/response-ops/feature_flag_service @elastic/response-ops -packages/response-ops/rule_params @elastic/response-ops -examples/response_stream @elastic/ml-ui packages/kbn-rison @elastic/kibana-operations -x-pack/packages/rollup @elastic/kibana-management -x-pack/plugins/rollup @elastic/kibana-management packages/kbn-router-to-openapispec @elastic/kibana-core packages/kbn-router-utils @elastic/obs-ux-logs-team -examples/routing_example @elastic/kibana-core packages/kbn-rrule @elastic/response-ops packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team -x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team -x-pack/plugins/runtime_fields @elastic/kibana-management packages/kbn-safer-lodash-set @elastic/kibana-security -x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-security -x-pack/test/plugin_api_integration/plugins/sample_task_plugin @elastic/response-ops -x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget @elastic/response-ops -test/plugin_functional/plugins/saved_object_export_transforms @elastic/kibana-core -test/plugin_functional/plugins/saved_object_import_warnings @elastic/kibana-core -x-pack/test/saved_object_api_integration/common/plugins/saved_object_test_plugin @elastic/kibana-security -src/plugins/saved_objects_finder @elastic/kibana-data-discovery -test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type @elastic/kibana-core -test/plugin_functional/plugins/saved_objects_hidden_type @elastic/kibana-core -src/plugins/saved_objects_management @elastic/kibana-core -src/plugins/saved_objects @elastic/appex-sharedux packages/kbn-saved-objects-settings @elastic/appex-sharedux -src/plugins/saved_objects_tagging_oss @elastic/appex-sharedux -x-pack/plugins/saved_objects_tagging @elastic/appex-sharedux -src/plugins/saved_search @elastic/kibana-data-discovery -examples/screenshot_mode_example @elastic/appex-sharedux -src/plugins/screenshot_mode @elastic/appex-sharedux -x-pack/examples/screenshotting_example @elastic/appex-sharedux -x-pack/plugins/screenshotting @elastic/kibana-reporting-services packages/kbn-screenshotting-server @elastic/appex-sharedux packages/kbn-search-api-keys-components @elastic/search-kibana packages/kbn-search-api-keys-server @elastic/search-kibana packages/kbn-search-api-panels @elastic/search-kibana -x-pack/plugins/search_assistant @elastic/search-kibana packages/kbn-search-connectors @elastic/search-kibana -x-pack/plugins/search_connectors @elastic/search-kibana packages/kbn-search-errors @elastic/kibana-data-discovery -examples/search_examples @elastic/kibana-data-discovery -x-pack/plugins/search_homepage @elastic/search-kibana packages/kbn-search-index-documents @elastic/search-kibana -x-pack/plugins/search_indices @elastic/search-kibana -x-pack/plugins/search_inference_endpoints @elastic/search-kibana -x-pack/plugins/search_notebooks @elastic/search-kibana -x-pack/plugins/search_playground @elastic/search-kibana packages/kbn-search-response-warnings @elastic/kibana-data-discovery -x-pack/packages/search/shared_ui @elastic/search-kibana packages/kbn-search-types @elastic/kibana-data-discovery -x-pack/plugins/searchprofiler @elastic/kibana-management -x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security -x-pack/packages/security/api_key_management @elastic/kibana-security -x-pack/packages/security/authorization_core @elastic/kibana-security -x-pack/packages/security/authorization_core_common @elastic/kibana-security -x-pack/packages/security/form_components @elastic/kibana-security packages/kbn-security-hardening @elastic/kibana-security -x-pack/plugins/security @elastic/kibana-security -x-pack/packages/security/plugin_types_common @elastic/kibana-security -x-pack/packages/security/plugin_types_public @elastic/kibana-security -x-pack/packages/security/plugin_types_server @elastic/kibana-security -x-pack/packages/security/role_management_model @elastic/kibana-security -x-pack/packages/security-solution/distribution_bar @elastic/kibana-cloud-security-posture -x-pack/plugins/security_solution_ess @elastic/security-solution -x-pack/packages/security-solution/features @elastic/security-threat-hunting-explore -x-pack/test/cases_api_integration/common/plugins/security_solution @elastic/response-ops -x-pack/packages/security-solution/navigation @elastic/security-threat-hunting-explore -x-pack/plugins/security_solution @elastic/security-solution -x-pack/plugins/security_solution_serverless @elastic/security-solution -x-pack/packages/security-solution/side_nav @elastic/security-threat-hunting-explore -x-pack/packages/security-solution/storybook/config @elastic/security-threat-hunting-explore -x-pack/packages/security-solution/upselling @elastic/security-threat-hunting-explore -x-pack/test/security_functional/plugins/test_endpoints @elastic/kibana-security -x-pack/packages/security/ui_components @elastic/kibana-security packages/kbn-securitysolution-autocomplete @elastic/security-detection-engine -x-pack/packages/security-solution/data_table @elastic/security-threat-hunting-investigations packages/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore packages/kbn-securitysolution-endpoint-exceptions-common @elastic/security-detection-engine packages/kbn-securitysolution-es-utils @elastic/security-detection-engine @@ -829,37 +495,90 @@ packages/kbn-server-http-tools @elastic/kibana-core packages/kbn-server-route-repository @elastic/obs-knowledge-team packages/kbn-server-route-repository-client @elastic/obs-knowledge-team packages/kbn-server-route-repository-utils @elastic/obs-knowledge-team -x-pack/plugins/serverless @elastic/appex-sharedux +packages/kbn-set-map @elastic/kibana-operations +packages/kbn-shared-svg @elastic/obs-ux-infra_services-team +packages/kbn-shared-ux-utility @elastic/appex-sharedux +packages/kbn-some-dev-log @elastic/kibana-operations +packages/kbn-sort-package-json @elastic/kibana-operations +packages/kbn-sort-predicates @elastic/kibana-visualizations +packages/kbn-sse-utils @elastic/obs-knowledge-team +packages/kbn-sse-utils-client @elastic/obs-knowledge-team +packages/kbn-sse-utils-server @elastic/obs-knowledge-team +packages/kbn-std @elastic/kibana-core +packages/kbn-stdio-dev-helpers @elastic/kibana-operations +packages/kbn-storybook @elastic/kibana-operations +packages/kbn-telemetry-tools @elastic/kibana-core +packages/kbn-test @elastic/kibana-operations @elastic/appex-qa +packages/kbn-test-eui-helpers @elastic/kibana-visualizations +packages/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa +packages/kbn-test-subj-selector @elastic/kibana-operations @elastic/appex-qa +packages/kbn-timelion-grammar @elastic/kibana-visualizations +packages/kbn-timerange @elastic/obs-ux-logs-team +packages/kbn-tinymath @elastic/kibana-visualizations +packages/kbn-tooling-log @elastic/kibana-operations +packages/kbn-transpose-utils @elastic/kibana-visualizations +packages/kbn-triggers-actions-ui-types @elastic/response-ops +packages/kbn-try-in-console @elastic/search-kibana +packages/kbn-ts-projects @elastic/kibana-operations +packages/kbn-ts-type-check-cli @elastic/kibana-operations +packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team +packages/kbn-ui-actions-browser @elastic/appex-sharedux +packages/kbn-ui-shared-deps-npm @elastic/kibana-operations +packages/kbn-ui-shared-deps-src @elastic/kibana-operations +packages/kbn-ui-theme @elastic/kibana-operations +packages/kbn-unified-data-table @elastic/kibana-data-discovery @elastic/security-threat-hunting-investigations +packages/kbn-unified-doc-viewer @elastic/kibana-data-discovery +packages/kbn-unified-field-list @elastic/kibana-data-discovery +packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery +packages/kbn-unsaved-changes-prompt @elastic/kibana-management +packages/kbn-use-tracked-promise @elastic/obs-ux-logs-team +packages/kbn-user-profile-components @elastic/kibana-security +packages/kbn-utility-types @elastic/kibana-core +packages/kbn-utility-types-jest @elastic/kibana-operations +packages/kbn-utils @elastic/kibana-operations +packages/kbn-validate-next-docs-cli @elastic/kibana-operations +packages/kbn-visualization-ui-components @elastic/kibana-visualizations +packages/kbn-visualization-utils @elastic/kibana-visualizations +packages/kbn-web-worker-stub @elastic/kibana-operations +packages/kbn-whereis-pkg-cli @elastic/kibana-operations +packages/kbn-xstate-utils @elastic/obs-ux-logs-team +packages/kbn-yarn-lock-validator @elastic/kibana-operations +packages/kbn-zod @elastic/kibana-core +packages/kbn-zod-helpers @elastic/security-detection-rule-management +packages/presentation/presentation_containers @elastic/kibana-presentation +packages/presentation/presentation_publishing @elastic/kibana-presentation +packages/react/kibana_context/common @elastic/appex-sharedux +packages/react/kibana_context/render @elastic/appex-sharedux +packages/react/kibana_context/root @elastic/appex-sharedux +packages/react/kibana_context/styled @elastic/appex-sharedux +packages/react/kibana_context/theme @elastic/appex-sharedux +packages/react/kibana_mount @elastic/appex-sharedux +packages/response-ops/feature_flag_service @elastic/response-ops +packages/response-ops/rule_params @elastic/response-ops +packages/serverless/project_switcher @elastic/appex-sharedux packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-management -x-pack/plugins/serverless_observability @elastic/obs-ux-management-team packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team -packages/serverless/project_switcher @elastic/appex-sharedux -x-pack/plugins/serverless_search @elastic/search-kibana packages/serverless/settings/search_project @elastic/search-kibana @elastic/kibana-management packages/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management packages/serverless/storybook/config @elastic/appex-sharedux packages/serverless/types @elastic/appex-sharedux -test/plugin_functional/plugins/session_notifications @elastic/kibana-core -x-pack/plugins/session_view @elastic/kibana-cloud-security-posture -packages/kbn-set-map @elastic/kibana-operations -examples/share_examples @elastic/appex-sharedux -src/plugins/share @elastic/appex-sharedux -packages/kbn-shared-svg @elastic/obs-ux-infra_services-team packages/shared-ux/avatar/solution @elastic/appex-sharedux -packages/shared-ux/button/exit_full_screen @elastic/appex-sharedux packages/shared-ux/button_toolbar @elastic/appex-sharedux +packages/shared-ux/button/exit_full_screen @elastic/appex-sharedux packages/shared-ux/card/no_data/impl @elastic/appex-sharedux packages/shared-ux/card/no_data/mocks @elastic/appex-sharedux packages/shared-ux/card/no_data/types @elastic/appex-sharedux packages/shared-ux/chrome/navigation @elastic/appex-sharedux +packages/shared-ux/code_editor/impl @elastic/appex-sharedux +packages/shared-ux/code_editor/mocks @elastic/appex-sharedux packages/shared-ux/error_boundary @elastic/appex-sharedux packages/shared-ux/file/context @elastic/appex-sharedux +packages/shared-ux/file/file_picker/impl @elastic/appex-sharedux +packages/shared-ux/file/file_upload/impl @elastic/appex-sharedux packages/shared-ux/file/image/impl @elastic/appex-sharedux packages/shared-ux/file/image/mocks @elastic/appex-sharedux packages/shared-ux/file/mocks @elastic/appex-sharedux -packages/shared-ux/file/file_picker/impl @elastic/appex-sharedux packages/shared-ux/file/types @elastic/appex-sharedux -packages/shared-ux/file/file_upload/impl @elastic/appex-sharedux packages/shared-ux/file/util @elastic/appex-sharedux packages/shared-ux/link/redirect_app/impl @elastic/appex-sharedux packages/shared-ux/link/redirect_app/mocks @elastic/appex-sharedux @@ -867,6 +586,7 @@ packages/shared-ux/link/redirect_app/types @elastic/appex-sharedux packages/shared-ux/markdown/impl @elastic/appex-sharedux packages/shared-ux/markdown/mocks @elastic/appex-sharedux packages/shared-ux/markdown/types @elastic/appex-sharedux +packages/shared-ux/modal/tabbed @elastic/appex-sharedux packages/shared-ux/page/analytics_no_data/impl @elastic/appex-sharedux packages/shared-ux/page/analytics_no_data/mocks @elastic/appex-sharedux packages/shared-ux/page/analytics_no_data/types @elastic/appex-sharedux @@ -876,10 +596,10 @@ packages/shared-ux/page/kibana_no_data/types @elastic/appex-sharedux packages/shared-ux/page/kibana_template/impl @elastic/appex-sharedux packages/shared-ux/page/kibana_template/mocks @elastic/appex-sharedux packages/shared-ux/page/kibana_template/types @elastic/appex-sharedux -packages/shared-ux/page/no_data/impl @elastic/appex-sharedux packages/shared-ux/page/no_data_config/impl @elastic/appex-sharedux packages/shared-ux/page/no_data_config/mocks @elastic/appex-sharedux packages/shared-ux/page/no_data_config/types @elastic/appex-sharedux +packages/shared-ux/page/no_data/impl @elastic/appex-sharedux packages/shared-ux/page/no_data/mocks @elastic/appex-sharedux packages/shared-ux/page/no_data/types @elastic/appex-sharedux packages/shared-ux/page/solution_nav @elastic/appex-sharedux @@ -892,109 +612,89 @@ packages/shared-ux/router/mocks @elastic/appex-sharedux packages/shared-ux/router/types @elastic/appex-sharedux packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux -packages/shared-ux/modal/tabbed @elastic/appex-sharedux packages/shared-ux/table_persist @elastic/appex-sharedux -packages/kbn-shared-ux-utility @elastic/appex-sharedux -x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team -x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team -x-pack/plugins/snapshot_restore @elastic/kibana-management -packages/kbn-some-dev-log @elastic/kibana-operations -packages/kbn-sort-package-json @elastic/kibana-operations -packages/kbn-sort-predicates @elastic/kibana-visualizations -x-pack/plugins/spaces @elastic/kibana-security -x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security -packages/kbn-sse-utils @elastic/obs-knowledge-team -packages/kbn-sse-utils-client @elastic/obs-knowledge-team -packages/kbn-sse-utils-server @elastic/obs-knowledge-team -x-pack/plugins/stack_alerts @elastic/response-ops -x-pack/plugins/stack_connectors @elastic/response-ops -x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/kibana-management -examples/state_containers_examples @elastic/appex-sharedux -test/server_integration/plugins/status_plugin_a @elastic/kibana-core -test/server_integration/plugins/status_plugin_b @elastic/kibana-core -packages/kbn-std @elastic/kibana-core -packages/kbn-stdio-dev-helpers @elastic/kibana-operations -packages/kbn-storybook @elastic/kibana-operations -x-pack/plugins/observability_solution/synthetics/e2e @elastic/obs-ux-management-team -x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-management-team -x-pack/packages/kbn-synthetics-private-location @elastic/obs-ux-management-team -x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops -x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops -x-pack/plugins/task_manager @elastic/response-ops +src/core @elastic/kibana-core +src/plugins/advanced_settings @elastic/appex-sharedux @elastic/kibana-management +src/plugins/ai_assistant_management/selection @elastic/obs-knowledge-team +src/plugins/bfetch @elastic/appex-sharedux +src/plugins/chart_expressions/common @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_legacy_metric @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_metric @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_partition_vis @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_tagcloud @elastic/kibana-visualizations +src/plugins/chart_expressions/expression_xy @elastic/kibana-visualizations +src/plugins/charts @elastic/kibana-visualizations +src/plugins/console @elastic/kibana-management +src/plugins/content_management @elastic/appex-sharedux +src/plugins/controls @elastic/kibana-presentation +src/plugins/custom_integrations @elastic/fleet +src/plugins/dashboard @elastic/kibana-presentation +src/plugins/data @elastic/kibana-visualizations @elastic/kibana-data-discovery +src/plugins/data_view_editor @elastic/kibana-data-discovery +src/plugins/data_view_field_editor @elastic/kibana-data-discovery +src/plugins/data_view_management @elastic/kibana-data-discovery +src/plugins/data_views @elastic/kibana-data-discovery +src/plugins/dev_tools @elastic/kibana-management +src/plugins/discover @elastic/kibana-data-discovery +src/plugins/discover_shared @elastic/kibana-data-discovery @elastic/obs-ux-logs-team +src/plugins/embeddable @elastic/kibana-presentation +src/plugins/es_ui_shared @elastic/kibana-management +src/plugins/esql @elastic/kibana-esql +src/plugins/esql_datagrid @elastic/kibana-esql +src/plugins/event_annotation @elastic/kibana-visualizations +src/plugins/event_annotation_listing @elastic/kibana-visualizations +src/plugins/expression_error @elastic/kibana-presentation +src/plugins/expression_image @elastic/kibana-presentation +src/plugins/expression_metric @elastic/kibana-presentation +src/plugins/expression_repeat_image @elastic/kibana-presentation +src/plugins/expression_reveal_image @elastic/kibana-presentation +src/plugins/expression_shape @elastic/kibana-presentation +src/plugins/expressions @elastic/kibana-visualizations +src/plugins/field_formats @elastic/kibana-data-discovery +src/plugins/files @elastic/appex-sharedux +src/plugins/files_management @elastic/appex-sharedux +src/plugins/ftr_apis @elastic/kibana-core +src/plugins/guided_onboarding @elastic/appex-sharedux +src/plugins/home @elastic/kibana-core +src/plugins/image_embeddable @elastic/appex-sharedux +src/plugins/input_control_vis @elastic/kibana-presentation +src/plugins/inspector @elastic/kibana-presentation +src/plugins/interactive_setup @elastic/kibana-security +src/plugins/kibana_overview @elastic/appex-sharedux +src/plugins/kibana_react @elastic/appex-sharedux +src/plugins/kibana_usage_collection @elastic/kibana-core +src/plugins/kibana_utils @elastic/appex-sharedux +src/plugins/links @elastic/kibana-presentation +src/plugins/management @elastic/kibana-management +src/plugins/maps_ems @elastic/kibana-presentation +src/plugins/navigation @elastic/appex-sharedux +src/plugins/newsfeed @elastic/kibana-core +src/plugins/no_data_page @elastic/appex-sharedux +src/plugins/presentation_panel @elastic/kibana-presentation +src/plugins/presentation_util @elastic/kibana-presentation +src/plugins/saved_objects @elastic/appex-sharedux +src/plugins/saved_objects_finder @elastic/kibana-data-discovery +src/plugins/saved_objects_management @elastic/kibana-core +src/plugins/saved_objects_tagging_oss @elastic/appex-sharedux +src/plugins/saved_search @elastic/kibana-data-discovery +src/plugins/screenshot_mode @elastic/appex-sharedux +src/plugins/share @elastic/appex-sharedux +src/plugins/telemetry @elastic/kibana-core src/plugins/telemetry_collection_manager @elastic/kibana-core -x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core src/plugins/telemetry_management_section @elastic/kibana-core -src/plugins/telemetry @elastic/kibana-core -test/plugin_functional/plugins/telemetry @elastic/kibana-core -packages/kbn-telemetry-tools @elastic/kibana-core -packages/kbn-test @elastic/kibana-operations @elastic/appex-qa -packages/kbn-test-eui-helpers @elastic/kibana-visualizations -x-pack/test/licensing_plugin/plugins/test_feature_usage @elastic/kibana-security -packages/kbn-test-jest-helpers @elastic/kibana-operations @elastic/appex-qa -packages/kbn-test-subj-selector @elastic/kibana-operations @elastic/appex-qa -x-pack/test_serverless -test -x-pack/test -x-pack/performance @elastic/appex-qa -x-pack/examples/testing_embedded_lens @elastic/kibana-visualizations -x-pack/examples/third_party_lens_navigation_prompt @elastic/kibana-visualizations -x-pack/examples/third_party_vis_lens_example @elastic/kibana-visualizations -x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations -x-pack/plugins/timelines @elastic/security-threat-hunting-investigations -packages/kbn-timelion-grammar @elastic/kibana-visualizations -packages/kbn-timerange @elastic/obs-ux-logs-team -packages/kbn-tinymath @elastic/kibana-visualizations -packages/kbn-tooling-log @elastic/kibana-operations -x-pack/plugins/transform @elastic/ml-ui -x-pack/plugins/translations @elastic/kibana-localization -packages/kbn-transpose-utils @elastic/kibana-visualizations -x-pack/examples/triggers_actions_ui_example @elastic/response-ops -x-pack/plugins/triggers_actions_ui @elastic/response-ops -packages/kbn-triggers-actions-ui-types @elastic/response-ops -packages/kbn-try-in-console @elastic/search-kibana -packages/kbn-ts-projects @elastic/kibana-operations -packages/kbn-ts-type-check-cli @elastic/kibana-operations -packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team -packages/kbn-ui-actions-browser @elastic/appex-sharedux -x-pack/examples/ui_actions_enhanced_examples @elastic/appex-sharedux -src/plugins/ui_actions_enhanced @elastic/appex-sharedux -examples/ui_action_examples @elastic/appex-sharedux -examples/ui_actions_explorer @elastic/appex-sharedux src/plugins/ui_actions @elastic/appex-sharedux -test/plugin_functional/plugins/ui_settings_plugin @elastic/kibana-core -packages/kbn-ui-shared-deps-npm @elastic/kibana-operations -packages/kbn-ui-shared-deps-src @elastic/kibana-operations -packages/kbn-ui-theme @elastic/kibana-operations -packages/kbn-unified-data-table @elastic/kibana-data-discovery @elastic/security-threat-hunting-investigations -packages/kbn-unified-doc-viewer @elastic/kibana-data-discovery -examples/unified_doc_viewer @elastic/kibana-core +src/plugins/ui_actions_enhanced @elastic/appex-sharedux src/plugins/unified_doc_viewer @elastic/kibana-data-discovery -packages/kbn-unified-field-list @elastic/kibana-data-discovery -examples/unified_field_list_examples @elastic/kibana-data-discovery src/plugins/unified_histogram @elastic/kibana-data-discovery src/plugins/unified_search @elastic/kibana-visualizations -packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery -packages/kbn-unsaved-changes-prompt @elastic/kibana-management -x-pack/plugins/upgrade_assistant @elastic/kibana-management -x-pack/plugins/observability_solution/uptime @elastic/obs-ux-management-team -x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux src/plugins/url_forwarding @elastic/kibana-visualizations src/plugins/usage_collection @elastic/kibana-core -test/plugin_functional/plugins/usage_collection @elastic/kibana-core -packages/kbn-use-tracked-promise @elastic/obs-ux-logs-team -packages/kbn-user-profile-components @elastic/kibana-security -examples/user_profile_examples @elastic/kibana-security -x-pack/test/security_api_integration/plugins/user_profiles_consumer @elastic/kibana-security -packages/kbn-utility-types @elastic/kibana-core -packages/kbn-utility-types-jest @elastic/kibana-operations -packages/kbn-utils @elastic/kibana-operations -x-pack/plugins/observability_solution/ux @elastic/obs-ux-infra_services-team -examples/v8_profiler_examples @elastic/response-ops -packages/kbn-validate-next-docs-cli @elastic/kibana-operations src/plugins/vis_default_editor @elastic/kibana-visualizations +src/plugins/vis_type_markdown @elastic/kibana-presentation src/plugins/vis_types/gauge @elastic/kibana-visualizations src/plugins/vis_types/heatmap @elastic/kibana-visualizations -src/plugins/vis_type_markdown @elastic/kibana-presentation src/plugins/vis_types/metric @elastic/kibana-visualizations src/plugins/vis_types/pie @elastic/kibana-visualizations src/plugins/vis_types/table @elastic/kibana-visualizations @@ -1004,16 +704,316 @@ src/plugins/vis_types/timeseries @elastic/kibana-visualizations src/plugins/vis_types/vega @elastic/kibana-visualizations src/plugins/vis_types/vislib @elastic/kibana-visualizations src/plugins/vis_types/xy @elastic/kibana-visualizations -packages/kbn-visualization-ui-components @elastic/kibana-visualizations -packages/kbn-visualization-utils @elastic/kibana-visualizations src/plugins/visualizations @elastic/kibana-visualizations +test +test/analytics/plugins/analytics_ftr_helpers @elastic/kibana-core +test/analytics/plugins/analytics_plugin_a @elastic/kibana-core +test/common/plugins/newsfeed @elastic/kibana-core +test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team +test/health_gateway/plugins/status @elastic/kibana-core +test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security +test/interpreter_functional/plugins/kbn_tp_run_pipeline @elastic/kibana-core +test/node_roles_functional/plugins/core_plugin_initializer_context @elastic/kibana-core +test/plugin_functional/plugins/app_link_test @elastic/kibana-core +test/plugin_functional/plugins/core_app_status @elastic/kibana-core +test/plugin_functional/plugins/core_dynamic_resolving_a @elastic/kibana-core +test/plugin_functional/plugins/core_dynamic_resolving_b @elastic/kibana-core +test/plugin_functional/plugins/core_history_block @elastic/kibana-core +test/plugin_functional/plugins/core_http @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_a @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_appleave @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_b @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_chromeless @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_deep_links @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_deprecations @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_execution_context @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_helpmenu @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_route_timeouts @elastic/kibana-core +test/plugin_functional/plugins/core_plugin_static_assets @elastic/kibana-core +test/plugin_functional/plugins/core_provider_plugin @elastic/kibana-core +test/plugin_functional/plugins/data_search @elastic/kibana-data-discovery +test/plugin_functional/plugins/elasticsearch_client_plugin @elastic/kibana-core +test/plugin_functional/plugins/eui_provider_dev_warning @elastic/appex-sharedux +test/plugin_functional/plugins/hardening @elastic/kibana-security +test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery +test/plugin_functional/plugins/kbn_sample_panel_action @elastic/appex-sharedux +test/plugin_functional/plugins/kbn_top_nav @elastic/kibana-core +test/plugin_functional/plugins/kbn_tp_custom_visualizations @elastic/kibana-visualizations +test/plugin_functional/plugins/management_test_plugin @elastic/kibana-management +test/plugin_functional/plugins/rendering_plugin @elastic/kibana-core +test/plugin_functional/plugins/saved_object_export_transforms @elastic/kibana-core +test/plugin_functional/plugins/saved_object_import_warnings @elastic/kibana-core +test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type @elastic/kibana-core +test/plugin_functional/plugins/saved_objects_hidden_type @elastic/kibana-core +test/plugin_functional/plugins/session_notifications @elastic/kibana-core +test/plugin_functional/plugins/telemetry @elastic/kibana-core +test/plugin_functional/plugins/ui_settings_plugin @elastic/kibana-core +test/plugin_functional/plugins/usage_collection @elastic/kibana-core +test/server_integration/plugins/status_plugin_a @elastic/kibana-core +test/server_integration/plugins/status_plugin_b @elastic/kibana-core +x-pack/examples/alerting_example @elastic/response-ops +x-pack/examples/embedded_lens_example @elastic/kibana-visualizations +x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team +x-pack/examples/gen_ai_streaming_response_example @elastic/response-ops +x-pack/examples/lens_config_builder_example @elastic/kibana-visualizations +x-pack/examples/lens_embeddable_inline_editing_example @elastic/kibana-visualizations +x-pack/examples/screenshotting_example @elastic/appex-sharedux +x-pack/examples/testing_embedded_lens @elastic/kibana-visualizations +x-pack/examples/third_party_lens_navigation_prompt @elastic/kibana-visualizations +x-pack/examples/third_party_maps_source_example @elastic/kibana-presentation +x-pack/examples/third_party_vis_lens_example @elastic/kibana-visualizations +x-pack/examples/triggers_actions_ui_example @elastic/response-ops +x-pack/examples/ui_actions_enhanced_examples @elastic/appex-sharedux +x-pack/packages/ai-infra/inference-common @elastic/appex-ai-infra +x-pack/packages/ai-infra/product-doc-artifact-builder @elastic/appex-ai-infra +x-pack/packages/index-management/index_management_shared_types @elastic/kibana-management +x-pack/packages/kbn-ai-assistant @elastic/search-kibana +x-pack/packages/kbn-ai-assistant-common @elastic/search-kibana +x-pack/packages/kbn-alerting-comparators @elastic/response-ops +x-pack/packages/kbn-alerting-state-types @elastic/response-ops +x-pack/packages/kbn-cloud-security-posture/common @elastic/kibana-cloud-security-posture +x-pack/packages/kbn-cloud-security-posture/graph @elastic/kibana-cloud-security-posture +x-pack/packages/kbn-cloud-security-posture/public @elastic/kibana-cloud-security-posture +x-pack/packages/kbn-data-forge @elastic/obs-ux-management-team +x-pack/packages/kbn-elastic-assistant @elastic/security-generative-ai +x-pack/packages/kbn-elastic-assistant-common @elastic/security-generative-ai +x-pack/packages/kbn-entities-schema @elastic/obs-entities +x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team +x-pack/packages/kbn-langchain @elastic/security-generative-ai +x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations +x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team +x-pack/packages/kbn-synthetics-private-location @elastic/obs-ux-management-team +x-pack/packages/maps/vector_tile_utils @elastic/kibana-presentation +x-pack/packages/ml/agg_utils @elastic/ml-ui +x-pack/packages/ml/aiops_change_point_detection @elastic/ml-ui +x-pack/packages/ml/aiops_common @elastic/ml-ui +x-pack/packages/ml/aiops_components @elastic/ml-ui +x-pack/packages/ml/aiops_log_pattern_analysis @elastic/ml-ui +x-pack/packages/ml/aiops_log_rate_analysis @elastic/ml-ui +x-pack/packages/ml/aiops_test_utils @elastic/ml-ui +x-pack/packages/ml/anomaly_utils @elastic/ml-ui +x-pack/packages/ml/cancellable_search @elastic/ml-ui +x-pack/packages/ml/category_validator @elastic/ml-ui +x-pack/packages/ml/chi2test @elastic/ml-ui +x-pack/packages/ml/creation_wizard_utils @elastic/ml-ui +x-pack/packages/ml/data_frame_analytics_utils @elastic/ml-ui +x-pack/packages/ml/data_grid @elastic/ml-ui +x-pack/packages/ml/data_view_utils @elastic/ml-ui +x-pack/packages/ml/date_picker @elastic/ml-ui +x-pack/packages/ml/date_utils @elastic/ml-ui +x-pack/packages/ml/error_utils @elastic/ml-ui +x-pack/packages/ml/field_stats_flyout @elastic/ml-ui +x-pack/packages/ml/in_memory_table @elastic/ml-ui +x-pack/packages/ml/inference_integration_flyout @elastic/ml-ui +x-pack/packages/ml/is_defined @elastic/ml-ui +x-pack/packages/ml/is_populated_object @elastic/ml-ui +x-pack/packages/ml/json_schemas @elastic/ml-ui +x-pack/packages/ml/kibana_theme @elastic/ml-ui +x-pack/packages/ml/local_storage @elastic/ml-ui +x-pack/packages/ml/nested_property @elastic/ml-ui +x-pack/packages/ml/number_utils @elastic/ml-ui +x-pack/packages/ml/parse_interval @elastic/ml-ui +x-pack/packages/ml/query_utils @elastic/ml-ui +x-pack/packages/ml/random_sampler_utils @elastic/ml-ui +x-pack/packages/ml/response_stream @elastic/ml-ui +x-pack/packages/ml/route_utils @elastic/ml-ui +x-pack/packages/ml/runtime_field_utils @elastic/ml-ui +x-pack/packages/ml/string_hash @elastic/ml-ui +x-pack/packages/ml/time_buckets @elastic/ml-ui +x-pack/packages/ml/trained_models_utils @elastic/ml-ui +x-pack/packages/ml/ui_actions @elastic/ml-ui +x-pack/packages/ml/url_state @elastic/ml-ui +x-pack/packages/ml/validators @elastic/ml-ui +x-pack/packages/observability/alert_details @elastic/obs-ux-management-team +x-pack/packages/observability/alerting_rule_utils @elastic/obs-ux-management-team +x-pack/packages/observability/alerting_test_data @elastic/obs-ux-management-team +x-pack/packages/observability/get_padded_alert_time_range_util @elastic/obs-ux-management-team +x-pack/packages/observability/logs_overview @elastic/obs-ux-logs-team +x-pack/packages/observability/observability_utils @elastic/observability-ui +x-pack/packages/observability/synthetics_test_data @elastic/obs-ux-management-team +x-pack/packages/rollup @elastic/kibana-management +x-pack/packages/search/shared_ui @elastic/search-kibana +x-pack/packages/security-solution/data_table @elastic/security-threat-hunting-investigations +x-pack/packages/security-solution/distribution_bar @elastic/kibana-cloud-security-posture +x-pack/packages/security-solution/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore +x-pack/packages/security-solution/features @elastic/security-threat-hunting-explore +x-pack/packages/security-solution/navigation @elastic/security-threat-hunting-explore +x-pack/packages/security-solution/side_nav @elastic/security-threat-hunting-explore +x-pack/packages/security-solution/storybook/config @elastic/security-threat-hunting-explore +x-pack/packages/security-solution/upselling @elastic/security-threat-hunting-explore +x-pack/packages/security/api_key_management @elastic/kibana-security +x-pack/packages/security/authorization_core @elastic/kibana-security +x-pack/packages/security/authorization_core_common @elastic/kibana-security +x-pack/packages/security/form_components @elastic/kibana-security +x-pack/packages/security/plugin_types_common @elastic/kibana-security +x-pack/packages/security/plugin_types_public @elastic/kibana-security +x-pack/packages/security/plugin_types_server @elastic/kibana-security +x-pack/packages/security/role_management_model @elastic/kibana-security +x-pack/packages/security/ui_components @elastic/kibana-security +x-pack/performance @elastic/appex-qa +x-pack/plugins/actions @elastic/response-ops +x-pack/plugins/aiops @elastic/ml-ui +x-pack/plugins/alerting @elastic/response-ops +x-pack/plugins/banners @elastic/appex-sharedux +x-pack/plugins/canvas @elastic/kibana-presentation +x-pack/plugins/cases @elastic/response-ops +x-pack/plugins/cloud @elastic/kibana-core +x-pack/plugins/cloud_defend @elastic/kibana-cloud-security-posture +x-pack/plugins/cloud_integrations/cloud_chat @elastic/kibana-core +x-pack/plugins/cloud_integrations/cloud_data_migration @elastic/kibana-management +x-pack/plugins/cloud_integrations/cloud_experiments @elastic/kibana-core +x-pack/plugins/cloud_integrations/cloud_full_story @elastic/kibana-core +x-pack/plugins/cloud_integrations/cloud_links @elastic/kibana-core +x-pack/plugins/cloud_security_posture @elastic/kibana-cloud-security-posture +x-pack/plugins/cross_cluster_replication @elastic/kibana-management +x-pack/plugins/custom_branding @elastic/appex-sharedux +x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation +x-pack/plugins/data_quality @elastic/obs-ux-logs-team +x-pack/plugins/data_usage @elastic/obs-ai-assistant @elastic/security-solution +x-pack/plugins/data_visualizer @elastic/ml-ui +x-pack/plugins/discover_enhanced @elastic/kibana-data-discovery +x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux +x-pack/plugins/ecs_data_quality_dashboard @elastic/security-threat-hunting-explore +x-pack/plugins/elastic_assistant @elastic/security-generative-ai +x-pack/plugins/embeddable_enhanced @elastic/kibana-presentation +x-pack/plugins/encrypted_saved_objects @elastic/kibana-security +x-pack/plugins/enterprise_search @elastic/search-kibana +x-pack/plugins/entity_manager @elastic/obs-entities +x-pack/plugins/event_log @elastic/response-ops +x-pack/plugins/features @elastic/kibana-core +x-pack/plugins/fields_metadata @elastic/obs-ux-logs-team +x-pack/plugins/file_upload @elastic/kibana-presentation @elastic/ml-ui +x-pack/plugins/fleet @elastic/fleet +x-pack/plugins/global_search @elastic/appex-sharedux +x-pack/plugins/global_search_bar @elastic/appex-sharedux +x-pack/plugins/global_search_providers @elastic/appex-sharedux +x-pack/plugins/graph @elastic/kibana-visualizations +x-pack/plugins/grokdebugger @elastic/kibana-management +x-pack/plugins/index_lifecycle_management @elastic/kibana-management +x-pack/plugins/index_management @elastic/kibana-management +x-pack/plugins/inference @elastic/appex-ai-infra +x-pack/plugins/ingest_pipelines @elastic/kibana-management +x-pack/plugins/integration_assistant @elastic/security-scalability +x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture +x-pack/plugins/lens @elastic/kibana-visualizations +x-pack/plugins/license_api_guard @elastic/kibana-management +x-pack/plugins/license_management @elastic/kibana-management +x-pack/plugins/licensing @elastic/kibana-core +x-pack/plugins/lists @elastic/security-detection-engine +x-pack/plugins/logstash @elastic/logstash +x-pack/plugins/maps @elastic/kibana-presentation +x-pack/plugins/ml @elastic/ml-ui +x-pack/plugins/monitoring @elastic/stack-monitoring +x-pack/plugins/monitoring_collection @elastic/stack-monitoring +x-pack/plugins/notifications @elastic/appex-sharedux +x-pack/plugins/observability_solution/apm @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/apm_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/apm/ftr_e2e @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/dataset_quality @elastic/obs-ux-logs-team +x-pack/plugins/observability_solution/entities_data_access @elastic/obs-entities +x-pack/plugins/observability_solution/exploratory_view @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/infra @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/inventory @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/inventory/e2e @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/investigate @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/investigate_app @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/logs_data_access @elastic/obs-knowledge-team @elastic/obs-ux-logs-team +x-pack/plugins/observability_solution/logs_explorer @elastic/obs-ux-logs-team +x-pack/plugins/observability_solution/logs_shared @elastic/obs-ux-logs-team +x-pack/plugins/observability_solution/metrics_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/observability_ai_assistant @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/observability_ai_assistant_app @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/observability_ai_assistant_management @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/observability_logs_explorer @elastic/obs-ux-logs-team +x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team +x-pack/plugins/observability_solution/observability_onboarding/e2e @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team +x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui +x-pack/plugins/observability_solution/profiling @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/profiling_data_access @elastic/obs-ux-infra_services-team +x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/synthetics @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/synthetics/e2e @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/uptime @elastic/obs-ux-management-team +x-pack/plugins/observability_solution/ux @elastic/obs-ux-infra_services-team +x-pack/plugins/osquery @elastic/security-defend-workflows +x-pack/plugins/painless_lab @elastic/kibana-management +x-pack/plugins/remote_clusters @elastic/kibana-management +x-pack/plugins/reporting @elastic/appex-sharedux +x-pack/plugins/rollup @elastic/kibana-management +x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team +x-pack/plugins/runtime_fields @elastic/kibana-management +x-pack/plugins/saved_objects_tagging @elastic/appex-sharedux +x-pack/plugins/screenshotting @elastic/kibana-reporting-services +x-pack/plugins/search_assistant @elastic/search-kibana +x-pack/plugins/search_connectors @elastic/search-kibana +x-pack/plugins/search_homepage @elastic/search-kibana +x-pack/plugins/search_indices @elastic/search-kibana +x-pack/plugins/search_inference_endpoints @elastic/search-kibana +x-pack/plugins/search_notebooks @elastic/search-kibana +x-pack/plugins/search_playground @elastic/search-kibana +x-pack/plugins/searchprofiler @elastic/kibana-management +x-pack/plugins/security @elastic/kibana-security +x-pack/plugins/security_solution @elastic/security-solution +x-pack/plugins/security_solution_ess @elastic/security-solution +x-pack/plugins/security_solution_serverless @elastic/security-solution +x-pack/plugins/serverless @elastic/appex-sharedux +x-pack/plugins/serverless_observability @elastic/obs-ux-management-team +x-pack/plugins/serverless_search @elastic/search-kibana +x-pack/plugins/session_view @elastic/kibana-cloud-security-posture +x-pack/plugins/snapshot_restore @elastic/kibana-management +x-pack/plugins/spaces @elastic/kibana-security +x-pack/plugins/stack_alerts @elastic/response-ops +x-pack/plugins/stack_connectors @elastic/response-ops +x-pack/plugins/task_manager @elastic/response-ops +x-pack/plugins/telemetry_collection_xpack @elastic/kibana-core +x-pack/plugins/threat_intelligence @elastic/security-threat-hunting-investigations +x-pack/plugins/timelines @elastic/security-threat-hunting-investigations +x-pack/plugins/transform @elastic/ml-ui +x-pack/plugins/translations @elastic/kibana-localization +x-pack/plugins/triggers_actions_ui @elastic/response-ops +x-pack/plugins/upgrade_assistant @elastic/kibana-management x-pack/plugins/watcher @elastic/kibana-management -packages/kbn-web-worker-stub @elastic/kibana-operations -packages/kbn-whereis-pkg-cli @elastic/kibana-operations -packages/kbn-xstate-utils @elastic/obs-ux-logs-team -packages/kbn-yarn-lock-validator @elastic/kibana-operations -packages/kbn-zod @elastic/kibana-core -packages/kbn-zod-helpers @elastic/security-detection-rule-management +x-pack/test +x-pack/test_serverless +x-pack/test/alerting_api_integration/common/plugins/aad @elastic/response-ops +x-pack/test/alerting_api_integration/common/plugins/actions_simulators @elastic/response-ops +x-pack/test/alerting_api_integration/common/plugins/alerts @elastic/response-ops +x-pack/test/alerting_api_integration/common/plugins/alerts_restricted @elastic/response-ops +x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops +x-pack/test/alerting_api_integration/packages/helpers @elastic/response-ops +x-pack/test/api_integration/apis/entity_manager/fixture_plugin @elastic/obs-entities +x-pack/test/cases_api_integration/common/plugins/cases @elastic/response-ops +x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops +x-pack/test/cases_api_integration/common/plugins/security_solution @elastic/response-ops +x-pack/test/cloud_integration/plugins/saml_provider @elastic/kibana-core +x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security +x-pack/test/functional_cors/plugins/kibana_cors_test @elastic/kibana-security +x-pack/test/functional_embedded/plugins/iframe_embedded @elastic/kibana-core +x-pack/test/functional_execution_context/plugins/alerts @elastic/kibana-core +x-pack/test/functional_with_es_ssl/plugins/alerts @elastic/response-ops +x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops +x-pack/test/licensing_plugin/plugins/test_feature_usage @elastic/kibana-security +x-pack/test/plugin_api_integration/plugins/elasticsearch_client @elastic/kibana-core +x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops +x-pack/test/plugin_api_integration/plugins/feature_usage_test @elastic/kibana-security +x-pack/test/plugin_api_integration/plugins/sample_task_plugin @elastic/response-ops +x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops +x-pack/test/plugin_functional/plugins/global_search_test @elastic/kibana-core +x-pack/test/plugin_functional/plugins/resolver_test @elastic/security-solution +x-pack/test/saved_object_api_integration/common/plugins/saved_object_test_plugin @elastic/kibana-security +x-pack/test/security_api_integration/packages/helpers @elastic/kibana-security +x-pack/test/security_api_integration/plugins/audit_log @elastic/kibana-security +x-pack/test/security_api_integration/plugins/features_provider @elastic/kibana-security +x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security +x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-security +x-pack/test/security_api_integration/plugins/user_profiles_consumer @elastic/kibana-security +x-pack/test/security_functional/plugins/test_endpoints @elastic/kibana-security +x-pack/test/spaces_api_integration/common/plugins/spaces_test_plugin @elastic/kibana-security +x-pack/test/task_manager_claimer_update_by_query/plugins/sample_task_plugin_mget @elastic/response-ops +x-pack/test/ui_capabilities/common/plugins/foo_plugin @elastic/kibana-security +x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core +x-pack/test/usage_collection/plugins/stack_management_usage_test @elastic/kibana-management #### ## Everything below this line overrides the default assignments for each package. ## Items lower in the file have higher precedence: diff --git a/packages/kbn-generate/src/commands/codeowners_command.ts b/packages/kbn-generate/src/commands/codeowners_command.ts index a86b4250d6850..ea76bc3a659c3 100644 --- a/packages/kbn-generate/src/commands/codeowners_command.ts +++ b/packages/kbn-generate/src/commands/codeowners_command.ts @@ -62,6 +62,11 @@ export const CodeownersCommand: GenerateCommand = { content = content.slice(0, ultStart); } + // sort genarated entries by directory name + // this improves readability and makes sure that ownership for nested + // test plugins is not overriden by the parent package's entry + pkgs.sort((a, b) => a.directory.localeCompare(b.directory)); + const newCodeowners = `${GENERATED_START}${pkgs .map( (pkg) => From e803f5c794348fe2330cfc77df4003dc55ce7929 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:41:43 +1100 Subject: [PATCH 02/16] Authorized route migration for routes owned by security-threat-hunting (#198386) ### Authz API migration for authorized routes This PR migrates `access:` tags used in route definitions to new security configuration. Please refer to the documentation for more information: [Authorization API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization) ### **Before migration:** Access control tags were defined in the `options` object of the route: ```ts router.get({ path: '/api/path', options: { tags: ['access:', 'access:'], }, ... }, handler); ``` ### **After migration:** Tags have been replaced with the more robust `security.authz.requiredPrivileges` field under `security`: ```ts router.get({ path: '/api/path', security: { authz: { requiredPrivileges: ['', ''], }, }, ... }, handler); ``` ### What to do next? 1. Review the changes in this PR. 2. You might need to update your tests to reflect the new security configuration: - If you have tests that rely on checking `access` tags. - If you have snapshot tests that include the route definition. - If you have FTR tests that rely on checking unauthorized error message. The error message changed to also include missing privileges. ## Any questions? If you have any questions or need help with API authorization, please reach out to the `@elastic/kibana-security` team. Co-authored-by: Angela Chuang <6295984+angorayc@users.noreply.github.com> --- .../server/lib/siem_migrations/rules/api/create.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/create.ts b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/create.ts index e2cf97dd094a9..f4c52e9b444b8 100644 --- a/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/create.ts +++ b/x-pack/plugins/security_solution/server/lib/siem_migrations/rules/api/create.ts @@ -25,7 +25,11 @@ export const registerSiemRuleMigrationsCreateRoute = ( .post({ path: SIEM_RULE_MIGRATIONS_PATH, access: 'internal', - options: { tags: ['access:securitySolution'] }, + security: { + authz: { + requiredPrivileges: ['securitySolution'], + }, + }, }) .addVersion( { From c1e00a887173e8b86fd58fa0e7e768e4f0b1643c Mon Sep 17 00:00:00 2001 From: Julia Rechkunova Date: Wed, 6 Nov 2024 13:45:01 +0100 Subject: [PATCH 03/16] [Discover] Show the fetched Discover results even when histogram request fails on some shards (#198553) - Closes https://github.com/elastic/kibana/issues/198496 ## Summary This PR fixes an issue when the histogram request returns only a partial result (0 or greater than 0) by adding a warning icon next to the total hits counter and not blocking the whole page with "No results" message (when partial result with 0 hits from histogram). Screenshot 2024-10-31 at 15 45 17 ### Testing Execute the following and open `example*` data view in Discover. ``` PUT example1 PUT example1/_mapping { "properties": { "message": { "type": "text" }, "date": { "type": "date" } } } PUT example1/_doc/11 { "message": "11", "date": "2024-11-11T12:10:30Z" } PUT example1/_doc/12 { "message": "22", "date": "2024-11-12T12:10:30Z" } PUT example2 PUT example2/_mapping { "properties": { "message": { "type": "keyword" }, "date": { "type": "date" } } } PUT example2/_doc/21 { "message": "21", "date": "2024-12-01T12:10:30Z" } PUT example2/_doc/22 { "message": "22", "date": "2024-12-02T12:10:30Z" } ``` Then add `message` as a breakdown field. Notice that the histogram gets some partial results: Screenshot 2024-10-31 at 16 11 14 Now, add a filter for `_id: 11` and notice that the histogram request has no results (it partially failed on some shards) but Discover still renders the table: Screenshot 2024-10-31 at 16 11 31 ### 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/main/packages/kbn-i18n/README.md) - [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: Davis McPhee --- .../hits_counter/hits_counter.test.tsx | 60 ++++++++++++++++- .../components/hits_counter/hits_counter.tsx | 65 +++++++++++++------ .../public/chart/histogram.test.tsx | 2 +- .../public/chart/histogram.tsx | 15 +++-- .../ccs_compatibility/_search_errors.ts | 2 +- test/functional/page_objects/discover_page.ts | 6 +- 6 files changed, 119 insertions(+), 31 deletions(-) diff --git a/src/plugins/discover/public/components/hits_counter/hits_counter.test.tsx b/src/plugins/discover/public/components/hits_counter/hits_counter.test.tsx index 18f9c8b629b3b..e34ad87d403e5 100644 --- a/src/plugins/discover/public/components/hits_counter/hits_counter.test.tsx +++ b/src/plugins/discover/public/components/hits_counter/hits_counter.test.tsx @@ -14,8 +14,20 @@ import { findTestSubject } from '@elastic/eui/lib/test'; import { EuiLoadingSpinner } from '@elastic/eui'; import { BehaviorSubject } from 'rxjs'; import { getDiscoverStateMock } from '../../__mocks__/discover_state.mock'; -import { DataTotalHits$ } from '../../application/main/state_management/discover_data_state_container'; +import { + DataDocuments$, + DataTotalHits$, +} from '../../application/main/state_management/discover_data_state_container'; import { FetchStatus } from '../../application/types'; +import { dataViewMock, esHitsMock } from '@kbn/discover-utils/src/__mocks__'; +import { buildDataTableRecord } from '@kbn/discover-utils'; + +function getDocuments$(count: number = 5) { + return new BehaviorSubject({ + fetchStatus: FetchStatus.COMPLETE, + result: esHitsMock.map((esHit) => buildDataTableRecord(esHit, dataViewMock)).slice(0, count), + }) as DataDocuments$; +} describe('hits counter', function () { it('expect to render the number of hits', function () { @@ -24,6 +36,7 @@ describe('hits counter', function () { fetchStatus: FetchStatus.COMPLETE, result: 1, }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(); const component1 = mountWithIntl( ); @@ -45,6 +58,7 @@ describe('hits counter', function () { fetchStatus: FetchStatus.COMPLETE, result: 1899, }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(); const component1 = mountWithIntl( ); @@ -64,6 +78,7 @@ describe('hits counter', function () { fetchStatus: FetchStatus.PARTIAL, result: 2, }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(); const component = mountWithIntl( ); @@ -76,6 +91,7 @@ describe('hits counter', function () { fetchStatus: FetchStatus.PARTIAL, result: 2, }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(); const component = mountWithIntl( ); @@ -89,9 +105,51 @@ describe('hits counter', function () { fetchStatus: FetchStatus.LOADING, result: undefined, }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(); const component = mountWithIntl( ); expect(component.isEmptyRender()).toBe(true); }); + + it('should render discoverQueryHitsPartial when status is error', () => { + const stateContainer = getDiscoverStateMock({ isTimeBased: true }); + stateContainer.dataState.data$.totalHits$ = new BehaviorSubject({ + fetchStatus: FetchStatus.ERROR, + result: undefined, + }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(3); + const component = mountWithIntl( + + ); + expect(component.find('[data-test-subj="discoverQueryHitsPartial"]').length).toBe(1); + expect(findTestSubject(component, 'discoverQueryTotalHits').text()).toBe('≥3 resultsInfo'); + expect(component.text()).toBe('≥3 resultsInfo'); + + stateContainer.dataState.data$.totalHits$ = new BehaviorSubject({ + fetchStatus: FetchStatus.ERROR, + result: 200, + }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(2); + + const component2 = mountWithIntl( + + ); + expect(component2.find('[data-test-subj="discoverQueryHitsPartial"]').length).toBe(1); + expect(findTestSubject(component2, 'discoverQueryTotalHits').text()).toBe('≥200Info'); + expect(component2.text()).toBe(' (≥200Info)'); + + stateContainer.dataState.data$.totalHits$ = new BehaviorSubject({ + fetchStatus: FetchStatus.ERROR, + result: 0, + }) as DataTotalHits$; + stateContainer.dataState.data$.documents$ = getDocuments$(1); + + const component3 = mountWithIntl( + + ); + expect(component3.find('[data-test-subj="discoverQueryHitsPartial"]').length).toBe(1); + expect(findTestSubject(component3, 'discoverQueryTotalHits').text()).toBe('≥1Info'); + expect(component3.text()).toBe(' (≥1Info)'); + }); }); diff --git a/src/plugins/discover/public/components/hits_counter/hits_counter.tsx b/src/plugins/discover/public/components/hits_counter/hits_counter.tsx index fc89183ff864d..203d32ce97f58 100644 --- a/src/plugins/discover/public/components/hits_counter/hits_counter.tsx +++ b/src/plugins/discover/public/components/hits_counter/hits_counter.tsx @@ -8,7 +8,7 @@ */ import React from 'react'; -import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingSpinner } from '@elastic/eui'; +import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLoadingSpinner, EuiIconTip } from '@elastic/eui'; import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { css } from '@emotion/react'; @@ -29,18 +29,33 @@ export interface HitsCounterProps { export const HitsCounter: React.FC = ({ mode, stateContainer }) => { const totalHits$ = stateContainer.dataState.data$.totalHits$; const totalHitsState = useDataState(totalHits$); - const hitsTotal = totalHitsState.result; + let hitsTotal = totalHitsState.result; const hitsStatus = totalHitsState.fetchStatus; + const documents$ = stateContainer.dataState.data$.documents$; + const documentsState = useDataState(documents$); + const documentsCount = documentsState.result?.length || 0; + if (!hitsTotal && hitsStatus === FetchStatus.LOADING) { return null; } + if ( + hitsStatus === FetchStatus.ERROR && + documentsState.fetchStatus === FetchStatus.COMPLETE && + documentsCount > (hitsTotal ?? 0) + ) { + // if histogram returned partial results and which are less than the fetched documents count => + // override hitsTotal with the fetched documents count + hitsTotal = documentsCount; + } + + const showGreaterOrEqualSign = + hitsStatus === FetchStatus.PARTIAL || hitsStatus === FetchStatus.ERROR; + const formattedHits = ( @@ -55,7 +70,7 @@ export const HitsCounter: React.FC = ({ mode, stateContainer } const element = ( = ({ mode, stateContainer } - {hitsStatus === FetchStatus.PARTIAL && - (mode === HitsCounterMode.standalone ? ( + {showGreaterOrEqualSign ? ( + mode === HitsCounterMode.standalone ? ( = ({ mode, stateContainer } defaultMessage="≥{formattedHits}" values={{ formattedHits }} /> - ))} - {hitsStatus !== FetchStatus.PARTIAL && - (mode === HitsCounterMode.standalone ? ( - - ) : ( - formattedHits - ))} + ) + ) : mode === HitsCounterMode.standalone ? ( + + ) : ( + formattedHits + )} @@ -103,6 +117,19 @@ export const HitsCounter: React.FC = ({ mode, stateContainer } /> )} + {hitsStatus === FetchStatus.ERROR && ( + + + + )} ); diff --git a/src/plugins/unified_histogram/public/chart/histogram.test.tsx b/src/plugins/unified_histogram/public/chart/histogram.test.tsx index 26bdc0c505234..72b5c0cc0b791 100644 --- a/src/plugins/unified_histogram/public/chart/histogram.test.tsx +++ b/src/plugins/unified_histogram/public/chart/histogram.test.tsx @@ -240,7 +240,7 @@ describe('Histogram', () => { onLoad(false, adapters); }); expect(props.onTotalHitsChange).toHaveBeenLastCalledWith( - UnifiedHistogramFetchStatus.complete, + UnifiedHistogramFetchStatus.error, 100 ); expect(props.onChartLoad).toHaveBeenLastCalledWith({ adapters }); diff --git a/src/plugins/unified_histogram/public/chart/histogram.tsx b/src/plugins/unified_histogram/public/chart/histogram.tsx index faa5ddd2b1fc3..e63cf775158aa 100644 --- a/src/plugins/unified_histogram/public/chart/histogram.tsx +++ b/src/plugins/unified_histogram/public/chart/histogram.tsx @@ -130,9 +130,6 @@ export function Histogram({ | undefined; const response = json?.rawResponse; - // The response can have `response?._shards.failed` but we should still be able to show hits number - // TODO: show shards warnings as a badge next to the total hits number - if (requestFailed) { onTotalHitsChange?.(UnifiedHistogramFetchStatus.error, undefined); onChartLoad?.({ adapters: adapters ?? {} }); @@ -142,10 +139,14 @@ export function Histogram({ const adapterTables = adapters?.tables?.tables; const totalHits = computeTotalHits(hasLensSuggestions, adapterTables, isPlainRecord); - onTotalHitsChange?.( - isLoading ? UnifiedHistogramFetchStatus.loading : UnifiedHistogramFetchStatus.complete, - totalHits ?? hits?.total - ); + if (response?._shards?.failed || response?.timed_out) { + onTotalHitsChange?.(UnifiedHistogramFetchStatus.error, totalHits); + } else { + onTotalHitsChange?.( + isLoading ? UnifiedHistogramFetchStatus.loading : UnifiedHistogramFetchStatus.complete, + totalHits ?? hits?.total + ); + } if (response) { const newBucketInterval = buildBucketInterval({ diff --git a/test/functional/apps/discover/ccs_compatibility/_search_errors.ts b/test/functional/apps/discover/ccs_compatibility/_search_errors.ts index 7045e0e7d1a3b..96db6e2f7a347 100644 --- a/test/functional/apps/discover/ccs_compatibility/_search_errors.ts +++ b/test/functional/apps/discover/ccs_compatibility/_search_errors.ts @@ -65,7 +65,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // Ensure documents are still returned for the successful shards await retry.try(async function tryingForTime() { - const hitCount = await discover.getHitCount(); + const hitCount = await discover.getHitCount({ isPartial: true }); expect(hitCount).to.be('9,247'); }); diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index 979e4341931ab..e8a0de7fbc340 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -339,9 +339,11 @@ export class DiscoverPageObject extends FtrService { return await this.header.waitUntilLoadingHasFinished(); } - public async getHitCount() { + public async getHitCount({ isPartial }: { isPartial?: boolean } = {}) { await this.header.waitUntilLoadingHasFinished(); - return await this.testSubjects.getVisibleText('discoverQueryHits'); + return await this.testSubjects.getVisibleText( + isPartial ? 'discoverQueryHitsPartial' : 'discoverQueryHits' + ); } public async getHitCountInt() { From b8dbf835088295246f457d27daa44d2546e17565 Mon Sep 17 00:00:00 2001 From: Paulina Shakirova Date: Wed, 6 Nov 2024 13:50:19 +0100 Subject: [PATCH 04/16] feat: SavedObjectSaveModal - add postfix if the title is duplicated (#198777) ## Summary This PR fixes the issue with the [[Dashboard][Event annotations][Lens] appending a postfix when there is a duplicate title instead of interrupting the save flow](https://github.com/elastic/kibana/issues/161119). Currently, if a user wants to save an object as a new group without modifying the title, they will see a warning about it. This PR introduces an additional step. If the user attempts to save an object as a new group, we automatically append a postfix to the title. If the user manually changes the title back to the original and tries to save it, they will see the currently configured warning. https://github.com/user-attachments/assets/4f764b75-5b83-4277-8e5e-42fe1174fae7 --- .../saved_object_save_modal.test.tsx | 50 +++++++++++++++++++ .../save_modal/saved_object_save_modal.tsx | 21 ++++++++ 2 files changed, 71 insertions(+) diff --git a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.test.tsx b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.test.tsx index 82e8051b897c7..273a79c307001 100644 --- a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.test.tsx +++ b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.test.tsx @@ -121,4 +121,54 @@ describe('SavedObjectSaveModal', () => { expect(onSave.mock.calls[0][0].newCopyOnSave).toBe(true); }); }); + + describe('handle title duplication logic', () => { + it('should append "[1]" to title if no number is present', async () => { + const onSave = jest.fn(); + + render( + + {}} + title="Saved Object" + objectType="visualization" + showDescription={true} + showCopyOnSave={true} + /> + + ); + + const switchElement = screen.getByTestId('saveAsNewCheckbox'); + await userEvent.click(switchElement); + + await waitFor(() => { + expect(screen.getByTestId('savedObjectTitle')).toHaveValue('Saved Object [1]'); + }); + }); + + it('should increment the number by one when a number is already present', async () => { + const onSave = jest.fn(); + + render( + + {}} + title="Saved Object [1]" + objectType="visualization" + showDescription={true} + showCopyOnSave={true} + /> + + ); + + const switchElement = screen.getByTestId('saveAsNewCheckbox'); + await userEvent.click(switchElement); + + await waitFor(() => { + expect(screen.getByTestId('savedObjectTitle')).toHaveValue('Saved Object [2]'); + }); + }); + }); }); diff --git a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx index aa82feafb60aa..a3e6d1cc22b2a 100644 --- a/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx +++ b/src/plugins/saved_objects/public/save_modal/saved_object_save_modal.tsx @@ -276,7 +276,28 @@ export class SavedObjectSaveModal extends React.Component }); }; + private handleTitleDuplication = () => { + const regex = /\s*\[(\d+)\]$/; + const match = this.state.title.match(regex); + + if (match) { + const newNumber = Number(match[1]) + 1; + + this.setState({ + title: this.state.title.replace(regex, ` [${newNumber}]`), + }); + } else { + this.setState({ + title: this.state.title + ' [1]', + }); + } + }; + private onCopyOnSaveChange = (event: EuiSwitchEvent) => { + if (this.props.title === this.state.title && event.target.checked) { + this.handleTitleDuplication(); + } + this.setState({ copyOnSave: event.target.checked, }); From bdb6ff128c8e9fbf83d5e38e9a771853a171fdd2 Mon Sep 17 00:00:00 2001 From: Juan Pablo Djeredjian Date: Wed, 6 Nov 2024 09:50:44 -0300 Subject: [PATCH 05/16] [Security Solution] `/upgrade/_perform` performance testing (#197898) ## Summary - Creates a new `withSyncSecuritySpan` wrapper to measure sync functions in APM. Adds this wrapper to new CPU intensive logic in the `/upgrade/_perform` endpoint. - Do performance testing on the endpoint. See results below. ## Performance testing ### Possible OOMs in production Serverless Created an Serverless instance and manually installed different Prebuilt Rules package to force rule upgrades. - With the current published prebuilt packages, a user cannot update more than 950 rules with a single request. - This number is expected to grow, but at a slower pace than the actual number of rules being published. - Also, as users start customizing rules, rules with conflicts will be excluded from bulk requests, which will **make payloads even smaller.** - Testing the biggest possible upgrade request, Serverless behaved reliably and no **timeouts** or **OOMs** occurred: | From version | To version | Rule Updates | Request time | |---------|--------|---------|--------| | 8.9.9 | 8.15.9 | 913 | 47.3s | | 8.9.12 | 8.15.9 | 917 | 52.34s | | 8.9.15 | 8.15.9 | 928 | 56.08s | | 8.10.4 | 8.15.9 | 872 | 43.29s | | 8.10.5 | 8.15.9 | 910 | 52.21s | | 8.10.6 | 8.15.9 | 913 | 55.92s | | 8.10.7 | 8.15.9 | 924 | 49.89s | | 8.11.2 | 8.15.9 | 910 | 56.48s | | 8.11.5 | 8.15.9 | 928 | 49.22s | | 8.11.16 | 8.15.9 | 695 | 38.91s | | 8.12.6 | 8.15.9 | 947 | 51.13s | | 8.13.11 | 8.15.9 | 646 | 42.98s | - Given the positive results for much bigger payloads seen in the **Memory profiling with limited memory in Kibana production mode** below, we can assume that there's no risk of OOMs in Serverless at the moment. ### Memory profiling with limited memory in Kibana production mode - Launched Kibana in Production mode, and set a **memory limit of 700mb** to mimic as closely as possible the Serverless environment (where memory is a hard constraint) - Stress tested with big number of requests and saw the following behaviour: | Rule Updates | Request time (min) | OOM error? | Metrics | |---------|--------|--------|--------| | 1500 | 1.1 | No |
Unfold![image](https://github.com/user-attachments/assets/46303a1a-a929-4c00-8777-8d1f23face17)
| | 2000 | 1.5 | No |
Unfold![image](https://github.com/user-attachments/assets/bd33d259-50fd-42df-947d-3a2e7c5c78c3)
| | 2500 | 1.8 | No |
Unfold![image](https://github.com/user-attachments/assets/9145d2e7-e87c-4ba6-8633-7fe1087c29fb)
| | 2750 | 1.9 | No |
Unfold![image](https://github.com/user-attachments/assets/9009163e-f58d-4be3-8a1f-87844760a037)
| | 3000 | - | YES | | - Rule upgrade OOM's consistently when the payload is >= 3000 rules, but behaves reliably below that. Good enough buffer for growth of the Prebuilt Rules package. - Also, the saw-toothed shape of the heap used graphics shows that garbage collection works properly for payloads under 3000 rules. ### APM request profiling - Connected Kibana in production mode to a APM server to measure spans of the `/upgrade/_perform` request. - Additionally, measured new CPU-intensive logic which calculates rule diffs and create rule payloads for upgrades. - An example span for a successful upgrade of 2500 rules: image - The new spans for CPU-intensive tasks `getUpgradeableRules` and `createModifiedPrebuiltRuleAssets`, which are displayed as `blocking`, have an acceptable span length, and do not have a considerable overhead on the total length of the request. ### Timeout testing - Tested Kibana with `--no-base-path` in order to check for potential timeouts in long running requests (ESS Cloud proxy is supposed to have a request timeout config of 2.5 mins) - Still [confirming](https://elastic.slack.com/archives/C5UDAFZQU/p1730297621776729) with Kibana Operations the behaviour of the timeouts in ESS and Serverless envs: - Tested with mock rules (indexed directly to ES) and **no timeouts occurred**: | Rule Updates | Request time (min) | |---------|--------| | 2000 | 2.1 | | 2000 | 2.1 | | 2250 | 2.3 | | 2500 | 2.6 | | 3000 | 3.1 | ### Conclusion The results show that the `/upgrade/_perform` endpoint performs reliably under stress, given the currentexpected request payloads. The only question to triple check is the behaviour of server request timeouts in Serverless: I'm waiting the Kibana ops team to get back to me, even though testing here did not show cases of timeouts. --------- Co-authored-by: Elastic Machine Co-authored-by: Dmitrii Shevchenko --- .../create_upgradeable_rules_payload.ts | 142 +++++++++--------- .../get_upgradeable_rules.ts | 102 +++++++------ .../server/utils/with_security_span.ts | 15 +- 3 files changed, 140 insertions(+), 119 deletions(-) diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/create_upgradeable_rules_payload.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/create_upgradeable_rules_payload.ts index 97e587646e524..b25320e1131ef 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/create_upgradeable_rules_payload.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/create_upgradeable_rules_payload.ts @@ -5,6 +5,7 @@ * 2.0. */ import { pickBy } from 'lodash'; +import { withSecuritySpanSync } from '../../../../../utils/with_security_span'; import type { PromisePoolError } from '../../../../../utils/promise_pool'; import { PickVersionValuesEnum, @@ -36,77 +37,82 @@ export const createModifiedPrebuiltRuleAssets = ({ upgradeableRules, requestBody, }: CreateModifiedPrebuiltRuleAssetsProps) => { - const { pick_version: globalPickVersion = PickVersionValuesEnum.MERGED, mode } = requestBody; - - const { modifiedPrebuiltRuleAssets, processingErrors } = upgradeableRules.reduce( - (processedRules, upgradeableRule) => { - const targetRuleType = upgradeableRule.target.type; - const ruleId = upgradeableRule.target.rule_id; - const fieldNames = FIELD_NAMES_BY_RULE_TYPE_MAP.get(targetRuleType); - - try { - if (fieldNames === undefined) { - throw new Error(`Unexpected rule type: ${targetRuleType}`); - } - - const { current, target } = upgradeableRule; - if (current.type !== target.type) { - assertPickVersionIsTarget({ ruleId, requestBody }); - } - - const calculatedRuleDiff = calculateRuleFieldsDiff({ - base_version: upgradeableRule.base - ? convertRuleToDiffable(convertPrebuiltRuleAssetToRuleResponse(upgradeableRule.base)) - : MissingVersion, - current_version: convertRuleToDiffable(upgradeableRule.current), - target_version: convertRuleToDiffable( - convertPrebuiltRuleAssetToRuleResponse(upgradeableRule.target) - ), - }) as AllFieldsDiff; - - if (mode === 'ALL_RULES' && globalPickVersion === 'MERGED') { - const fieldsWithConflicts = Object.keys(getFieldsDiffConflicts(calculatedRuleDiff)); - if (fieldsWithConflicts.length > 0) { - // If the mode is ALL_RULES, no fields can be overriden to any other pick_version - // than "MERGED", so throw an error for the fields that have conflicts. - throw new Error( - `Merge conflicts found in rule '${ruleId}' for fields: ${fieldsWithConflicts.join( - ', ' - )}. Please resolve the conflict manually or choose another value for 'pick_version'` - ); + return withSecuritySpanSync(createModifiedPrebuiltRuleAssets.name, () => { + const { pick_version: globalPickVersion = PickVersionValuesEnum.MERGED, mode } = requestBody; + + const { modifiedPrebuiltRuleAssets, processingErrors } = + upgradeableRules.reduce( + (processedRules, upgradeableRule) => { + const targetRuleType = upgradeableRule.target.type; + const ruleId = upgradeableRule.target.rule_id; + const fieldNames = FIELD_NAMES_BY_RULE_TYPE_MAP.get(targetRuleType); + + try { + if (fieldNames === undefined) { + throw new Error(`Unexpected rule type: ${targetRuleType}`); + } + + const { current, target } = upgradeableRule; + if (current.type !== target.type) { + assertPickVersionIsTarget({ ruleId, requestBody }); + } + + const calculatedRuleDiff = calculateRuleFieldsDiff({ + base_version: upgradeableRule.base + ? convertRuleToDiffable( + convertPrebuiltRuleAssetToRuleResponse(upgradeableRule.base) + ) + : MissingVersion, + current_version: convertRuleToDiffable(upgradeableRule.current), + target_version: convertRuleToDiffable( + convertPrebuiltRuleAssetToRuleResponse(upgradeableRule.target) + ), + }) as AllFieldsDiff; + + if (mode === 'ALL_RULES' && globalPickVersion === 'MERGED') { + const fieldsWithConflicts = Object.keys(getFieldsDiffConflicts(calculatedRuleDiff)); + if (fieldsWithConflicts.length > 0) { + // If the mode is ALL_RULES, no fields can be overriden to any other pick_version + // than "MERGED", so throw an error for the fields that have conflicts. + throw new Error( + `Merge conflicts found in rule '${ruleId}' for fields: ${fieldsWithConflicts.join( + ', ' + )}. Please resolve the conflict manually or choose another value for 'pick_version'` + ); + } + } + + const modifiedPrebuiltRuleAsset = createModifiedPrebuiltRuleAsset({ + upgradeableRule, + fieldNames, + requestBody, + globalPickVersion, + calculatedRuleDiff, + }); + + processedRules.modifiedPrebuiltRuleAssets.push(modifiedPrebuiltRuleAsset); + + return processedRules; + } catch (err) { + processedRules.processingErrors.push({ + error: err, + item: { rule_id: ruleId }, + }); + + return processedRules; } + }, + { + modifiedPrebuiltRuleAssets: [], + processingErrors: [], } + ); - const modifiedPrebuiltRuleAsset = createModifiedPrebuiltRuleAsset({ - upgradeableRule, - fieldNames, - requestBody, - globalPickVersion, - calculatedRuleDiff, - }); - - processedRules.modifiedPrebuiltRuleAssets.push(modifiedPrebuiltRuleAsset); - - return processedRules; - } catch (err) { - processedRules.processingErrors.push({ - error: err, - item: { rule_id: ruleId }, - }); - - return processedRules; - } - }, - { - modifiedPrebuiltRuleAssets: [], - processingErrors: [], - } - ); - - return { - modifiedPrebuiltRuleAssets, - processingErrors, - }; + return { + modifiedPrebuiltRuleAssets, + processingErrors, + }; + }); }; interface CreateModifiedPrebuiltRuleAssetParams { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/get_upgradeable_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/get_upgradeable_rules.ts index acfdb674c309a..750561b9858a9 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/get_upgradeable_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/api/perform_rule_upgrade/get_upgradeable_rules.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { withSecuritySpanSync } from '../../../../../utils/with_security_span'; import type { RuleResponse, RuleUpgradeSpecifier, @@ -26,58 +26,60 @@ export const getUpgradeableRules = ({ versionSpecifiers?: RuleUpgradeSpecifier[]; mode: Mode; }) => { - const upgradeableRules = new Map( - rawUpgradeableRules.map((_rule) => [_rule.current.rule_id, _rule]) - ); - const fetchErrors: Array> = []; - const skippedRules: SkippedRuleUpgrade[] = []; + return withSecuritySpanSync(getUpgradeableRules.name, () => { + const upgradeableRules = new Map( + rawUpgradeableRules.map((_rule) => [_rule.current.rule_id, _rule]) + ); + const fetchErrors: Array> = []; + const skippedRules: SkippedRuleUpgrade[] = []; - if (mode === ModeEnum.SPECIFIC_RULES) { - const installedRuleIds = new Set(currentRules.map((rule) => rule.rule_id)); - const upgradeableRuleIds = new Set(rawUpgradeableRules.map(({ current }) => current.rule_id)); - versionSpecifiers?.forEach((rule) => { - // Check that the requested rule was found - if (!installedRuleIds.has(rule.rule_id)) { - fetchErrors.push({ - error: new Error( - `Rule with rule_id "${rule.rule_id}" and version "${rule.version}" not found` - ), - item: rule, - }); - return; - } + if (mode === ModeEnum.SPECIFIC_RULES) { + const installedRuleIds = new Set(currentRules.map((rule) => rule.rule_id)); + const upgradeableRuleIds = new Set(rawUpgradeableRules.map(({ current }) => current.rule_id)); + versionSpecifiers?.forEach((rule) => { + // Check that the requested rule was found + if (!installedRuleIds.has(rule.rule_id)) { + fetchErrors.push({ + error: new Error( + `Rule with rule_id "${rule.rule_id}" and version "${rule.version}" not found` + ), + item: rule, + }); + return; + } - // Check that the requested rule is upgradeable - if (!upgradeableRuleIds.has(rule.rule_id)) { - skippedRules.push({ - rule_id: rule.rule_id, - reason: SkipRuleUpgradeReasonEnum.RULE_UP_TO_DATE, - }); - return; - } + // Check that the requested rule is upgradeable + if (!upgradeableRuleIds.has(rule.rule_id)) { + skippedRules.push({ + rule_id: rule.rule_id, + reason: SkipRuleUpgradeReasonEnum.RULE_UP_TO_DATE, + }); + return; + } - // Check that rule revisions match (no update slipped in since the user reviewed the list) - const currentRevision = currentRules.find( - (currentRule) => currentRule.rule_id === rule.rule_id - )?.revision; - if (rule.revision !== currentRevision) { - fetchErrors.push({ - error: new Error( - `Revision mismatch for rule_id ${rule.rule_id}: expected ${currentRevision}, got ${rule.revision}` - ), - item: rule, - }); - // Remove the rule from the list of upgradeable rules - if (upgradeableRules.has(rule.rule_id)) { - upgradeableRules.delete(rule.rule_id); + // Check that rule revisions match (no update slipped in since the user reviewed the list) + const currentRevision = currentRules.find( + (currentRule) => currentRule.rule_id === rule.rule_id + )?.revision; + if (rule.revision !== currentRevision) { + fetchErrors.push({ + error: new Error( + `Revision mismatch for rule_id ${rule.rule_id}: expected ${currentRevision}, got ${rule.revision}` + ), + item: rule, + }); + // Remove the rule from the list of upgradeable rules + if (upgradeableRules.has(rule.rule_id)) { + upgradeableRules.delete(rule.rule_id); + } } - } - }); - } + }); + } - return { - upgradeableRules: Array.from(upgradeableRules.values()), - fetchErrors, - skippedRules, - }; + return { + upgradeableRules: Array.from(upgradeableRules.values()), + fetchErrors, + skippedRules, + }; + }); }; diff --git a/x-pack/plugins/security_solution/server/utils/with_security_span.ts b/x-pack/plugins/security_solution/server/utils/with_security_span.ts index 58787dc45d09b..f9f78600cfb8d 100644 --- a/x-pack/plugins/security_solution/server/utils/with_security_span.ts +++ b/x-pack/plugins/security_solution/server/utils/with_security_span.ts @@ -6,7 +6,7 @@ */ import type { SpanOptions } from '@kbn/apm-utils'; import { withSpan } from '@kbn/apm-utils'; -import type agent from 'elastic-apm-node'; +import agent from 'elastic-apm-node'; import { APP_ID } from '../../common/constants'; type Span = Exclude; @@ -35,3 +35,16 @@ export const withSecuritySpan = ( }, cb ); + +export const withSecuritySpanSync = (name: string, fn: (span: Span | null) => T): T => { + const span = agent.startSpan(name, APP_ID); + + try { + const result = fn(span); + return result; + } finally { + if (span) { + span.end(); + } + } +}; From ce9f6222d8a3408bf72e8e3118d0e98be166657b Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Wed, 6 Nov 2024 08:01:46 -0500 Subject: [PATCH 06/16] [Fleet] remove deprecated settings API endpoints (#198799) --- oas_docs/bundle.json | 243 +----------------- oas_docs/bundle.serverless.json | 243 +----------------- oas_docs/output/kibana.serverless.yaml | 172 ------------- oas_docs/output/kibana.yaml | 172 ------------- .../plugins/fleet/common/constants/routes.ts | 5 - .../fleet/common/types/models/settings.ts | 1 - .../types/rest_spec/enrollment_api_key.ts | 5 +- .../common/types/rest_spec/health_check.ts | 4 - .../epm/screens/detail/index.test.tsx | 8 +- .../use_create_azure_arm_template_url.ts | 7 +- .../hooks/use_create_cloud_shell_url.ts | 6 +- .../routes/enrollment_api_key/handler.ts | 1 - .../server/routes/enrollment_api_key/index.ts | 73 +----- .../routes/health_check/handler.test.ts | 16 -- .../server/routes/health_check/handler.ts | 11 +- .../routes/settings/settings_handler.test.ts | 2 - .../fleet/server/services/settings.test.ts | 4 +- .../plugins/fleet/server/services/settings.ts | 11 +- .../server/types/rest_spec/health_check.ts | 9 - .../fleet/server/types/rest_spec/settings.ts | 10 - .../apis/enrollment_api_keys/crud.ts | 27 -- .../apis/fleet_telemetry.ts | 2 +- .../apis/settings/get.ts | 26 +- .../apis/settings/index.js | 1 - .../apis/settings/update.ts | 135 ---------- 25 files changed, 24 insertions(+), 1170 deletions(-) delete mode 100644 x-pack/test/fleet_api_integration/apis/settings/update.ts diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index 743d6ae6e422a..d378331392dc0 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -16887,176 +16887,6 @@ ] } }, - "/api/fleet/enrollment-api-keys": { - "get": { - "operationId": "get-fleet-enrollment-api-keys-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "default": 1, - "type": "number" - } - }, - { - "in": "query", - "name": "perPage", - "required": false, - "schema": { - "default": 20, - "type": "number" - } - }, - { - "in": "query", - "name": "kuery", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-enrollment-api-keys-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "expiration": { - "type": "string" - }, - "name": { - "type": "string" - }, - "policy_id": { - "type": "string" - } - }, - "required": [ - "policy_id" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, - "/api/fleet/enrollment-api-keys/{keyId}": { - "delete": { - "operationId": "delete-fleet-enrollment-api-keys-keyid-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "keyId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-enrollment-api-keys-keyid-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "keyId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/enrollment_api_keys": { "get": { "description": "List enrollment API keys", @@ -17150,49 +16980,6 @@ }, "type": "array" }, - "list": { - "deprecated": true, - "items": { - "additionalProperties": false, - "properties": { - "active": { - "description": "When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.", - "type": "boolean" - }, - "api_key": { - "description": "The enrollment API key (token) used for enrolling Elastic Agents.", - "type": "string" - }, - "api_key_id": { - "description": "The ID of the API key in the Security API.", - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "description": "The name of the enrollment API key.", - "type": "string" - }, - "policy_id": { - "description": "The ID of the agent policy the Elastic Agent will be enrolled in.", - "type": "string" - } - }, - "required": [ - "id", - "api_key_id", - "api_key", - "active", - "created_at" - ], - "type": "object" - }, - "type": "array" - }, "page": { "type": "number" }, @@ -17207,8 +16994,7 @@ "items", "total", "page", - "perPage", - "list" + "perPage" ], "type": "object" } @@ -24920,10 +24706,6 @@ "schema": { "additionalProperties": false, "properties": { - "host": { - "format": "uri", - "type": "string" - }, "id": { "type": "string" } @@ -24943,10 +24725,6 @@ "schema": { "additionalProperties": false, "properties": { - "host": { - "deprecated": true, - "type": "string" - }, "host_id": { "type": "string" }, @@ -39316,12 +39094,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, @@ -39476,13 +39248,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "format": "uri", - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, @@ -39531,12 +39296,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index f171dadde991a..972712045a1c6 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -16887,176 +16887,6 @@ ] } }, - "/api/fleet/enrollment-api-keys": { - "get": { - "operationId": "get-fleet-enrollment-api-keys-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "default": 1, - "type": "number" - } - }, - { - "in": "query", - "name": "perPage", - "required": false, - "schema": { - "default": 20, - "type": "number" - } - }, - { - "in": "query", - "name": "kuery", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-enrollment-api-keys-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "expiration": { - "type": "string" - }, - "name": { - "type": "string" - }, - "policy_id": { - "type": "string" - } - }, - "required": [ - "policy_id" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, - "/api/fleet/enrollment-api-keys/{keyId}": { - "delete": { - "operationId": "delete-fleet-enrollment-api-keys-keyid-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "keyId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-enrollment-api-keys-keyid-2", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "keyId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/enrollment_api_keys": { "get": { "description": "List enrollment API keys", @@ -17150,49 +16980,6 @@ }, "type": "array" }, - "list": { - "deprecated": true, - "items": { - "additionalProperties": false, - "properties": { - "active": { - "description": "When false, the enrollment API key is revoked and cannot be used for enrolling Elastic Agents.", - "type": "boolean" - }, - "api_key": { - "description": "The enrollment API key (token) used for enrolling Elastic Agents.", - "type": "string" - }, - "api_key_id": { - "description": "The ID of the API key in the Security API.", - "type": "string" - }, - "created_at": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "description": "The name of the enrollment API key.", - "type": "string" - }, - "policy_id": { - "description": "The ID of the agent policy the Elastic Agent will be enrolled in.", - "type": "string" - } - }, - "required": [ - "id", - "api_key_id", - "api_key", - "active", - "created_at" - ], - "type": "object" - }, - "type": "array" - }, "page": { "type": "number" }, @@ -17207,8 +16994,7 @@ "items", "total", "page", - "perPage", - "list" + "perPage" ], "type": "object" } @@ -24920,10 +24706,6 @@ "schema": { "additionalProperties": false, "properties": { - "host": { - "format": "uri", - "type": "string" - }, "id": { "type": "string" } @@ -24943,10 +24725,6 @@ "schema": { "additionalProperties": false, "properties": { - "host": { - "deprecated": true, - "type": "string" - }, "host_id": { "type": "string" }, @@ -39316,12 +39094,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, @@ -39476,13 +39248,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "format": "uri", - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, @@ -39531,12 +39296,6 @@ ], "type": "object" }, - "fleet_server_hosts": { - "items": { - "type": "string" - }, - "type": "array" - }, "has_seen_add_data_notice": { "type": "boolean" }, diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index afb7d8bbd5f4d..a1cc60cbe7bd0 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -17841,44 +17841,6 @@ paths: - active - created_at type: array - list: - deprecated: true - items: - additionalProperties: false - type: object - properties: - active: - description: >- - When false, the enrollment API key is revoked and - cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: >- - The enrollment API key (token) used for enrolling - Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: >- - The ID of the agent policy the Elastic Agent will be - enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - type: array page: type: number perPage: @@ -17890,7 +17852,6 @@ paths: - total - page - perPage - - list '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -18152,120 +18113,6 @@ paths: summary: '' tags: - Fleet enrollment API keys - /api/fleet/enrollment-api-keys: - get: - operationId: get-fleet-enrollment-api-keys-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: query - name: page - required: false - schema: - default: 1 - type: number - - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - in: query - name: kuery - required: false - schema: - type: string - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-enrollment-api-keys-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - expiration: - type: string - name: - type: string - policy_id: - type: string - required: - - policy_id - responses: {} - summary: '' - tags: [] - /api/fleet/enrollment-api-keys/{keyId}: - delete: - operationId: delete-fleet-enrollment-api-keys-keyid-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: keyId - required: true - schema: - type: string - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-enrollment-api-keys-keyid-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: keyId - required: true - schema: - type: string - responses: {} - summary: '' - tags: [] /api/fleet/epm/bulk_assets: post: description: Bulk get assets @@ -23280,9 +23127,6 @@ paths: additionalProperties: false type: object properties: - host: - format: uri - type: string id: type: string required: @@ -23295,9 +23139,6 @@ paths: additionalProperties: false type: object properties: - host: - deprecated: true - type: string host_id: type: string name: @@ -33088,10 +32929,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - type: string - type: array has_seen_add_data_notice: type: boolean id: @@ -33191,11 +33028,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - format: uri - type: string - type: array has_seen_add_data_notice: type: boolean kibana_ca_sha256: @@ -33230,10 +33062,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - type: string - type: array has_seen_add_data_notice: type: boolean id: diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 6122607df925f..0dd1586ef8b37 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -21274,44 +21274,6 @@ paths: - active - created_at type: array - list: - deprecated: true - items: - additionalProperties: false - type: object - properties: - active: - description: >- - When false, the enrollment API key is revoked and - cannot be used for enrolling Elastic Agents. - type: boolean - api_key: - description: >- - The enrollment API key (token) used for enrolling - Elastic Agents. - type: string - api_key_id: - description: The ID of the API key in the Security API. - type: string - created_at: - type: string - id: - type: string - name: - description: The name of the enrollment API key. - type: string - policy_id: - description: >- - The ID of the agent policy the Elastic Agent will be - enrolled in. - type: string - required: - - id - - api_key_id - - api_key - - active - - created_at - type: array page: type: number perPage: @@ -21323,7 +21285,6 @@ paths: - total - page - perPage - - list '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -21585,120 +21546,6 @@ paths: summary: '' tags: - Fleet enrollment API keys - /api/fleet/enrollment-api-keys: - get: - operationId: get-fleet-enrollment-api-keys-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: query - name: page - required: false - schema: - default: 1 - type: number - - in: query - name: perPage - required: false - schema: - default: 20 - type: number - - in: query - name: kuery - required: false - schema: - type: string - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-enrollment-api-keys-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - expiration: - type: string - name: - type: string - policy_id: - type: string - required: - - policy_id - responses: {} - summary: '' - tags: [] - /api/fleet/enrollment-api-keys/{keyId}: - delete: - operationId: delete-fleet-enrollment-api-keys-keyid-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: keyId - required: true - schema: - type: string - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-enrollment-api-keys-keyid-2 - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: keyId - required: true - schema: - type: string - responses: {} - summary: '' - tags: [] /api/fleet/epm/bulk_assets: post: description: Bulk get assets @@ -26713,9 +26560,6 @@ paths: additionalProperties: false type: object properties: - host: - format: uri - type: string id: type: string required: @@ -26728,9 +26572,6 @@ paths: additionalProperties: false type: object properties: - host: - deprecated: true - type: string host_id: type: string name: @@ -36521,10 +36362,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - type: string - type: array has_seen_add_data_notice: type: boolean id: @@ -36624,11 +36461,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - format: uri - type: string - type: array has_seen_add_data_notice: type: boolean kibana_ca_sha256: @@ -36663,10 +36495,6 @@ paths: required: - enabled - is_preconfigured - fleet_server_hosts: - items: - type: string - type: array has_seen_add_data_notice: type: boolean id: diff --git a/x-pack/plugins/fleet/common/constants/routes.ts b/x-pack/plugins/fleet/common/constants/routes.ts index 61d50d0f9e073..4b40b4fb51092 100644 --- a/x-pack/plugins/fleet/common/constants/routes.ts +++ b/x-pack/plugins/fleet/common/constants/routes.ts @@ -171,11 +171,6 @@ export const ENROLLMENT_API_KEY_ROUTES = { LIST_PATTERN: `${API_ROOT}/enrollment_api_keys`, INFO_PATTERN: `${API_ROOT}/enrollment_api_keys/{keyId}`, DELETE_PATTERN: `${API_ROOT}/enrollment_api_keys/{keyId}`, - // deprecated since 8.0 - CREATE_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys`, - LIST_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys`, - INFO_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys/{keyId}`, - DELETE_PATTERN_DEPRECATED: `${API_ROOT}/enrollment-api-keys/{keyId}`, }; export const UNINSTALL_TOKEN_ROUTES = { diff --git a/x-pack/plugins/fleet/common/types/models/settings.ts b/x-pack/plugins/fleet/common/types/models/settings.ts index a63211ef14c55..15b74645b16b3 100644 --- a/x-pack/plugins/fleet/common/types/models/settings.ts +++ b/x-pack/plugins/fleet/common/types/models/settings.ts @@ -7,7 +7,6 @@ export interface BaseSettings { has_seen_add_data_notice?: boolean; - fleet_server_hosts?: string[]; prerelease_integrations_enabled?: boolean; } diff --git a/x-pack/plugins/fleet/common/types/rest_spec/enrollment_api_key.ts b/x-pack/plugins/fleet/common/types/rest_spec/enrollment_api_key.ts index 7fa724e5079c8..e1509d551bdef 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/enrollment_api_key.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/enrollment_api_key.ts @@ -13,10 +13,7 @@ export interface GetEnrollmentAPIKeysRequest { query: ListWithKuery; } -export type GetEnrollmentAPIKeysResponse = ListResult & { - // deprecated in 8.x - list?: EnrollmentAPIKey[]; -}; +export type GetEnrollmentAPIKeysResponse = ListResult; export interface GetOneEnrollmentAPIKeyRequest { params: { diff --git a/x-pack/plugins/fleet/common/types/rest_spec/health_check.ts b/x-pack/plugins/fleet/common/types/rest_spec/health_check.ts index 4b25d958d21ad..5554dde4e2484 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/health_check.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/health_check.ts @@ -8,14 +8,10 @@ export interface PostHealthCheckRequest { body: { id: string; - /** @deprecated use id field instead */ - host?: string; }; } export interface PostHealthCheckResponse { host_id: string; - // deprecated - host?: string; status: string; } diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx index 3cd1a310208bf..6c9be4796f205 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/index.test.tsx @@ -106,7 +106,7 @@ describe('When on integration detail', () => { describe('and the package is not installed and prerelease enabled', () => { beforeEach(async () => { mockedApi.responseProvider.getSettings.mockReturnValue({ - item: { prerelease_integrations_enabled: true, id: '', fleet_server_hosts: [] }, + item: { prerelease_integrations_enabled: true, id: '' }, }); mockGAAndPrereleaseVersions('1.0.0-beta'); await render(); @@ -145,7 +145,7 @@ describe('When on integration detail', () => { beforeEach(async () => { mockGAAndPrereleaseVersions('1.0.0'); mockedApi.responseProvider.getSettings.mockReturnValue({ - item: { prerelease_integrations_enabled: false, id: '', fleet_server_hosts: [] }, + item: { prerelease_integrations_enabled: false, id: '' }, }); await render(); await act(() => mockedApi.waitForApi()); @@ -172,7 +172,7 @@ describe('When on integration detail', () => { describe('and a custom UI extension is NOT registered', () => { beforeEach(async () => { mockedApi.responseProvider.getSettings.mockReturnValue({ - item: { prerelease_integrations_enabled: false, id: '', fleet_server_hosts: [] }, + item: { prerelease_integrations_enabled: false, id: '' }, }); await render(); await act(() => mockedApi.waitForApi()); @@ -211,7 +211,7 @@ describe('When on integration detail', () => { beforeEach(async () => { let setWasRendered: () => void; mockedApi.responseProvider.getSettings.mockReturnValue({ - item: { prerelease_integrations_enabled: false, id: '', fleet_server_hosts: [] }, + item: { prerelease_integrations_enabled: false, id: '' }, }); lazyComponentWasRendered = new Promise((resolve) => { setWasRendered = resolve; diff --git a/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_azure_arm_template_url.ts b/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_azure_arm_template_url.ts index ea20d14fdb868..47237ac962bfd 100644 --- a/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_azure_arm_template_url.ts +++ b/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_azure_arm_template_url.ts @@ -7,10 +7,9 @@ import { i18n } from '@kbn/i18n'; +import { useGetFleetServerHosts } from '../../../hooks'; import type { AzureArmTemplateProps } from '../../agent_enrollment_flyout/types'; -import { useGetSettings } from '../../../hooks'; - const ARM_TEMPLATE_DEFAULT_ACCOUNT_TYPE = 'single-account'; export const useCreateAzureArmTemplateUrl = ({ @@ -20,13 +19,13 @@ export const useCreateAzureArmTemplateUrl = ({ enrollmentAPIKey: string | undefined; azureArmTemplateProps: AzureArmTemplateProps | undefined; }) => { - const { data, isLoading } = useGetSettings(); + const { data, isLoading } = useGetFleetServerHosts(); let isError = false; let error: string | undefined; // Default fleet server host - const fleetServerHost = data?.item.fleet_server_hosts?.[0]; + const fleetServerHost = data?.items?.find((item) => item.is_default)?.host_urls?.[0]; if (!fleetServerHost && !isLoading) { isError = true; diff --git a/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_cloud_shell_url.ts b/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_cloud_shell_url.ts index f1543e337180b..34ab224b2028c 100644 --- a/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_cloud_shell_url.ts +++ b/x-pack/plugins/fleet/public/components/cloud_security_posture/hooks/use_create_cloud_shell_url.ts @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n'; import type { PackagePolicy } from '../../../../common'; -import { useGetSettings } from '../../../hooks'; +import { useGetFleetServerHosts } from '../../../hooks'; import { getCloudShellUrlFromPackagePolicy } from '../services'; @@ -20,13 +20,13 @@ export const useCreateCloudShellUrl = ({ enrollmentAPIKey: string | undefined; packagePolicy?: PackagePolicy; }) => { - const { data, isLoading } = useGetSettings(); + const { data, isLoading } = useGetFleetServerHosts(); let isError = false; let error: string | undefined; // Default fleet server host - const fleetServerHost = data?.item.fleet_server_hosts?.[0]; + const fleetServerHost = data?.items?.find((item) => item.is_default)?.host_urls?.[0]; if (!fleetServerHost && !isLoading) { isError = true; diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts index a38f5bdadc617..cfce60b0f18f5 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts @@ -43,7 +43,6 @@ export const getEnrollmentApiKeysHandler: RequestHandler< spaceId: useSpaceAwareness ? getCurrentNamespace(soClient) : undefined, }); const body: GetEnrollmentAPIKeysResponse = { - list: items, // deprecated items, total, page, diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts index bcf4448420919..bc6c61dc8ffe4 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/index.ts @@ -109,10 +109,7 @@ export const registerRoutes = (router: FleetAuthzRouter) => { request: GetEnrollmentAPIKeysRequestSchema, response: { 200: { - body: () => - ListResponseSchema(EnrollmentAPIKeySchema).extends({ - list: schema.arrayOf(EnrollmentAPIKeySchema, { meta: { deprecated: true } }), - }), + body: () => ListResponseSchema(EnrollmentAPIKeySchema), }, 400: { body: genericErrorResponse, @@ -154,72 +151,4 @@ export const registerRoutes = (router: FleetAuthzRouter) => { }, postEnrollmentApiKeyHandler ); - - router.versioned - .get({ - path: ENROLLMENT_API_KEY_ROUTES.INFO_PATTERN_DEPRECATED, - fleetAuthz: { - fleet: { readEnrollmentTokens: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: GetOneEnrollmentAPIKeyRequestSchema }, - }, - getOneEnrollmentApiKeyHandler - ); - - router.versioned - .delete({ - path: ENROLLMENT_API_KEY_ROUTES.DELETE_PATTERN_DEPRECATED, - fleetAuthz: { - fleet: { allAgents: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: DeleteEnrollmentAPIKeyRequestSchema }, - }, - deleteEnrollmentApiKeyHandler - ); - - router.versioned - .get({ - path: ENROLLMENT_API_KEY_ROUTES.LIST_PATTERN_DEPRECATED, - fleetAuthz: { - fleet: { readEnrollmentTokens: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: GetEnrollmentAPIKeysRequestSchema }, - }, - getEnrollmentApiKeysHandler - ); - - router.versioned - .post({ - path: ENROLLMENT_API_KEY_ROUTES.CREATE_PATTERN_DEPRECATED, - fleetAuthz: { - fleet: { allAgents: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: PostEnrollmentAPIKeyRequestSchema }, - }, - postEnrollmentApiKeyHandler - ); }; diff --git a/x-pack/plugins/fleet/server/routes/health_check/handler.test.ts b/x-pack/plugins/fleet/server/routes/health_check/handler.test.ts index bb36c2ec8146b..37c204c141a04 100644 --- a/x-pack/plugins/fleet/server/routes/health_check/handler.test.ts +++ b/x-pack/plugins/fleet/server/routes/health_check/handler.test.ts @@ -63,21 +63,6 @@ describe('Fleet server health_check handler', () => { }); }); - it('should return a bad request error if body contains deprecated parameter `host`', async () => { - const res = await postHealthCheckHandler( - mockContext, - { body: { host: 'https://localhost:8220' } } as any, - mockResponse as any - ); - - expect(res).toEqual({ - body: { - message: `Property 'host' is deprecated. Please use id instead.`, - }, - statusCode: 400, - }); - }); - it('should return 200 and active status when fetch response is `active`', async () => { const activeRes = { status: 'ONLINE', @@ -105,7 +90,6 @@ describe('Fleet server health_check handler', () => { ); const expectedResponse = { - host: 'https://localhost:8220', host_id: 'default-fleet-server', name: 'Default', status: 'ONLINE', diff --git a/x-pack/plugins/fleet/server/routes/health_check/handler.ts b/x-pack/plugins/fleet/server/routes/health_check/handler.ts index f191caa3fff1b..16114217bee2b 100644 --- a/x-pack/plugins/fleet/server/routes/health_check/handler.ts +++ b/x-pack/plugins/fleet/server/routes/health_check/handler.ts @@ -20,17 +20,10 @@ export const postHealthCheckHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { const abortController = new AbortController(); - const { id, host: deprecatedField } = request.body; + const { id } = request.body; const coreContext = await context.core; const soClient = coreContext.savedObjects.client; - if (deprecatedField) { - return response.badRequest({ - body: { - message: `Property 'host' is deprecated. Please use id instead.`, - }, - }); - } try { const fleetServerHost = await getFleetServerHost(soClient, id); @@ -61,7 +54,7 @@ export const postHealthCheckHandler: FleetRequestHandler< signal: abortController.signal, }); const bodyRes = await res.json(); - const body = { ...bodyRes, host }; + const body = { ...bodyRes }; return response.ok({ body }); } catch (error) { diff --git a/x-pack/plugins/fleet/server/routes/settings/settings_handler.test.ts b/x-pack/plugins/fleet/server/routes/settings/settings_handler.test.ts index 73641bfaed71a..151a0a2ba2af8 100644 --- a/x-pack/plugins/fleet/server/routes/settings/settings_handler.test.ts +++ b/x-pack/plugins/fleet/server/routes/settings/settings_handler.test.ts @@ -29,7 +29,6 @@ jest.mock('../../services', () => ({ secret_storage_requirements_met: true, output_secret_storage_requirements_met: true, has_seen_add_data_notice: true, - fleet_server_hosts: ['http://localhost:8220'], prerelease_integrations_enabled: true, delete_unenrolled_agents: { enabled: true, @@ -76,7 +75,6 @@ describe('SettingsHandler', () => { secret_storage_requirements_met: true, output_secret_storage_requirements_met: true, has_seen_add_data_notice: true, - fleet_server_hosts: ['http://localhost:8220'], prerelease_integrations_enabled: true, delete_unenrolled_agents: { enabled: true, diff --git a/x-pack/plugins/fleet/server/services/settings.test.ts b/x-pack/plugins/fleet/server/services/settings.test.ts index 92fb85a335775..f88e735dfcb69 100644 --- a/x-pack/plugins/fleet/server/services/settings.test.ts +++ b/x-pack/plugins/fleet/server/services/settings.test.ts @@ -151,7 +151,7 @@ describe('saveSettings', () => { const soClient = savedObjectsClientMock.create(); const newData: Partial> = { - fleet_server_hosts: ['http://localhost:8220'], + output_secret_storage_requirements_met: true, }; soClient.find.mockResolvedValueOnce({ @@ -205,7 +205,7 @@ describe('saveSettings', () => { const soClient = savedObjectsClientMock.create(); const newData: Partial> = { - fleet_server_hosts: ['http://localhost:8220'], + output_secret_storage_requirements_met: true, }; soClient.find.mockRejectedValueOnce(Boom.notFound('not found')); diff --git a/x-pack/plugins/fleet/server/services/settings.ts b/x-pack/plugins/fleet/server/services/settings.ts index 5f7433403c4e6..3288ec1090e41 100644 --- a/x-pack/plugins/fleet/server/services/settings.ts +++ b/x-pack/plugins/fleet/server/services/settings.ts @@ -7,8 +7,8 @@ import Boom from '@hapi/boom'; import type { SavedObjectsClientContract, SavedObjectsUpdateOptions } from '@kbn/core/server'; +import { omit } from 'lodash'; -import { normalizeHostsForAgents } from '../../common/services'; import { GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, GLOBAL_SETTINGS_ID } from '../../common/constants'; import type { Settings, BaseSettings } from '../../common/types'; import type { SettingsSOAttributes } from '../types'; @@ -16,7 +16,6 @@ import type { SettingsSOAttributes } from '../types'; import { DeleteUnenrolledAgentsPreconfiguredError } from '../errors'; import { appContextService } from './app_context'; -import { listFleetServerHosts } from './fleet_server_host'; import { auditLoggingService } from './audit_logging'; export async function getSettings(soClient: SavedObjectsClientContract): Promise { @@ -33,7 +32,6 @@ export async function getSettings(soClient: SavedObjectsClientContract): Promise throw Boom.notFound('Global settings not found'); } const settingsSo = res.saved_objects[0]; - const fleetServerHosts = await listFleetServerHosts(soClient); return { id: settingsSo.id, @@ -47,7 +45,6 @@ export async function getSettings(soClient: SavedObjectsClientContract): Promise settingsSo.attributes.use_space_awareness_migration_status, use_space_awareness_migration_started_at: settingsSo.attributes.use_space_awareness_migration_started_at, - fleet_server_hosts: fleetServerHosts.items.flatMap((item) => item.host_urls), preconfigured_fields: getConfigFleetServerHosts() ? ['fleet_server_hosts'] : [], delete_unenrolled_agents: settingsSo.attributes.delete_unenrolled_agents, }; @@ -88,10 +85,8 @@ export async function saveSettings( fromSetup?: boolean; } ): Promise & Pick> { - const data = { ...newData }; - if (data.fleet_server_hosts) { - data.fleet_server_hosts = data.fleet_server_hosts.map(normalizeHostsForAgents); - } + const data = omit({ ...newData }, 'fleet_server_hosts'); + const { createWithOverwrite, ...updateOptions } = options ?? {}; try { diff --git a/x-pack/plugins/fleet/server/types/rest_spec/health_check.ts b/x-pack/plugins/fleet/server/types/rest_spec/health_check.ts index 72c40e5bd6a68..c83d516c67f5a 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/health_check.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/health_check.ts @@ -10,20 +10,11 @@ import { schema } from '@kbn/config-schema'; export const PostHealthCheckRequestSchema = { body: schema.object({ id: schema.string(), - // deprecated - host: schema.maybe(schema.uri({ scheme: ['http', 'https'] })), }), }; export const PostHealthCheckResponseSchema = schema.object({ status: schema.string(), name: schema.maybe(schema.string()), - host: schema.maybe( - schema.string({ - meta: { - deprecated: true, - }, - }) - ), host_id: schema.maybe(schema.string()), }); diff --git a/x-pack/plugins/fleet/server/types/rest_spec/settings.ts b/x-pack/plugins/fleet/server/types/rest_spec/settings.ts index 459070fa9591a..c40dcc0b63596 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/settings.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/settings.ts @@ -17,15 +17,6 @@ export const GetSettingsRequestSchema = {}; export const PutSettingsRequestSchema = { body: schema.object({ - fleet_server_hosts: schema.maybe( - schema.arrayOf(schema.uri({ scheme: ['http', 'https'] }), { - validate: (value) => { - if (value.length && isDiffPathProtocol(value)) { - return 'Protocol and path must be the same for each URL'; - } - }, - }) - ), has_seen_add_data_notice: schema.maybe(schema.boolean()), additional_yaml_config: schema.maybe(schema.string()), // Deprecated not used @@ -61,7 +52,6 @@ export const SpaceSettingsResponseSchema = schema.object({ export const SettingsResponseSchema = schema.object({ item: schema.object({ has_seen_add_data_notice: schema.maybe(schema.boolean()), - fleet_server_hosts: schema.maybe(schema.arrayOf(schema.string())), prerelease_integrations_enabled: schema.maybe(schema.boolean()), id: schema.string(), version: schema.maybe(schema.string()), diff --git a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts b/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts index 9cb11df2b34de..24d1520d8d6f8 100644 --- a/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts +++ b/x-pack/test/fleet_api_integration/apis/enrollment_api_keys/crud.ts @@ -285,32 +285,5 @@ export default function (providerContext: FtrProviderContext) { }); }); }); - - describe('deprecated API', () => { - let keyId: string; - before(async () => { - const { body: apiResponse } = await supertest - .post(`/api/fleet/enrollment-api-keys`) - .set('kbn-xsrf', 'xxx') - .send({ - policy_id: 'policy1', - }) - .expect(200); - keyId = apiResponse.item.id; - }); - - it('should get and delete with deprecated API', async () => { - await supertest.get(`/api/fleet/enrollment-api-keys`).set('kbn-xsrf', 'xxx').expect(200); - await supertest - .get(`/api/fleet/enrollment-api-keys/${ENROLLMENT_KEY_ID}`) - .set('kbn-xsrf', 'xxx') - .expect(200); - - await supertest - .delete(`/api/fleet/enrollment-api-keys/${keyId}`) - .set('kbn-xsrf', 'xxx') - .expect(200); - }); - }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts b/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts index 474d777fcd906..5afd57dbe1531 100644 --- a/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts +++ b/x-pack/test/fleet_api_integration/apis/fleet_telemetry.ts @@ -144,7 +144,7 @@ export default function (providerContext: FtrProviderContext) { if (_attemptsMade >= attempts) { throw new Error( `Agents not loaded correctly, failing test. All agents: \n: ${JSON.stringify( - apiResponse.list, + apiResponse.items, null, 2 )}` diff --git a/x-pack/test/fleet_api_integration/apis/settings/get.ts b/x-pack/test/fleet_api_integration/apis/settings/get.ts index e035dbc580e72..2a453a40db2cd 100644 --- a/x-pack/test/fleet_api_integration/apis/settings/get.ts +++ b/x-pack/test/fleet_api_integration/apis/settings/get.ts @@ -5,7 +5,6 @@ * 2.0. */ -import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; @@ -28,29 +27,8 @@ export default function (providerContext: FtrProviderContext) { await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); }); - it('should respond with fleet_server_hosts', async function () { - // Create a fleet server host - await supertest - .post(`/api/fleet/fleet_server_hosts`) - .set('kbn-xsrf', 'xxxx') - .send({ - id: 'test-default-123', - name: 'Default', - is_default: true, - host_urls: ['https://test.com:8080', 'https://test.com:8081'], - }) - .expect(200); - - // Assert that the hosts appear in the setting response - const response = await supertest - .get(`/api/fleet/settings`) - .set('kbn-xsrf', 'xxxx') - .expect(200); - - expect(response.body.item.fleet_server_hosts).to.eql([ - 'https://test.com:8080', - 'https://test.com:8081', - ]); + it('should respond return settings', async function () { + await supertest.get(`/api/fleet/settings`).set('kbn-xsrf', 'xxxx').expect(200); }); }); } diff --git a/x-pack/test/fleet_api_integration/apis/settings/index.js b/x-pack/test/fleet_api_integration/apis/settings/index.js index e74a278f61ad8..b7a51abf746f7 100644 --- a/x-pack/test/fleet_api_integration/apis/settings/index.js +++ b/x-pack/test/fleet_api_integration/apis/settings/index.js @@ -8,7 +8,6 @@ export default function loadTests({ loadTestFile }) { describe('Settings Endpoints', () => { loadTestFile(require.resolve('./get')); - loadTestFile(require.resolve('./update')); loadTestFile(require.resolve('./enrollment')); loadTestFile(require.resolve('./enrollment_privileges')); }); diff --git a/x-pack/test/fleet_api_integration/apis/settings/update.ts b/x-pack/test/fleet_api_integration/apis/settings/update.ts deleted file mode 100644 index b4abd6414c865..0000000000000 --- a/x-pack/test/fleet_api_integration/apis/settings/update.ts +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import expect from '@kbn/expect'; -import { AGENT_POLICY_INDEX } from '@kbn/fleet-plugin/common'; -import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; -import { skipIfNoDockerRegistry } from '../../helpers'; - -export default function (providerContext: FtrProviderContext) { - const { getService } = providerContext; - const supertest = getService('supertest'); - const kibanaServer = getService('kibanaServer'); - const esClient = getService('es'); - const esArchiver = getService('esArchiver'); - const fleetAndAgents = getService('fleetAndAgents'); - - // Skipped as the Fleet Server hosts settings values are no longer used as of https://github.com/elastic/kibana/issues/137785 - describe.skip('Settings - update', function () { - skipIfNoDockerRegistry(providerContext); - before(async () => { - await esArchiver.load('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); - await fleetAndAgents.setup(); - }); - - const createdAgentPolicyIds: string[] = []; - after(async () => { - const deletedPromises = createdAgentPolicyIds.map((agentPolicyId) => - supertest - .post(`/api/fleet/agent_policies/delete`) - .set('kbn-xsrf', 'xxxx') - .send({ agentPolicyId }) - ); - await Promise.all(deletedPromises); - await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server'); - }); - - it('should explicitly set port on fleet_server_hosts', async function () { - await supertest - .put(`/api/fleet/settings`) - .set('kbn-xsrf', 'xxxx') - .send({ fleet_server_hosts: ['https://test.fr'] }) - .expect(200); - - const { body: getSettingsRes } = await supertest.get(`/api/fleet/settings`).expect(200); - expect(getSettingsRes.item.fleet_server_hosts).to.eql(['https://test.fr:443']); - }); - - it("should bump all agent policy's revision", async function () { - const { body: testPolicy1PostRes } = await supertest - .post(`/api/fleet/agent_policies`) - .set('kbn-xsrf', 'xxxx') - .send({ - name: 'test 1', - description: '', - namespace: 'default', - }); - createdAgentPolicyIds.push(testPolicy1PostRes.item.id); - - const { body: testPolicy2PostRes } = await supertest - .post(`/api/fleet/agent_policies`) - .set('kbn-xsrf', 'xxxx') - .send({ - name: 'test2', - description: '', - namespace: 'default', - }); - createdAgentPolicyIds.push(testPolicy2PostRes.item.id); - - await supertest - .put(`/api/fleet/settings`) - .set('kbn-xsrf', 'xxxx') - .send({ fleet_server_hosts: ['http://localhost:1232/abc', 'http://localhost:1232/abc'] }) - .expect(200); - - const getTestPolicy1Res = await kibanaServer.savedObjects.get({ - type: 'ingest-agent-policies', - id: testPolicy1PostRes.item.id, - }); - const getTestPolicy2Res = await kibanaServer.savedObjects.get({ - type: 'ingest-agent-policies', - id: testPolicy2PostRes.item.id, - }); - expect(getTestPolicy1Res.attributes.revision).equal(2); - expect(getTestPolicy2Res.attributes.revision).equal(2); - }); - - it('should create agent actions', async function () { - const { body: testPolicyRes } = await supertest - .post(`/api/fleet/agent_policies`) - .set('kbn-xsrf', 'xxxx') - .send({ - name: 'test', - description: '', - namespace: 'default', - }); - createdAgentPolicyIds.push(testPolicyRes.item.id); - - const beforeRes = await esClient.search({ - index: AGENT_POLICY_INDEX, - ignore_unavailable: true, - body: { - query: { - term: { - policy_id: testPolicyRes.item.id, - }, - }, - }, - }); - - await supertest - .put(`/api/fleet/settings`) - .set('kbn-xsrf', 'xxxx') - .send({ fleet_server_hosts: ['http://localhost:1232/abc', 'http://localhost:1232/abc'] }) - .expect(200); - - const res = await esClient.search({ - index: AGENT_POLICY_INDEX, - ignore_unavailable: true, - body: { - query: { - term: { - policy_id: testPolicyRes.item.id, - }, - }, - }, - }); - - expect(res.hits.hits.length).equal(beforeRes.hits.hits.length + 1); - }); - }); -} From 15c1ceb47539f1a8223c049a26abba7373fd8a10 Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Wed, 6 Nov 2024 08:38:26 -0500 Subject: [PATCH 07/16] [Fleet] Remove deprecated epm APIs (#198434) --- oas_docs/bundle.json | 3830 +++------------- oas_docs/bundle.serverless.json | 3832 +++-------------- oas_docs/output/kibana.serverless.yaml | 2622 ++--------- oas_docs/output/kibana.yaml | 2622 ++--------- .../plugins/fleet/common/constants/routes.ts | 14 +- .../fleet/common/services/route.test.ts | 43 + .../plugins/fleet/common/services/routes.ts | 35 +- .../plugins/fleet/common/types/models/epm.ts | 2 +- .../fleet/common/types/rest_spec/epm.ts | 28 - .../tutorial_module_notice.tsx | 4 +- .../fleet/public/search_provider.test.ts | 14 +- .../plugins/fleet/public/search_provider.ts | 4 +- .../fleet/server/routes/epm/handlers.ts | 17 +- .../fleet/server/routes/epm/index.test.ts | 13 - .../plugins/fleet/server/routes/epm/index.ts | 132 - .../server/services/epm/packages/remove.ts | 11 +- .../services/security/route_required_authz.ts | 2 +- .../fleet/server/types/rest_spec/epm.ts | 73 +- .../public/management/mocks/fleet_mocks.ts | 2 +- .../apis/epm/bulk_get_assets.ts | 7 +- .../apis/epm/install_error_rollback.ts | 4 +- .../fleet_api_integration/apis/epm/setup.ts | 4 +- .../fleet_api_integration/apis/fleet_setup.ts | 2 +- .../apis/package_policy/helper.ts | 13 + .../input_package_create_upgrade.ts | 14 +- .../package_policy/input_package_rollback.ts | 8 +- .../apis/package_policy/update.ts | 8 +- .../apis/package_policy/upgrade.ts | 12 +- .../functional/services/ml/test_resources.ts | 4 +- .../delete_endpoint_fleet_package.ts | 4 +- .../delete_prebuilt_rules_fleet_package.ts | 6 +- 31 files changed, 2502 insertions(+), 10884 deletions(-) create mode 100644 x-pack/plugins/fleet/common/services/route.test.ts create mode 100644 x-pack/test/fleet_api_integration/apis/package_policy/helper.ts diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index d378331392dc0..19094b82be094 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -17554,14 +17554,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "include_policy_templates", @@ -17606,36 +17598,6 @@ "type": "object" }, "type": "array" - }, - "response": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "count": { - "type": "number" - }, - "id": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "parent_title": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title", - "count" - ], - "type": "object" - }, - "type": "array" } }, "required": [ @@ -17844,79 +17806,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -18119,14 +18008,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "excludeInstallStatus", @@ -18577,7 +18458,6 @@ ], "type": "string" }, - "savedObject": {}, "signature_path": { "type": "string" }, @@ -18619,7 +18499,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -18628,497 +18507,197 @@ "type": "object" }, "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package by upload", + "operationId": "post-fleet-epm-packages", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "format": "binary", + "type": "string" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { "items": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, + "anyOf": [ + { + "additionalProperties": false, "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" + "id": { + "type": "string" }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" + "originId": { + "type": "string" + }, + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], + "type": "string" } }, + "required": [ + "id", + "type" + ], "type": "object" }, - "download": { - "type": "string" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "installationInfo": { - "additionalProperties": true, + { + "additionalProperties": false, "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" + "deferred": { + "type": "boolean" }, - "install_format_schema_version": { + "id": { "type": "string" }, - "install_source": { + "type": { "enum": [ - "registry", - "upload", - "bundled", - "custom" + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" ], "type": "string" }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "integration": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { + "version": { "type": "string" } }, "required": [ - "license" + "id", + "type" ], "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "id" - ], - "type": "object" + ] }, "type": "array" } }, "required": [ - "items" + "items", + "_meta" ], "type": "object" } @@ -19127,7 +18706,7 @@ }, "400": { "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "description": "Generic Error", @@ -19155,10 +18734,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, + } + }, + "/api/fleet/epm/packages/_bulk": { "post": { - "description": "Install package by upload", - "operationId": "post-fleet-epm-packages", + "description": "Bulk install packages", + "operationId": "post-fleet-epm-packages-bulk", "parameters": [ { "description": "The version of the API to use", @@ -19184,278 +18765,16 @@ }, { "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", + "name": "prerelease", "required": false, "schema": { - "default": false, "type": "boolean" } } ], "requestBody": { "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "format": "binary", - "type": "string" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items", - "_meta" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/_bulk": { - "post": { - "description": "Bulk install packages", - "operationId": "post-fleet-epm-packages-bulk", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/json; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "properties": { @@ -19653,152 +18972,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "result": { - "additionalProperties": false, - "properties": { - "assets": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "error": {}, - "installSource": { - "type": "string" - }, - "installType": { - "type": "string" - }, - "status": { - "enum": [ - "installed", - "already_installed" - ], - "type": "string" - } - }, - "required": [ - "error", - "installType" - ], - "type": "object" - }, - "version": { - "type": "string" - } - }, - "required": [ - "name", - "version", - "result" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "error": { - "anyOf": [ - { - "type": "string" - }, - {} - ] - }, - "name": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "name", - "statusCode", - "error" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -20102,1641 +19275,106 @@ ], "responses": { "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/stats": { - "get": { - "description": "Get package stats", - "operationId": "get-fleet-epm-packages-pkgname-stats", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "response": { - "additionalProperties": false, - "properties": { - "agent_policy_count": { - "type": "number" - } - }, - "required": [ - "agent_policy_count" - ], - "type": "object" - } - }, - "required": [ - "response" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { - "delete": { - "description": "Delete package", - "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - }, - "get": { - "description": "Get package", - "operationId": "get-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "has_policies": { - "type": "boolean" - } - }, - "required": [ - "has_policies" - ], - "type": "object" - }, - "response": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + } + }, + "/api/fleet/epm/packages/{pkgName}/stats": { + "get": { + "description": "Get package stats", + "operationId": "get-fleet-epm-packages-pkgname-stats", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "response": { + "additionalProperties": false, + "properties": { + "agent_policy_count": { + "type": "number" } }, "required": [ - "savedObject", - "name", - "version", - "title", - "assets" + "agent_policy_count" ], "type": "object" } }, "required": [ - "item" + "response" ], "type": "object" } @@ -21773,10 +19411,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, - "post": { - "description": "Install package from registry", - "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + } + }, + "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { + "delete": { + "description": "Delete package", + "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -21811,59 +19451,20 @@ { "in": "path", "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", "required": false, "schema": { - "default": false, - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "skipDataStreamRollover", + "name": "force", "required": false, "schema": { - "default": false, "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "default": false, - "type": "boolean" - }, - "ignore_constraints": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "content": { @@ -21871,18 +19472,6 @@ "schema": { "additionalProperties": false, "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, "items": { "items": { "anyOf": [ @@ -21954,84 +19543,10 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ - "items", - "_meta" + "items" ], "type": "object" } @@ -22069,9 +19584,9 @@ "Elastic Package Manager (EPM)" ] }, - "put": { - "description": "Update package settings", - "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "get": { + "description": "Get package", + "operationId": "get-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -22080,18 +19595,8 @@ "schema": { "default": "2023-10-31", "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", + "2023-10-31" + ], "type": "string" } }, @@ -22106,30 +19611,45 @@ { "in": "path", "name": "pkgVersion", - "required": true, + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } + }, + { + "in": "query", + "name": "ignoreUnverified", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "full", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "withMetadata", + "required": false, + "schema": { + "default": false, + "type": "boolean" } } - }, + ], "responses": { "200": { "content": { @@ -22625,90 +20145,429 @@ "experimental" ], "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { + }, + "screenshots": { + "items": { + "additionalProperties": false, + "properties": { + "dark_mode": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "size": { + "type": "string" + }, + "src": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "type": "array" + }, + "signature_path": { + "type": "string" + }, + "source": { + "additionalProperties": true, + "properties": { + "license": { + "type": "string" + } + }, + "required": [ + "license" + ], + "type": "object" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "integration", + "input", + "content" + ], + "type": "string" + }, + "vars": { + "items": { + "additionalProperties": {}, + "type": "object" + }, + "type": "array" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version", + "title", + "assets" + ], + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "has_policies": { + "type": "boolean" + } + }, + "required": [ + "has_policies" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package from registry", + "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "nullable": true, + "properties": { + "force": { + "default": false, + "type": "boolean" + }, + "ignore_constraints": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { + "items": { + "anyOf": [ + { "additionalProperties": false, "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { + "id": { "type": "string" }, - "size": { + "originId": { "type": "string" }, - "src": { + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "deferred": { + "type": "boolean" }, - "title": { + "id": { "type": "string" }, "type": { + "enum": [ + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" + ], + "type": "string" + }, + "version": { "type": "string" } }, "required": [ - "src" + "id", + "type" ], "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } + } + ] }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" + "type": "array" + } + }, + "required": [ + "items", + "_meta" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "put": { + "description": "Update package settings", + "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "keepPoliciesUpToDate": { + "type": "boolean" + } + }, + "required": [ + "keepPoliciesUpToDate" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { "additionalProperties": true, - "deprecated": true, "properties": { "agent": { "additionalProperties": false, @@ -23196,7 +21055,6 @@ ], "type": "string" }, - "savedObject": {}, "screenshots": { "items": { "additionalProperties": false, @@ -23268,7 +21126,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -23543,265 +21400,6 @@ ] } }, - "/api/fleet/epm/packages/{pkgkey}": { - "delete": { - "operationId": "delete-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "put": { - "operationId": "put-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs": { "get": { "description": "Get inputs template", diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index 972712045a1c6..bc3d45fe67960 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -17554,14 +17554,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "include_policy_templates", @@ -17606,36 +17598,6 @@ "type": "object" }, "type": "array" - }, - "response": { - "items": { - "additionalProperties": false, - "deprecated": true, - "properties": { - "count": { - "type": "number" - }, - "id": { - "type": "string" - }, - "parent_id": { - "type": "string" - }, - "parent_title": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "required": [ - "id", - "title", - "count" - ], - "type": "object" - }, - "type": "array" } }, "required": [ @@ -17844,79 +17806,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -18119,14 +18008,6 @@ "type": "boolean" } }, - { - "in": "query", - "name": "experimental", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "excludeInstallStatus", @@ -18577,7 +18458,6 @@ ], "type": "string" }, - "savedObject": {}, "signature_path": { "type": "string" }, @@ -18619,7 +18499,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -18628,497 +18507,197 @@ "type": "object" }, "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package by upload", + "operationId": "post-fleet-epm-packages", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "format": "binary", + "type": "string" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { "items": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, + "anyOf": [ + { + "additionalProperties": false, "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" + "id": { + "type": "string" }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" + "originId": { + "type": "string" + }, + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], + "type": "string" } }, + "required": [ + "id", + "type" + ], "type": "object" }, - "download": { - "type": "string" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "installationInfo": { - "additionalProperties": true, + { + "additionalProperties": false, "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" + "deferred": { + "type": "boolean" }, - "install_format_schema_version": { + "id": { "type": "string" }, - "install_source": { + "type": { "enum": [ - "registry", - "upload", - "bundled", - "custom" + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" ], "type": "string" }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "integration": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "name": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { + "version": { "type": "string" } }, "required": [ - "license" + "id", + "type" ], "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "id" - ], - "type": "object" + ] }, "type": "array" } }, "required": [ - "items" + "items", + "_meta" ], "type": "object" } @@ -19127,7 +18706,7 @@ }, "400": { "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "description": "Generic Error", @@ -19155,10 +18734,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, + } + }, + "/api/fleet/epm/packages/_bulk": { "post": { - "description": "Install package by upload", - "operationId": "post-fleet-epm-packages", + "description": "Bulk install packages", + "operationId": "post-fleet-epm-packages-bulk", "parameters": [ { "description": "The version of the API to use", @@ -19184,278 +18765,16 @@ }, { "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", + "name": "prerelease", "required": false, "schema": { - "default": false, "type": "boolean" } } ], "requestBody": { "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "format": "binary", - "type": "string" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items", - "_meta" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/gzip; application/zip; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/_bulk": { - "post": { - "description": "Bulk install packages", - "operationId": "post-fleet-epm-packages-bulk", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { + "application/json; Elastic-Api-Version=2023-10-31": { "schema": { "additionalProperties": false, "properties": { @@ -19653,152 +18972,6 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "result": { - "additionalProperties": false, - "properties": { - "assets": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "error": {}, - "installSource": { - "type": "string" - }, - "installType": { - "type": "string" - }, - "status": { - "enum": [ - "installed", - "already_installed" - ], - "type": "string" - } - }, - "required": [ - "error", - "installType" - ], - "type": "object" - }, - "version": { - "type": "string" - } - }, - "required": [ - "name", - "version", - "result" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "error": { - "anyOf": [ - { - "type": "string" - }, - {} - ] - }, - "name": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "name", - "statusCode", - "error" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ @@ -20104,1639 +19277,104 @@ "200": { "content": { "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/stats": { - "get": { - "description": "Get package stats", - "operationId": "get-fleet-epm-packages-pkgname-stats", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "response": { - "additionalProperties": false, - "properties": { - "agent_policy_count": { - "type": "number" - } - }, - "required": [ - "agent_policy_count" - ], - "type": "object" - } - }, - "required": [ - "response" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - } - }, - "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { - "delete": { - "description": "Delete package", - "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "items": { - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" - } - }, - "required": [ - "items" - ], - "type": "object" - } - } - } - }, - "400": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "description": "Generic Error", - "properties": { - "error": { - "type": "string" - }, - "message": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - }, - "required": [ - "message" - ], - "type": "object" - } - } - } - } - }, - "summary": "", - "tags": [ - "Elastic Package Manager (EPM)" - ] - }, - "get": { - "description": "Get package", - "operationId": "get-fleet-epm-packages-pkgname-pkgversion", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgName", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "item": { - "additionalProperties": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } - }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" - }, - "metadata": { - "additionalProperties": false, - "properties": { - "has_policies": { - "type": "boolean" - } - }, - "required": [ - "has_policies" - ], - "type": "object" - }, - "response": { - "additionalProperties": true, - "deprecated": true, - "properties": { - "agent": { - "additionalProperties": false, - "properties": { - "privileges": { - "additionalProperties": false, - "properties": { - "root": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "asset_tags": { - "items": { - "additionalProperties": false, - "properties": { - "asset_ids": { - "items": { - "type": "string" - }, - "type": "array" - }, - "asset_types": { - "items": { - "type": "string" - }, - "type": "array" - }, - "text": { - "type": "string" - } - }, - "required": [ - "text" - ], - "type": "object" - }, - "type": "array" - }, - "assets": { - "additionalProperties": {}, - "type": "object" - }, - "categories": { - "items": { - "type": "string" - }, - "type": "array" - }, - "conditions": { - "additionalProperties": true, - "properties": { - "elastic": { - "additionalProperties": true, - "properties": { - "capabilities": { - "items": { - "type": "string" - }, - "type": "array" - }, - "subscription": { - "type": "string" - } - }, - "type": "object" - }, - "kibana": { - "additionalProperties": true, - "properties": { - "version": { - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "data_streams": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "description": { - "type": "string" - }, - "discovery": { - "additionalProperties": true, - "properties": { - "fields": { - "items": { - "additionalProperties": true, - "properties": { - "name": { - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "download": { - "type": "string" - }, - "elasticsearch": { - "additionalProperties": {}, - "type": "object" - }, - "format_version": { - "type": "string" - }, - "icons": { - "items": { - "additionalProperties": true, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "installationInfo": { - "additionalProperties": true, - "properties": { - "additional_spaces_installed_kibana": { - "additionalProperties": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "type": "object" - }, - "created_at": { - "type": "string" - }, - "experimental_data_stream_features": { - "items": { - "additionalProperties": true, - "properties": { - "data_stream": { - "type": "string" - }, - "features": { - "additionalProperties": true, - "properties": { - "doc_value_only_numeric": { - "type": "boolean" - }, - "doc_value_only_other": { - "type": "boolean" - }, - "synthetic_source": { - "type": "boolean" - }, - "tsdb": { - "type": "boolean" - } - }, - "type": "object" - } - }, - "required": [ - "data_stream", - "features" - ], - "type": "object" - }, - "type": "array" - }, - "install_format_schema_version": { - "type": "string" - }, - "install_source": { - "enum": [ - "registry", - "upload", - "bundled", - "custom" - ], - "type": "string" - }, - "install_status": { - "enum": [ - "installed", - "installing", - "install_failed" - ], - "type": "string" - }, - "installed_es": { - "items": { - "additionalProperties": true, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana": { - "items": { - "additionalProperties": true, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - "type": "array" - }, - "installed_kibana_space_id": { - "type": "string" - }, - "latest_executed_state": { - "additionalProperties": true, - "properties": { - "error": { - "type": "string" - }, - "name": { - "type": "string" - }, - "started_at": { - "type": "string" - } - }, - "required": [ - "name", - "started_at" - ], - "type": "object" - }, - "latest_install_failed_attempts": { - "items": { - "additionalProperties": true, - "properties": { - "created_at": { - "type": "string" - }, - "error": { - "additionalProperties": true, - "properties": { - "message": { - "type": "string" - }, - "name": { - "type": "string" - }, - "stack": { - "type": "string" - } - }, - "required": [ - "name", - "message" - ], - "type": "object" - }, - "target_version": { - "type": "string" - } - }, - "required": [ - "created_at", - "target_version", - "error" - ], - "type": "object" - }, - "type": "array" - }, - "name": { - "type": "string" - }, - "namespaces": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "type": "string" - }, - "updated_at": { - "type": "string" - }, - "verification_key_id": { - "nullable": true, - "type": "string" - }, - "verification_status": { - "enum": [ - "unverified", - "verified", - "unknown" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "type", - "installed_kibana", - "installed_es", - "name", - "version", - "install_status", - "install_source", - "verification_status" - ], - "type": "object" - }, - "internal": { - "type": "boolean" - }, - "keepPoliciesUpToDate": { - "type": "boolean" - }, - "latestVersion": { - "type": "string" - }, - "license": { - "type": "string" - }, - "licensePath": { - "type": "string" - }, - "name": { - "type": "string" - }, - "notice": { - "type": "string" - }, - "owner": { - "additionalProperties": true, - "properties": { - "github": { - "type": "string" - }, - "type": { - "enum": [ - "elastic", - "partner", - "community" - ], - "type": "string" - } - }, - "type": "object" - }, - "path": { - "type": "string" - }, - "policy_templates": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "readme": { - "type": "string" - }, - "release": { - "enum": [ - "ga", - "beta", - "experimental" - ], - "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { - "additionalProperties": false, - "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { - "type": "string" - }, - "size": { - "type": "string" - }, - "src": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "type": "string" - } - }, - "required": [ - "src" - ], - "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" + "schema": { + "additionalProperties": false, + "properties": { + "items": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "items" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + } + }, + "/api/fleet/epm/packages/{pkgName}/stats": { + "get": { + "description": "Get package stats", + "operationId": "get-fleet-epm-packages-pkgname-stats", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "response": { + "additionalProperties": false, + "properties": { + "agent_policy_count": { + "type": "number" } }, "required": [ - "savedObject", - "name", - "version", - "title", - "assets" + "agent_policy_count" ], "type": "object" } }, "required": [ - "item" + "response" ], "type": "object" } @@ -21773,10 +19411,12 @@ "tags": [ "Elastic Package Manager (EPM)" ] - }, - "post": { - "description": "Install package from registry", - "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + } + }, + "/api/fleet/epm/packages/{pkgName}/{pkgVersion}": { + "delete": { + "description": "Delete package", + "operationId": "delete-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", @@ -21811,59 +19451,20 @@ { "in": "path", "name": "pkgVersion", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", "required": false, "schema": { - "default": false, - "type": "boolean" + "type": "string" } }, { "in": "query", - "name": "skipDataStreamRollover", + "name": "force", "required": false, "schema": { - "default": false, "type": "boolean" } } ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "default": false, - "type": "boolean" - }, - "ignore_constraints": { - "default": false, - "type": "boolean" - } - }, - "type": "object" - } - } - } - }, "responses": { "200": { "content": { @@ -21871,18 +19472,6 @@ "schema": { "additionalProperties": false, "properties": { - "_meta": { - "additionalProperties": false, - "properties": { - "install_source": { - "type": "string" - } - }, - "required": [ - "install_source" - ], - "type": "object" - }, "items": { "items": { "anyOf": [ @@ -21954,84 +19543,10 @@ ] }, "type": "array" - }, - "response": { - "deprecated": true, - "items": { - "anyOf": [ - { - "additionalProperties": false, - "properties": { - "id": { - "type": "string" - }, - "originId": { - "type": "string" - }, - "type": { - "enum": [ - "dashboard", - "lens", - "visualization", - "search", - "index-pattern", - "map", - "ml-module", - "security-rule", - "csp-rule-template", - "osquery-pack-asset", - "osquery-saved-query", - "tag" - ], - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - }, - { - "additionalProperties": false, - "properties": { - "deferred": { - "type": "boolean" - }, - "id": { - "type": "string" - }, - "type": { - "enum": [ - "index", - "index_template", - "component_template", - "ingest_pipeline", - "ilm_policy", - "data_stream_ilm_policy", - "transform", - "ml_model" - ], - "type": "string" - }, - "version": { - "type": "string" - } - }, - "required": [ - "id", - "type" - ], - "type": "object" - } - ] - }, - "type": "array" } }, "required": [ - "items", - "_meta" + "items" ], "type": "object" } @@ -22069,29 +19584,19 @@ "Elastic Package Manager (EPM)" ] }, - "put": { - "description": "Update package settings", - "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "get": { + "description": "Get package", + "operationId": "get-fleet-epm-packages-pkgname-pkgversion", "parameters": [ { "description": "The version of the API to use", "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, + "name": "elastic-api-version", "schema": { - "example": "true", + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], "type": "string" } }, @@ -22106,30 +19611,45 @@ { "in": "path", "name": "pkgVersion", - "required": true, + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } + }, + { + "in": "query", + "name": "ignoreUnverified", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "full", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "withMetadata", + "required": false, + "schema": { + "default": false, + "type": "boolean" } } - }, + ], "responses": { "200": { "content": { @@ -22625,90 +20145,429 @@ "experimental" ], "type": "string" - }, - "savedObject": {}, - "screenshots": { - "items": { + }, + "screenshots": { + "items": { + "additionalProperties": false, + "properties": { + "dark_mode": { + "type": "boolean" + }, + "path": { + "type": "string" + }, + "size": { + "type": "string" + }, + "src": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "type": "array" + }, + "signature_path": { + "type": "string" + }, + "source": { + "additionalProperties": true, + "properties": { + "license": { + "type": "string" + } + }, + "required": [ + "license" + ], + "type": "object" + }, + "status": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "integration", + "input", + "content" + ], + "type": "string" + }, + "vars": { + "items": { + "additionalProperties": {}, + "type": "object" + }, + "type": "array" + }, + "version": { + "type": "string" + } + }, + "required": [ + "name", + "version", + "title", + "assets" + ], + "type": "object" + }, + "metadata": { + "additionalProperties": false, + "properties": { + "has_policies": { + "type": "boolean" + } + }, + "required": [ + "has_policies" + ], + "type": "object" + } + }, + "required": [ + "item" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "post": { + "description": "Install package from registry", + "operationId": "post-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "prerelease", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "ignoreMappingUpdateErrors", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "in": "query", + "name": "skipDataStreamRollover", + "required": false, + "schema": { + "default": false, + "type": "boolean" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "nullable": true, + "properties": { + "force": { + "default": false, + "type": "boolean" + }, + "ignore_constraints": { + "default": false, + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "_meta": { + "additionalProperties": false, + "properties": { + "install_source": { + "type": "string" + } + }, + "required": [ + "install_source" + ], + "type": "object" + }, + "items": { + "items": { + "anyOf": [ + { "additionalProperties": false, "properties": { - "dark_mode": { - "type": "boolean" - }, - "path": { + "id": { "type": "string" }, - "size": { + "originId": { "type": "string" }, - "src": { + "type": { + "enum": [ + "dashboard", + "lens", + "visualization", + "search", + "index-pattern", + "map", + "ml-module", + "security-rule", + "csp-rule-template", + "osquery-pack-asset", + "osquery-saved-query", + "tag" + ], "type": "string" + } + }, + "required": [ + "id", + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "deferred": { + "type": "boolean" }, - "title": { + "id": { "type": "string" }, "type": { + "enum": [ + "index", + "index_template", + "component_template", + "ingest_pipeline", + "ilm_policy", + "data_stream_ilm_policy", + "transform", + "ml_model" + ], + "type": "string" + }, + "version": { "type": "string" } }, "required": [ - "src" + "id", + "type" ], "type": "object" - }, - "type": "array" - }, - "signature_path": { - "type": "string" - }, - "source": { - "additionalProperties": true, - "properties": { - "license": { - "type": "string" - } - }, - "required": [ - "license" - ], - "type": "object" - }, - "status": { - "type": "string" - }, - "title": { - "type": "string" - }, - "type": { - "enum": [ - "integration", - "input", - "content" - ], - "type": "string" - }, - "vars": { - "items": { - "additionalProperties": {}, - "type": "object" - }, - "type": "array" - }, - "version": { - "type": "string" - } + } + ] }, - "required": [ - "savedObject", - "name", - "version", - "title", - "assets" - ], - "type": "object" + "type": "array" + } + }, + "required": [ + "items", + "_meta" + ], + "type": "object" + } + } + } + }, + "400": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "description": "Generic Error", + "properties": { + "error": { + "type": "string" }, - "response": { + "message": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + }, + "required": [ + "message" + ], + "type": "object" + } + } + } + } + }, + "summary": "", + "tags": [ + "Elastic Package Manager (EPM)" + ] + }, + "put": { + "description": "Update package settings", + "operationId": "put-fleet-epm-packages-pkgname-pkgversion", + "parameters": [ + { + "description": "The version of the API to use", + "in": "header", + "name": "elastic-api-version", + "schema": { + "default": "2023-10-31", + "enum": [ + "2023-10-31" + ], + "type": "string" + } + }, + { + "description": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "pkgName", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "pkgVersion", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "keepPoliciesUpToDate": { + "type": "boolean" + } + }, + "required": [ + "keepPoliciesUpToDate" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "item": { "additionalProperties": true, - "deprecated": true, "properties": { "agent": { "additionalProperties": false, @@ -23196,7 +21055,6 @@ ], "type": "string" }, - "savedObject": {}, "screenshots": { "items": { "additionalProperties": false, @@ -23268,7 +21126,6 @@ } }, "required": [ - "savedObject", "name", "version", "title", @@ -23543,265 +21400,6 @@ ] } }, - "/api/fleet/epm/packages/{pkgkey}": { - "delete": { - "operationId": "delete-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "get": { - "operationId": "get-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "ignoreUnverified", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "full", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "withMetadata", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "responses": {}, - "summary": "", - "tags": [] - }, - "post": { - "operationId": "post-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "prerelease", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "ignoreMappingUpdateErrors", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - }, - { - "in": "query", - "name": "skipDataStreamRollover", - "required": false, - "schema": { - "default": false, - "type": "boolean" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "nullable": true, - "properties": { - "force": { - "type": "boolean" - } - }, - "required": [ - "force" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - }, - "put": { - "operationId": "put-fleet-epm-packages-pkgkey", - "parameters": [ - { - "description": "The version of the API to use", - "in": "header", - "name": "elastic-api-version", - "schema": { - "default": "2023-10-31", - "enum": [ - "2023-10-31" - ], - "type": "string" - } - }, - { - "description": "A required header to protect against CSRF attacks", - "in": "header", - "name": "kbn-xsrf", - "required": true, - "schema": { - "example": "true", - "type": "string" - } - }, - { - "in": "path", - "name": "pkgkey", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json; Elastic-Api-Version=2023-10-31": { - "schema": { - "additionalProperties": false, - "properties": { - "keepPoliciesUpToDate": { - "type": "boolean" - } - }, - "required": [ - "keepPoliciesUpToDate" - ], - "type": "object" - } - } - } - }, - "responses": {}, - "summary": "", - "tags": [] - } - }, "/api/fleet/epm/templates/{pkgName}/{pkgVersion}/inputs": { "get": { "description": "Get inputs template", diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index a1cc60cbe7bd0..78c8541059d26 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -18230,11 +18230,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: include_policy_templates required: false @@ -18268,27 +18263,6 @@ paths: - title - count type: array - response: - items: - additionalProperties: false - deprecated: true - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - type: array required: - items '400': @@ -18431,59 +18405,6 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - _meta @@ -18612,11 +18533,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: excludeInstallStatus required: false @@ -18941,7 +18857,6 @@ paths: - beta - experimental type: string - savedObject: {} signature_path: type: string source: @@ -18970,536 +18885,135 @@ paths: version: type: string required: - - savedObject - name - version - title - id type: array - response: + required: + - items + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package by upload + operationId: post-fleet-epm-packages + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + responses: + '200': + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: items: - additionalProperties: true - deprecated: true - type: object - properties: - categories: - items: - type: string - type: array - conditions: - additionalProperties: true + anyOf: + - additionalProperties: false type: object properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false type: object properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: + deferred: + type: boolean + id: type: string - namespaces: - items: - type: string - type: array type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: enum: - - unverified - - verified - - unknown + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model type: string version: type: string required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - id - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - post: - description: Install package by upload - operationId: post-fleet-epm-packages - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - responses: - '200': - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id + - id - type type: array required: @@ -19589,1442 +19103,105 @@ paths: properties: items: items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - /api/fleet/epm/packages/{pkgkey}: - delete: - operationId: delete-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - put: - operationId: put-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate - responses: {} - summary: '' - tags: [] - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: - delete: - description: Delete package - operationId: delete-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: force - required: false - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - get: - description: Get package - operationId: get-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies - response: - additionalProperties: true - deprecated: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: + anyOf: + - additionalProperties: false + type: object + properties: + name: type: string - type: + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + error: {} + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: type: string required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} + - name + - version + - result + - additionalProperties: false type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets + properties: + error: + anyOf: + - type: string + - {} + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + - error + type: array required: - - item + - items '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -21044,9 +19221,10 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - post: - description: Install package from registry - operationId: post-fleet-epm-packages-pkgname-pkgversion + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: + description: Delete package + operationId: delete-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -21070,40 +19248,14 @@ paths: type: string - in: path name: pkgVersion - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors required: false schema: - default: false - type: boolean + type: string - in: query - name: skipDataStreamRollover + name: force required: false schema: - default: false type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean responses: '200': content: @@ -21112,14 +19264,6 @@ paths: additionalProperties: false type: object properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source items: items: anyOf: @@ -21172,62 +19316,8 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - - _meta '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -21247,9 +19337,9 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - put: - description: Update package settings - operationId: put-fleet-epm-packages-pkgname-pkgversion + get: + description: Get package + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -21259,13 +19349,6 @@ paths: enum: - '2023-10-31' type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - in: path name: pkgName required: true @@ -21273,20 +19356,30 @@ paths: type: string - in: path name: pkgVersion - required: true + required: false + schema: + type: string + - in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: full + required: false schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate + type: boolean + - in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: @@ -21643,7 +19736,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -21692,14 +19784,239 @@ paths: version: type: string required: - - savedObject - name - version - title - assets - response: + metadata: + additionalProperties: false + type: object + properties: + has_policies: + type: boolean + required: + - has_policies + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package from registry + operationId: post-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + required: + - items + - _meta + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + put: + description: Update package settings + operationId: put-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + keepPoliciesUpToDate: + type: boolean + required: + - keepPoliciesUpToDate + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: true - deprecated: true type: object properties: agent: @@ -22046,7 +20363,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -22095,7 +20411,6 @@ paths: version: type: string required: - - savedObject - name - version - title @@ -22500,11 +20815,6 @@ paths: items: type: string type: array - response: - deprecated: true - items: - type: string - type: array required: - items '400': diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 0dd1586ef8b37..64d227b91979d 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -21663,11 +21663,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: include_policy_templates required: false @@ -21701,27 +21696,6 @@ paths: - title - count type: array - response: - items: - additionalProperties: false - deprecated: true - type: object - properties: - count: - type: number - id: - type: string - parent_id: - type: string - parent_title: - type: string - title: - type: string - required: - - id - - title - - count - type: array required: - items '400': @@ -21864,59 +21838,6 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - _meta @@ -22045,11 +21966,6 @@ paths: required: false schema: type: boolean - - in: query - name: experimental - required: false - schema: - type: boolean - in: query name: excludeInstallStatus required: false @@ -22374,7 +22290,6 @@ paths: - beta - experimental type: string - savedObject: {} signature_path: type: string source: @@ -22403,536 +22318,135 @@ paths: version: type: string required: - - savedObject - name - version - title - id type: array - response: + required: + - items + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package by upload + operationId: post-fleet-epm-packages + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + responses: + '200': + content: + application/gzip; application/zip; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: items: - additionalProperties: true - deprecated: true - type: object - properties: - categories: - items: - type: string - type: array - conditions: - additionalProperties: true + anyOf: + - additionalProperties: false type: object properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false type: object properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - id: - type: string - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: + deferred: + type: boolean + id: type: string - namespaces: - items: - type: string - type: array type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: enum: - - unverified - - verified - - unknown + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model type: string version: type: string required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - integration: - type: string - internal: - type: boolean - latestVersion: - type: string - name: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - id - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - post: - description: Install package by upload - operationId: post-fleet-epm-packages - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - responses: - '200': - content: - application/gzip; application/zip; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id + - id - type type: array required: @@ -23022,1442 +22536,105 @@ paths: properties: items: items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - name: - type: string - result: - additionalProperties: false - type: object - properties: - assets: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - error: {} - installSource: - type: string - installType: - type: string - status: - enum: - - installed - - already_installed - type: string - required: - - error - - installType - version: - type: string - required: - - name - - version - - result - - additionalProperties: false - type: object - properties: - error: - anyOf: - - type: string - - {} - name: - type: string - statusCode: - type: number - required: - - name - - statusCode - - error - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - /api/fleet/epm/packages/{pkgkey}: - delete: - operationId: delete-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - get: - operationId: get-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: {} - summary: '' - tags: [] - post: - operationId: post-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors - required: false - schema: - default: false - type: boolean - - in: query - name: skipDataStreamRollover - required: false - schema: - default: false - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: {} - summary: '' - tags: [] - put: - operationId: put-fleet-epm-packages-pkgkey - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgkey - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate - responses: {} - summary: '' - tags: [] - /api/fleet/epm/packages/{pkgName}/{pkgVersion}: - delete: - description: Delete package - operationId: delete-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: force - required: false - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - type: boolean - required: - - force - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - items: - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - required: - - items - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - description: Generic Error - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - required: - - message - summary: '' - tags: - - Elastic Package Manager (EPM) - get: - description: Get package - operationId: get-fleet-epm-packages-pkgname-pkgversion - parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - in: path - name: pkgName - required: true - schema: - type: string - - in: path - name: pkgVersion - required: true - schema: - type: string - - in: query - name: ignoreUnverified - required: false - schema: - type: boolean - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: full - required: false - schema: - type: boolean - - in: query - name: withMetadata - required: false - schema: - default: false - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - item: - additionalProperties: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} - type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets - metadata: - additionalProperties: false - type: object - properties: - has_policies: - type: boolean - required: - - has_policies - response: - additionalProperties: true - deprecated: true - type: object - properties: - agent: - additionalProperties: false - type: object - properties: - privileges: - additionalProperties: false - type: object - properties: - root: - type: boolean - asset_tags: - items: - additionalProperties: false - type: object - properties: - asset_ids: - items: - type: string - type: array - asset_types: - items: - type: string - type: array - text: - type: string - required: - - text - type: array - assets: - additionalProperties: {} - type: object - categories: - items: - type: string - type: array - conditions: - additionalProperties: true - type: object - properties: - elastic: - additionalProperties: true - type: object - properties: - capabilities: - items: - type: string - type: array - subscription: - type: string - kibana: - additionalProperties: true - type: object - properties: - version: - type: string - data_streams: - items: - additionalProperties: {} - type: object - type: array - description: - type: string - discovery: - additionalProperties: true - type: object - properties: - fields: - items: - additionalProperties: true - type: object - properties: - name: - type: string - required: - - name - type: array - download: - type: string - elasticsearch: - additionalProperties: {} - type: object - format_version: - type: string - icons: - items: - additionalProperties: true - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: - type: string - type: - type: string - required: - - src - type: array - installationInfo: - additionalProperties: true - type: object - properties: - additional_spaces_installed_kibana: - additionalProperties: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - type: object - created_at: - type: string - experimental_data_stream_features: - items: - additionalProperties: true - type: object - properties: - data_stream: - type: string - features: - additionalProperties: true - type: object - properties: - doc_value_only_numeric: - type: boolean - doc_value_only_other: - type: boolean - synthetic_source: - type: boolean - tsdb: - type: boolean - required: - - data_stream - - features - type: array - install_format_schema_version: - type: string - install_source: - enum: - - registry - - upload - - bundled - - custom - type: string - install_status: - enum: - - installed - - installing - - install_failed - type: string - installed_es: - items: - additionalProperties: true - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array - installed_kibana: - items: - additionalProperties: true - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - type: array - installed_kibana_space_id: - type: string - latest_executed_state: - additionalProperties: true - type: object - properties: - error: - type: string - name: - type: string - started_at: - type: string - required: - - name - - started_at - latest_install_failed_attempts: - items: - additionalProperties: true - type: object - properties: - created_at: - type: string - error: - additionalProperties: true - type: object - properties: - message: - type: string - name: - type: string - stack: - type: string - required: - - name - - message - target_version: - type: string - required: - - created_at - - target_version - - error - type: array - name: - type: string - namespaces: - items: - type: string - type: array - type: - type: string - updated_at: - type: string - verification_key_id: - nullable: true - type: string - verification_status: - enum: - - unverified - - verified - - unknown - type: string - version: - type: string - required: - - type - - installed_kibana - - installed_es - - name - - version - - install_status - - install_source - - verification_status - internal: - type: boolean - keepPoliciesUpToDate: - type: boolean - latestVersion: - type: string - license: - type: string - licensePath: - type: string - name: - type: string - notice: - type: string - owner: - additionalProperties: true - type: object - properties: - github: - type: string - type: - enum: - - elastic - - partner - - community - type: string - path: - type: string - policy_templates: - items: - additionalProperties: {} - type: object - type: array - readme: - type: string - release: - enum: - - ga - - beta - - experimental - type: string - savedObject: {} - screenshots: - items: - additionalProperties: false - type: object - properties: - dark_mode: - type: boolean - path: - type: string - size: - type: string - src: - type: string - title: + anyOf: + - additionalProperties: false + type: object + properties: + name: type: string - type: + result: + additionalProperties: false + type: object + properties: + assets: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + error: {} + installSource: + type: string + installType: + type: string + status: + enum: + - installed + - already_installed + type: string + required: + - error + - installType + version: type: string required: - - src - type: array - signature_path: - type: string - source: - additionalProperties: true - type: object - properties: - license: - type: string - required: - - license - status: - type: string - title: - type: string - type: - enum: - - integration - - input - - content - type: string - vars: - items: - additionalProperties: {} + - name + - version + - result + - additionalProperties: false type: object - type: array - version: - type: string - required: - - savedObject - - name - - version - - title - - assets + properties: + error: + anyOf: + - type: string + - {} + name: + type: string + statusCode: + type: number + required: + - name + - statusCode + - error + type: array required: - - item + - items '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -24477,9 +22654,10 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - post: - description: Install package from registry - operationId: post-fleet-epm-packages-pkgname-pkgversion + /api/fleet/epm/packages/{pkgName}/{pkgVersion}: + delete: + description: Delete package + operationId: delete-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -24503,40 +22681,14 @@ paths: type: string - in: path name: pkgVersion - required: true - schema: - type: string - - in: query - name: prerelease - required: false - schema: - type: boolean - - in: query - name: ignoreMappingUpdateErrors required: false schema: - default: false - type: boolean + type: string - in: query - name: skipDataStreamRollover + name: force required: false schema: - default: false type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - nullable: true - type: object - properties: - force: - default: false - type: boolean - ignore_constraints: - default: false - type: boolean responses: '200': content: @@ -24545,14 +22697,6 @@ paths: additionalProperties: false type: object properties: - _meta: - additionalProperties: false - type: object - properties: - install_source: - type: string - required: - - install_source items: items: anyOf: @@ -24605,62 +22749,8 @@ paths: - id - type type: array - response: - deprecated: true - items: - anyOf: - - additionalProperties: false - type: object - properties: - id: - type: string - originId: - type: string - type: - enum: - - dashboard - - lens - - visualization - - search - - index-pattern - - map - - ml-module - - security-rule - - csp-rule-template - - osquery-pack-asset - - osquery-saved-query - - tag - type: string - required: - - id - - type - - additionalProperties: false - type: object - properties: - deferred: - type: boolean - id: - type: string - type: - enum: - - index - - index_template - - component_template - - ingest_pipeline - - ilm_policy - - data_stream_ilm_policy - - transform - - ml_model - type: string - version: - type: string - required: - - id - - type - type: array required: - items - - _meta '400': content: application/json; Elastic-Api-Version=2023-10-31: @@ -24680,9 +22770,9 @@ paths: summary: '' tags: - Elastic Package Manager (EPM) - put: - description: Update package settings - operationId: put-fleet-epm-packages-pkgname-pkgversion + get: + description: Get package + operationId: get-fleet-epm-packages-pkgname-pkgversion parameters: - description: The version of the API to use in: header @@ -24692,13 +22782,6 @@ paths: enum: - '2023-10-31' type: string - - description: A required header to protect against CSRF attacks - in: header - name: kbn-xsrf - required: true - schema: - example: 'true' - type: string - in: path name: pkgName required: true @@ -24706,20 +22789,30 @@ paths: type: string - in: path name: pkgVersion - required: true + required: false + schema: + type: string + - in: query + name: ignoreUnverified + required: false + schema: + type: boolean + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: full + required: false schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - additionalProperties: false - type: object - properties: - keepPoliciesUpToDate: - type: boolean - required: - - keepPoliciesUpToDate + type: boolean + - in: query + name: withMetadata + required: false + schema: + default: false + type: boolean responses: '200': content: @@ -25076,7 +23169,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -25125,14 +23217,239 @@ paths: version: type: string required: - - savedObject - name - version - title - assets - response: + metadata: + additionalProperties: false + type: object + properties: + has_policies: + type: boolean + required: + - has_policies + required: + - item + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + post: + description: Install package from registry + operationId: post-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + - in: query + name: prerelease + required: false + schema: + type: boolean + - in: query + name: ignoreMappingUpdateErrors + required: false + schema: + default: false + type: boolean + - in: query + name: skipDataStreamRollover + required: false + schema: + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + nullable: true + type: object + properties: + force: + default: false + type: boolean + ignore_constraints: + default: false + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + _meta: + additionalProperties: false + type: object + properties: + install_source: + type: string + required: + - install_source + items: + items: + anyOf: + - additionalProperties: false + type: object + properties: + id: + type: string + originId: + type: string + type: + enum: + - dashboard + - lens + - visualization + - search + - index-pattern + - map + - ml-module + - security-rule + - csp-rule-template + - osquery-pack-asset + - osquery-saved-query + - tag + type: string + required: + - id + - type + - additionalProperties: false + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + enum: + - index + - index_template + - component_template + - ingest_pipeline + - ilm_policy + - data_stream_ilm_policy + - transform + - ml_model + type: string + version: + type: string + required: + - id + - type + type: array + required: + - items + - _meta + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + description: Generic Error + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + required: + - message + summary: '' + tags: + - Elastic Package Manager (EPM) + put: + description: Update package settings + operationId: put-fleet-epm-packages-pkgname-pkgversion + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: A required header to protect against CSRF attacks + in: header + name: kbn-xsrf + required: true + schema: + example: 'true' + type: string + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: false + schema: + type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + keepPoliciesUpToDate: + type: boolean + required: + - keepPoliciesUpToDate + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + additionalProperties: false + type: object + properties: + item: additionalProperties: true - deprecated: true type: object properties: agent: @@ -25479,7 +23796,6 @@ paths: - beta - experimental type: string - savedObject: {} screenshots: items: additionalProperties: false @@ -25528,7 +23844,6 @@ paths: version: type: string required: - - savedObject - name - version - title @@ -25933,11 +24248,6 @@ paths: items: type: string type: array - response: - deprecated: true - items: - type: string - type: array required: - items '400': diff --git a/x-pack/plugins/fleet/common/constants/routes.ts b/x-pack/plugins/fleet/common/constants/routes.ts index 4b40b4fb51092..436d476db16d2 100644 --- a/x-pack/plugins/fleet/common/constants/routes.ts +++ b/x-pack/plugins/fleet/common/constants/routes.ts @@ -23,19 +23,21 @@ export const LIMITED_CONCURRENCY_ROUTE_TAG = 'ingest:limited-concurrency'; const EPM_PACKAGES_MANY = `${EPM_API_ROOT}/packages`; const EPM_PACKAGES_INSTALLED = `${EPM_API_ROOT}/packages/installed`; const EPM_PACKAGES_BULK = `${EPM_PACKAGES_MANY}/_bulk`; -const EPM_PACKAGES_ONE_DEPRECATED = `${EPM_PACKAGES_MANY}/{pkgkey}`; +const EPM_PACKAGES_ONE_WITHOUT_VERSION = `${EPM_PACKAGES_MANY}/{pkgName}`; const EPM_PACKAGES_ONE = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion}`; +const EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION = `${EPM_PACKAGES_MANY}/{pkgName}/{pkgVersion?}`; export const EPM_API_ROUTES = { BULK_INSTALL_PATTERN: EPM_PACKAGES_BULK, LIST_PATTERN: EPM_PACKAGES_MANY, INSTALLED_LIST_PATTERN: EPM_PACKAGES_INSTALLED, LIMITED_LIST_PATTERN: `${EPM_PACKAGES_MANY}/limited`, - INFO_PATTERN: EPM_PACKAGES_ONE, + INFO_WITHOUT_VERSION_PATTERN: EPM_PACKAGES_ONE_WITHOUT_VERSION, + INFO_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, DATA_STREAMS_PATTERN: `${EPM_API_ROOT}/data_streams`, - INSTALL_FROM_REGISTRY_PATTERN: EPM_PACKAGES_ONE, + INSTALL_FROM_REGISTRY_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, INSTALL_BY_UPLOAD_PATTERN: EPM_PACKAGES_MANY, CUSTOM_INTEGRATIONS_PATTERN: `${EPM_API_ROOT}/custom_integrations`, - DELETE_PATTERN: EPM_PACKAGES_ONE, + DELETE_PATTERN: EPM_PACKAGES_ONE_WITH_OPTIONAL_VERSION, INSTALL_KIBANA_ASSETS_PATTERN: `${EPM_PACKAGES_ONE}/kibana_assets`, DELETE_KIBANA_ASSETS_PATTERN: `${EPM_PACKAGES_ONE}/kibana_assets`, FILEPATH_PATTERN: `${EPM_PACKAGES_ONE}/{filePath*}`, @@ -45,10 +47,6 @@ export const EPM_API_ROUTES = { BULK_ASSETS_PATTERN: `${EPM_API_ROOT}/bulk_assets`, INPUTS_PATTERN: `${EPM_API_ROOT}/templates/{pkgName}/{pkgVersion}/inputs`, - INFO_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - DELETE_PATTERN_DEPRECATED: EPM_PACKAGES_ONE_DEPRECATED, - REAUTHORIZE_TRANSFORMS: `${EPM_PACKAGES_ONE}/transforms/authorize`, }; diff --git a/x-pack/plugins/fleet/common/services/route.test.ts b/x-pack/plugins/fleet/common/services/route.test.ts new file mode 100644 index 0000000000000..1075f4f2605ea --- /dev/null +++ b/x-pack/plugins/fleet/common/services/route.test.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { epmRouteService } from './routes'; + +describe('Route services', () => { + describe('epmRouteService', () => { + describe('getInfoPath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getInfoPath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getInfoPath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + describe('getInstallPath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getInstallPath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getInstallPath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + describe('getRemovePath', () => { + it('should generate path with pkgVersion', () => { + expect(epmRouteService.getRemovePath('test', '1.0.0')).toBe( + '/api/fleet/epm/packages/test/1.0.0' + ); + }); + it('should generate path without pkgVersion', () => { + expect(epmRouteService.getRemovePath('test')).toBe('/api/fleet/epm/packages/test'); + }); + }); + }); +}); diff --git a/x-pack/plugins/fleet/common/services/routes.ts b/x-pack/plugins/fleet/common/services/routes.ts index 520a71e1bdc0a..56f7096cf9766 100644 --- a/x-pack/plugins/fleet/common/services/routes.ts +++ b/x-pack/plugins/fleet/common/services/routes.ts @@ -47,11 +47,14 @@ export const epmRouteService = { getInfoPath: (pkgName: string, pkgVersion?: string) => { if (pkgVersion) { return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace( - '{pkgVersion}', + '{pkgVersion?}', pkgVersion ); } else { - return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace('/{pkgVersion}', ''); + return EPM_API_ROUTES.INFO_PATTERN.replace('{pkgName}', pkgName).replace( + '/{pkgVersion?}', + '' + ); } }, @@ -63,20 +66,32 @@ export const epmRouteService = { return `${EPM_API_ROOT}${filePath.replace('/package', '/packages')}`; }, - getInstallPath: (pkgName: string, pkgVersion: string) => { - return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) - .replace('{pkgVersion}', pkgVersion) - .replace(/\/$/, ''); // trim trailing slash + getInstallPath: (pkgName: string, pkgVersion?: string) => { + if (pkgVersion) { + return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) + .replace('{pkgVersion?}', pkgVersion) + .replace(/\/$/, ''); // trim trailing slash + } else { + return EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN.replace('{pkgName}', pkgName) + .replace('/{pkgVersion?}', '') + .replace(/\/$/, ''); // trim trailing slash + } }, getBulkInstallPath: () => { return EPM_API_ROUTES.BULK_INSTALL_PATTERN; }, - getRemovePath: (pkgName: string, pkgVersion: string) => { - return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) - .replace('{pkgVersion}', pkgVersion) - .replace(/\/$/, ''); // trim trailing slash + getRemovePath: (pkgName: string, pkgVersion?: string) => { + if (pkgVersion) { + return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) + .replace('{pkgVersion?}', pkgVersion) + .replace(/\/$/, ''); // trim trailing slash + } else { + return EPM_API_ROUTES.DELETE_PATTERN.replace('{pkgName}', pkgName) + .replace('/{pkgVersion?}', '') + .replace(/\/$/, ''); // trim trailing slash + } }, getInstallKibanaAssetsPath: (pkgName: string, pkgVersion: string) => { diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 827130d802f22..f1cd9e5ee4a7f 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -546,8 +546,8 @@ export type PackageList = PackageListItem[]; export type PackageListItem = Installable & { id: string; integration?: string; - installationInfo?: InstallationInfo; savedObject?: InstallableSavedObject; + installationInfo?: InstallationInfo; }; export type PackagesGroupedByStatus = Record, PackageList>; export type PackageInfo = diff --git a/x-pack/plugins/fleet/common/types/rest_spec/epm.ts b/x-pack/plugins/fleet/common/types/rest_spec/epm.ts index e8dee14e40b30..68c09eeb5e9dc 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/epm.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/epm.ts @@ -25,8 +25,6 @@ import type { export interface GetCategoriesRequest { query: { - // deprecated in 8.6 - experimental?: boolean; prerelease?: boolean; include_policy_templates?: boolean; }; @@ -34,15 +32,11 @@ export interface GetCategoriesRequest { export interface GetCategoriesResponse { items: CategorySummaryList; - // deprecated in 8.0 - response?: CategorySummaryList; } export interface GetPackagesRequest { query: { category?: string; - // deprecated in 8.6 - experimental?: boolean; prerelease?: boolean; excludeInstallStatus?: boolean; }; @@ -50,8 +44,6 @@ export interface GetPackagesRequest { export interface GetPackagesResponse { items: PackageList; - // deprecated in 8.0 - response?: PackageList; } export interface InstalledPackage { @@ -79,8 +71,6 @@ export interface GetEpmDataStreamsResponse { } export interface GetLimitedPackagesResponse { items: string[]; - // deprecated in 8.0 - response?: string[]; } export interface GetFileRequest { @@ -93,8 +83,6 @@ export interface GetFileRequest { export interface GetInfoRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -103,14 +91,10 @@ export interface GetInfoRequest { export interface GetInfoResponse { item: PackageInfo; metadata?: PackageMetadata; - // deprecated in 8.0 - response?: PackageInfo; } export interface UpdatePackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -121,8 +105,6 @@ export interface UpdatePackageRequest { export interface UpdatePackageResponse { item: PackageInfo; - // deprecated in 8.0 - response?: PackageInfo; } export interface GetStatsRequest { @@ -137,8 +119,6 @@ export interface GetStatsResponse { export interface InstallPackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -149,8 +129,6 @@ export interface InstallPackageResponse { _meta: { install_source: InstallSource; }; - // deprecated in 8.0 - response?: AssetReference[]; } export interface IBulkInstallPackageHTTPError { @@ -175,8 +153,6 @@ export interface BulkInstallPackageInfo { export interface BulkInstallPackagesResponse { items: Array; - // deprecated in 8.0 - response?: Array; } export interface BulkInstallPackagesRequest { @@ -191,8 +167,6 @@ export interface MessageResponse { export interface DeletePackageRequest { params: { - // deprecated in 8.0 - pkgkey?: string; pkgName: string; pkgVersion: string; }; @@ -202,8 +176,6 @@ export interface DeletePackageRequest { } export interface DeletePackageResponse { - // deprecated in 8.0 - response?: AssetReference[]; items: AssetReference[]; } export interface GetVerificationKeyIdResponse { diff --git a/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx b/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx index 905f2c82e85c7..f3b7b0cb77f84 100644 --- a/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx +++ b/x-pack/plugins/fleet/public/components/home_integration/tutorial_module_notice.tsx @@ -23,8 +23,8 @@ const TutorialModuleNotice: TutorialModuleNoticeComponent = memo(({ moduleName } const pkgInfo = !isLoading && - packagesData?.response && - packagesData.response.find((pkg) => pkg.name === moduleName && pkg.name !== FLEET_APM_PACKAGE); // APM needs special handling + packagesData?.items && + packagesData.items.find((pkg) => pkg.name === moduleName && pkg.name !== FLEET_APM_PACKAGE); // APM needs special handling if (hasIntegrationsPermissions && pkgInfo) { return ( diff --git a/x-pack/plugins/fleet/public/search_provider.test.ts b/x-pack/plugins/fleet/public/search_provider.test.ts index 5f95eef60546c..68ba3042a8e76 100644 --- a/x-pack/plugins/fleet/public/search_provider.test.ts +++ b/x-pack/plugins/fleet/public/search_provider.test.ts @@ -133,7 +133,7 @@ describe('Package search provider', () => { test('returns formatted results', () => { getTestScheduler().run(({ expectObservable, hot }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -217,7 +217,7 @@ describe('Package search provider', () => { test('calls EPR once only', () => { getTestScheduler().run(({ hot }) => { - mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { response: [] } } })); + mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { items: [] } } })); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any ); @@ -237,7 +237,7 @@ describe('Package search provider', () => { test('completes without returning results if aborted', () => { getTestScheduler().run(({ expectObservable, hot }) => { - mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { response: [] } } })); + mockSendGetPackages.mockReturnValue(hot('--(a|)', { a: { data: { items: [] } } })); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any ); @@ -258,7 +258,7 @@ describe('Package search provider', () => { test('respect maximum results', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -292,7 +292,7 @@ describe('Package search provider', () => { test('without packages tag, without search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -314,7 +314,7 @@ describe('Package search provider', () => { test('with integration tag, with no search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any @@ -397,7 +397,7 @@ describe('Package search provider', () => { test('with integration tag, with search term', () => { getTestScheduler().run(({ hot, expectObservable }) => { mockSendGetPackages.mockReturnValue( - hot('--(a|)', { a: { data: { response: testResponse } } }) + hot('--(a|)', { a: { data: { items: testResponse } } }) ); setupMock.getStartServices.mockReturnValue( hot('--(a|)', { a: [coreMock.createStart()] }) as any diff --git a/x-pack/plugins/fleet/public/search_provider.ts b/x-pack/plugins/fleet/public/search_provider.ts index ce1ddd10ac5a2..a6810633c428e 100644 --- a/x-pack/plugins/fleet/public/search_provider.ts +++ b/x-pack/plugins/fleet/public/search_provider.ts @@ -30,7 +30,7 @@ const createPackages$ = () => if (error) { throw error; } - return data?.response ?? []; + return data?.items ?? []; }), shareReplay(1) ); @@ -86,7 +86,7 @@ export const createPackageSearchProvider = (core: CoreSetup): GlobalSearchResult shareReplay(1) ); - let packages$: undefined | Observable; + let packages$: undefined | Observable; const getPackages$ = () => { if (!packages$) { diff --git a/x-pack/plugins/fleet/server/routes/epm/handlers.ts b/x-pack/plugins/fleet/server/routes/epm/handlers.ts index 7d7fea6d693a7..1fcd0e26a6ef0 100644 --- a/x-pack/plugins/fleet/server/routes/epm/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/epm/handlers.ts @@ -9,7 +9,7 @@ import type { TypeOf } from '@kbn/config-schema'; import semverValid from 'semver/functions/valid'; import type { HttpResponseOptions } from '@kbn/core/server'; -import { pick } from 'lodash'; +import { omit, pick } from 'lodash'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../../common'; @@ -98,12 +98,11 @@ export const getCategoriesHandler: FleetRequestHandler< TypeOf > = async (context, request, response) => { try { - const res = await getCategories({ + const items = await getCategories({ ...request.query, }); const body: GetCategoriesResponse = { - items: res, - response: res, + items, }; return response.ok({ body, headers: { ...CACHE_CONTROL_10_MINUTES_HEADER } }); } catch (error) { @@ -124,7 +123,6 @@ export const getListHandler: FleetRequestHandler< const flattenedRes = res.map((pkg) => soToInstallationInfo(pkg)) as PackageList; const body: GetPackagesResponse = { items: flattenedRes, - response: res, }; return response.ok({ body, @@ -199,7 +197,6 @@ export const getLimitedListHandler: FleetRequestHandler< }); const body: GetLimitedPackagesResponse = { items: res, - response: res, }; return response.ok({ body, @@ -460,7 +457,6 @@ export const bulkInstallPackagesFromRegistryHandler: FleetRequestHandler< const payload = bulkInstalledResponses.map(bulkInstallServiceResponseToHttpEntry); const body: BulkInstallPackagesResponse = { items: payload, - response: payload, }; return response.ok({ body }); }; @@ -494,7 +490,6 @@ export const installPackageByUploadHandler: FleetRequestHandler< if (!res.error) { const body: InstallPackageResponse = { items: res.assets || [], - response: res.assets || [], _meta: { install_source: res.installSource ?? installSource, }, @@ -519,8 +514,7 @@ export const installPackageByUploadHandler: FleetRequestHandler< export const deletePackageHandler: FleetRequestHandler< TypeOf, - TypeOf, - TypeOf + TypeOf > = async (context, request, response) => { try { const { pkgName, pkgVersion } = request.params; @@ -676,8 +670,7 @@ const soToInstallationInfo = (pkg: PackageListItem | PackageInfo) => { }; return { - // When savedObject gets removed, replace `pkg` with `...omit(pkg, 'savedObject')` - ...pkg, + ...omit(pkg, 'savedObject'), installationInfo, }; } diff --git a/x-pack/plugins/fleet/server/routes/epm/index.test.ts b/x-pack/plugins/fleet/server/routes/epm/index.test.ts index a054b02aae1d1..d736cb7c318ba 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.test.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.test.ts @@ -323,7 +323,6 @@ describe('schema validation', () => { }; const expectedResponse: GetCategoriesResponse = { items: [category], - response: [category], }; (getCategoriesHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -386,7 +385,6 @@ describe('schema validation', () => { }; const expectedResponse: GetPackagesResponse = { items: [packageItem], - response: [packageItem], }; (getListHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -444,7 +442,6 @@ describe('schema validation', () => { it('get limited packages should return valid response', async () => { const expectedResponse: GetLimitedPackagesResponse = { items: ['test'], - response: ['test'], }; (getLimitedListHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -513,7 +510,6 @@ describe('schema validation', () => { metadata: { has_policies: true, }, - response: packageInfo, }; (getInfoHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -530,7 +526,6 @@ describe('schema validation', () => { it('update package should return valid response', async () => { const expectedResponse: UpdatePackageResponse = { item: packageInfo, - response: packageInfo, }; (updatePackageHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -556,13 +551,6 @@ describe('schema validation', () => { _meta: { install_source: 'registry', }, - response: [ - { - id: 'test', - type: KibanaSavedObjectType.dashboard, - originId: 'test', - }, - ], }; (installPackageFromRegistryHandler as jest.Mock).mockImplementation((ctx, request, res) => { return res.ok({ body: expectedResponse }); @@ -612,7 +600,6 @@ describe('schema validation', () => { }; const expectedResponse: BulkInstallPackagesResponse = { items: [item, { name: 'test', statusCode: 400, error: 'test' }], - response: [item], }; (bulkInstallPackagesFromRegistryHandler as jest.Mock).mockImplementation( (ctx, request, res) => { diff --git a/x-pack/plugins/fleet/server/routes/epm/index.ts b/x-pack/plugins/fleet/server/routes/epm/index.ts index 0e3c5e76eb825..283f8d6a1b0a0 100644 --- a/x-pack/plugins/fleet/server/routes/epm/index.ts +++ b/x-pack/plugins/fleet/server/routes/epm/index.ts @@ -5,8 +5,6 @@ * 2.0. */ -import type { IKibanaResponse } from '@kbn/core/server'; - import { parseExperimentalConfigValue } from '../../../common/experimental_features'; import { API_VERSIONS } from '../../../common/constants'; @@ -20,32 +18,20 @@ import { } from '../../services/security'; import type { FleetAuthzRouteConfig } from '../../services/security/types'; -import type { - DeletePackageResponse, - GetInfoResponse, - InstallPackageResponse, - UpdatePackageResponse, -} from '../../../common/types'; - import { EPM_API_ROUTES } from '../../constants'; -import { splitPkgKey } from '../../services/epm/registry'; import { GetCategoriesRequestSchema, GetPackagesRequestSchema, GetInstalledPackagesRequestSchema, GetFileRequestSchema, GetInfoRequestSchema, - GetInfoRequestSchemaDeprecated, GetBulkAssetsRequestSchema, InstallPackageFromRegistryRequestSchema, - InstallPackageFromRegistryRequestSchemaDeprecated, InstallPackageByUploadRequestSchema, DeletePackageRequestSchema, - DeletePackageRequestSchemaDeprecated, BulkInstallPackagesFromRegistryRequestSchema, GetStatsRequestSchema, UpdatePackageRequestSchema, - UpdatePackageRequestSchemaDeprecated, ReauthorizeTransformRequestSchema, GetDataStreamsRequestSchema, CreateCustomIntegrationRequestSchema, @@ -648,124 +634,6 @@ export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType getBulkAssetsHandler ); - // deprecated since 8.0 - // This endpoint should be marked as internal but the router selects this endpoint over the new GET one - // For now keeping it public - router.versioned - .get({ - path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED, - fleetAuthz: (fleetAuthz: FleetAuthz): boolean => - calculateRouteAuthz( - fleetAuthz, - getRouteRequiredAuthz('get', EPM_API_ROUTES.INFO_PATTERN_DEPRECATED) - ).granted, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: GetInfoRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await getInfoHandler( - context, - newRequest, - response - ); - if (resp.payload?.item) { - // returning item as well here, because pkgVersion is optional in new GET endpoint, and if not specified, the router selects the deprecated route - return response.ok({ body: { item: resp.payload.item, response: resp.payload.item } }); - } - return resp; - } - ); - - router.versioned - .put({ - path: EPM_API_ROUTES.INFO_PATTERN_DEPRECATED, - fleetAuthz: { - integrations: { writePackageSettings: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: UpdatePackageRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await updatePackageHandler( - context, - newRequest, - response - ); - if (resp.payload?.item) { - return response.ok({ body: { response: resp.payload.item } }); - } - return resp; - } - ); - - // This endpoint should be marked as internal but the router selects this endpoint over the new POST - router.versioned - .post({ - path: EPM_API_ROUTES.INSTALL_FROM_REGISTRY_PATTERN_DEPRECATED, - fleetAuthz: INSTALL_PACKAGES_AUTHZ, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: InstallPackageFromRegistryRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { - ...request, - params: splitPkgKey(request.params.pkgkey), - query: request.query, - } as any; - const resp: IKibanaResponse = - await installPackageFromRegistryHandler(context, newRequest, response); - if (resp.payload?.items) { - return response.ok({ body: { ...resp.payload, response: resp.payload.items } }); - } - return resp; - } - ); - - router.versioned - .delete({ - path: EPM_API_ROUTES.DELETE_PATTERN_DEPRECATED, - fleetAuthz: { - integrations: { removePackages: true }, - }, - // @ts-expect-error TODO(https://github.com/elastic/kibana/issues/196095): Replace {RouteDeprecationInfo} - deprecated: true, - }) - .addVersion( - { - version: API_VERSIONS.public.v1, - validate: { request: DeletePackageRequestSchemaDeprecated }, - }, - async (context, request, response) => { - const newRequest = { ...request, params: splitPkgKey(request.params.pkgkey) } as any; - const resp: IKibanaResponse = await deletePackageHandler( - context, - newRequest, - response - ); - if (resp.payload?.items) { - return response.ok({ body: { response: resp.payload.items } }); - } - return resp; - } - ); - // Update transforms with es-secondary-authorization headers, // append authorized_by to transform's _meta, and start transforms router.versioned diff --git a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts index 3892eaa951e5f..84c8a8eb9e104 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/remove.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/remove.ts @@ -57,14 +57,15 @@ const MAX_ASSETS_TO_DELETE = 1000; export async function removeInstallation(options: { savedObjectsClient: SavedObjectsClientContract; pkgName: string; - pkgVersion: string; + pkgVersion?: string; esClient: ElasticsearchClient; force?: boolean; }): Promise { - const { savedObjectsClient, pkgName, pkgVersion, esClient } = options; + const { savedObjectsClient, pkgName, esClient } = options; const installation = await getInstallation({ savedObjectsClient, pkgName }); - if (!installation) throw new PackageRemovalError(`${pkgName} is not installed`); - + if (!installation) { + throw new PackageRemovalError(`${pkgName} is not installed`); + } const { total, items } = await packagePolicyService.list( appContextService.getInternalUserSOClientWithoutSpaceExtension(), { @@ -115,7 +116,7 @@ export async function removeInstallation(options: { // a fresh copy from the registry deletePackageCache({ name: pkgName, - version: pkgVersion, + version: installation.version, }); await removeArchiveEntries({ savedObjectsClient, refs: installation.package_assets }); diff --git a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts index bbc1b07010fb7..37ab96b96afb7 100644 --- a/x-pack/plugins/fleet/server/services/security/route_required_authz.ts +++ b/x-pack/plugins/fleet/server/services/security/route_required_authz.ts @@ -164,7 +164,7 @@ const ROUTE_AUTHZ_REQUIREMENTS = deepFreeze p.status === 'installed') .map((p: any) => p.name) .sort(); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts b/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts new file mode 100644 index 0000000000000..2c53248905521 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/package_policy/helper.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Agent } from 'supertest'; + +export async function getInstallationInfo(supertest: Agent, name: string, version: string) { + const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); + return res.body.item.installationInfo; +} diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts index 481f4e09c68d9..bbd55641ce916 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_create_upgrade.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const PACKAGE_NAME = 'input_package_upgrade'; const START_VERSION = '1.0.0'; const UPGRADE_VERSION = '1.1.0'; @@ -33,11 +34,6 @@ export default function (providerContext: FtrProviderContext) { .expect(200); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const createPackagePolicyWithDataset = async ( agentPolicyId: string, dataset: string, @@ -195,13 +191,13 @@ export default function (providerContext: FtrProviderContext) { }); it('should not have created any ES assets on install', async () => { - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expect(installation.installed_es).to.eql([]); }); it('should create index templates and update installed_es on package policy creation', async () => { await createPackagePolicyWithDataset(agentPolicyId, 'dataset1'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expectIdArraysEqual(installation.installed_es, [ { id: 'logs-dataset1-1.0.0', type: 'ingest_pipeline' }, { id: 'logs-dataset1', type: 'index_template' }, @@ -249,7 +245,7 @@ export default function (providerContext: FtrProviderContext) { it('should create index templates and update installed_es on second package policy creation', async () => { await createPackagePolicyWithDataset(agentPolicyId, 'dataset2'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); let found = 0; [ { id: 'logs-dataset2-1.0.0', type: 'ingest_pipeline' }, @@ -268,7 +264,7 @@ export default function (providerContext: FtrProviderContext) { await createFakeFleetDataStream('dataset3'); await createPackagePolicyWithDataset(agentPolicyId, 'dataset3'); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); let found = 0; [ { id: 'logs-dataset3-1.0.0', type: 'ingest_pipeline' }, diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts index 2ea9c64ee2507..7ccd2fad8bdde 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/input_package_rollback.ts @@ -8,6 +8,7 @@ import expect from '@kbn/expect'; import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const PACKAGE_NAME = 'input_package_upgrade'; const START_VERSION = '1.0.0'; @@ -31,11 +32,6 @@ export default function (providerContext: FtrProviderContext) { .expect(200); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getPackage = async (name: string, version: string) => { const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); return res.body.item; @@ -131,7 +127,7 @@ export default function (providerContext: FtrProviderContext) { await installPackage(PACKAGE_NAME, START_VERSION); await createPackagePolicyWithDataset(agentPolicyId, 'test*', 400); - const installation = await getInstallationSavedObject(PACKAGE_NAME, START_VERSION); + const installation = await getInstallationInfo(supertest, PACKAGE_NAME, START_VERSION); expectIdArraysEqual(installation.installed_es, []); await uninstallPackage(PACKAGE_NAME, START_VERSION); diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts index 273f051dfcec6..619ddeb0544e7 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/update.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/update.ts @@ -15,6 +15,7 @@ import { enableSecrets, } from '../../helpers'; import { testUsers } from '../test_users'; +import { getInstallationInfo } from './helper'; export default function (providerContext: FtrProviderContext) { const { getService } = providerContext; @@ -28,11 +29,6 @@ export default function (providerContext: FtrProviderContext) { expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); }; - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getPackagePolicyById = async (id: string) => { const { body } = await supertest.get(`/api/fleet/package_policies/${id}`); return body; @@ -935,7 +931,7 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - const installation = await getInstallationSavedObject('integration_to_input', '2.0.0'); + const installation = await getInstallationInfo(supertest, 'integration_to_input', '2.0.0'); expectIdArraysEqual(installation.installed_es, [ // assets from version 1.0.0 diff --git a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts index 021eebcdcc0c1..e0fbddb578a91 100644 --- a/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts +++ b/x-pack/test/fleet_api_integration/apis/package_policy/upgrade.ts @@ -12,6 +12,7 @@ import { import { sortBy } from 'lodash'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; +import { getInstallationInfo } from './helper'; const expectIdArraysEqual = (arr1: any[], arr2: any[]) => { expect(sortBy(arr1, 'id')).to.eql(sortBy(arr2, 'id')); @@ -36,11 +37,6 @@ export default function (providerContext: FtrProviderContext) { }); } - const getInstallationSavedObject = async (name: string, version: string) => { - const res = await supertest.get(`/api/fleet/epm/packages/${name}/${version}`).expect(200); - return res.body.item.savedObject.attributes; - }; - const getComponentTemplate = async (name: string) => { try { const { component_templates: templates } = await es.cluster.getComponentTemplate({ name }); @@ -1358,7 +1354,11 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - const installation = await getInstallationSavedObject('integration_to_input', '3.0.0'); + const installation = await getInstallationInfo( + supertest, + 'integration_to_input', + '3.0.0' + ); expectIdArraysEqual(installation.installed_es, expectedAssets); const expectedComponentTemplates = expectedAssets.filter( diff --git a/x-pack/test/functional/services/ml/test_resources.ts b/x-pack/test/functional/services/ml/test_resources.ts index 5035b6844b9c3..915060b152f24 100644 --- a/x-pack/test/functional/services/ml/test_resources.ts +++ b/x-pack/test/functional/services/ml/test_resources.ts @@ -594,12 +594,12 @@ export function MachineLearningTestResourcesProvider( await retry.tryForTime(10 * 1000, async () => { const { body, status } = await supertest - .get(`/api/fleet/epm/packages?experimental=true`) + .get(`/api/fleet/epm/packages?prerelease=true`) .set(getCommonRequestHeader(`${API_VERSIONS.public.v1}`)); mlApi.assertResponseStatusCode(200, status, body); packageVersion = - body.response.find( + body.items.find( ({ name, version }: { name: string; version: string }) => name === packageName && version )?.version ?? ''; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts index e53e24f98de3b..cea8363d9085c 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_endpoint_fleet_package.ts @@ -21,9 +21,9 @@ export async function deleteEndpointFleetPackage(supertest: SuperTest.Agent) { .set('elastic-api-version', '2023-10-31') .send(); - if (resp.status === 200 && resp.body.response.status === 'installed') { + if (resp.status === 200 && resp.body.item.status === 'installed') { await supertest - .delete(epmRouteService.getRemovePath(ENDPOINT_PACKAGE_NAME, resp.body.response.version)) + .delete(epmRouteService.getRemovePath(ENDPOINT_PACKAGE_NAME, resp.body.item.version)) .set('kbn-xsrf', 'true') .send({ force: true }); } diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts index 930c9d39757f4..084d59c55df0d 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/rules/prebuilt_rules/delete_prebuilt_rules_fleet_package.ts @@ -21,11 +21,9 @@ export async function deletePrebuiltRulesFleetPackage(supertest: SuperTest.Agent .set('elastic-api-version', '2023-10-31') .send(); - if (resp.status === 200 && resp.body.response.status === 'installed') { + if (resp.status === 200 && resp.body.item.status === 'installed') { await supertest - .delete( - epmRouteService.getRemovePath(PREBUILT_RULES_PACKAGE_NAME, resp.body.response.version) - ) + .delete(epmRouteService.getRemovePath(PREBUILT_RULES_PACKAGE_NAME, resp.body.item.version)) .set('kbn-xsrf', 'true') .send({ force: true }); } From cdb9ef37e67d23c1a5bec27789a4d0398a4f2250 Mon Sep 17 00:00:00 2001 From: Yan Savitski Date: Wed, 6 Nov 2024 14:48:04 +0100 Subject: [PATCH 08/16] [Search] [Playground] Update use source indices fields hook tests (#198393) ## Summary Summarize your PR. If it involves visual changes include a screenshot or gif. ### Checklist Delete any items that are not applicable to this PR. - [ ] 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/main/packages/kbn-i18n/README.md) - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --- .../hooks/use_source_indices_fields.test.tsx | 182 ++++++------------ 1 file changed, 60 insertions(+), 122 deletions(-) diff --git a/x-pack/plugins/search_playground/public/hooks/use_source_indices_fields.test.tsx b/x-pack/plugins/search_playground/public/hooks/use_source_indices_fields.test.tsx index b31512177d3cb..4adf3d18ea92b 100644 --- a/x-pack/plugins/search_playground/public/hooks/use_source_indices_fields.test.tsx +++ b/x-pack/plugins/search_playground/public/hooks/use_source_indices_fields.test.tsx @@ -6,144 +6,82 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; -import { useKibana } from './use_kibana'; -import { PlaygroundProvider } from '../providers/playground_provider'; -import React from 'react'; -import * as ReactHookForm from 'react-hook-form'; - -jest.mock('./use_kibana', () => ({ - useKibana: jest.fn(), -})); -jest.mock('react-router-dom-v5-compat', () => ({ - useSearchParams: jest.fn(() => [{ get: jest.fn() }]), -})); - -let formHookSpy: jest.SpyInstance; - +import { useUsageTracker } from './use_usage_tracker'; +import { useController } from 'react-hook-form'; +import { useIndicesFields } from './use_indices_fields'; +import { AnalyticsEvents } from '../analytics/constants'; import { useSourceIndicesFields } from './use_source_indices_field'; -import { IndicesQuerySourceFields } from '../types'; -// Failing: See https://github.com/elastic/kibana/issues/188840 -describe.skip('useSourceIndicesFields Hook', () => { - let postMock: jest.Mock; - - beforeEach(() => { - // Playground Provider has the formProvider which - // persists the form state into local storage - // We need to clear the local storage before each test - localStorage.clear(); - }); +jest.mock('./use_usage_tracker'); +jest.mock('react-hook-form'); +jest.mock('./use_indices_fields'); - const wrapper = ({ children }: { children: React.ReactNode }) => ( - {children} - ); +describe('useSourceIndicesFields', () => { + const mockUsageTracker = { + count: jest.fn(), + }; + const mockOnChange = jest.fn(); + const mockFields = ['field1', 'field2']; + const mockSelectedIndices = ['index1', 'index2']; beforeEach(() => { - formHookSpy = jest.spyOn(ReactHookForm, 'useForm'); - const querySourceFields: IndicesQuerySourceFields = { - newIndex: { - elser_query_fields: [ - { - field: 'field1', - model_id: 'model1', - indices: ['newIndex'], - sparse_vector: true, - }, - ], - dense_vector_query_fields: [], - bm25_query_fields: [], - source_fields: ['field1'], - skipped_fields: 0, - semantic_fields: [], - }, - }; - - postMock = jest.fn().mockResolvedValue(querySourceFields); - (useKibana as jest.Mock).mockImplementation(() => ({ - services: { - http: { - post: postMock, - get: jest.fn(() => { - return []; - }), - }, - }, - })); - }); - - afterEach(() => { jest.clearAllMocks(); + (useUsageTracker as jest.Mock).mockReturnValue(mockUsageTracker); + (useController as jest.Mock).mockReturnValue({ + field: { value: mockSelectedIndices, onChange: mockOnChange }, + }); + (useIndicesFields as jest.Mock).mockReturnValue({ + fields: mockFields, + isLoading: false, + }); }); - it('should handle addIndex correctly changing indices', async () => { - const { result, waitForNextUpdate } = renderHook(() => useSourceIndicesFields(), { wrapper }); - const { getValues } = formHookSpy.mock.results[0].value; + it('should initialize correctly', () => { + const { result } = renderHook(() => useSourceIndicesFields()); + + expect(result.current.indices).toEqual(mockSelectedIndices); + expect(result.current.fields).toEqual(mockFields); + expect(result.current.isFieldsLoading).toBe(false); + }); + it('should add an index', () => { + const { result } = renderHook(() => useSourceIndicesFields()); act(() => { - expect(result.current.indices).toEqual([]); - expect(getValues()).toMatchInlineSnapshot(` - Object { - "doc_size": 3, - "elasticsearch_query": Object { - "retriever": Object { - "standard": Object { - "query": Object { - "match_all": Object {}, - }, - }, - }, - }, - "indices": Array [], - "prompt": "You are an assistant for question-answering tasks.", - "query_fields": Object {}, - "source_fields": Object {}, - "summarization_model": undefined, - } - `); result.current.addIndex('newIndex'); }); - await act(async () => { - await waitForNextUpdate(); - expect(result.current.indices).toEqual(['newIndex']); + expect(mockOnChange).toHaveBeenCalledWith([...mockSelectedIndices, 'newIndex']); + expect(mockUsageTracker.count).toHaveBeenCalledWith( + AnalyticsEvents.sourceIndexUpdated, + mockSelectedIndices.length + 1 + ); + }); + + it('should remove an index', () => { + const { result } = renderHook(() => useSourceIndicesFields()); + act(() => { + result.current.removeIndex('index1'); }); - expect(postMock).toHaveBeenCalled(); + expect(mockOnChange).toHaveBeenCalledWith(['index2']); + expect(mockUsageTracker.count).toHaveBeenCalledWith( + AnalyticsEvents.sourceIndexUpdated, + mockSelectedIndices.length - 1 + ); + }); + + it('should set indices', () => { + const { result } = renderHook(() => useSourceIndicesFields()); + const newIndices = ['index3', 'index4']; - await act(async () => { - expect(getValues()).toMatchInlineSnapshot(` - Object { - "doc_size": 3, - "elasticsearch_query": Object { - "retriever": Object { - "standard": Object { - "query": Object { - "sparse_vector": Object { - "field": "field1", - "inference_id": "model1", - "query": "{query}", - }, - }, - }, - }, - }, - "indices": Array [ - "newIndex", - ], - "prompt": "You are an assistant for question-answering tasks.", - "query_fields": Object { - "newIndex": Array [ - "field1", - ], - }, - "source_fields": Object { - "newIndex": Array [ - "field1", - ], - }, - "summarization_model": undefined, - } - `); + act(() => { + result.current.setIndices(newIndices); }); + + expect(mockOnChange).toHaveBeenCalledWith(newIndices); + expect(mockUsageTracker.count).toHaveBeenCalledWith( + AnalyticsEvents.sourceIndexUpdated, + newIndices.length + ); }); }); From de46e7f0739eb14138655e204d4be77d8e24ff37 Mon Sep 17 00:00:00 2001 From: Jordan <51442161+JordanSh@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:52:30 +0200 Subject: [PATCH 09/16] [Cloud Security] Fixes SVG flickering and adding insight telemetry (#198812) --- .../common/utils/ui_metrics.ts | 17 ++++++++++++++- .../empty_states_illustration_container.tsx | 21 +++++++++++++++++++ .../no_findings_states/no_findings_states.tsx | 21 ++++++++++++------- .../components/no_vulnerabilities_states.tsx | 21 ++++++++++++------- .../left/components/host_details.tsx | 2 ++ .../left/components/user_details.tsx | 1 + .../right/components/host_entity_overview.tsx | 2 ++ .../right/components/user_entity_overview.tsx | 1 + .../components/misconfiguration_insight.tsx | 20 +++++++++++++++++- .../components/vulnerabilities_insight.tsx | 20 +++++++++++++++++- 10 files changed, 109 insertions(+), 17 deletions(-) create mode 100644 x-pack/plugins/cloud_security_posture/public/components/empty_states_illustration_container.tsx diff --git a/x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts b/x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts index 252252b08e976..c7baeb47bc214 100644 --- a/x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts +++ b/x-pack/packages/kbn-cloud-security-posture/common/utils/ui_metrics.ts @@ -10,6 +10,15 @@ import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; export const APP_NAME = 'cloud-security'; +export const MISCONFIGURATION_INSIGHT = 'misconfiguration-insight'; +export const VULNERABILITIES_INSIGHT = 'vulnerabilities-insight'; +export const MISCONFIGURATION_INSIGHT_HOST_DETAILS = `${MISCONFIGURATION_INSIGHT}-host-details`; +export const MISCONFIGURATION_INSIGHT_USER_DETAILS = `${MISCONFIGURATION_INSIGHT}-user-details`; +export const MISCONFIGURATION_INSIGHT_HOST_ENTITY_OVERVIEW = `${MISCONFIGURATION_INSIGHT}-host-entity-overview`; +export const MISCONFIGURATION_INSIGHT_USER_ENTITY_OVERVIEW = `${MISCONFIGURATION_INSIGHT}-user-entity-overview`; +export const VULNERABILITIES_INSIGHT_HOST_DETAILS = `${VULNERABILITIES_INSIGHT}-host-details`; +export const VULNERABILITIES_INSIGHT_HOST_ENTITY_OVERVIEW = `${VULNERABILITIES_INSIGHT}-host-entity-overview`; + export const ENTITY_FLYOUT_WITH_MISCONFIGURATION_VISIT = 'entity-flyout-with-misconfiguration-visits'; export const ENTITY_FLYOUT_WITH_VULNERABILITY_PREVIEW = @@ -41,7 +50,13 @@ type CloudSecurityUiCounters = | typeof CREATE_DETECTION_RULE_FROM_FLYOUT | typeof CREATE_DETECTION_FROM_TABLE_ROW_ACTION | typeof GROUP_BY_CLICK - | typeof CHANGE_RULE_STATE; + | typeof CHANGE_RULE_STATE + | typeof MISCONFIGURATION_INSIGHT_HOST_DETAILS + | typeof MISCONFIGURATION_INSIGHT_USER_DETAILS + | typeof MISCONFIGURATION_INSIGHT_HOST_ENTITY_OVERVIEW + | typeof MISCONFIGURATION_INSIGHT_USER_ENTITY_OVERVIEW + | typeof VULNERABILITIES_INSIGHT_HOST_DETAILS + | typeof VULNERABILITIES_INSIGHT_HOST_ENTITY_OVERVIEW; export class UiMetricService { private usageCollection: UsageCollectionSetup | undefined; diff --git a/x-pack/plugins/cloud_security_posture/public/components/empty_states_illustration_container.tsx b/x-pack/plugins/cloud_security_posture/public/components/empty_states_illustration_container.tsx new file mode 100644 index 0000000000000..3ae4b64b1c848 --- /dev/null +++ b/x-pack/plugins/cloud_security_posture/public/components/empty_states_illustration_container.tsx @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +// dimensions of the SVGs used in the empty states illustrations +// e.g. x-pack/plugins/cloud_security_posture/public/assets/illustrations/clouds.svg +const SVG_HEIGHT = 209; +const SVG_WIDTH = 376; + +/** + * A container component that maintains a fixed size for child elements. + * used for displaying the empty state illustrations and prevent flickering while the SVGs are loading. + */ +export const EmptyStatesIllustrationContainer: React.FC<{ children: React.ReactNode }> = ({ + children, +}) =>
{children}
; diff --git a/x-pack/plugins/cloud_security_posture/public/components/no_findings_states/no_findings_states.tsx b/x-pack/plugins/cloud_security_posture/public/components/no_findings_states/no_findings_states.tsx index 5a8db618d5495..a475d35cd6885 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/no_findings_states/no_findings_states.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/no_findings_states/no_findings_states.tsx @@ -26,6 +26,7 @@ import type { IndexDetails, CspStatusCode } from '@kbn/cloud-security-posture-co import { useCspSetupStatusApi } from '@kbn/cloud-security-posture/src/hooks/use_csp_setup_status_api'; import { useLocation } from 'react-router-dom'; import { findingsNavigation } from '@kbn/cloud-security-posture'; +import { EmptyStatesIllustrationContainer } from '../empty_states_illustration_container'; import { useAdd3PIntegrationRoute } from '../../common/api/use_wiz_integration_route'; import { FullSizeCenteredPage } from '../full_size_centered_page'; import { useCISIntegrationPoliciesLink } from '../../common/navigation/use_navigate_to_cis_integration_policies'; @@ -191,7 +192,11 @@ const EmptySecurityFindingsPrompt = () => { } + icon={ + + + + } title={

{ style={{ padding: euiTheme.size.l }} data-test-subj={THIRD_PARTY_INTEGRATIONS_NO_MISCONFIGURATIONS_FINDINGS_PROMPT} icon={ - + + + } title={

diff --git a/x-pack/plugins/cloud_security_posture/public/components/no_vulnerabilities_states.tsx b/x-pack/plugins/cloud_security_posture/public/components/no_vulnerabilities_states.tsx index 20438aa341ad6..4e6b487f73cbc 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/no_vulnerabilities_states.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/no_vulnerabilities_states.tsx @@ -25,6 +25,7 @@ import type { IndexDetails } from '@kbn/cloud-security-posture-common'; import { useCspSetupStatusApi } from '@kbn/cloud-security-posture/src/hooks/use_csp_setup_status_api'; import { useLocation } from 'react-router-dom'; import { findingsNavigation } from '@kbn/cloud-security-posture'; +import { EmptyStatesIllustrationContainer } from './empty_states_illustration_container'; import { VULN_MGMT_POLICY_TEMPLATE } from '../../common/constants'; import { FullSizeCenteredPage } from './full_size_centered_page'; import { CloudPosturePage } from './cloud_posture_page'; @@ -84,7 +85,11 @@ const CnvmIntegrationNotInstalledEmptyPrompt = ({ } + icon={ + + + + } title={

+ + + } title={

diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx index f5a1e112afa80..c315e991d9f06 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/host_details.tsx @@ -359,11 +359,13 @@ export const HostDetails: React.FC = ({ hostName, timestamp, s name={hostName} direction="column" data-test-subj={HOST_DETAILS_MISCONFIGURATIONS_TEST_ID} + telemetrySuffix={'host-details'} /> diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx index ed406d3b8c679..2f98c641b5954 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/components/user_details.tsx @@ -359,6 +359,7 @@ export const UserDetails: React.FC = ({ userName, timestamp, s name={userName} direction="column" data-test-subj={USER_DETAILS_MISCONFIGURATIONS_TEST_ID} + telemetrySuffix={'user-details'} /> diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx index 90405286b004c..9b60eefbb5f61 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/host_entity_overview.tsx @@ -285,10 +285,12 @@ export const HostEntityOverview: React.FC = ({ hostName fieldName={'host.name'} name={hostName} data-test-subj={ENTITIES_HOST_OVERVIEW_MISCONFIGURATIONS_TEST_ID} + telemetrySuffix={'host-entity-overview'} /> ); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx index 0019228d656cd..1008f6139cd67 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/components/user_entity_overview.tsx @@ -283,6 +283,7 @@ export const UserEntityOverview: React.FC = ({ userName fieldName={'user.name'} name={userName} data-test-subj={ENTITIES_USER_OVERVIEW_MISCONFIGURATIONS_TEST_ID} + telemetrySuffix={'user-entity-overview'} /> ); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx index 961fa1d5f3a45..e7ebb371fb020 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/misconfiguration_insight.tsx @@ -5,12 +5,17 @@ * 2.0. */ -import React, { useMemo } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { EuiFlexItem, type EuiFlexGroupProps, useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/css'; import { useMisconfigurationPreview } from '@kbn/cloud-security-posture/src/hooks/use_misconfiguration_preview'; import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; +import { + MISCONFIGURATION_INSIGHT, + uiMetricService, +} from '@kbn/cloud-security-posture-common/utils/ui_metrics'; +import { METRIC_TYPE } from '@kbn/analytics'; import { InsightDistributionBar } from './insight_distribution_bar'; import { getFindingsStats } from '../../../../cloud_security_posture/components/misconfiguration/misconfiguration_preview'; import { FormattedCount } from '../../../../common/components/formatted_number'; @@ -34,6 +39,10 @@ interface MisconfigurationsInsightProps { * The data-test-subj to use for the component */ ['data-test-subj']?: string; + /** + * used to track the instance of this component, prefer kebab-case + */ + telemetrySuffix?: string; } /* @@ -44,6 +53,7 @@ export const MisconfigurationsInsight: React.FC = fieldName, direction, 'data-test-subj': dataTestSubj, + telemetrySuffix, }) => { const { scopeId, isPreview } = useDocumentDetailsContext(); const { euiTheme } = useEuiTheme(); @@ -54,6 +64,14 @@ export const MisconfigurationsInsight: React.FC = pageSize: 1, }); + useEffect(() => { + uiMetricService.trackUiMetric( + METRIC_TYPE.COUNT, + `${MISCONFIGURATION_INSIGHT}-${telemetrySuffix}` + ); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const passedFindings = data?.count.passed || 0; const failedFindings = data?.count.failed || 0; const totalFindings = useMemo( diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx index c675c0a0e079b..1dab4660194b9 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/components/vulnerabilities_insight.tsx @@ -5,13 +5,18 @@ * 2.0. */ -import React, { useMemo } from 'react'; +import React, { useEffect, useMemo } from 'react'; import { EuiFlexItem, type EuiFlexGroupProps, useEuiTheme } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { css } from '@emotion/css'; import { useVulnerabilitiesPreview } from '@kbn/cloud-security-posture/src/hooks/use_vulnerabilities_preview'; import { buildEntityFlyoutPreviewQuery } from '@kbn/cloud-security-posture-common'; import { getVulnerabilityStats, hasVulnerabilitiesData } from '@kbn/cloud-security-posture'; +import { + uiMetricService, + VULNERABILITIES_INSIGHT, +} from '@kbn/cloud-security-posture-common/utils/ui_metrics'; +import { METRIC_TYPE } from '@kbn/analytics'; import { InsightDistributionBar } from './insight_distribution_bar'; import { FormattedCount } from '../../../../common/components/formatted_number'; import { PreviewLink } from '../../../shared/components/preview_link'; @@ -30,6 +35,10 @@ interface VulnerabilitiesInsightProps { * The data-test-subj to use for the component */ ['data-test-subj']?: string; + /** + * used to track the instance of this component, prefer kebab-case + */ + telemetrySuffix?: string; } /* @@ -39,6 +48,7 @@ export const VulnerabilitiesInsight: React.FC = ({ hostName, direction, 'data-test-subj': dataTestSubj, + telemetrySuffix, }) => { const { scopeId, isPreview } = useDocumentDetailsContext(); const { euiTheme } = useEuiTheme(); @@ -49,6 +59,14 @@ export const VulnerabilitiesInsight: React.FC = ({ pageSize: 1, }); + useEffect(() => { + uiMetricService.trackUiMetric( + METRIC_TYPE.COUNT, + `${VULNERABILITIES_INSIGHT}-${telemetrySuffix}` + ); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + const { CRITICAL = 0, HIGH = 0, MEDIUM = 0, LOW = 0, NONE = 0 } = data?.count || {}; const totalVulnerabilities = useMemo( () => CRITICAL + HIGH + MEDIUM + LOW + NONE, From deeb9fe32af717a883727aed7d83c6106d8d839f Mon Sep 17 00:00:00 2001 From: Aleh Zasypkin Date: Wed, 6 Nov 2024 16:06:39 +0200 Subject: [PATCH 10/16] fix(security, features): do not expose UI capabilities of the deprecated features (#198656) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This PR ensures that we don’t expose UI capabilities for deprecated features since they’re unnecessary, and the code should rely on the UI capabilities of the replacement features instead. Additionally, this PR transforms the `disabledFeatures` property of Space objects returned from our programmatic and HTTP APIs to replace any deprecated feature IDs with the IDs of their replacement features, ensuring that feature visibility toggles work for deprecated features as well. ## How to test 1. Run Kibana FTR server with the following config (registers test deprecated features): ```shell node scripts/functional_tests_server.js --config x-pack/test/security_api_integration/features.config.ts ``` 2. Once server is up and running create Space with the `case_1_feature_a` **deprecated** feature disabled: ```shell curl 'http://localhost:5620/api/spaces/space' -u elastic:changeme \ -X POST -H 'Content-Type: application/json' -H 'kbn-version: 9.0.0' \ --data-raw '{"name":"space-alpha","id":"space-alpha","initials":"s","color":"#D6BF57","disabledFeatures":["case_1_feature_a"],"imageUrl":""}' ``` 3. Log in to Kibana and [navigate to a Space `space-alpha`](http://localhost:5620/app/management/kibana/spaces/edit/space-alpha) you've just created. Observe that deprecated `Case #1 feature A` (`case_1_feature_a`) isn't displayed, and instead you should see that replaces deprecated one - `Case #1 feature B` (`case_1_feature_b`): ![Screen Shot 2024-11-01 at 17 40 59](https://github.com/user-attachments/assets/5b91e71c-7d46-4ff1-bf73-d148622e8ec4) Co-authored-by: Elastic Machine --- x-pack/plugins/features/server/mocks.ts | 4 +- x-pack/plugins/features/server/plugin.ts | 3 +- .../authorization_service.test.ts | 10 +- x-pack/plugins/security/server/plugin.test.ts | 4 +- .../capabilities_switcher.test.ts | 28 ++++- .../capabilities/capabilities_switcher.ts | 2 +- .../utils/space_solution_disabled_features.ts | 1 + .../server/routes/api/external/post.test.ts | 6 +- .../server/routes/api/external/put.test.ts | 6 +- .../spaces_client/spaces_client.test.ts | 48 ++++++++ .../server/spaces_client/spaces_client.ts | 59 ++++++++- .../plugins/features_provider/server/index.ts | 30 ++++- .../features_provider/server/init_routes.ts | 25 ++++ .../tests/features/deprecated_features.ts | 113 ++++++++++++++++-- x-pack/test/ui_capabilities/common/config.ts | 4 + 15 files changed, 301 insertions(+), 42 deletions(-) create mode 100644 x-pack/test/security_api_integration/plugins/features_provider/server/init_routes.ts diff --git a/x-pack/plugins/features/server/mocks.ts b/x-pack/plugins/features/server/mocks.ts index bb2292a45377f..15339b068e7e8 100644 --- a/x-pack/plugins/features/server/mocks.ts +++ b/x-pack/plugins/features/server/mocks.ts @@ -25,8 +25,8 @@ const createSetup = (): jest.Mocked => { const createStart = (): jest.Mocked => { return { - getKibanaFeatures: jest.fn(), - getElasticsearchFeatures: jest.fn(), + getKibanaFeatures: jest.fn().mockReturnValue([]), + getElasticsearchFeatures: jest.fn().mockReturnValue([]), }; }; diff --git a/x-pack/plugins/features/server/plugin.ts b/x-pack/plugins/features/server/plugin.ts index 15888358bb773..9f6cae36f6aee 100644 --- a/x-pack/plugins/features/server/plugin.ts +++ b/x-pack/plugins/features/server/plugin.ts @@ -138,7 +138,8 @@ export class FeaturesPlugin this.featureRegistry.validateFeatures(); this.capabilities = uiCapabilitiesForFeatures( - this.featureRegistry.getAllKibanaFeatures(), + // Don't expose capabilities of the deprecated features. + this.featureRegistry.getAllKibanaFeatures({ omitDeprecated: true }), this.featureRegistry.getAllElasticsearchFeatures() ); diff --git a/x-pack/plugins/security/server/authorization/authorization_service.test.ts b/x-pack/plugins/security/server/authorization/authorization_service.test.ts index 275a6d2643f24..de3646166d8f9 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.test.ts +++ b/x-pack/plugins/security/server/authorization/authorization_service.test.ts @@ -145,12 +145,9 @@ describe('#start', () => { customBranding: mockCoreSetup.customBranding, }); - const featuresStart = featuresPluginMock.createStart(); - featuresStart.getKibanaFeatures.mockReturnValue([]); - authorizationService.start({ clusterClient: mockClusterClient, - features: featuresStart, + features: featuresPluginMock.createStart(), online$: statusSubject.asObservable(), }); @@ -217,12 +214,9 @@ it('#stop unsubscribes from license and ES updates.', async () => { customBranding: mockCoreSetup.customBranding, }); - const featuresStart = featuresPluginMock.createStart(); - featuresStart.getKibanaFeatures.mockReturnValue([]); - authorizationService.start({ clusterClient: mockClusterClient, - features: featuresStart, + features: featuresPluginMock.createStart(), online$: statusSubject.asObservable(), }); diff --git a/x-pack/plugins/security/server/plugin.test.ts b/x-pack/plugins/security/server/plugin.test.ts index 37c6e22a07fab..4b9479f51a0f3 100644 --- a/x-pack/plugins/security/server/plugin.test.ts +++ b/x-pack/plugins/security/server/plugin.test.ts @@ -64,10 +64,8 @@ describe('Security Plugin', () => { mockCoreStart = coreMock.createStart(); - const mockFeaturesStart = featuresPluginMock.createStart(); - mockFeaturesStart.getKibanaFeatures.mockReturnValue([]); mockStartDependencies = { - features: mockFeaturesStart, + features: featuresPluginMock.createStart(), licensing: licensingMock.createStart(), taskManager: taskManagerMock.createStart(), }; diff --git a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts index d48095638babf..688f8297271a3 100644 --- a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts +++ b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.test.ts @@ -66,7 +66,7 @@ const features = [ category: { id: 'securitySolution' }, }, { - // feature 4 intentionally delcares the same items as feature 3 + // feature 4 intentionally declares the same items as feature 3 id: 'feature_4', name: 'Feature 4', app: ['feature3', 'feature3_app'], @@ -87,6 +87,32 @@ const features = [ }, category: { id: 'observability' }, }, + { + deprecated: { notice: 'It was a mistake.' }, + id: 'deprecated_feature', + name: 'Deprecated Feature', + // Expose the same `app` and `catalogue` entries as `feature_2` to make sure they are disabled + // when `feature_2` is disabled even if the deprecated feature isn't explicitly disabled. + app: ['feature2'], + catalogue: ['feature2Entry'], + category: { id: 'deprecated', label: 'deprecated' }, + privileges: { + all: { + savedObject: { all: [], read: [] }, + ui: ['ui_deprecated_all'], + app: ['feature2'], + catalogue: ['feature2Entry'], + replacedBy: [{ feature: 'feature_2', privileges: ['all'] }], + }, + read: { + savedObject: { all: [], read: [] }, + ui: ['ui_deprecated_read'], + app: ['feature2'], + catalogue: ['feature2Entry'], + replacedBy: [{ feature: 'feature_2', privileges: ['all'] }], + }, + }, + }, ] as unknown as KibanaFeature[]; const buildCapabilities = () => diff --git a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts index 90ee85fece486..41d5dcdf2cb14 100644 --- a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts +++ b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts @@ -72,7 +72,7 @@ function toggleDisabledFeatures( (acc, feature) => { if (disabledFeatureKeys.includes(feature.id)) { acc.disabledFeatures.push(feature); - } else { + } else if (!feature.deprecated) { acc.enabledFeatures.push(feature); } return acc; diff --git a/x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.ts b/x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.ts index 066166e7e87dd..6d30645325535 100644 --- a/x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.ts +++ b/x-pack/plugins/spaces/server/lib/utils/space_solution_disabled_features.ts @@ -39,6 +39,7 @@ const enabledFeaturesPerSolution: Record = { * This function takes the current space's disabled features and the space solution and returns * the updated array of disabled features. * + * @param features The list of all Kibana registered features. * @param spaceDisabledFeatures The current space's disabled features * @param spaceSolution The current space's solution (es, oblt, security or classic) * @returns The updated array of disabled features diff --git a/x-pack/plugins/spaces/server/routes/api/external/post.test.ts b/x-pack/plugins/spaces/server/routes/api/external/post.test.ts index 984d684762159..88c846b77eb53 100644 --- a/x-pack/plugins/spaces/server/routes/api/external/post.test.ts +++ b/x-pack/plugins/spaces/server/routes/api/external/post.test.ts @@ -56,13 +56,9 @@ describe('Spaces Public API', () => { basePath: httpService.basePath, }); - const featuresPluginMockStart = featuresPluginMock.createStart(); - - featuresPluginMockStart.getKibanaFeatures.mockReturnValue([]); - const usageStatsServicePromise = Promise.resolve(usageStatsServiceMock.createSetupContract()); - const clientServiceStart = clientService.start(coreStart, featuresPluginMockStart); + const clientServiceStart = clientService.start(coreStart, featuresPluginMock.createStart()); const spacesServiceStart = service.start({ basePath: coreStart.http.basePath, diff --git a/x-pack/plugins/spaces/server/routes/api/external/put.test.ts b/x-pack/plugins/spaces/server/routes/api/external/put.test.ts index 8aa71d30fc4bb..cf2e9981fd024 100644 --- a/x-pack/plugins/spaces/server/routes/api/external/put.test.ts +++ b/x-pack/plugins/spaces/server/routes/api/external/put.test.ts @@ -56,13 +56,9 @@ describe('PUT /api/spaces/space', () => { basePath: httpService.basePath, }); - const featuresPluginMockStart = featuresPluginMock.createStart(); - - featuresPluginMockStart.getKibanaFeatures.mockReturnValue([]); - const usageStatsServicePromise = Promise.resolve(usageStatsServiceMock.createSetupContract()); - const clientServiceStart = clientService.start(coreStart, featuresPluginMockStart); + const clientServiceStart = clientService.start(coreStart, featuresPluginMock.createStart()); const spacesServiceStart = service.start({ basePath: coreStart.http.basePath, diff --git a/x-pack/plugins/spaces/server/spaces_client/spaces_client.test.ts b/x-pack/plugins/spaces/server/spaces_client/spaces_client.test.ts index 364afdcaba66a..4b7c1de0b3fcb 100644 --- a/x-pack/plugins/spaces/server/spaces_client/spaces_client.test.ts +++ b/x-pack/plugins/spaces/server/spaces_client/spaces_client.test.ts @@ -55,6 +55,37 @@ const features = [ catalogue: ['feature3Entry'], category: { id: 'securitySolution' }, }, + { + deprecated: { notice: 'It was a mistake.' }, + id: 'feature_4_deprecated', + name: 'Deprecated Feature', + app: ['feature2', 'feature3'], + catalogue: ['feature2Entry', 'feature3Entry'], + category: { id: 'deprecated', label: 'deprecated' }, + scope: ['spaces', 'security'], + privileges: { + all: { + savedObject: { all: [], read: [] }, + ui: [], + app: ['feature2', 'feature3'], + catalogue: ['feature2Entry', 'feature3Entry'], + replacedBy: [ + { feature: 'feature_2', privileges: ['all'] }, + { feature: 'feature_3', privileges: ['all'] }, + ], + }, + read: { + savedObject: { all: [], read: [] }, + ui: [], + app: ['feature2', 'feature3'], + catalogue: ['feature2Entry', 'feature3Entry'], + replacedBy: [ + { feature: 'feature_2', privileges: ['read'] }, + { feature: 'feature_3', privileges: ['read'] }, + ], + }, + }, + }, ] as unknown as KibanaFeature[]; const featuresStart = featuresPluginMock.createStart(); @@ -103,6 +134,17 @@ describe('#getAll', () => { bar: 'baz-bar', // an extra attribute that will be ignored during conversion }, }, + { + // alpha only has deprecated disabled features + id: 'alpha', + type: 'space', + references: [], + attributes: { + name: 'alpha-name', + description: 'alpha-description', + disabledFeatures: ['feature_1', 'feature_4_deprecated'], + }, + }, ]; const expectedSpaces: Space[] = [ @@ -130,6 +172,12 @@ describe('#getAll', () => { description: 'baz-description', disabledFeatures: [], }, + { + id: 'alpha', + name: 'alpha-name', + description: 'alpha-description', + disabledFeatures: ['feature_1', 'feature_2', 'feature_3'], + }, ]; test(`finds spaces using callWithRequestRepository`, async () => { diff --git a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts index 5d7ae1159f5ea..66728636f9752 100644 --- a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts +++ b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts @@ -14,6 +14,7 @@ import type { SavedObject, } from '@kbn/core/server'; import type { LegacyUrlAliasTarget } from '@kbn/core-saved-objects-common'; +import type { KibanaFeature } from '@kbn/features-plugin/common'; import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import type { FeaturesPluginStart } from '@kbn/features-plugin/server'; @@ -84,7 +85,13 @@ export interface ISpacesClient { * Client for interacting with spaces. */ export class SpacesClient implements ISpacesClient { - private isServerless = false; + private readonly isServerless: boolean; + + /** + * A map of deprecated feature IDs to the feature IDs that replace them used to transform the disabled features + * of a space to make sure they only reference non-deprecated features. + */ + private readonly deprecatedFeaturesReferences: Map>; constructor( private readonly debugLogger: (message: string) => void, @@ -95,6 +102,9 @@ export class SpacesClient implements ISpacesClient { private readonly features: FeaturesPluginStart ) { this.isServerless = this.buildFlavour === 'serverless'; + this.deprecatedFeaturesReferences = this.collectDeprecatedFeaturesReferences( + features.getKibanaFeatures() + ); } public async getAll(options: v1.GetAllSpacesOptions = {}): Promise { @@ -247,6 +257,8 @@ export class SpacesClient implements ISpacesClient { }; private transformSavedObjectToSpace = (savedObject: SavedObject): v1.Space => { + // Solution isn't supported in the serverless offering. + const solution = !this.isServerless ? savedObject.attributes.solution : undefined; return { id: savedObject.id, name: savedObject.attributes.name ?? '', @@ -256,11 +268,13 @@ export class SpacesClient implements ISpacesClient { imageUrl: savedObject.attributes.imageUrl, disabledFeatures: withSpaceSolutionDisabledFeatures( this.features.getKibanaFeatures(), - savedObject.attributes.disabledFeatures ?? [], - !this.isServerless ? savedObject.attributes.solution : undefined + savedObject.attributes.disabledFeatures?.flatMap((featureId: string) => + Array.from(this.deprecatedFeaturesReferences.get(featureId) ?? [featureId]) + ) ?? [], + solution ), _reserved: savedObject.attributes._reserved, - ...(!this.isServerless ? { solution: savedObject.attributes.solution } : {}), + ...(solution ? { solution } : {}), } as v1.Space; }; @@ -275,4 +289,41 @@ export class SpacesClient implements ISpacesClient { ...(!this.isServerless && space.solution ? { solution: space.solution } : {}), }; }; + + /** + * Collects a map of all deprecated feature IDs and the feature IDs that replace them. + * @param features A list of all available Kibana features including deprecated ones. + */ + private collectDeprecatedFeaturesReferences(features: KibanaFeature[]) { + const deprecatedFeatureReferences = new Map(); + for (const feature of features) { + if (!feature.deprecated || !feature.scope?.includes(KibanaFeatureScope.Spaces)) { + continue; + } + + // Collect all feature privileges including the ones provided by sub-features, if any. + const allPrivileges = Object.values(feature.privileges ?? {}).concat( + feature.subFeatures?.flatMap((subFeature) => + subFeature.privilegeGroups.flatMap(({ privileges }) => privileges) + ) ?? [] + ); + + // Collect all features IDs that are referenced by the deprecated feature privileges. + const referencedFeaturesIds = new Set(); + for (const privilege of allPrivileges) { + const replacedBy = privilege.replacedBy + ? 'default' in privilege.replacedBy + ? privilege.replacedBy.default.concat(privilege.replacedBy.minimal) + : privilege.replacedBy + : []; + for (const privilegeReference of replacedBy) { + referencedFeaturesIds.add(privilegeReference.feature); + } + } + + deprecatedFeatureReferences.set(feature.id, referencedFeaturesIds); + } + + return deprecatedFeatureReferences; + } } diff --git a/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts b/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts index 646fe327a0015..61100babefea7 100644 --- a/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts +++ b/x-pack/test/security_api_integration/plugins/features_provider/server/index.ts @@ -9,8 +9,11 @@ import type { PluginSetupContract as AlertingPluginsSetup } from '@kbn/alerting- import { schema } from '@kbn/config-schema'; import type { CoreSetup, Plugin, PluginInitializer } from '@kbn/core/server'; import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; +import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import type { FeaturesPluginSetup, FeaturesPluginStart } from '@kbn/features-plugin/server'; +import { initRoutes } from './init_routes'; + export interface PluginSetupDependencies { features: FeaturesPluginSetup; alerting: AlertingPluginsSetup; @@ -23,7 +26,7 @@ export interface PluginStartDependencies { export const plugin: PluginInitializer = async (): Promise< Plugin > => ({ - setup: (_: CoreSetup, deps: PluginSetupDependencies) => { + setup: (core: CoreSetup, deps: PluginSetupDependencies) => { // Case #1: feature A needs to be renamed to feature B. It's unfortunate, but the existing feature A // should be deprecated and re-created as a new feature with the same privileges. case1FeatureRename(deps); @@ -46,6 +49,8 @@ export const plugin: PluginInitializer = async (): Promise< // * `case_4_feature_b_v2` (new, decoupled from `ab` SO, partially replaces `case_4_feature_b`) // * `case_4_feature_c` (new, only for `ab` SO access) case4FeatureExtract(deps); + + initRoutes(core); }, start: () => {}, stop: () => {}, @@ -61,6 +66,7 @@ function case1FeatureRename(deps: PluginSetupDependencies) { all: { savedObject: { all: ['one'], read: [] }, ui: ['ui_all'] }, read: { savedObject: { all: [], read: ['one'] }, ui: ['ui_read'] }, }, + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], }; // Step 2: mark feature A as deprecated and provide proper replacements for all feature and @@ -96,6 +102,8 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { deps.features.registerKibanaFeature({ deprecated: { notice: 'Case #2 is deprecated.' }, + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + app: ['app_one', 'app_two'], catalogue: ['cat_one', 'cat_two'], management: { kibana: ['management_one', 'management_two'] }, @@ -139,6 +147,8 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { read: { savedObject: { all: [], read: ['one', 'two'] }, ui: ['ui_read_one', 'ui_read_two'], + catalogue: ['cat_one', 'cat_two'], + app: ['app_one', 'app_two'], replacedBy: [ { feature: 'case_2_feature_b', privileges: ['read'] }, { feature: 'case_2_feature_c', privileges: ['read'] }, @@ -149,6 +159,8 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { // Step 2: define new features deps.features.registerKibanaFeature({ + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_2_feature_b', name: 'Case #2 feature B', @@ -182,10 +194,14 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { read: { savedObject: { all: [], read: ['one'] }, ui: ['ui_read_one'], + catalogue: ['cat_one'], + app: ['app_one'], }, }, }); deps.features.registerKibanaFeature({ + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_2_feature_c', name: 'Case #2 feature C', @@ -219,6 +235,8 @@ function case2FeatureSplit(deps: PluginSetupDependencies) { read: { savedObject: { all: [], read: ['two'] }, ui: ['ui_read_two'], + app: ['app_two'], + catalogue: ['cat_two'], }, }, }); @@ -249,6 +267,8 @@ function case3FeatureSplitSubFeature(deps: PluginSetupDependencies) { deps.features.registerKibanaFeature({ deprecated: { notice: 'Case #3 is deprecated.' }, + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_3_feature_a', name: 'Case #3 feature A (DEPRECATED)', @@ -275,6 +295,8 @@ function case3FeatureSplitSubFeature(deps: PluginSetupDependencies) { // Step 2: Create a new feature with the desired privileges structure. deps.features.registerKibanaFeature({ + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_3_feature_a_v2', name: 'Case #3 feature A', @@ -324,6 +346,8 @@ function case4FeatureExtract(deps: PluginSetupDependencies) { deps.features.registerKibanaFeature({ deprecated: { notice: 'Case #4 is deprecated.' }, + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: `case_4_feature_${suffix.toLowerCase()}`, name: `Case #4 feature ${suffix} (DEPRECATED)`, @@ -350,6 +374,8 @@ function case4FeatureExtract(deps: PluginSetupDependencies) { // Step 2: introduce new features (v2) with privileges that don't grant access to `ab`. deps.features.registerKibanaFeature({ + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: `case_4_feature_${suffix.toLowerCase()}_v2`, name: `Case #4 feature ${suffix}`, @@ -363,6 +389,8 @@ function case4FeatureExtract(deps: PluginSetupDependencies) { // Step 3: introduce new feature C that only grants access to `ab`. deps.features.registerKibanaFeature({ + scope: [KibanaFeatureScope.Security, KibanaFeatureScope.Spaces], + category: DEFAULT_APP_CATEGORIES.kibana, id: 'case_4_feature_c', name: 'Case #4 feature C', diff --git a/x-pack/test/security_api_integration/plugins/features_provider/server/init_routes.ts b/x-pack/test/security_api_integration/plugins/features_provider/server/init_routes.ts new file mode 100644 index 0000000000000..d58f2f3078a3a --- /dev/null +++ b/x-pack/test/security_api_integration/plugins/features_provider/server/init_routes.ts @@ -0,0 +1,25 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreSetup } from '@kbn/core/server'; + +import type { PluginStartDependencies } from '.'; + +export function initRoutes(core: CoreSetup) { + const router = core.http.createRouter(); + + // This route mirrors existing `GET /api/features` route except that it also returns all deprecated features. + router.get( + { path: '/internal/features_provider/features', validate: false }, + async (context, request, response) => { + const [, pluginDeps] = await core.getStartServices(); + return response.ok({ + body: pluginDeps.features.getKibanaFeatures().map((feature) => feature.toRaw()), + }); + } + ); +} diff --git a/x-pack/test/security_api_integration/tests/features/deprecated_features.ts b/x-pack/test/security_api_integration/tests/features/deprecated_features.ts index 030f5ac704d8b..6e868fc5946ec 100644 --- a/x-pack/test/security_api_integration/tests/features/deprecated_features.ts +++ b/x-pack/test/security_api_integration/tests/features/deprecated_features.ts @@ -14,6 +14,7 @@ import type { FeatureKibanaPrivilegesReference, KibanaFeatureConfig, } from '@kbn/features-plugin/common'; +import { KibanaFeatureScope } from '@kbn/features-plugin/common'; import type { Role } from '@kbn/security-plugin-types-common'; import type { FtrProviderContext } from '../../ftr_provider_context'; @@ -163,11 +164,97 @@ export default function ({ getService }: FtrProviderContext) { } }); + it('all deprecated features are known', async () => { + const { body: features } = await supertest + .get('/internal/features_provider/features') + .expect(200); + + // **NOTE**: This test is to ensure the AppEx Security team has a chance to review all features marked as + // deprecated. If you’re adding a new deprecated feature, make sure to add it to the list below manually or by + // running the API integration test locally with the --updateSnapshot flag. + expectSnapshot( + (features as KibanaFeatureConfig[]).flatMap((f) => (f.deprecated ? [f.id] : [])).sort() + ).toMatchInline(` + Array [ + "case_1_feature_a", + "case_2_feature_a", + "case_3_feature_a", + "case_4_feature_a", + "case_4_feature_b", + ] + `); + }); + + it('all deprecated features are replaced by a single feature only', async () => { + const featuresResponse = await supertest + .get('/internal/features_provider/features') + .expect(200); + const features = featuresResponse.body as KibanaFeatureConfig[]; + + // **NOTE**: This test ensures that deprecated features displayed in the Space’s feature visibility toggles screen + // are only replaced by a single feature. This way, if a feature is toggled off for a particular Space, there + // won’t be any ambiguity about which replacement feature should also be toggled off. Currently, we don’t + // anticipate having a deprecated feature replaced by more than one feature, so this test is intended to catch + // such scenarios early. If there’s a need for a deprecated feature to be replaced by multiple features, please + // reach out to the AppEx Security team to discuss how this should affect Space’s feature visibility toggles. + const featureIdsThatSupportMultipleReplacements = new Set([ + 'case_2_feature_a', + 'case_4_feature_a', + 'case_4_feature_b', + ]); + for (const feature of features) { + if ( + !feature.deprecated || + !feature.scope?.includes(KibanaFeatureScope.Spaces) || + featureIdsThatSupportMultipleReplacements.has(feature.id) + ) { + continue; + } + + // Collect all feature privileges including the ones provided by sub-features, if any. + const allPrivileges = Object.values(feature.privileges ?? {}).concat( + feature.subFeatures?.flatMap((subFeature) => + subFeature.privilegeGroups.flatMap(({ privileges }) => privileges) + ) ?? [] + ); + + // Collect all features IDs that are referenced by the deprecated feature privileges. + const referencedFeaturesIds = new Set(); + for (const privilege of allPrivileges) { + const replacedBy = privilege.replacedBy + ? 'default' in privilege.replacedBy + ? privilege.replacedBy.default.concat(privilege.replacedBy.minimal) + : privilege.replacedBy + : []; + for (const privilegeReference of replacedBy) { + referencedFeaturesIds.add(privilegeReference.feature); + } + } + + if (referencedFeaturesIds.size > 1) { + throw new Error( + `Feature "${feature.id}" is deprecated and replaced by more than one feature: ${ + referencedFeaturesIds.size + } features: ${Array.from(referencedFeaturesIds).join( + ', ' + )}. If it's intentional, please contact the AppEx Security team.` + ); + } + } + }); + it('all privileges of the deprecated features should have a proper replacement', async () => { // Fetch all features first. - const featuresResponse = await supertest.get('/api/features').expect(200); + const featuresResponse = await supertest + .get('/internal/features_provider/features') + .expect(200); const features = featuresResponse.body as KibanaFeatureConfig[]; + // Check if the action provided by the deprecated feature is directly replaceable by other + // features. The `ui:`-prefixed actions are special since they are prefixed with a feature ID, + // and do not need to be replaced like any other privilege actions. + const isReplaceableAction = (action: string) => !action.startsWith('ui:'); + // Collect all deprecated features. const deprecatedFeatures = features.filter((f) => f.deprecated); log.info(`Found ${deprecatedFeatures.length} deprecated features.`); @@ -207,7 +294,10 @@ export default function ({ getService }: FtrProviderContext) { ); for (const deprecatedAction of deprecatedActions) { - if (!replacementActions.has(deprecatedAction)) { + if ( + isReplaceableAction(deprecatedAction) && + !replacementActions.has(deprecatedAction) + ) { throw new Error( `Action "${deprecatedAction}" granted by the privilege "${privilegeId}" of the deprecated feature "${feature.id}" is not properly replaced.` ); @@ -225,22 +315,23 @@ export default function ({ getService }: FtrProviderContext) { .send({ applications: [] }) .expect(200); - // Both deprecated and new UI capabilities should be toggled. + // Only new UI capabilities should be toggled, deprecated ones should not be present. expect(capabilities).toEqual( expect.objectContaining({ - // UI flags from the deprecated feature privilege. - case_2_feature_a: { - ui_all_one: true, - ui_all_two: true, - ui_read_one: false, - ui_read_two: false, - }, - // UI flags from the feature privileges that replace deprecated one. case_2_feature_b: { ui_all_one: true, ui_read_one: false }, case_2_feature_c: { ui_all_two: true, ui_read_two: false }, }) ); + for (const deprecatedFeatureId of [ + 'case_1_feature_a', + 'case_2_feature_a', + 'case_3_feature_a', + 'case_4_feature_a', + 'case_4_feature_b', + ]) { + expect(capabilities).not.toHaveProperty(deprecatedFeatureId); + } }); it('Cases privileges are properly handled for deprecated privileges', async () => { diff --git a/x-pack/test/ui_capabilities/common/config.ts b/x-pack/test/ui_capabilities/common/config.ts index ba40e613c0d69..18a96b8e26274 100644 --- a/x-pack/test/ui_capabilities/common/config.ts +++ b/x-pack/test/ui_capabilities/common/config.ts @@ -46,6 +46,10 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions) .filter((k) => k !== 'security') .map((key) => `--xpack.${key}.enabled=false`), `--plugin-path=${path.resolve(__dirname, 'plugins/foo_plugin')}`, + `--plugin-path=${path.resolve( + __dirname, + '../../security_api_integration/plugins/features_provider' + )}`, ], }, }; From 56b0ac2eda55b0fe1a3dc0cd445d704320b69981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georgiana-Andreea=20Onolea=C8=9B=C4=83?= Date: Wed, 6 Nov 2024 16:43:48 +0200 Subject: [PATCH 11/16] [ResponseOps][Connectors]Preconfigured connectors of disabled types show as disabled, but are actually enabled (#198792) Closes https://github.com/elastic/kibana/issues/190420 ## Summary - the preconfigured connectors should be displayed as enabled and not have the tooltip icon even if the xpack.actions.enabledActionTypes: [] setting is present in the kibana.yml (to disable all the connector types) ![Screenshot 2024-11-04 at 14 38 10](https://github.com/user-attachments/assets/ee817087-a079-481b-bf82-b7247f3ea923) --------- Co-authored-by: Antonio --- .../utils/check_action_type_enabled.test.ts | 20 +++++++++++++++++++ .../utils/check_action_type_enabled.ts | 5 +++-- .../actions_connectors_list.test.tsx | 15 +++++++++++++- .../components/actions_connectors_list.tsx | 7 ++++--- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts index 987d95ef3d070..7794f83825c76 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.test.ts @@ -99,6 +99,26 @@ describe('checkActionTypeEnabled', () => { } `); }); + test('checkActionTypeEnabled returns true when actionType is disabled by config', async () => { + const actionType: ActionType = { + id: '1', + minimumLicenseRequired: 'basic', + supportedFeatureIds: ['alerting'], + name: 'my action', + enabled: false, + enabledInConfig: false, + enabledInLicense: true, + isSystemActionType: false, + }; + + const isPreconfiguredConnector = true; + + expect(checkActionTypeEnabled(actionType, isPreconfiguredConnector)).toMatchInlineSnapshot(` + Object { + "isEnabled": true, + } + `); + }); }); describe('checkActionFormActionTypeEnabled', () => { diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.ts index 891012f0eeb23..79c26b7052e86 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/check_action_type_enabled.ts @@ -22,13 +22,14 @@ export interface IsDisabledResult { } export const checkActionTypeEnabled = ( - actionType?: ActionType + actionType?: ActionType, + isPreconfiguredConnector: boolean = false ): IsEnabledResult | IsDisabledResult => { if (actionType?.enabledInLicense === false) { return getLicenseCheckResult(actionType); } - if (actionType?.enabledInConfig === false) { + if (actionType?.enabledInConfig === false && isPreconfiguredConnector === false) { return configurationCheckResult; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx index a938aa6b7e6e5..1c191bf213852 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx @@ -750,6 +750,12 @@ describe('actions_connectors_list', () => { referencedByCount: 1, config: {}, }, + { + id: '3', + actionTypeId: 'test3', + isPreconfigured: true, + isDeprecated: false, + }, ] as ActionConnector[] } setActions={() => {}} @@ -766,7 +772,7 @@ describe('actions_connectors_list', () => { it('renders table of connectors', async () => { await setup(); expect(wrapper.find('EuiInMemoryTable')).toHaveLength(1); - expect(wrapper.find('EuiTableRow')).toHaveLength(2); + expect(wrapper.find('EuiTableRow')).toHaveLength(3); expect(wrapper.find('EuiTableRow').at(0).prop('className')).toEqual( 'actConnectorsList__tableRowDisabled' ); @@ -774,6 +780,13 @@ describe('actions_connectors_list', () => { 'actConnectorsList__tableRowDisabled' ); }); + + it('renders preconfigured connectors as enabled', async () => { + await setup(); + expect(wrapper.find('EuiTableRow').at(2).prop('className')).not.toEqual( + 'actConnectorsList__tableRowDisabled' + ); + }); }); describe('component with deprecated connectors', () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index e00b08d9c8512..17e6531a65c20 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -199,9 +199,9 @@ const ActionsConnectorsList = ({ truncateText: true, render: (value: string, item: ActionConnectorTableItem) => { const checkEnabledResult = checkActionTypeEnabled( - actionTypesIndex && actionTypesIndex[item.actionTypeId] + actionTypesIndex && actionTypesIndex[item.actionTypeId], + item.isPreconfigured ); - /** * TODO: Remove when connectors can provide their own UX message. * Issue: https://github.com/elastic/kibana/issues/114507 @@ -363,7 +363,8 @@ const ActionsConnectorsList = ({ columns={actionsTableColumns} rowProps={(item: ActionConnectorTableItem) => ({ className: - !actionTypesIndex || !actionTypesIndex[item.actionTypeId]?.enabled + !item.isPreconfigured && + (!actionTypesIndex || !actionTypesIndex[item.actionTypeId]?.enabled) ? 'actConnectorsList__tableRowDisabled' : '', 'data-test-subj': 'connectors-row', From 730f4c9d2a5119a9f30e9b94ccb28ec418af270a Mon Sep 17 00:00:00 2001 From: Gerard Soldevila Date: Wed, 6 Nov 2024 15:44:35 +0100 Subject: [PATCH 12/16] Address some of the `no_group_crossing` dependencies (#198261) ### Summary This PR relocates some plugins and packages that are incorrectly categorised, aiming at reducing inter-solution dependencies. It also fixes some incorrect import statements that introduce unnecessary dependencies with other components. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Maryam Saeidi --- .eslintrc.js | 50 ++++++------------- .../page/analytics_no_data/impl/kibana.jsonc | 4 +- .../page/analytics_no_data/mocks/kibana.jsonc | 4 +- .../page/analytics_no_data/types/kibana.jsonc | 4 +- .../selection/kibana.jsonc | 5 +- .../exploratory_view_example/kibana.jsonc | 2 + .../screenshotting_example/kibana.jsonc | 4 ++ .../ui_actions_enhanced_examples/kibana.jsonc | 4 ++ x-pack/packages/kbn-ai-assistant/kibana.jsonc | 4 +- .../security-solution/data_table/kibana.jsonc | 4 +- .../plugins/dashboard_enhanced/kibana.jsonc | 4 +- x-pack/plugins/data_quality/kibana.jsonc | 2 + x-pack/plugins/ingest_pipelines/kibana.jsonc | 2 + .../telemetry_collection/get_licenses.ts | 6 +-- x-pack/plugins/monitoring/tsconfig.json | 1 - .../observability_solution/infra/kibana.jsonc | 2 + .../inventory/kibana.jsonc | 2 + .../investigate_app/kibana.jsonc | 2 + .../lib/adapters/framework/adapter_types.ts | 2 - .../metrics_data_access/tsconfig.json | 1 - .../observability/common/typings.ts | 7 ++- .../alerts_table/common/get_columns.tsx | 31 ++---------- .../common/render_cell_value.test.tsx | 22 -------- .../alerts_table/common/render_cell_value.tsx | 19 +++---- .../alerts_table/slo/default_columns.tsx | 13 ++--- .../components/custom_threshold/types.ts | 48 +++++++++--------- .../pages/alerts/components/alert_actions.tsx | 6 +-- .../public/utils/test_helper.tsx | 3 +- .../observability/tsconfig.json | 2 - .../observability_ai_assistant/kibana.jsonc | 6 +-- .../kibana.jsonc | 2 + .../public/helpers/test_helper.tsx | 3 +- .../tsconfig.json | 1 - .../slo/public/utils/test_helper.tsx | 3 +- .../observability_solution/slo/tsconfig.json | 1 - .../synthetics/e2e/kibana.jsonc | 2 + x-pack/plugins/screenshotting/kibana.jsonc | 4 +- x-pack/plugins/search_assistant/kibana.jsonc | 2 + .../server/index.ts | 2 - .../es_deprecation_logs.test.tsx | 3 -- .../helpers/app_context.mock.ts | 1 - x-pack/plugins/upgrade_assistant/kibana.jsonc | 3 +- .../upgrade_assistant/public/plugin.ts | 6 +-- .../plugins/upgrade_assistant/public/types.ts | 1 - 44 files changed, 124 insertions(+), 176 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f751c9692c996..730c9599f23f9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1992,43 +1992,23 @@ module.exports = { }, { files: [ - 'packages/kbn-reporting/common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/export_types/pdf_common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/export_types/pdf/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/export_types/png_common/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/export_types/png/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/public/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/kbn-reporting/server/**', // TODO @elastic/appex-sharedux - A package depending on a plugin: @kbn/screenshotting-plugin, can we move theser interfaces to a platform/shared package? - 'packages/shared-ux/page/analytics_no_data/types/**', - 'scripts/create_observability_rules.js', // TODO - is importing "@kbn/observability-alerting-test-data" (observability/private) - 'src/cli_setup/**', // TODO @kibana/operations - is importing "@kbn/interactive-setup-plugin" (platform/private) - 'src/dev/build/tasks/install_chromium.ts', // TODO @kibana/operations - is importing "@kbn/screenshotting-plugin" (platform/private) - 'src/plugins/ai_assistant_management/selection/**', - 'src/plugins/dashboard/**', - 'src/plugins/discover/**', - 'test/**', - 'x-pack/examples/exploratory_view_example/**', - 'x-pack/examples/screenshotting_example/**', - 'x-pack/examples/ui_actions_enhanced_examples/**', - 'x-pack/packages/security-solution/data_table/**', - 'x-pack/plugins/aiops/**', - 'x-pack/plugins/data_quality/**', - 'x-pack/plugins/ingest_pipelines/**', - 'x-pack/plugins/ml/**', - 'x-pack/plugins/monitoring/**', - 'x-pack/plugins/observability_solution/infra/**', - 'x-pack/plugins/observability_solution/inventory/**', - 'x-pack/plugins/observability_solution/investigate_app/**', - 'x-pack/plugins/observability_solution/investigate/**', + // logsShared depends on o11y/private plugins, but platform plugins depend on it 'x-pack/plugins/observability_solution/logs_shared/**', - 'x-pack/plugins/observability_solution/metrics_data_access/**', - 'x-pack/plugins/observability_solution/observability_ai_assistant_app/**', - 'x-pack/plugins/observability_solution/observability_ai_assistant_management/**', - 'x-pack/plugins/observability_solution/observability/**', - 'x-pack/plugins/observability_solution/slo/**', - 'x-pack/plugins/observability_solution/synthetics/e2e/**', + + // this plugin depends on visTypeTimeseries plugin (for TSVB viz) which is platform/private ATM + 'x-pack/plugins/observability_solution/infra/**', + + // TODO @kibana/operations + 'scripts/create_observability_rules.js', // is importing "@kbn/observability-alerting-test-data" (observability/private) + 'src/cli_setup/**', // is importing "@kbn/interactive-setup-plugin" (platform/private) + 'src/dev/build/tasks/install_chromium.ts', // is importing "@kbn/screenshotting-plugin" (platform/private) + + // @kbn/osquery-plugin could be categorised as Security, but @kbn/infra-plugin (observability) depends on it! 'x-pack/plugins/osquery/**', - 'x-pack/plugins/search_assistant/**', + + // For now, we keep the exception to let tests depend on anythying. + // Ideally, we need to classify the solution specific ones to reduce CI times + 'test/**', 'x-pack/test_serverless/**', 'x-pack/test/**', 'x-pack/test/plugin_functional/plugins/resolver_test/**', diff --git a/packages/shared-ux/page/analytics_no_data/impl/kibana.jsonc b/packages/shared-ux/page/analytics_no_data/impl/kibana.jsonc index b8690de58bdb9..45c7a028be286 100644 --- a/packages/shared-ux/page/analytics_no_data/impl/kibana.jsonc +++ b/packages/shared-ux/page/analytics_no_data/impl/kibana.jsonc @@ -1,5 +1,7 @@ { "type": "shared-browser", "id": "@kbn/shared-ux-page-analytics-no-data", - "owner": "@elastic/appex-sharedux" + "owner": "@elastic/appex-sharedux", + "group": "platform", + "visibility": "private" } diff --git a/packages/shared-ux/page/analytics_no_data/mocks/kibana.jsonc b/packages/shared-ux/page/analytics_no_data/mocks/kibana.jsonc index cde1666e15f14..e7d570e4239e6 100644 --- a/packages/shared-ux/page/analytics_no_data/mocks/kibana.jsonc +++ b/packages/shared-ux/page/analytics_no_data/mocks/kibana.jsonc @@ -1,5 +1,7 @@ { "type": "shared-common", "id": "@kbn/shared-ux-page-analytics-no-data-mocks", - "owner": "@elastic/appex-sharedux" + "owner": "@elastic/appex-sharedux", + "group": "platform", + "visibility": "private" } diff --git a/packages/shared-ux/page/analytics_no_data/types/kibana.jsonc b/packages/shared-ux/page/analytics_no_data/types/kibana.jsonc index df5498181fe69..fd1740c0d757e 100644 --- a/packages/shared-ux/page/analytics_no_data/types/kibana.jsonc +++ b/packages/shared-ux/page/analytics_no_data/types/kibana.jsonc @@ -1,5 +1,7 @@ { "type": "shared-browser", "id": "@kbn/shared-ux-page-analytics-no-data-types", - "owner": "@elastic/appex-sharedux" + "owner": "@elastic/appex-sharedux", + "group": "platform", + "visibility": "private" } diff --git a/src/plugins/ai_assistant_management/selection/kibana.jsonc b/src/plugins/ai_assistant_management/selection/kibana.jsonc index 715b90f1d4d79..74640423685a9 100644 --- a/src/plugins/ai_assistant_management/selection/kibana.jsonc +++ b/src/plugins/ai_assistant_management/selection/kibana.jsonc @@ -4,8 +4,9 @@ "owner": [ "@elastic/obs-knowledge-team" ], + // This should probably be platform. While the code owner is currently observability, the package is a platform AI assistant selector. "group": "platform", - "visibility": "private", + "visibility": "shared", "plugin": { "id": "aiAssistantManagementSelection", "browser": true, @@ -25,4 +26,4 @@ "kibanaReact" ] } -} \ No newline at end of file +} diff --git a/x-pack/examples/exploratory_view_example/kibana.jsonc b/x-pack/examples/exploratory_view_example/kibana.jsonc index 6cf8fa64983ac..cf077336b0f90 100644 --- a/x-pack/examples/exploratory_view_example/kibana.jsonc +++ b/x-pack/examples/exploratory_view_example/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/exploratory-view-example-plugin", "owner": "@elastic/obs-ux-infra_services-team", + "group": "observability", + "visibility": "private", "plugin": { "id": "exploratoryViewExample", "server": false, diff --git a/x-pack/examples/screenshotting_example/kibana.jsonc b/x-pack/examples/screenshotting_example/kibana.jsonc index 127706ad42e3d..3519bc91caa66 100644 --- a/x-pack/examples/screenshotting_example/kibana.jsonc +++ b/x-pack/examples/screenshotting_example/kibana.jsonc @@ -2,6 +2,10 @@ "type": "plugin", "id": "@kbn/screenshotting-example-plugin", "owner": "@elastic/appex-sharedux", + // This plugin is not meant to be referenced or imported + "visibility": "private", + // If cloned / used as an inspiration, please bear in mind that your plugin might belong to a specific solution group + "group": "platform", "description": "An example integration with the screenshotting plugin.", "plugin": { "id": "screenshottingExample", diff --git a/x-pack/examples/ui_actions_enhanced_examples/kibana.jsonc b/x-pack/examples/ui_actions_enhanced_examples/kibana.jsonc index 1da3e4f182875..25211ae2063bd 100644 --- a/x-pack/examples/ui_actions_enhanced_examples/kibana.jsonc +++ b/x-pack/examples/ui_actions_enhanced_examples/kibana.jsonc @@ -2,6 +2,10 @@ "type": "plugin", "id": "@kbn/ui-actions-enhanced-examples-plugin", "owner": "@elastic/appex-sharedux", + // This plugin is not meant to be referenced or imported + "visibility": "private", + // If cloned / used as an inspiration, please bear in mind that your plugin might belong to a specific solution group + "group": "platform", "plugin": { "id": "uiActionsEnhancedExamples", "server": false, diff --git a/x-pack/packages/kbn-ai-assistant/kibana.jsonc b/x-pack/packages/kbn-ai-assistant/kibana.jsonc index f8da31c9d6749..625dedc6c99f4 100644 --- a/x-pack/packages/kbn-ai-assistant/kibana.jsonc +++ b/x-pack/packages/kbn-ai-assistant/kibana.jsonc @@ -2,6 +2,6 @@ "id": "@kbn/ai-assistant", "owner": "@elastic/search-kibana", "type": "shared-browser", - "group": "observability", - "visibility": "private" + "group": "platform", + "visibility": "shared" } diff --git a/x-pack/packages/security-solution/data_table/kibana.jsonc b/x-pack/packages/security-solution/data_table/kibana.jsonc index 5298db752359f..9695411a65301 100644 --- a/x-pack/packages/security-solution/data_table/kibana.jsonc +++ b/x-pack/packages/security-solution/data_table/kibana.jsonc @@ -1,5 +1,7 @@ { "type": "shared-common", "id": "@kbn/securitysolution-data-table", - "owner": "@elastic/security-threat-hunting-investigations" + "owner": "@elastic/security-threat-hunting-investigations", + "group": "security", + "visibility": "private" } diff --git a/x-pack/plugins/dashboard_enhanced/kibana.jsonc b/x-pack/plugins/dashboard_enhanced/kibana.jsonc index 36f8a02e65ce9..ae6902cc3c714 100644 --- a/x-pack/plugins/dashboard_enhanced/kibana.jsonc +++ b/x-pack/plugins/dashboard_enhanced/kibana.jsonc @@ -5,7 +5,7 @@ "@elastic/kibana-presentation" ], "group": "platform", - "visibility": "private", + "visibility": "shared", "plugin": { "id": "dashboardEnhanced", "browser": true, @@ -31,4 +31,4 @@ "uiActions" ] } -} \ No newline at end of file +} diff --git a/x-pack/plugins/data_quality/kibana.jsonc b/x-pack/plugins/data_quality/kibana.jsonc index ad1a64d4ed140..dc54e20f40bd7 100644 --- a/x-pack/plugins/data_quality/kibana.jsonc +++ b/x-pack/plugins/data_quality/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/data-quality-plugin", "owner": "@elastic/obs-ux-logs-team", + "group": "observability", + "visibility": "private", "plugin": { "id": "dataQuality", "server": true, diff --git a/x-pack/plugins/ingest_pipelines/kibana.jsonc b/x-pack/plugins/ingest_pipelines/kibana.jsonc index 55fa46c61b377..85b3e43aedf4d 100644 --- a/x-pack/plugins/ingest_pipelines/kibana.jsonc +++ b/x-pack/plugins/ingest_pipelines/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/ingest-pipelines-plugin", "owner": "@elastic/kibana-management", + "group": "platform", + "visibility": "shared", "plugin": { "id": "ingestPipelines", "server": true, diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/get_licenses.ts b/x-pack/plugins/monitoring/server/telemetry_collection/get_licenses.ts index 4ea0077c21ba8..98f3932984546 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/get_licenses.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/get_licenses.ts @@ -7,7 +7,7 @@ import { ElasticsearchClient } from '@kbn/core/server'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ESLicense } from '@kbn/telemetry-collection-xpack-plugin/server'; +import type { LicenseGetLicenseInformation } from '@elastic/elasticsearch/lib/api/types'; import { INDEX_PATTERN_ELASTICSEARCH, USAGE_FETCH_INTERVAL } from '../../common/constants'; /** @@ -18,7 +18,7 @@ export async function getLicenses( callCluster: ElasticsearchClient, timestamp: number, maxBucketSize: number -): Promise<{ [clusterUuid: string]: ESLicense | undefined }> { +): Promise<{ [clusterUuid: string]: LicenseGetLicenseInformation | undefined }> { const response = await fetchLicenses(callCluster, clusterUuids, timestamp, maxBucketSize); return handleLicenses(response); } @@ -76,7 +76,7 @@ export async function fetchLicenses( export interface ESClusterStatsWithLicense { cluster_uuid: string; type: 'cluster_stats'; - license?: ESLicense; + license?: LicenseGetLicenseInformation; } /** diff --git a/x-pack/plugins/monitoring/tsconfig.json b/x-pack/plugins/monitoring/tsconfig.json index 957b256bd726b..3b78104e65b8c 100644 --- a/x-pack/plugins/monitoring/tsconfig.json +++ b/x-pack/plugins/monitoring/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/features-plugin", "@kbn/infra-plugin", "@kbn/licensing-plugin", - "@kbn/telemetry-collection-xpack-plugin", "@kbn/triggers-actions-ui-plugin", "@kbn/expect", "@kbn/i18n", diff --git a/x-pack/plugins/observability_solution/infra/kibana.jsonc b/x-pack/plugins/observability_solution/infra/kibana.jsonc index 0f039fb02e356..6bcc6ef7259b4 100644 --- a/x-pack/plugins/observability_solution/infra/kibana.jsonc +++ b/x-pack/plugins/observability_solution/infra/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/infra-plugin", "owner": ["@elastic/obs-ux-logs-team", "@elastic/obs-ux-infra_services-team"], + "group": "observability", + "visibility": "private", "description": "This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions", "plugin": { "id": "infra", diff --git a/x-pack/plugins/observability_solution/inventory/kibana.jsonc b/x-pack/plugins/observability_solution/inventory/kibana.jsonc index fc77163ae3c5f..e7cc398c9c655 100644 --- a/x-pack/plugins/observability_solution/inventory/kibana.jsonc +++ b/x-pack/plugins/observability_solution/inventory/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/inventory-plugin", "owner": "@elastic/obs-ux-infra_services-team", + "group": "observability", + "visibility": "private", "plugin": { "id": "inventory", "server": true, diff --git a/x-pack/plugins/observability_solution/investigate_app/kibana.jsonc b/x-pack/plugins/observability_solution/investigate_app/kibana.jsonc index e55dc03c83266..9b8284808a657 100644 --- a/x-pack/plugins/observability_solution/investigate_app/kibana.jsonc +++ b/x-pack/plugins/observability_solution/investigate_app/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/investigate-app-plugin", "owner": "@elastic/obs-ux-management-team", + "group": "observability", + "visibility": "private", "plugin": { "id": "investigateApp", "server": true, diff --git a/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts b/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts index daea1177b19f8..246988ed96307 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts +++ b/x-pack/plugins/observability_solution/metrics_data_access/server/lib/adapters/framework/adapter_types.ts @@ -17,7 +17,6 @@ import { } from '@kbn/data-plugin/server'; import { PluginStart as DataViewsPluginStart } from '@kbn/data-views-plugin/server'; import { HomeServerPluginSetup } from '@kbn/home-plugin/server'; -import { VisTypeTimeseriesSetup } from '@kbn/vis-type-timeseries-plugin/server'; import { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import { SpacesPluginSetup } from '@kbn/spaces-plugin/server'; import { PluginSetupContract as AlertingPluginContract } from '@kbn/alerting-plugin/server'; @@ -37,7 +36,6 @@ export interface InfraServerPluginSetupDeps { share: SharePluginSetup; spaces: SpacesPluginSetup; usageCollection: UsageCollectionSetup; - visTypeTimeseries: VisTypeTimeseriesSetup; ml?: MlPluginSetup; metricsDataAccess: MetricsDataPluginSetup; } diff --git a/x-pack/plugins/observability_solution/metrics_data_access/tsconfig.json b/x-pack/plugins/observability_solution/metrics_data_access/tsconfig.json index 0c2c471a6bf77..2889bddc82393 100644 --- a/x-pack/plugins/observability_solution/metrics_data_access/tsconfig.json +++ b/x-pack/plugins/observability_solution/metrics_data_access/tsconfig.json @@ -16,7 +16,6 @@ "@kbn/data-plugin", "@kbn/data-views-plugin", "@kbn/home-plugin", - "@kbn/vis-type-timeseries-plugin", "@kbn/features-plugin", "@kbn/spaces-plugin", "@kbn/alerting-plugin", diff --git a/x-pack/plugins/observability_solution/observability/common/typings.ts b/x-pack/plugins/observability_solution/observability/common/typings.ts index 03981f5941dc2..6c4eb09b284b7 100644 --- a/x-pack/plugins/observability_solution/observability/common/typings.ts +++ b/x-pack/plugins/observability_solution/observability/common/typings.ts @@ -11,7 +11,7 @@ import { ALERT_STATUS_RECOVERED, ALERT_STATUS_UNTRACKED, } from '@kbn/rule-data-utils'; -import { Filter } from '@kbn/es-query'; +import type { Filter } from '@kbn/es-query'; import { ALERT_STATUS_ALL } from './constants'; export type Maybe = T | null | undefined; @@ -54,5 +54,10 @@ export interface TimeRange { to?: string; } +export interface EventNonEcsData { + field: string; + value?: Maybe; +} + // Alert fields['kibana.alert.group] type export type GroupBy = Group[]; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/get_columns.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/get_columns.tsx index 2d2c1b1c299cf..fa2f10c3516e7 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/get_columns.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/get_columns.tsx @@ -5,11 +5,7 @@ * 2.0. */ -/** - * We need to produce types and code transpilation at different folders during the build of the package. - * We have types and code at different imports because we don't want to import the whole package in the resulting webpack bundle for the plugin. - * This way plugins can do targeted imports to reduce the final code bundle - */ +import type { EuiDataGridColumn } from '@elastic/eui'; import { ALERT_EVALUATION_VALUE, ALERT_EVALUATION_THRESHOLD, @@ -21,30 +17,18 @@ import { ALERT_INSTANCE_ID, TAGS, } from '@kbn/rule-data-utils'; -import { EuiDataGridColumn } from '@elastic/eui'; -import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common'; import { i18n } from '@kbn/i18n'; -/** - * columns implements a subset of `EuiDataGrid`'s `EuiDataGridColumn` interface, - * plus additional TGrid column properties - */ export const getColumns = ( { showRuleName, }: { showRuleName?: boolean; } = { showRuleName: false } -): Array< - Pick & ColumnHeaderOptions -> => { - const ruleNameColumn: Array< - Pick & - ColumnHeaderOptions - > = showRuleName +): EuiDataGridColumn[] => { + const ruleNameColumn: EuiDataGridColumn[] = showRuleName ? [ { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.alertsTGrid.ruleNameColumnDescription', { @@ -59,7 +43,6 @@ export const getColumns = ( return [ { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.statusColumnDescription', { defaultMessage: 'Alert Status', }), @@ -67,7 +50,6 @@ export const getColumns = ( initialWidth: 120, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.triggeredColumnDescription', { defaultMessage: 'Triggered', }), @@ -76,7 +58,6 @@ export const getColumns = ( schema: 'datetime', }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.durationColumnDescription', { defaultMessage: 'Duration', }), @@ -85,7 +66,6 @@ export const getColumns = ( }, ...ruleNameColumn, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.sourceColumnDescription', { defaultMessage: 'Group', }), @@ -93,7 +73,6 @@ export const getColumns = ( initialWidth: 100, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.alertsTGrid.observedValueColumnDescription', { @@ -104,7 +83,6 @@ export const getColumns = ( initialWidth: 100, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.thresholdColumnDescription', { defaultMessage: 'Threshold', }), @@ -112,7 +90,6 @@ export const getColumns = ( initialWidth: 100, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.tagsColumnDescription', { defaultMessage: 'Tags', }), @@ -120,12 +97,10 @@ export const getColumns = ( initialWidth: 150, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate('xpack.observability.alertsTGrid.reasonColumnDescription', { defaultMessage: 'Reason', }), id: ALERT_REASON, - linkField: '*', }, ]; }; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.test.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.test.tsx index d551f90f1097f..d9d01d85c5303 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.test.tsx @@ -6,7 +6,6 @@ */ import { ALERT_STATUS, ALERT_STATUS_ACTIVE, ALERT_STATUS_RECOVERED } from '@kbn/rule-data-utils'; -import type { DeprecatedCellValueElementProps } from '@kbn/timelines-plugin/common'; import { render } from '../../../utils/test_helper'; import { getRenderCellValue } from './render_cell_value'; @@ -19,7 +18,6 @@ describe('getRenderCellValue', () => { it('should return an active indicator when alert status is active', async () => { const cell = render( getRenderCellValue({ - ...requiredProperties, columnId: ALERT_STATUS, data: makeAlertsTableRow({ alertStatus: ALERT_STATUS_ACTIVE }), }) @@ -31,7 +29,6 @@ describe('getRenderCellValue', () => { it('should return a recovered indicator when alert status is recovered', async () => { const cell = render( getRenderCellValue({ - ...requiredProperties, columnId: ALERT_STATUS, data: makeAlertsTableRow({ alertStatus: ALERT_STATUS_RECOVERED }), }) @@ -50,22 +47,3 @@ function makeAlertsTableRow({ alertStatus }: AlertsTableRow) { }, ]; } - -const requiredProperties: DeprecatedCellValueElementProps = { - rowIndex: 0, - colIndex: 0, - columnId: '', - setCellProps: jest.fn(), - isExpandable: false, - isExpanded: false, - isDetails: false, - data: [], - eventId: '', - header: { - id: '', - columnHeaderType: 'not-filtered', - }, - isDraggable: false, - linkValues: [], - scopeId: '', -}; diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx index 6f6eb54a333d1..23757f889e058 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/common/render_cell_value.tsx @@ -23,7 +23,7 @@ import { ALERT_RULE_EXECUTION_TIMESTAMP, } from '@kbn/rule-data-utils'; import { isEmpty } from 'lodash'; -import type { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; +import type { EventNonEcsData } from '../../../../common/typings'; import type { ObservabilityRuleTypeRegistry } from '../../..'; import { asDuration } from '../../../../common/utils/formatters'; import { AlertSeverityBadge } from '../../alert_severity_badge'; @@ -36,7 +36,7 @@ export const getMappedNonEcsValue = ({ data, fieldName, }: { - data: TimelineNonEcsData[]; + data: EventNonEcsData[]; fieldName: string; }): string[] | undefined => { const item = data.find((d) => d.field === fieldName); @@ -64,23 +64,24 @@ const getRenderValue = (mappedNonEcsValue: any) => { return '--'; }; +interface GetRenderCellValueParams { + columnId: string; + data?: EventNonEcsData[]; + setFlyoutAlert?: (alertId: string) => void; + observabilityRuleTypeRegistry?: ObservabilityRuleTypeRegistry; +} + /** * This implementation of `EuiDataGrid`'s `renderCellValue` * accepts `EuiDataGridCellValueElementProps`, plus `data` * from the TGrid */ - export const getRenderCellValue = ({ columnId, data, setFlyoutAlert, observabilityRuleTypeRegistry, -}: { - columnId: string; - data?: Array<{ field: string; value: any }>; - setFlyoutAlert?: (alertId: string) => void; - observabilityRuleTypeRegistry?: ObservabilityRuleTypeRegistry; -}) => { +}: GetRenderCellValueParams) => { if (!data) return null; const mappedNonEcsValue = getMappedNonEcsValue({ data, diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx index ea67c7c158e83..3796667e2583f 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_table/slo/default_columns.tsx @@ -10,20 +10,17 @@ * We have types and code at different imports because we don't want to import the whole package in the resulting webpack bundle for the plugin. * This way plugins can do targeted imports to reduce the final code bundle */ + +import type { EuiDataGridColumn } from '@elastic/eui'; import { ALERT_DURATION, ALERT_REASON, ALERT_STATUS, ALERT_RULE_NAME } from '@kbn/rule-data-utils'; -import { EuiDataGridColumn } from '@elastic/eui'; -import type { ColumnHeaderOptions } from '@kbn/timelines-plugin/common'; import { i18n } from '@kbn/i18n'; /** * columns implements a subset of `EuiDataGrid`'s `EuiDataGridColumn` interface, * plus additional TGrid column properties */ -export const columns: Array< - Pick & ColumnHeaderOptions -> = [ +export const columns: EuiDataGridColumn[] = [ { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.statusColumnDescription', { @@ -34,7 +31,6 @@ export const columns: Array< initialWidth: 110, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.durationColumnDescription', { @@ -45,7 +41,6 @@ export const columns: Array< initialWidth: 116, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.sloColumnDescription', { @@ -56,7 +51,6 @@ export const columns: Array< initialWidth: 110, }, { - columnHeaderType: 'not-filtered', displayAsText: i18n.translate( 'xpack.observability.slo.sloAlertsEmbeddable.alertsTGrid.reasonColumnDescription', { @@ -64,6 +58,5 @@ export const columns: Array< } ), id: ALERT_REASON, - linkField: '*', }, ]; diff --git a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts index 891661b6bc82a..2c04cdf8f0767 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts +++ b/x-pack/plugins/observability_solution/observability/public/components/custom_threshold/types.ts @@ -6,35 +6,36 @@ */ import * as rt from 'io-ts'; -import { CasesPublicStart } from '@kbn/cases-plugin/public'; -import { ChartsPluginStart } from '@kbn/charts-plugin/public'; -import { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { DataView, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import { DiscoverStart } from '@kbn/discover-plugin/public'; -import { EmbeddableStart } from '@kbn/embeddable-plugin/public'; -import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; -import { LensPublicStart } from '@kbn/lens-plugin/public'; -import { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public'; -import { OsqueryPluginStart } from '@kbn/osquery-plugin/public'; +import type { CasesPublicStart } from '@kbn/cases-plugin/public'; +import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { DataView, DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { DiscoverStart } from '@kbn/discover-plugin/public'; +import type { EmbeddableStart } from '@kbn/embeddable-plugin/public'; +import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; +import type { LensPublicStart } from '@kbn/lens-plugin/public'; +import type { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public'; +import type { OsqueryPluginStart } from '@kbn/osquery-plugin/public'; import { ALERT_GROUP, ALERT_RULE_PARAMETERS } from '@kbn/rule-data-utils'; -import { SharePluginStart } from '@kbn/share-plugin/public'; -import { SpacesPluginStart } from '@kbn/spaces-plugin/public'; -import { +import type { SharePluginStart } from '@kbn/share-plugin/public'; +import type { SpacesPluginStart } from '@kbn/spaces-plugin/public'; +import type { RuleTypeParams, TriggersAndActionsUIPublicPluginStart, } from '@kbn/triggers-actions-ui-plugin/public'; -import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; -import { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; +import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public'; +import type { Group } from '../../../common/typings'; import { aggType, - CustomThresholdSearchSourceFields, - BaseMetricExpressionParams, - CustomMetricExpressionParams, - MetricExpressionParams, - ThresholdParams, + type CustomThresholdSearchSourceFields, + type BaseMetricExpressionParams, + type CustomMetricExpressionParams, + type MetricExpressionParams, + type ThresholdParams, } from '../../../common/custom_threshold_rule/types'; -import { ObservabilityPublicStart } from '../../plugin'; +import type { ObservabilityPublicStart } from '../../plugin'; export type CustomThresholdPrefillOptions = Partial< Omit & { criteria: Array> } @@ -90,8 +91,9 @@ export interface CustomThresholdRuleTypeParams extends RuleTypeParams { searchConfiguration: CustomThresholdSearchSourceFields; groupBy?: string | string[]; } + export interface CustomThresholdAlertFields { - [ALERT_GROUP]?: Array<{ field: string; value: string }>; + [ALERT_GROUP]?: Group[]; [ALERT_RULE_PARAMETERS]: CustomThresholdRuleTypeParams; } diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx index f591347b17238..071b75ab89632 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alerts/components/alert_actions.tsx @@ -19,15 +19,15 @@ import { i18n } from '@kbn/i18n'; import { CaseAttachmentsWithoutOwner } from '@kbn/cases-plugin/public'; import { AttachmentType } from '@kbn/cases-plugin/common'; import { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; -import { TimelineNonEcsData } from '@kbn/timelines-plugin/common'; import type { AlertActionsProps } from '@kbn/triggers-actions-ui-plugin/public/types'; import { useRouteMatch } from 'react-router-dom'; import { SLO_ALERTS_TABLE_ID } from '@kbn/observability-shared-plugin/common'; +import type { EventNonEcsData } from '../../../../common/typings'; import { RULE_DETAILS_PAGE_ID } from '../../rule_details/constants'; import { paths, SLO_DETAIL_PATH } from '../../../../common/locators/paths'; import { useKibana } from '../../../utils/kibana_react'; import { parseAlert } from '../helpers/parse_alert'; -import { observabilityFeatureId, ObservabilityRuleTypeRegistry } from '../../..'; +import { observabilityFeatureId, type ObservabilityRuleTypeRegistry } from '../../..'; import type { ConfigSchema } from '../../../plugin'; import { ALERT_DETAILS_PAGE_ID } from '../../alert_details/alert_details'; @@ -58,7 +58,7 @@ export function AlertActions({ const data = useMemo( () => - Object.entries(alert ?? {}).reduce( + Object.entries(alert ?? {}).reduce( (acc, [field, value]) => [...acc, { field, value: value as string[] }], [] ), diff --git a/x-pack/plugins/observability_solution/observability/public/utils/test_helper.tsx b/x-pack/plugins/observability_solution/observability/public/utils/test_helper.tsx index dca5d29851469..16184c5621594 100644 --- a/x-pack/plugins/observability_solution/observability/public/utils/test_helper.tsx +++ b/x-pack/plugins/observability_solution/observability/public/utils/test_helper.tsx @@ -14,7 +14,6 @@ import { coreMock } from '@kbn/core/public/mocks'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; -import translations from '@kbn/translations-plugin/translations/ja-JP.json'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; @@ -52,7 +51,7 @@ const queryClient = new QueryClient({ export const render = (component: React.ReactNode, config: Subset = {}) => { return testLibRender( - + + diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_management/tsconfig.json b/x-pack/plugins/observability_solution/observability_ai_assistant_management/tsconfig.json index 99bce73e1722f..f0ad230f6f1b3 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_management/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_management/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/core-chrome-browser", "@kbn/observability-ai-assistant-plugin", "@kbn/serverless", - "@kbn/translations-plugin", "@kbn/enterprise-search-plugin", "@kbn/management-settings-components-field-row", "@kbn/observability-shared-plugin", diff --git a/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx b/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx index 1fe6ece726610..014644d973b74 100644 --- a/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx +++ b/x-pack/plugins/observability_solution/slo/public/utils/test_helper.tsx @@ -13,7 +13,6 @@ import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { createObservabilityRuleTypeRegistryMock } from '@kbn/observability-plugin/public'; import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; -import translations from '@kbn/translations-plugin/translations/ja-JP.json'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { render as testLibRender } from '@testing-library/react'; import React from 'react'; @@ -43,7 +42,7 @@ const queryClient = new QueryClient({ export const render = (component: React.ReactNode) => { return testLibRender( // @ts-ignore - + { prepend: (url: string) => url, }, }, - plugins: { - infra: {}, - }, }); }); diff --git a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts index 0583c79eb3eff..31fd69648418f 100644 --- a/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts +++ b/x-pack/plugins/upgrade_assistant/__jest__/client_integration/helpers/app_context.mock.ts @@ -108,7 +108,6 @@ export const getAppContextMock = (kibanaVersion: SemVer) => ({ }, plugins: { share: shareMock, - infra: undefined, cloud: { ...cloudMock.createSetup(), isCloudEnabled: false, diff --git a/x-pack/plugins/upgrade_assistant/kibana.jsonc b/x-pack/plugins/upgrade_assistant/kibana.jsonc index a339a06c9e60d..55a08297937bb 100644 --- a/x-pack/plugins/upgrade_assistant/kibana.jsonc +++ b/x-pack/plugins/upgrade_assistant/kibana.jsonc @@ -2,6 +2,8 @@ "type": "plugin", "id": "@kbn/upgrade-assistant-plugin", "owner": "@elastic/kibana-management", + "group": "platform", + "visibility": "private", "plugin": { "id": "upgradeAssistant", "server": true, @@ -21,7 +23,6 @@ "usageCollection", "cloud", "security", - "infra", "logsShared" ], "requiredBundles": [ diff --git a/x-pack/plugins/upgrade_assistant/public/plugin.ts b/x-pack/plugins/upgrade_assistant/public/plugin.ts index 694e29cd7cee3..ceeb674fef961 100644 --- a/x-pack/plugins/upgrade_assistant/public/plugin.ts +++ b/x-pack/plugins/upgrade_assistant/public/plugin.ts @@ -51,7 +51,7 @@ export class UpgradeAssistantUIPlugin title: pluginName, order: 1, async mount(params) { - const [coreStart, { data, ...plugins }] = await coreSetup.getStartServices(); + const [coreStart, { data }] = await coreSetup.getStartServices(); const { chrome: { docTitle }, @@ -65,10 +65,6 @@ export class UpgradeAssistantUIPlugin plugins: { cloud, share, - // Infra plugin doesnt export anything as a public interface. So the only - // way we have at this stage for checking if the plugin is available or not - // is by checking if the startServices has the `infra` key. - infra: Object.hasOwn(plugins, 'infra') ? {} : undefined, }, services: { core: coreStart, diff --git a/x-pack/plugins/upgrade_assistant/public/types.ts b/x-pack/plugins/upgrade_assistant/public/types.ts index f91a17323b02b..f01271443cb7f 100644 --- a/x-pack/plugins/upgrade_assistant/public/types.ts +++ b/x-pack/plugins/upgrade_assistant/public/types.ts @@ -47,7 +47,6 @@ export interface AppDependencies { plugins: { cloud?: CloudSetup; share: SharePluginSetup; - infra: object | undefined; }; services: { core: CoreStart; From 8ed8cc964e2ec557ea7173cc8cecf17b7f69d0d3 Mon Sep 17 00:00:00 2001 From: Navarone Feekery <13634519+navarone-feekery@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:45:22 +0100 Subject: [PATCH 13/16] [Search] Move `ConnectorDefinition` types and consts (#197676) ## Summary - Move types and consts for `ConnectorClientSideDefinition` and `ConnectorServerSideDefinition` to the shared `kbn-search-connectors` package - Update ESS references to these values to use it from the package - Remove them from the connectors plugin --- packages/kbn-optimizer/limits.yml | 2 +- .../constants}/connectors.ts | 467 +++-- .../constants}/doc_links.ts | 8 +- .../kbn-search-connectors/constants/index.ts | 11 + packages/kbn-search-connectors/index.ts | 1 + packages/kbn-search-connectors/tsconfig.json | 1 + .../types/connector_definition.ts | 29 + packages/kbn-search-connectors/types/index.ts | 1 + .../types/native_connectors.ts | 1844 ++++++++--------- .../method_connector/new_connector_logic.ts | 3 +- .../new_index/new_search_index_page.tsx | 2 +- .../native_connector_configuration_config.tsx | 11 +- .../research_configuration.tsx | 3 +- .../shared/kibana/kibana_logic.ts | 2 +- .../server/utils/search_result_provider.ts | 2 +- .../search_connectors/common/constants.ts | 182 -- .../common/lib/connector_types.ts | 10 +- .../plugins/search_connectors/common/types.ts | 17 - .../plugins/search_connectors/public/index.ts | 1 - .../search_connectors/public/plugin.ts | 2 +- .../plugins/search_connectors/public/types.ts | 3 +- .../plugins/search_connectors/server/index.ts | 1 - .../search_connectors/server/plugin.ts | 2 +- .../plugins/search_connectors/server/types.ts | 2 +- .../plugins/search_connectors/tsconfig.json | 3 +- .../translations/translations/fr-FR.json | 133 +- .../translations/translations/ja-JP.json | 133 +- .../translations/translations/zh-CN.json | 133 +- 28 files changed, 1427 insertions(+), 1582 deletions(-) rename {x-pack/plugins/search_connectors/common => packages/kbn-search-connectors/constants}/connectors.ts (50%) rename {x-pack/plugins/search_connectors/common => packages/kbn-search-connectors/constants}/doc_links.ts (90%) create mode 100644 packages/kbn-search-connectors/constants/index.ts create mode 100644 packages/kbn-search-connectors/types/connector_definition.ts delete mode 100644 x-pack/plugins/search_connectors/common/constants.ts delete mode 100644 x-pack/plugins/search_connectors/common/types.ts diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 7936e52ccbf18..432211d395f61 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -138,7 +138,7 @@ pageLoadAssetSize: screenshotMode: 17856 screenshotting: 22870 searchAssistant: 19831 - searchConnectors: 30000 + searchConnectors: 65000 searchHomepage: 19831 searchIndices: 20519 searchInferenceEndpoints: 20470 diff --git a/x-pack/plugins/search_connectors/common/connectors.ts b/packages/kbn-search-connectors/constants/connectors.ts similarity index 50% rename from x-pack/plugins/search_connectors/common/connectors.ts rename to packages/kbn-search-connectors/constants/connectors.ts index b0bc5564e9750..ad5c716234133 100644 --- a/x-pack/plugins/search_connectors/common/connectors.ts +++ b/packages/kbn-search-connectors/constants/connectors.ts @@ -1,42 +1,207 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". */ import { i18n } from '@kbn/i18n'; +import { + ConnectorClientSideDefinition, + ConnectorServerSideDefinition, +} from '../types/connector_definition'; -export interface ConnectorServerSideDefinition { - categories?: string[]; - description?: string; - iconPath: string; - isBeta: boolean; - isNative: boolean; - isTechPreview?: boolean; - keywords: string[]; - name: string; - serviceType: string; -} +import { docLinks } from './doc_links'; + +// needs to be a function because, docLinks are only populated with actual +// documentation links in browser after SearchConnectorsPlugin starts +export const getConnectorsDict = (): Record => ({ + azure_blob_storage: { + docsUrl: docLinks.connectorsAzureBlobStorage, + externalAuthDocsUrl: 'https://learn.microsoft.com/azure/storage/common/authorize-data-access', + externalDocsUrl: 'https://learn.microsoft.com/azure/storage/blobs/', + platinumOnly: true, + }, + box: { + docsUrl: docLinks.connectorsBox, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + confluence: { + docsUrl: docLinks.connectorsConfluence, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + custom: { + docsUrl: docLinks.connectors, + externalAuthDocsUrl: '', + externalDocsUrl: '', + }, + dropbox: { + docsUrl: docLinks.connectorsDropbox, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + github: { + docsUrl: docLinks.connectorsGithub, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + gmail: { + docsUrl: docLinks.connectorsGmail, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + google_cloud_storage: { + docsUrl: docLinks.connectorsGoogleCloudStorage, + externalAuthDocsUrl: 'https://cloud.google.com/storage/docs/authentication', + externalDocsUrl: 'https://cloud.google.com/storage/docs', + platinumOnly: true, + }, + google_drive: { + docsUrl: docLinks.connectorsGoogleDrive, + externalAuthDocsUrl: 'https://cloud.google.com/iam/docs/service-account-overview', + externalDocsUrl: 'https://developers.google.com/drive', + platinumOnly: true, + }, + jira: { + docsUrl: docLinks.connectorsJira, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + microsoft_teams: { + docsUrl: docLinks.connectorsTeams, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + mongodb: { + docsUrl: docLinks.connectorsMongoDB, + externalAuthDocsUrl: 'https://www.mongodb.com/docs/atlas/app-services/authentication/', + externalDocsUrl: 'https://www.mongodb.com/docs/', + platinumOnly: true, + }, + mssql: { + docsUrl: docLinks.connectorsMicrosoftSQL, + externalAuthDocsUrl: + 'https://learn.microsoft.com/sql/relational-databases/security/authentication-access/getting-started-with-database-engine-permissions', + externalDocsUrl: 'https://learn.microsoft.com/sql/', + platinumOnly: true, + }, + mysql: { + docsUrl: docLinks.connectorsMySQL, + externalDocsUrl: 'https://dev.mysql.com/doc/', + platinumOnly: true, + }, + network_drive: { + docsUrl: docLinks.connectorsNetworkDrive, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + notion: { + docsUrl: docLinks.connectorsNotion, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + onedrive: { + docsUrl: docLinks.connectorsOneDrive, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + oracle: { + docsUrl: docLinks.connectorsOracle, + externalAuthDocsUrl: + 'https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/index.html', + externalDocsUrl: 'https://docs.oracle.com/database/oracle/oracle-database/', + platinumOnly: true, + }, + outlook: { + docsUrl: docLinks.connectorsOutlook, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + postgresql: { + docsUrl: docLinks.connectorsPostgreSQL, + externalAuthDocsUrl: 'https://www.postgresql.org/docs/15/auth-methods.html', + externalDocsUrl: 'https://www.postgresql.org/docs/', + platinumOnly: true, + }, + redis: { + docsUrl: docLinks.connectorsRedis, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + s3: { + docsUrl: docLinks.connectorsS3, + externalAuthDocsUrl: 'https://docs.aws.amazon.com/s3/index.html', + externalDocsUrl: '', + platinumOnly: true, + }, + salesforce: { + docsUrl: docLinks.connectorsSalesforce, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + servicenow: { + docsUrl: docLinks.connectorsServiceNow, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + sharepoint_online: { + docsUrl: docLinks.connectorsSharepointOnline, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + sharepoint_server: { + docsUrl: docLinks.connectorsSharepoint, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + slack: { + docsUrl: docLinks.connectorsSlack, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, + zoom: { + docsUrl: docLinks.connectorsZoom, + externalAuthDocsUrl: '', + externalDocsUrl: '', + platinumOnly: true, + }, +}); /* The consumer should host these icons and transform the iconPath into something usable * Enterprise Search and Serverless Search do this right now */ - export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.azureBlob.description', - { - defaultMessage: 'Search over your content on Azure Blob Storage.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.azureBlob.description', { + defaultMessage: 'Search over your content on Azure Blob Storage.', + }), iconPath: 'azure_blob_storage.svg', isBeta: false, isNative: true, keywords: ['cloud', 'azure', 'blob', 's3', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.azureBlob.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.azureBlob.name', { defaultMessage: 'Azure Blob Storage', }), serviceType: 'azure_blob_storage', @@ -44,7 +209,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.confluence.description', + 'searchConnectors.content.nativeConnectors.confluence.description', { defaultMessage: 'Search over your content on Confluence Cloud.', } @@ -53,7 +218,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['confluence', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.confluence.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.confluence.name', { defaultMessage: 'Confluence Cloud & Server', }), serviceType: 'confluence', @@ -61,7 +226,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.confluenceDataCenter.description', + 'searchConnectors.content.nativeConnectors.confluenceDataCenter.description', { defaultMessage: 'Search over your content on Confluence Data Center.', } @@ -71,45 +236,36 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: true, isTechPreview: true, keywords: ['confluence', 'data', 'center', 'connector'], - name: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.confluence_data_center.name', - { - defaultMessage: 'Confluence Data Center', - } - ), + name: i18n.translate('searchConnectors.content.nativeConnectors.confluence_data_center.name', { + defaultMessage: 'Confluence Data Center', + }), serviceType: 'confluence', }, { categories: ['search', 'elastic_stack', 'datastore', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.dropbox.description', - { - defaultMessage: 'Search over your files and folders stored on Dropbox.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.dropbox.description', { + defaultMessage: 'Search over your files and folders stored on Dropbox.', + }), iconPath: 'dropbox.svg', isBeta: false, isNative: true, isTechPreview: false, keywords: ['dropbox', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.dropbox.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.dropbox.name', { defaultMessage: 'Dropbox', }), serviceType: 'dropbox', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'jira'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.jira.description', - { - defaultMessage: 'Search over your content on Jira Cloud.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.jira.description', { + defaultMessage: 'Search over your content on Jira Cloud.', + }), iconPath: 'jira_cloud.svg', isBeta: false, isNative: true, keywords: ['jira', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.jira.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.jira.name', { defaultMessage: 'Jira Cloud', }), serviceType: 'jira', @@ -117,7 +273,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'jira'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.jiraServer.description', + 'searchConnectors.content.nativeConnectors.jiraServer.description', { defaultMessage: 'Search over your content on Jira Server.', } @@ -126,7 +282,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: false, keywords: ['jira', 'server', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.jiraServer.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.jiraServer.name', { defaultMessage: 'Jira Server', }), serviceType: 'jira', @@ -134,7 +290,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.jiraDataCenter.description', + 'searchConnectors.content.nativeConnectors.jiraDataCenter.description', { defaultMessage: 'Search over your content on Jira Data Center.', } @@ -144,24 +300,21 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isTechPreview: true, isNative: true, keywords: ['jira', 'data', 'center', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.jira_data_center.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.jira_data_center.name', { defaultMessage: 'Jira Data Center', }), serviceType: 'jira', }, { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.github.description', - { - defaultMessage: 'Search over your projects and repos on GitHub.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.github.description', { + defaultMessage: 'Search over your projects and repos on GitHub.', + }), iconPath: 'github.svg', isBeta: false, isNative: true, keywords: ['github', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.github.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.github.name', { defaultMessage: 'GitHub & GitHub Enterprise Server', }), serviceType: 'github', @@ -169,7 +322,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.googleCloud.description', + 'searchConnectors.content.nativeConnectors.googleCloud.description', { defaultMessage: 'Search over your content on Google Cloud Storage.', } @@ -178,7 +331,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['google', 'cloud', 'blob', 's3', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.googleCloud.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.googleCloud.name', { defaultMessage: 'Google Cloud Storage', }), serviceType: 'google_cloud_storage', @@ -186,7 +339,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.googleDrive.description', + 'searchConnectors.content.nativeConnectors.googleDrive.description', { defaultMessage: 'Search over your content on Google Drive.', } @@ -195,24 +348,21 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['google', 'drive', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.googleDrive.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.googleDrive.name', { defaultMessage: 'Google Drive', }), serviceType: 'google_drive', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.graphQL.description', - { - defaultMessage: 'Search over your content with GraphQL.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.graphQL.description', { + defaultMessage: 'Search over your content with GraphQL.', + }), iconPath: 'graphql.svg', isBeta: false, isNative: false, keywords: ['graphql', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.graphQL.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.graphQL.name', { defaultMessage: 'GraphQL', }), serviceType: 'graphql', @@ -220,58 +370,49 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ }, { categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.mongoDB.description', - { - defaultMessage: 'Search over your MongoDB content.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.mongoDB.description', { + defaultMessage: 'Search over your MongoDB content.', + }), iconPath: 'mongodb.svg', isBeta: false, isNative: true, keywords: ['mongo', 'mongodb', 'database', 'nosql', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.mongodb.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.mongodb.name', { defaultMessage: 'MongoDB', }), serviceType: 'mongodb', }, { categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.mysql.description', - { - defaultMessage: 'Search over your MySQL content.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.mysql.description', { + defaultMessage: 'Search over your MySQL content.', + }), iconPath: 'mysql.svg', isBeta: false, isNative: true, keywords: ['mysql', 'sql', 'database', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.mysql.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.mysql.name', { defaultMessage: 'MySQL', }), serviceType: 'mysql', }, { categories: ['search', 'custom', 'elastic_stack', 'datastore', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.msSql.description', - { - defaultMessage: 'Search over your content on Microsoft SQL Server.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.msSql.description', { + defaultMessage: 'Search over your content on Microsoft SQL Server.', + }), iconPath: 'mssql.svg', isBeta: false, isNative: true, keywords: ['mssql', 'microsoft', 'sql', 'database', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.microsoftSQL.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.microsoftSQL.name', { defaultMessage: 'Microsoft SQL', }), serviceType: 'mssql', }, { description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.netowkrDrive.description', + 'searchConnectors.content.nativeConnectors.netowkrDrive.description', { defaultMessage: 'Search over your Network Drive content.', } @@ -281,31 +422,28 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['network', 'drive', 'file', 'directory', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.networkDrive.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.networkDrive.name', { defaultMessage: 'Network drive', }), serviceType: 'network_drive', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.notion.description', - { - defaultMessage: 'Search over your content on Notion.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.notion.description', { + defaultMessage: 'Search over your content on Notion.', + }), iconPath: 'notion.svg', isBeta: false, isNative: true, keywords: ['notion', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.notion.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.notion.name', { defaultMessage: 'Notion', }), serviceType: 'notion', }, { description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.postgreSQL.description', + 'searchConnectors.content.nativeConnectors.postgreSQL.description', { defaultMessage: 'Search over your content on PostgreSQL.', } @@ -315,25 +453,22 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['postgresql', 'sql', 'database', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.postgresql.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.postgresql.name', { defaultMessage: 'PostgreSQL', }), serviceType: 'postgresql', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.redis.description', - { - defaultMessage: 'Search over your content on Redis.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.redis.description', { + defaultMessage: 'Search over your content on Redis.', + }), iconPath: 'redis.svg', isBeta: false, isNative: false, isTechPreview: true, keywords: ['redis', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.redis.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.redis.name', { defaultMessage: 'Redis', }), serviceType: 'redis', @@ -341,7 +476,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.salesforce.description', + 'searchConnectors.content.nativeConnectors.salesforce.description', { defaultMessage: 'Search over your content on Salesforce.', } @@ -350,7 +485,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['salesforce', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.salesforce.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.salesforce.name', { defaultMessage: 'Salesforce', }), serviceType: 'salesforce', @@ -358,7 +493,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.salesforceSandbox.description', + 'searchConnectors.content.nativeConnectors.salesforceSandbox.description', { defaultMessage: 'Search over your content on Salesforce Sandbox.', } @@ -367,7 +502,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['salesforce', 'cloud', 'connector', 'sandbox'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.salesforceBox.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.salesforceBox.name', { defaultMessage: 'Salesforce Sandbox', }), serviceType: 'salesforce', @@ -375,7 +510,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.serviceNow.description', + 'searchConnectors.content.nativeConnectors.serviceNow.description', { defaultMessage: 'Search over your content on ServiceNow.', } @@ -385,7 +520,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: true, isTechPreview: false, keywords: ['servicenow', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.serviceNow.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.serviceNow.name', { defaultMessage: 'ServiceNow', }), serviceType: 'servicenow', @@ -393,7 +528,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.description', + 'searchConnectors.content.nativeConnectors.sharepointOnline.description', { defaultMessage: 'Search over your content on SharePoint Online.', } @@ -403,24 +538,21 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: true, isTechPreview: false, keywords: ['sharepoint', 'office365', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.sharepointOnline.name', { defaultMessage: 'Sharepoint Online', }), serviceType: 'sharepoint_online', }, { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.gmail.description', - { - defaultMessage: 'Search over your content on Gmail.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.gmail.description', { + defaultMessage: 'Search over your content on Gmail.', + }), iconPath: 'gmail.svg', isBeta: false, isNative: true, keywords: ['gmail', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.gmail.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.gmail.name', { defaultMessage: 'Gmail', }), serviceType: 'gmail', @@ -428,7 +560,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.description', + 'searchConnectors.content.nativeConnectors.openTextDocumentum.description', { defaultMessage: 'Search over your content on OpenText Documentum.', } @@ -438,50 +570,41 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: false, isTechPreview: true, keywords: ['opentext', 'documentum', 'connector'], - name: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.name', - { - defaultMessage: 'OpenText Documentum', - } - ), + name: i18n.translate('searchConnectors.content.nativeConnectors.openTextDocumentum.name', { + defaultMessage: 'OpenText Documentum', + }), serviceType: 'opentext_documentum', }, { categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.oracle.description', - { - defaultMessage: 'Search over your content on Oracle.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.oracle.description', { + defaultMessage: 'Search over your content on Oracle.', + }), iconPath: 'oracle.svg', isBeta: false, isNative: true, keywords: ['oracle', 'sql', 'database', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.oracle.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.oracle.name', { defaultMessage: 'Oracle', }), serviceType: 'oracle', }, { categories: ['search', 'elastic_stack', 'custom', 'datastore', 'connector', 'connector_client'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.oneDrive.description', - { - defaultMessage: 'Search over your content on OneDrive.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.oneDrive.description', { + defaultMessage: 'Search over your content on OneDrive.', + }), iconPath: 'onedrive.svg', isBeta: false, isNative: true, keywords: ['network', 'drive', 'file', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.oneDrive.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.oneDrive.name', { defaultMessage: 'OneDrive', }), serviceType: 'onedrive', }, { - description: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.s3.description', { + description: i18n.translate('searchConnectors.content.nativeConnectors.s3.description', { defaultMessage: 'Search over your content on Amazon S3.', }), categories: ['search', 'datastore', 'elastic_stack', 'connector', 'connector_client'], @@ -489,25 +612,22 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: true, keywords: ['s3', 'cloud', 'amazon', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.s3.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.s3.name', { defaultMessage: 'S3', }), serviceType: 's3', }, { - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.slack.description', - { - defaultMessage: 'Search over your content on Slack.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.slack.description', { + defaultMessage: 'Search over your content on Slack.', + }), categories: ['search', 'elastic_stack', 'connector', 'connector_client'], iconPath: 'slack.svg', isBeta: false, isNative: true, isTechPreview: true, keywords: ['slack', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.slack.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.slack.name', { defaultMessage: 'Slack', }), serviceType: 'slack', @@ -515,7 +635,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.sharepointServer.description', + 'searchConnectors.content.nativeConnectors.sharepointServer.description', { defaultMessage: 'Search over your content on SharePoint Server.', } @@ -525,14 +645,14 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: true, isTechPreview: false, keywords: ['sharepoint', 'cloud', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.sharepointServer.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.sharepointServer.name', { defaultMessage: 'Sharepoint Server', }), serviceType: 'sharepoint_server', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'box'], - description: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.box.description', { + description: i18n.translate('searchConnectors.content.nativeConnectors.box.description', { defaultMessage: 'Search over your content on Box.', }), iconPath: 'box.svg', @@ -540,60 +660,51 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isNative: true, isTechPreview: true, keywords: ['cloud', 'box'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.box.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.box.name', { defaultMessage: 'Box', }), serviceType: 'box', }, { - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.outlook.description', - { - defaultMessage: 'Search over your content on Outlook.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.outlook.description', { + defaultMessage: 'Search over your content on Outlook.', + }), categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'outlook'], iconPath: 'outlook.svg', isBeta: false, isNative: true, keywords: ['outlook', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.outlook.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.outlook.name', { defaultMessage: 'Outlook', }), serviceType: 'outlook', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'teams'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.teams.description', - { - defaultMessage: 'Search over your content on Teams.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.teams.description', { + defaultMessage: 'Search over your content on Teams.', + }), iconPath: 'teams.svg', isBeta: false, isNative: true, isTechPreview: true, keywords: ['teams', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.teams.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.teams.name', { defaultMessage: 'Teams', }), serviceType: 'microsoft_teams', }, { categories: ['search', 'elastic_stack', 'custom', 'connector', 'connector_client', 'zoom'], - description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.zoom.description', - { - defaultMessage: 'Search over your content on Zoom.', - } - ), + description: i18n.translate('searchConnectors.content.nativeConnectors.zoom.description', { + defaultMessage: 'Search over your content on Zoom.', + }), iconPath: 'zoom.svg', isBeta: false, isNative: true, isTechPreview: true, keywords: ['zoom', 'connector'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.zoom.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.zoom.name', { defaultMessage: 'Zoom', }), serviceType: 'zoom', @@ -601,7 +712,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ { categories: ['search', 'custom', 'elastic_stack', 'connector', 'connector_client'], description: i18n.translate( - 'searchConnectorsPlugin.content.nativeConnectors.customConnector.description', + 'searchConnectors.content.nativeConnectors.customConnector.description', { defaultMessage: 'Search over data stored on custom data sources.', } @@ -610,7 +721,7 @@ export const CONNECTOR_DEFINITIONS: ConnectorServerSideDefinition[] = [ isBeta: false, isNative: false, keywords: ['custom', 'connector', 'code'], - name: i18n.translate('searchConnectorsPlugin.content.nativeConnectors.customConnector.name', { + name: i18n.translate('searchConnectors.content.nativeConnectors.customConnector.name', { defaultMessage: 'Customized connector', }), serviceType: '', diff --git a/x-pack/plugins/search_connectors/common/doc_links.ts b/packages/kbn-search-connectors/constants/doc_links.ts similarity index 90% rename from x-pack/plugins/search_connectors/common/doc_links.ts rename to packages/kbn-search-connectors/constants/doc_links.ts index 0c5edc1a07ca7..db4dc3870e5c4 100644 --- a/x-pack/plugins/search_connectors/common/doc_links.ts +++ b/packages/kbn-search-connectors/constants/doc_links.ts @@ -1,8 +1,10 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". */ import { DocLinks } from '@kbn/doc-links'; diff --git a/packages/kbn-search-connectors/constants/index.ts b/packages/kbn-search-connectors/constants/index.ts new file mode 100644 index 0000000000000..6019d3d61be2f --- /dev/null +++ b/packages/kbn-search-connectors/constants/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export * from './connectors'; +export * from './doc_links'; diff --git a/packages/kbn-search-connectors/index.ts b/packages/kbn-search-connectors/index.ts index 2418d0f4d557d..5f45a1bd8ffb6 100644 --- a/packages/kbn-search-connectors/index.ts +++ b/packages/kbn-search-connectors/index.ts @@ -16,6 +16,7 @@ export const CONNECTORS_ACCESS_CONTROL_INDEX_PREFIX = '.search-acl-filter-'; export const CRAWLER_SERVICE_TYPE = 'elastic-crawler'; export * from './components'; +export * from './constants'; export * from './lib'; export * from './types'; export * from './utils'; diff --git a/packages/kbn-search-connectors/tsconfig.json b/packages/kbn-search-connectors/tsconfig.json index cb54e57748e94..4aebaeb1fcb13 100644 --- a/packages/kbn-search-connectors/tsconfig.json +++ b/packages/kbn-search-connectors/tsconfig.json @@ -25,5 +25,6 @@ "@kbn/i18n-react", "@kbn/test-jest-helpers", "@kbn/std", + "@kbn/doc-links", ] } diff --git a/packages/kbn-search-connectors/types/connector_definition.ts b/packages/kbn-search-connectors/types/connector_definition.ts new file mode 100644 index 0000000000000..a2dccf6554959 --- /dev/null +++ b/packages/kbn-search-connectors/types/connector_definition.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the "Elastic License + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side + * Public License v 1"; you may not use this file except in compliance with, at + * your election, the "Elastic License 2.0", the "GNU Affero General Public + * License v3.0 only", or the "Server Side Public License, v 1". + */ + +export interface ConnectorClientSideDefinition { + docsUrl?: string; + externalAuthDocsUrl?: string; + externalDocsUrl: string; + platinumOnly?: boolean; +} + +export interface ConnectorServerSideDefinition { + categories?: string[]; + description?: string; + iconPath: string; + isBeta: boolean; + isNative: boolean; + isTechPreview?: boolean; + keywords: string[]; + name: string; + serviceType: string; +} + +export type ConnectorDefinition = ConnectorClientSideDefinition & ConnectorServerSideDefinition; diff --git a/packages/kbn-search-connectors/types/index.ts b/packages/kbn-search-connectors/types/index.ts index ca5c483ab51df..aaf98748cfcbd 100644 --- a/packages/kbn-search-connectors/types/index.ts +++ b/packages/kbn-search-connectors/types/index.ts @@ -7,6 +7,7 @@ * License v3.0 only", or the "Server Side Public License, v 1". */ +export * from './connector_definition'; export * from './connectors'; export * from './connectors_api'; export * from './connector_stats'; diff --git a/packages/kbn-search-connectors/types/native_connectors.ts b/packages/kbn-search-connectors/types/native_connectors.ts index f9719cb84b801..c5ef7beab0ba5 100644 --- a/packages/kbn-search-connectors/types/native_connectors.ts +++ b/packages/kbn-search-connectors/types/native_connectors.ts @@ -11,54 +11,64 @@ import { i18n } from '@kbn/i18n'; import { DisplayType, FeatureName, FieldType, NativeConnector } from './connectors'; -const USERNAME_LABEL = i18n.translate('searchConnectors.nativeConnectors.usernameLabel', { +// assigning these to a local var significantly improves bundle size +// because it reduces references to the imported modules. +const { translate } = i18n; +const { TEXTBOX, TEXTAREA, NUMERIC, TOGGLE, DROPDOWN } = DisplayType; +const { + SYNC_RULES, + INCREMENTAL_SYNC, + DOCUMENT_LEVEL_SECURITY, + FILTERING_ADVANCED_CONFIG, + FILTERING_RULES, +} = FeatureName; +const { STRING, LIST, INTEGER, BOOLEAN } = FieldType; + +const USERNAME_LABEL = translate('searchConnectors.nativeConnectors.usernameLabel', { defaultMessage: 'Username', }); -const PASSWORD_LABEL = i18n.translate('searchConnectors.nativeConnectors.passwordLabel', { +const PASSWORD_LABEL = translate('searchConnectors.nativeConnectors.passwordLabel', { defaultMessage: 'Password', }); -const ENABLE_SSL_LABEL = i18n.translate('searchConnectors.nativeConnectors.enableSSL.label', { +const ENABLE_SSL_LABEL = translate('searchConnectors.nativeConnectors.enableSSL.label', { defaultMessage: 'Enable SSL', }); -const SSL_CERTIFICATE_LABEL = i18n.translate( - 'searchConnectors.nativeConnectors.sslCertificate.label', - { - defaultMessage: 'SSL certificate', - } -); +const SSL_CERTIFICATE_LABEL = translate('searchConnectors.nativeConnectors.sslCertificate.label', { + defaultMessage: 'SSL certificate', +}); -const RETRIES_PER_REQUEST_LABEL = i18n.translate( +const RETRIES_PER_REQUEST_LABEL = translate( 'searchConnectors.nativeConnectors.retriesPerRequest.label', { defaultMessage: 'Retries per request', } ); -const ADVANCED_RULES_IGNORED_LABEL = i18n.translate( +const ADVANCED_RULES_IGNORED_LABEL = translate( 'searchConnectors.nativeConnectors.advancedRulesIgnored.label', { defaultMessage: 'This configurable field is ignored when Advanced Sync Rules are used.', } ); -const MAX_CONCURRENT_DOWNLOADS_LABEL = i18n.translate( +const MAX_CONCURRENT_DOWNLOADS_LABEL = translate( 'searchConnectors.nativeConnectors.nativeConnectors.maximumConcurrentLabel', { defaultMessage: 'Maximum concurrent downloads', } ); -const USE_TEXT_EXTRACTION_SERVICE_LABEL = i18n.translate( +const USE_TEXT_EXTRACTION_SERVICE_LABEL = translate( 'searchConnectors.nativeConnectors.textExtractionService.label', { defaultMessage: 'Use text extraction service', } ); -const USE_TEXT_EXTRACTION_SERVICE_TOOLTIP = i18n.translate( +const USE_TEXT_EXTRACTION_SERVICE_TOOLTIP = translate( 'searchConnectors.nativeConnectors.textExtractionService.tooltip', { defaultMessage: @@ -67,7 +77,7 @@ const USE_TEXT_EXTRACTION_SERVICE_TOOLTIP = i18n.translate( } ); -const ENABLE_DOCUMENT_LEVEL_SECURITY_LABEL = i18n.translate( +const ENABLE_DOCUMENT_LEVEL_SECURITY_LABEL = translate( 'searchConnectors.nativeConnectors.enableDLS.label', { defaultMessage: 'Enable document level security', @@ -75,21 +85,21 @@ const ENABLE_DOCUMENT_LEVEL_SECURITY_LABEL = i18n.translate( ); const getEnableDocumentLevelSecurityTooltip = (serviceName: string) => - i18n.translate('searchConnectors.nativeConnectors.enableDLS.tooltip', { + translate('searchConnectors.nativeConnectors.enableDLS.tooltip', { defaultMessage: 'Document level security ensures identities and permissions set in {serviceName} are maintained in Elasticsearch. This enables you to restrict and personalize read-access users and groups have to documents in this index. Access control syncs ensure this metadata is kept up to date in your Elasticsearch documents.', values: { serviceName }, }); -const DATABASE_LABEL = i18n.translate('searchConnectors.nativeConnectors.databaseLabel', { +const DATABASE_LABEL = translate('searchConnectors.nativeConnectors.databaseLabel', { defaultMessage: 'Database', }); -const SCHEMA_LABEL = i18n.translate('searchConnectors.nativeConnectors.schemaLabel', { +const SCHEMA_LABEL = translate('searchConnectors.nativeConnectors.schemaLabel', { defaultMessage: 'Schema', }); -const PORT_LABEL = i18n.translate('searchConnectors.nativeConnectors.portLabel', { +const PORT_LABEL = translate('searchConnectors.nativeConnectors.portLabel', { defaultMessage: 'Port', }); @@ -103,19 +113,16 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record Account -> Settings -> Customer Id', }), - type: FieldType.STRING, + type: STRING, ui_restrictions: [], validations: [], value: '', @@ -1355,24 +1341,21 @@ export const NATIVE_CONNECTOR_DEFINITIONS: Record => ({ - azure_blob_storage: { - docsUrl: docLinks.connectorsAzureBlobStorage, - externalAuthDocsUrl: 'https://learn.microsoft.com/azure/storage/common/authorize-data-access', - externalDocsUrl: 'https://learn.microsoft.com/azure/storage/blobs/', - platinumOnly: true, - }, - box: { - docsUrl: docLinks.connectorsBox, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - confluence: { - docsUrl: docLinks.connectorsConfluence, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - custom: { - docsUrl: docLinks.connectors, - externalAuthDocsUrl: '', - externalDocsUrl: '', - }, - dropbox: { - docsUrl: docLinks.connectorsDropbox, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - github: { - docsUrl: docLinks.connectorsGithub, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - gmail: { - docsUrl: docLinks.connectorsGmail, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - google_cloud_storage: { - docsUrl: docLinks.connectorsGoogleCloudStorage, - externalAuthDocsUrl: 'https://cloud.google.com/storage/docs/authentication', - externalDocsUrl: 'https://cloud.google.com/storage/docs', - platinumOnly: true, - }, - google_drive: { - docsUrl: docLinks.connectorsGoogleDrive, - externalAuthDocsUrl: 'https://cloud.google.com/iam/docs/service-account-overview', - externalDocsUrl: 'https://developers.google.com/drive', - platinumOnly: true, - }, - jira: { - docsUrl: docLinks.connectorsJira, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - microsoft_teams: { - docsUrl: docLinks.connectorsTeams, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - mongodb: { - docsUrl: docLinks.connectorsMongoDB, - externalAuthDocsUrl: 'https://www.mongodb.com/docs/atlas/app-services/authentication/', - externalDocsUrl: 'https://www.mongodb.com/docs/', - platinumOnly: true, - }, - mssql: { - docsUrl: docLinks.connectorsMicrosoftSQL, - externalAuthDocsUrl: - 'https://learn.microsoft.com/sql/relational-databases/security/authentication-access/getting-started-with-database-engine-permissions', - externalDocsUrl: 'https://learn.microsoft.com/sql/', - platinumOnly: true, - }, - mysql: { - docsUrl: docLinks.connectorsMySQL, - externalDocsUrl: 'https://dev.mysql.com/doc/', - platinumOnly: true, - }, - network_drive: { - docsUrl: docLinks.connectorsNetworkDrive, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - notion: { - docsUrl: docLinks.connectorsNotion, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - onedrive: { - docsUrl: docLinks.connectorsOneDrive, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - oracle: { - docsUrl: docLinks.connectorsOracle, - externalAuthDocsUrl: - 'https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/index.html', - externalDocsUrl: 'https://docs.oracle.com/database/oracle/oracle-database/', - platinumOnly: true, - }, - outlook: { - docsUrl: docLinks.connectorsOutlook, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - postgresql: { - docsUrl: docLinks.connectorsPostgreSQL, - externalAuthDocsUrl: 'https://www.postgresql.org/docs/15/auth-methods.html', - externalDocsUrl: 'https://www.postgresql.org/docs/', - platinumOnly: true, - }, - redis: { - docsUrl: docLinks.connectorsRedis, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - s3: { - docsUrl: docLinks.connectorsS3, - externalAuthDocsUrl: 'https://docs.aws.amazon.com/s3/index.html', - externalDocsUrl: '', - platinumOnly: true, - }, - salesforce: { - docsUrl: docLinks.connectorsSalesforce, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - servicenow: { - docsUrl: docLinks.connectorsServiceNow, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - sharepoint_online: { - docsUrl: docLinks.connectorsSharepointOnline, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - sharepoint_server: { - docsUrl: docLinks.connectorsSharepoint, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - slack: { - docsUrl: docLinks.connectorsSlack, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, - zoom: { - docsUrl: docLinks.connectorsZoom, - externalAuthDocsUrl: '', - externalDocsUrl: '', - platinumOnly: true, - }, -}); diff --git a/x-pack/plugins/search_connectors/common/lib/connector_types.ts b/x-pack/plugins/search_connectors/common/lib/connector_types.ts index 387b405b45774..32eff7d676a1d 100644 --- a/x-pack/plugins/search_connectors/common/lib/connector_types.ts +++ b/x-pack/plugins/search_connectors/common/lib/connector_types.ts @@ -6,10 +6,12 @@ */ import type { IStaticAssets } from '@kbn/core-http-browser'; -import { ConnectorServerSideDefinition, CONNECTOR_DEFINITIONS } from '../connectors'; -import { getConnectorsDict } from '../constants'; - -import { ConnectorDefinition } from '../types'; +import { + CONNECTOR_DEFINITIONS, + ConnectorDefinition, + ConnectorServerSideDefinition, + getConnectorsDict, +} from '@kbn/search-connectors'; // used on server and in browser before plugin start when we don't have docLinks yet export function getConnectorTypes(staticAssets: IStaticAssets): ConnectorServerSideDefinition[] { diff --git a/x-pack/plugins/search_connectors/common/types.ts b/x-pack/plugins/search_connectors/common/types.ts deleted file mode 100644 index 9d5049895b963..0000000000000 --- a/x-pack/plugins/search_connectors/common/types.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { ConnectorServerSideDefinition } from './connectors'; - -export interface ConnectorClientSideDefinition { - docsUrl?: string; - externalAuthDocsUrl?: string; - externalDocsUrl: string; - platinumOnly?: boolean; -} - -export type ConnectorDefinition = ConnectorClientSideDefinition & ConnectorServerSideDefinition; diff --git a/x-pack/plugins/search_connectors/public/index.ts b/x-pack/plugins/search_connectors/public/index.ts index 77afb7b9f82d8..6a59a98b068f4 100644 --- a/x-pack/plugins/search_connectors/public/index.ts +++ b/x-pack/plugins/search_connectors/public/index.ts @@ -13,4 +13,3 @@ export function plugin() { } export type { SearchConnectorsPluginSetup, SearchConnectorsPluginStart } from './types'; -export type { ConnectorDefinition } from '../common/types'; diff --git a/x-pack/plugins/search_connectors/public/plugin.ts b/x-pack/plugins/search_connectors/public/plugin.ts index 830d9d3e94c1e..cc86709121ab0 100644 --- a/x-pack/plugins/search_connectors/public/plugin.ts +++ b/x-pack/plugins/search_connectors/public/plugin.ts @@ -6,7 +6,7 @@ */ import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; -import { docLinks } from '../common/doc_links'; +import { docLinks } from '@kbn/search-connectors'; import { getConnectorFullTypes, getConnectorTypes } from '../common/lib/connector_types'; import { SearchConnectorsPluginSetup, diff --git a/x-pack/plugins/search_connectors/public/types.ts b/x-pack/plugins/search_connectors/public/types.ts index a86ca30170fce..ec77fb403af78 100644 --- a/x-pack/plugins/search_connectors/public/types.ts +++ b/x-pack/plugins/search_connectors/public/types.ts @@ -5,8 +5,7 @@ * 2.0. */ -import { ConnectorServerSideDefinition } from '../common/connectors'; -import { ConnectorDefinition } from '../common/types'; +import { ConnectorDefinition, ConnectorServerSideDefinition } from '@kbn/search-connectors'; /* eslint-disable @typescript-eslint/no-empty-interface */ diff --git a/x-pack/plugins/search_connectors/server/index.ts b/x-pack/plugins/search_connectors/server/index.ts index 304eb460ca7d6..9a52237740d16 100644 --- a/x-pack/plugins/search_connectors/server/index.ts +++ b/x-pack/plugins/search_connectors/server/index.ts @@ -18,4 +18,3 @@ export function plugin(initializerContext: PluginInitializerContext) { } export type { SearchConnectorsPluginSetup, SearchConnectorsPluginStart } from './types'; -export type { CONNECTOR_DEFINITIONS, ConnectorServerSideDefinition } from '../common/connectors'; diff --git a/x-pack/plugins/search_connectors/server/plugin.ts b/x-pack/plugins/search_connectors/server/plugin.ts index 56f78638da2d7..fe73afae20b9a 100644 --- a/x-pack/plugins/search_connectors/server/plugin.ts +++ b/x-pack/plugins/search_connectors/server/plugin.ts @@ -6,7 +6,7 @@ */ import type { PluginInitializerContext, Plugin, CoreSetup } from '@kbn/core/server'; -import { ConnectorServerSideDefinition } from '../common/connectors'; +import { ConnectorServerSideDefinition } from '@kbn/search-connectors'; import { getConnectorTypes } from '../common/lib/connector_types'; import type { SearchConnectorsPluginSetup as SearchConnectorsPluginSetup, diff --git a/x-pack/plugins/search_connectors/server/types.ts b/x-pack/plugins/search_connectors/server/types.ts index c08b562ec8a5f..36b5aa877fd1e 100644 --- a/x-pack/plugins/search_connectors/server/types.ts +++ b/x-pack/plugins/search_connectors/server/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ConnectorServerSideDefinition } from '../common/connectors'; +import { ConnectorServerSideDefinition } from '@kbn/search-connectors'; /* eslint-disable @typescript-eslint/no-empty-interface */ diff --git a/x-pack/plugins/search_connectors/tsconfig.json b/x-pack/plugins/search_connectors/tsconfig.json index 9da933a758aec..040c873fe0353 100644 --- a/x-pack/plugins/search_connectors/tsconfig.json +++ b/x-pack/plugins/search_connectors/tsconfig.json @@ -17,8 +17,7 @@ "kbn_references": [ "@kbn/core", "@kbn/config-schema", - "@kbn/doc-links", "@kbn/core-http-browser", - "@kbn/i18n", + "@kbn/search-connectors", ] } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 1521e3e251702..35fa0b829cbee 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -6393,11 +6393,61 @@ "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.description": "Récupérez du contenu pour créer ou mettre à jour vos documents Elasticsearch.", "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.title": "Synchronisation de contenu", "searchConnectors.content.indices.connectorScheduling.switch.label": "Activé", + "searchConnectors.content.nativeConnectors.azureBlob.description": "Effectuez des recherches sur votre contenu sur Stockage Blob Azure.", + "searchConnectors.content.nativeConnectors.azureBlob.name": "Stockage Blob Azure", + "searchConnectors.content.nativeConnectors.box.description": "Effectuez des recherches sur votre contenu dans Box.", + "searchConnectors.content.nativeConnectors.box.name": "Box", + "searchConnectors.content.nativeConnectors.confluence_data_center.name": "Centre de données Confluence", + "searchConnectors.content.nativeConnectors.confluence.description": "Effectuez des recherches sur votre contenu dans Confluence Cloud.", + "searchConnectors.content.nativeConnectors.confluence.name": "Confluence Cloud & Server", + "searchConnectors.content.nativeConnectors.confluenceDataCenter.description": "Effectuez des recherches sur votre contenu dans le centre de données Confluence.", + "searchConnectors.content.nativeConnectors.customConnector.description": "Effectuez des recherches sur des données stockées dans des sources de données personnalisées.", + "searchConnectors.content.nativeConnectors.customConnector.name": "Connecteur personnalisé", + "searchConnectors.content.nativeConnectors.dropbox.description": "Effectuez des recherches dans vos fichiers et dossiers stockés sur Dropbox.", + "searchConnectors.content.nativeConnectors.dropbox.name": "Dropbox", + "searchConnectors.content.nativeConnectors.github.description": "Effectuez des recherches sur vos projets et référentiels sur GitHub.", + "searchConnectors.content.nativeConnectors.github.name": "Serveurs GitHub & GitHub Enterprise", + "searchConnectors.content.nativeConnectors.gmail.description": "Effectuez des recherches sur votre contenu dans Gmail.", + "searchConnectors.content.nativeConnectors.gmail.name": "Gmail", + "searchConnectors.content.nativeConnectors.googleCloud.description": "Effectuez des recherches sur votre contenu sur Google Cloud Storage.", "searchConnectors.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", + "searchConnectors.content.nativeConnectors.googleDrive.description": "Effectuez des recherches sur votre contenu sur Google Drive.", + "searchConnectors.content.nativeConnectors.googleDrive.name": "Google Drive", + "searchConnectors.content.nativeConnectors.graphQL.description": "Effectuez des recherches dans votre contenu avec GraphQL.", + "searchConnectors.content.nativeConnectors.graphQL.name": "GraphQL", + "searchConnectors.content.nativeConnectors.jira_data_center.name": "Centre de données Jira", + "searchConnectors.content.nativeConnectors.jira.description": "Effectuez des recherches sur votre contenu dans Jira Cloud.", + "searchConnectors.content.nativeConnectors.jira.name": "Jira Cloud", + "searchConnectors.content.nativeConnectors.jiraDataCenter.description": "Effectuez des recherches sur votre contenu dans le centre de données Jira.", + "searchConnectors.content.nativeConnectors.jiraServer.description": "Effectuez des recherches sur votre contenu dans le serveur Jira.", + "searchConnectors.content.nativeConnectors.jiraServer.name": "Serveur Jira", + "searchConnectors.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", + "searchConnectors.content.nativeConnectors.mongoDB.description": "Effectuez des recherches sur votre contenu dans MongoDB.", + "searchConnectors.content.nativeConnectors.mongodb.name": "MongoDB", + "searchConnectors.content.nativeConnectors.msSql.description": "Effectuez des recherches sur votre contenu sur Microsoft SQL Server.", + "searchConnectors.content.nativeConnectors.mysql.description": "Effectuez des recherches sur votre contenu dans MySQL.", + "searchConnectors.content.nativeConnectors.mysql.name": "MySQL", + "searchConnectors.content.nativeConnectors.netowkrDrive.description": "Effectuez des recherches sur le contenu de votre lecteur réseau.", + "searchConnectors.content.nativeConnectors.networkDrive.name": "Lecteur réseau", + "searchConnectors.content.nativeConnectors.notion.description": "Effectuez des recherches sur votre contenu dans Notion.", + "searchConnectors.content.nativeConnectors.notion.name": "Notion", + "searchConnectors.content.nativeConnectors.oneDrive.description": "Effectuez des recherches sur votre contenu dans OneDrive.", + "searchConnectors.content.nativeConnectors.oneDrive.name": "OneDrive", + "searchConnectors.content.nativeConnectors.openTextDocumentum.description": "Recherchez votre contenu sur OpenText Documentum.", + "searchConnectors.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", + "searchConnectors.content.nativeConnectors.oracle.description": "Effectuez des recherches sur votre contenu dans Oracle.", + "searchConnectors.content.nativeConnectors.oracle.name": "Oracle", + "searchConnectors.content.nativeConnectors.outlook.description": "Effectuez des recherches sur votre contenu dans Outlook.", + "searchConnectors.content.nativeConnectors.outlook.name": "Outlook", + "searchConnectors.content.nativeConnectors.postgreSQL.description": "Effectuez des recherches sur votre contenu dans PostgreSQL.", + "searchConnectors.content.nativeConnectors.postgresql.name": "PostgreSQL", + "searchConnectors.content.nativeConnectors.redis.description": "Effectuez des recherches sur votre contenu dans Redis.", + "searchConnectors.content.nativeConnectors.redis.name": "Redis", "searchConnectors.content.nativeConnectors.s3.accessKey.label": "ID de clé d'accès AWS", "searchConnectors.content.nativeConnectors.s3.buckets.label": "Compartiments AWS", "searchConnectors.content.nativeConnectors.s3.buckets.tooltip": "Les compartiments AWS sont ignorés lorsque des règles de synchronisation avancées sont appliquées.", "searchConnectors.content.nativeConnectors.s3.connectTimeout.label": "Délai d'attente de connexion", + "searchConnectors.content.nativeConnectors.s3.description": "Effectuez des recherches sur votre contenu dans Amazon S3.", "searchConnectors.content.nativeConnectors.s3.maxAttempts.label": "Nombre maximum de nouvelles tentatives", "searchConnectors.content.nativeConnectors.s3.maxPageSize.label": "Taille maximum de la page", "searchConnectors.content.nativeConnectors.s3.name": "S3", @@ -6407,9 +6457,24 @@ "searchConnectors.content.nativeConnectors.salesforce.clientId.tooltip": "L'ID client de votre application connectée utilisant le protocole OAuth2. Également appelé \"clé consommateur\"", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.label": "Identifiant client secret", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.tooltip": "L'identifiant client secret de votre application connectée utilisant le protocole OAuth2. Également appelé \"secret consommateur\"", + "searchConnectors.content.nativeConnectors.salesforce.description": "Effectuez des recherches sur votre contenu dans Salesforce.", "searchConnectors.content.nativeConnectors.salesforce.domain.label": "Domaine", "searchConnectors.content.nativeConnectors.salesforce.domain.tooltip": "Le domaine de votre instance Salesforce. Si votre URL Salesforce est \"https://foo.salesforce.com\", le domaine est \"foo\".", "searchConnectors.content.nativeConnectors.salesforce.name": "Salesforce", + "searchConnectors.content.nativeConnectors.salesforceBox.name": "Sandbox Salesforce", + "searchConnectors.content.nativeConnectors.salesforceSandbox.description": "Effectuez des recherches sur votre contenu dans Salesforce Sandbox.", + "searchConnectors.content.nativeConnectors.serviceNow.description": "Effectuez des recherches sur votre contenu dans ServiceNow.", + "searchConnectors.content.nativeConnectors.serviceNow.name": "ServiceNow", + "searchConnectors.content.nativeConnectors.sharepointOnline.description": "Effectuez des recherches sur votre contenu dans SharePoint Online.", + "searchConnectors.content.nativeConnectors.sharepointOnline.name": "SharePoint en ligne", + "searchConnectors.content.nativeConnectors.sharepointServer.description": "Effectuez des recherches sur votre contenu dans Serveur SharePoint.", + "searchConnectors.content.nativeConnectors.sharepointServer.name": "Serveur SharePoint", + "searchConnectors.content.nativeConnectors.slack.description": "Effectuez des recherches sur votre contenu dans Slack.", + "searchConnectors.content.nativeConnectors.slack.name": "Slack", + "searchConnectors.content.nativeConnectors.teams.description": "Effectuez des recherches sur votre contenu dans Teams.", + "searchConnectors.content.nativeConnectors.teams.name": "Équipes", + "searchConnectors.content.nativeConnectors.zoom.description": "Effectuez des recherches sur votre contenu dans Zoom.", + "searchConnectors.content.nativeConnectors.zoom.name": "Effectuer un zoom", "searchConnectors.cronEditor.cronDaily.fieldHour.textAtLabel": "À", "searchConnectors.cronEditor.cronDaily.fieldTimeLabel": "Heure", "searchConnectors.cronEditor.cronDaily.hourSelectLabel": "Heure", @@ -6783,74 +6848,6 @@ "searchConnectors.syncStatus.inProgress": "Synchronisation en cours", "searchConnectors.syncStatus.pending": "Synchronisation en attente", "searchConnectors.syncStatus.suspended": "Synchronisation suspendue", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.description": "Effectuez des recherches sur votre contenu sur Stockage Blob Azure.", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.name": "Stockage Blob Azure", - "searchConnectorsPlugin.content.nativeConnectors.box.description": "Effectuez des recherches sur votre contenu dans Box.", - "searchConnectorsPlugin.content.nativeConnectors.box.name": "Box", - "searchConnectorsPlugin.content.nativeConnectors.confluence_data_center.name": "Centre de données Confluence", - "searchConnectorsPlugin.content.nativeConnectors.confluence.description": "Effectuez des recherches sur votre contenu dans Confluence Cloud.", - "searchConnectorsPlugin.content.nativeConnectors.confluence.name": "Confluence Cloud & Server", - "searchConnectorsPlugin.content.nativeConnectors.confluenceDataCenter.description": "Effectuez des recherches sur votre contenu dans le centre de données Confluence.", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.description": "Effectuez des recherches sur des données stockées dans des sources de données personnalisées.", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.name": "Connecteur personnalisé", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.description": "Effectuez des recherches dans vos fichiers et dossiers stockés sur Dropbox.", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.name": "Dropbox", - "searchConnectorsPlugin.content.nativeConnectors.github.description": "Effectuez des recherches sur vos projets et référentiels sur GitHub.", - "searchConnectorsPlugin.content.nativeConnectors.github.name": "Serveurs GitHub & GitHub Enterprise", - "searchConnectorsPlugin.content.nativeConnectors.gmail.description": "Effectuez des recherches sur votre contenu dans Gmail.", - "searchConnectorsPlugin.content.nativeConnectors.gmail.name": "Gmail", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.description": "Effectuez des recherches sur votre contenu sur Google Cloud Storage.", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.description": "Effectuez des recherches sur votre contenu sur Google Drive.", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.name": "Google Drive", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.description": "Effectuez des recherches dans votre contenu avec GraphQL.", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.name": "GraphQL", - "searchConnectorsPlugin.content.nativeConnectors.jira_data_center.name": "Centre de données Jira", - "searchConnectorsPlugin.content.nativeConnectors.jira.description": "Effectuez des recherches sur votre contenu dans Jira Cloud.", - "searchConnectorsPlugin.content.nativeConnectors.jira.name": "Jira Cloud", - "searchConnectorsPlugin.content.nativeConnectors.jiraDataCenter.description": "Effectuez des recherches sur votre contenu dans le centre de données Jira.", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.description": "Effectuez des recherches sur votre contenu dans le serveur Jira.", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.name": "Serveur Jira", - "searchConnectorsPlugin.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", - "searchConnectorsPlugin.content.nativeConnectors.mongoDB.description": "Effectuez des recherches sur votre contenu dans MongoDB.", - "searchConnectorsPlugin.content.nativeConnectors.mongodb.name": "MongoDB", - "searchConnectorsPlugin.content.nativeConnectors.msSql.description": "Effectuez des recherches sur votre contenu sur Microsoft SQL Server.", - "searchConnectorsPlugin.content.nativeConnectors.mysql.description": "Effectuez des recherches sur votre contenu dans MySQL.", - "searchConnectorsPlugin.content.nativeConnectors.mysql.name": "MySQL", - "searchConnectorsPlugin.content.nativeConnectors.netowkrDrive.description": "Effectuez des recherches sur le contenu de votre lecteur réseau.", - "searchConnectorsPlugin.content.nativeConnectors.networkDrive.name": "Lecteur réseau", - "searchConnectorsPlugin.content.nativeConnectors.notion.description": "Effectuez des recherches sur votre contenu dans Notion.", - "searchConnectorsPlugin.content.nativeConnectors.notion.name": "Notion", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.description": "Effectuez des recherches sur votre contenu dans OneDrive.", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.name": "OneDrive", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.description": "Recherchez votre contenu sur OpenText Documentum.", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", - "searchConnectorsPlugin.content.nativeConnectors.oracle.description": "Effectuez des recherches sur votre contenu dans Oracle.", - "searchConnectorsPlugin.content.nativeConnectors.oracle.name": "Oracle", - "searchConnectorsPlugin.content.nativeConnectors.outlook.description": "Effectuez des recherches sur votre contenu dans Outlook.", - "searchConnectorsPlugin.content.nativeConnectors.outlook.name": "Outlook", - "searchConnectorsPlugin.content.nativeConnectors.postgreSQL.description": "Effectuez des recherches sur votre contenu dans PostgreSQL.", - "searchConnectorsPlugin.content.nativeConnectors.postgresql.name": "PostgreSQL", - "searchConnectorsPlugin.content.nativeConnectors.redis.description": "Effectuez des recherches sur votre contenu dans Redis.", - "searchConnectorsPlugin.content.nativeConnectors.redis.name": "Redis", - "searchConnectorsPlugin.content.nativeConnectors.s3.description": "Effectuez des recherches sur votre contenu dans Amazon S3.", - "searchConnectorsPlugin.content.nativeConnectors.s3.name": "S3", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.description": "Effectuez des recherches sur votre contenu dans Salesforce.", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.name": "Salesforce", - "searchConnectorsPlugin.content.nativeConnectors.salesforceBox.name": "Sandbox Salesforce", - "searchConnectorsPlugin.content.nativeConnectors.salesforceSandbox.description": "Effectuez des recherches sur votre contenu dans Salesforce Sandbox.", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.description": "Effectuez des recherches sur votre contenu dans ServiceNow.", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.name": "ServiceNow", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.description": "Effectuez des recherches sur votre contenu dans SharePoint Online.", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.name": "SharePoint en ligne", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.description": "Effectuez des recherches sur votre contenu dans Serveur SharePoint.", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.name": "Serveur SharePoint", - "searchConnectorsPlugin.content.nativeConnectors.slack.description": "Effectuez des recherches sur votre contenu dans Slack.", - "searchConnectorsPlugin.content.nativeConnectors.slack.name": "Slack", - "searchConnectorsPlugin.content.nativeConnectors.teams.description": "Effectuez des recherches sur votre contenu dans Teams.", - "searchConnectorsPlugin.content.nativeConnectors.teams.name": "Équipes", - "searchConnectorsPlugin.content.nativeConnectors.zoom.description": "Effectuez des recherches sur votre contenu dans Zoom.", - "searchConnectorsPlugin.content.nativeConnectors.zoom.name": "Effectuer un zoom", "searchErrors.errors.fetchError": "Vérifiez votre connexion réseau et réessayez.", "searchErrors.esError.unknownRootCause": "inconnue", "searchErrors.esError.viewDetailsButtonLabel": "Afficher les détails", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index e10155c086e64..64a5214cdd770 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -6148,11 +6148,61 @@ "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.description": "Elasticsearchドキュメントを作成または更新するためにコンテンツを取得します。", "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.title": "コンテンツ同期", "searchConnectors.content.indices.connectorScheduling.switch.label": "有効", + "searchConnectors.content.nativeConnectors.azureBlob.description": "Azure Blob Storageのコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.azureBlob.name": "Azure Blob Storage", + "searchConnectors.content.nativeConnectors.box.description": "Boxでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.box.name": "Box", + "searchConnectors.content.nativeConnectors.confluence_data_center.name": "Confluence Data Center", + "searchConnectors.content.nativeConnectors.confluence.description": "Confluence Cloudでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.confluence.name": "Confluence Cloud & Server", + "searchConnectors.content.nativeConnectors.confluenceDataCenter.description": "Confluence Data Centerでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.customConnector.description": "カスタムデータソースに格納されているデータを検索します。", + "searchConnectors.content.nativeConnectors.customConnector.name": "カスタマイズされたコネクター", + "searchConnectors.content.nativeConnectors.dropbox.description": "Dropboxに保存されたファイルとフォルダーを検索します。", + "searchConnectors.content.nativeConnectors.dropbox.name": "Dropbox", + "searchConnectors.content.nativeConnectors.github.description": "GitHubのプロジェクトとリポジトリを検索します。", + "searchConnectors.content.nativeConnectors.github.name": "GitHub & GitHub Enterprise Server", + "searchConnectors.content.nativeConnectors.gmail.description": "Gmailでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.gmail.name": "Gmail", + "searchConnectors.content.nativeConnectors.googleCloud.description": "Google Cloud Storageのコンテンツを検索します。", "searchConnectors.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", + "searchConnectors.content.nativeConnectors.googleDrive.description": "Google Driveのコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.googleDrive.name": "Google Drive", + "searchConnectors.content.nativeConnectors.graphQL.description": "GraphQLでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.graphQL.name": "GraphQL", + "searchConnectors.content.nativeConnectors.jira_data_center.name": "Jira Data Center", + "searchConnectors.content.nativeConnectors.jira.description": "Jira Cloudでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.jira.name": "Jira Cloud", + "searchConnectors.content.nativeConnectors.jiraDataCenter.description": "Jira Data Centerでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.jiraServer.description": "Jira Serverでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.jiraServer.name": "Jira Server", + "searchConnectors.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", + "searchConnectors.content.nativeConnectors.mongoDB.description": "MongoDBコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.mongodb.name": "MongoDB", + "searchConnectors.content.nativeConnectors.msSql.description": "Microsoft SQL Serverでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.mysql.description": "MySQLコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.mysql.name": "MySQL", + "searchConnectors.content.nativeConnectors.netowkrDrive.description": "ネットワークドライブコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.networkDrive.name": "ネットワークドライブ", + "searchConnectors.content.nativeConnectors.notion.description": "Notionでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.notion.name": "Notion", + "searchConnectors.content.nativeConnectors.oneDrive.description": "OneDriveでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.oneDrive.name": "OneDrive", + "searchConnectors.content.nativeConnectors.openTextDocumentum.description": "OpenText Documentumでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", + "searchConnectors.content.nativeConnectors.oracle.description": "Oracleでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.oracle.name": "Oracle", + "searchConnectors.content.nativeConnectors.outlook.description": "Outlookでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.outlook.name": "Outlook", + "searchConnectors.content.nativeConnectors.postgreSQL.description": "PostgreSQLでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.postgresql.name": "PostgreSQL", + "searchConnectors.content.nativeConnectors.redis.description": "Redisでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.redis.name": "Redis", "searchConnectors.content.nativeConnectors.s3.accessKey.label": "AWSアクセスキーID", "searchConnectors.content.nativeConnectors.s3.buckets.label": "AWSバケット", "searchConnectors.content.nativeConnectors.s3.buckets.tooltip": "詳細同期ルールが使用されている場合、AWSバケットは無視されます。", "searchConnectors.content.nativeConnectors.s3.connectTimeout.label": "接続タイムアウト", + "searchConnectors.content.nativeConnectors.s3.description": "Amazon S3でコンテンツを検索します。", "searchConnectors.content.nativeConnectors.s3.maxAttempts.label": "最大再試行回数", "searchConnectors.content.nativeConnectors.s3.maxPageSize.label": "ページの最大サイズ", "searchConnectors.content.nativeConnectors.s3.name": "S3", @@ -6162,9 +6212,24 @@ "searchConnectors.content.nativeConnectors.salesforce.clientId.tooltip": "OAuth2対応接続済みアプリのクライアントID。「コンシューマーキー」とも呼ばれます。", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.label": "クライアントシークレット", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.tooltip": "OAuth2対応接続済みアプリのクライアントシークレット。「コンシューマーシークレット」とも呼ばれます。", + "searchConnectors.content.nativeConnectors.salesforce.description": "Salesforceでコンテンツを検索します。", "searchConnectors.content.nativeConnectors.salesforce.domain.label": "ドメイン", "searchConnectors.content.nativeConnectors.salesforce.domain.tooltip": "Salesforceインスタンスのドメイン。Salesforce URLがhttps://foo.salesforce.comの場合は、ドメインが「foo」になります。", "searchConnectors.content.nativeConnectors.salesforce.name": "Salesforce", + "searchConnectors.content.nativeConnectors.salesforceBox.name": "Salesforce Sandbox", + "searchConnectors.content.nativeConnectors.salesforceSandbox.description": "Salesforce Sandboxでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.serviceNow.description": "ServiceNowでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.serviceNow.name": "ServiceNow", + "searchConnectors.content.nativeConnectors.sharepointOnline.description": "SharePoint Onlineでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.sharepointOnline.name": "Sharepoint Online", + "searchConnectors.content.nativeConnectors.sharepointServer.description": "SharePoint Serverでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.sharepointServer.name": "Sharepoint Server", + "searchConnectors.content.nativeConnectors.slack.description": "Slackでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.slack.name": "Slack", + "searchConnectors.content.nativeConnectors.teams.description": "Teamsでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.teams.name": "Teams", + "searchConnectors.content.nativeConnectors.zoom.description": "Zoomでコンテンツを検索します。", + "searchConnectors.content.nativeConnectors.zoom.name": "ズーム", "searchConnectors.cronEditor.cronDaily.fieldHour.textAtLabel": "に", "searchConnectors.cronEditor.cronDaily.fieldTimeLabel": "時間", "searchConnectors.cronEditor.cronDaily.hourSelectLabel": "時間", @@ -6538,74 +6603,6 @@ "searchConnectors.syncStatus.inProgress": "同期は実行中です", "searchConnectors.syncStatus.pending": "同期は保留中です", "searchConnectors.syncStatus.suspended": "同期が一時停止されました", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.description": "Azure Blob Storageのコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.name": "Azure Blob Storage", - "searchConnectorsPlugin.content.nativeConnectors.box.description": "Boxでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.box.name": "Box", - "searchConnectorsPlugin.content.nativeConnectors.confluence_data_center.name": "Confluence Data Center", - "searchConnectorsPlugin.content.nativeConnectors.confluence.description": "Confluence Cloudでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.confluence.name": "Confluence Cloud & Server", - "searchConnectorsPlugin.content.nativeConnectors.confluenceDataCenter.description": "Confluence Data Centerでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.description": "カスタムデータソースに格納されているデータを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.name": "カスタマイズされたコネクター", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.description": "Dropboxに保存されたファイルとフォルダーを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.name": "Dropbox", - "searchConnectorsPlugin.content.nativeConnectors.github.description": "GitHubのプロジェクトとリポジトリを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.github.name": "GitHub & GitHub Enterprise Server", - "searchConnectorsPlugin.content.nativeConnectors.gmail.description": "Gmailでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.gmail.name": "Gmail", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.description": "Google Cloud Storageのコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.description": "Google Driveのコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.name": "Google Drive", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.description": "GraphQLでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.name": "GraphQL", - "searchConnectorsPlugin.content.nativeConnectors.jira_data_center.name": "Jira Data Center", - "searchConnectorsPlugin.content.nativeConnectors.jira.description": "Jira Cloudでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.jira.name": "Jira Cloud", - "searchConnectorsPlugin.content.nativeConnectors.jiraDataCenter.description": "Jira Data Centerでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.description": "Jira Serverでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.name": "Jira Server", - "searchConnectorsPlugin.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", - "searchConnectorsPlugin.content.nativeConnectors.mongoDB.description": "MongoDBコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.mongodb.name": "MongoDB", - "searchConnectorsPlugin.content.nativeConnectors.msSql.description": "Microsoft SQL Serverでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.mysql.description": "MySQLコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.mysql.name": "MySQL", - "searchConnectorsPlugin.content.nativeConnectors.netowkrDrive.description": "ネットワークドライブコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.networkDrive.name": "ネットワークドライブ", - "searchConnectorsPlugin.content.nativeConnectors.notion.description": "Notionでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.notion.name": "Notion", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.description": "OneDriveでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.name": "OneDrive", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.description": "OpenText Documentumでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", - "searchConnectorsPlugin.content.nativeConnectors.oracle.description": "Oracleでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.oracle.name": "Oracle", - "searchConnectorsPlugin.content.nativeConnectors.outlook.description": "Outlookでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.outlook.name": "Outlook", - "searchConnectorsPlugin.content.nativeConnectors.postgreSQL.description": "PostgreSQLでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.postgresql.name": "PostgreSQL", - "searchConnectorsPlugin.content.nativeConnectors.redis.description": "Redisでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.redis.name": "Redis", - "searchConnectorsPlugin.content.nativeConnectors.s3.description": "Amazon S3でコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.s3.name": "S3", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.description": "Salesforceでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.name": "Salesforce", - "searchConnectorsPlugin.content.nativeConnectors.salesforceBox.name": "Salesforce Sandbox", - "searchConnectorsPlugin.content.nativeConnectors.salesforceSandbox.description": "Salesforce Sandboxでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.description": "ServiceNowでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.name": "ServiceNow", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.description": "SharePoint Onlineでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.name": "Sharepoint Online", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.description": "SharePoint Serverでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.name": "Sharepoint Server", - "searchConnectorsPlugin.content.nativeConnectors.slack.description": "Slackでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.slack.name": "Slack", - "searchConnectorsPlugin.content.nativeConnectors.teams.description": "Teamsでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.teams.name": "Teams", - "searchConnectorsPlugin.content.nativeConnectors.zoom.description": "Zoomでコンテンツを検索します。", - "searchConnectorsPlugin.content.nativeConnectors.zoom.name": "ズーム", "searchErrors.errors.fetchError": "ネットワーク接続を確認して再試行してください。", "searchErrors.esError.unknownRootCause": "不明", "searchErrors.esError.viewDetailsButtonLabel": "詳細を表示", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 0ed330ec41630..f42192834b229 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -6161,11 +6161,61 @@ "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.description": "提取内容以创建或更新您的 Elasticsearch 文档。", "searchConnectors.content.indices.connectorScheduling.schedulePanel.contentSync.title": "内容同步", "searchConnectors.content.indices.connectorScheduling.switch.label": "已启用", + "searchConnectors.content.nativeConnectors.azureBlob.description": "在 Azure Blob 存储上搜索您的内容。", + "searchConnectors.content.nativeConnectors.azureBlob.name": "Azure Blob 存储", + "searchConnectors.content.nativeConnectors.box.description": "在 Box 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.box.name": "Box", + "searchConnectors.content.nativeConnectors.confluence_data_center.name": "Confluence 数据中心", + "searchConnectors.content.nativeConnectors.confluence.description": "在 Confluence Cloud 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.confluence.name": "Confluence Cloud 和 Confluence Server", + "searchConnectors.content.nativeConnectors.confluenceDataCenter.description": "在 Confluence 数据中心上搜索您的内容。", + "searchConnectors.content.nativeConnectors.customConnector.description": "搜索存储在定制数据源上的数据。", + "searchConnectors.content.nativeConnectors.customConnector.name": "定制连接器", + "searchConnectors.content.nativeConnectors.dropbox.description": "搜索存储在 Dropbox 上的文件和文件夹。", + "searchConnectors.content.nativeConnectors.dropbox.name": "Dropbox", + "searchConnectors.content.nativeConnectors.github.description": "搜索 GitHub 上的项目和存储库。", + "searchConnectors.content.nativeConnectors.github.name": "GitHub 和 GitHub Enterprise Server", + "searchConnectors.content.nativeConnectors.gmail.description": "在 Gmail 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.gmail.name": "Gmail", + "searchConnectors.content.nativeConnectors.googleCloud.description": "在 Google Cloud Storage 上搜索您的内容。", "searchConnectors.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", + "searchConnectors.content.nativeConnectors.googleDrive.description": "在 Google 云端硬盘上搜索您的内容。", + "searchConnectors.content.nativeConnectors.googleDrive.name": "Google 云端硬盘", + "searchConnectors.content.nativeConnectors.graphQL.description": "使用 GraphQL 搜索您的内容。", + "searchConnectors.content.nativeConnectors.graphQL.name": "GraphQL", + "searchConnectors.content.nativeConnectors.jira_data_center.name": "Jira 数据中心", + "searchConnectors.content.nativeConnectors.jira.description": "在 Jira Cloud 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.jira.name": "Jira Cloud", + "searchConnectors.content.nativeConnectors.jiraDataCenter.description": "在 Jira 数据中心上搜索您的内容。", + "searchConnectors.content.nativeConnectors.jiraServer.description": "在 Jira Server 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.jiraServer.name": "Jira Server", + "searchConnectors.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", + "searchConnectors.content.nativeConnectors.mongoDB.description": "搜索您的 MongoDB 内容。", + "searchConnectors.content.nativeConnectors.mongodb.name": "MongoDB", + "searchConnectors.content.nativeConnectors.msSql.description": "在 Microsoft SQL Server 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.mysql.description": "搜索您的 MySQL 内容。", + "searchConnectors.content.nativeConnectors.mysql.name": "MySQL", + "searchConnectors.content.nativeConnectors.netowkrDrive.description": "搜索您的网络驱动器内容。", + "searchConnectors.content.nativeConnectors.networkDrive.name": "网络驱动器", + "searchConnectors.content.nativeConnectors.notion.description": "在 Notion 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.notion.name": "Notion", + "searchConnectors.content.nativeConnectors.oneDrive.description": "在 OneDrive 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.oneDrive.name": "OneDrive", + "searchConnectors.content.nativeConnectors.openTextDocumentum.description": "在 OpenText Documentum 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", + "searchConnectors.content.nativeConnectors.oracle.description": "在 Oracle 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.oracle.name": "Oracle", + "searchConnectors.content.nativeConnectors.outlook.description": "在 Outlook 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.outlook.name": "Outlook", + "searchConnectors.content.nativeConnectors.postgreSQL.description": "在 PostgreSQL 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.postgresql.name": "PostgreSQL", + "searchConnectors.content.nativeConnectors.redis.description": "在 Redis 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.redis.name": "Redis", "searchConnectors.content.nativeConnectors.s3.accessKey.label": "AWS 访问密钥 ID", "searchConnectors.content.nativeConnectors.s3.buckets.label": "AWS 存储桶", "searchConnectors.content.nativeConnectors.s3.buckets.tooltip": "使用高级同步规则时,将忽略 AWS 存储桶。", "searchConnectors.content.nativeConnectors.s3.connectTimeout.label": "连接超时", + "searchConnectors.content.nativeConnectors.s3.description": "在 Amazon S3 上搜索您的内容。", "searchConnectors.content.nativeConnectors.s3.maxAttempts.label": "最大重试次数", "searchConnectors.content.nativeConnectors.s3.maxPageSize.label": "最大页面大小", "searchConnectors.content.nativeConnectors.s3.name": "S3", @@ -6175,9 +6225,24 @@ "searchConnectors.content.nativeConnectors.salesforce.clientId.tooltip": "启用了 OAuth2 的已连接应用的客户端 ID。也称为“使用者密钥”", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.label": "客户端密钥", "searchConnectors.content.nativeConnectors.salesforce.clientSecret.tooltip": "启用了 OAuth2 的已连接应用的客户端密钥。也称为“使用者机密”", + "searchConnectors.content.nativeConnectors.salesforce.description": "在 Salesforce 上搜索您的内容。", "searchConnectors.content.nativeConnectors.salesforce.domain.label": "域", "searchConnectors.content.nativeConnectors.salesforce.domain.tooltip": "Salesforce 实例的域。如果 Salesforce URL 为“https://foo.salesforce.com”,则该域将为“foo”。", "searchConnectors.content.nativeConnectors.salesforce.name": "Salesforce", + "searchConnectors.content.nativeConnectors.salesforceBox.name": "Salesforce Sandbox", + "searchConnectors.content.nativeConnectors.salesforceSandbox.description": "在 Salesforce Sandbox 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.serviceNow.description": "在 ServiceNow 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.serviceNow.name": "ServiceNow", + "searchConnectors.content.nativeConnectors.sharepointOnline.description": "在 SharePoint Online 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.sharepointOnline.name": "Sharepoint", + "searchConnectors.content.nativeConnectors.sharepointServer.description": "在 SharePoint Server 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.sharepointServer.name": "SharePoint Server", + "searchConnectors.content.nativeConnectors.slack.description": "在 Slack 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.slack.name": "Slack", + "searchConnectors.content.nativeConnectors.teams.description": "在 Teams 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.teams.name": "Teams", + "searchConnectors.content.nativeConnectors.zoom.description": "在 Zoom 上搜索您的内容。", + "searchConnectors.content.nativeConnectors.zoom.name": "缩放", "searchConnectors.cronEditor.cronDaily.fieldHour.textAtLabel": "于", "searchConnectors.cronEditor.cronDaily.fieldTimeLabel": "时间", "searchConnectors.cronEditor.cronDaily.hourSelectLabel": "小时", @@ -6551,74 +6616,6 @@ "searchConnectors.syncStatus.inProgress": "同步进行中", "searchConnectors.syncStatus.pending": "同步待处理", "searchConnectors.syncStatus.suspended": "同步已挂起", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.description": "在 Azure Blob 存储上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.azureBlob.name": "Azure Blob 存储", - "searchConnectorsPlugin.content.nativeConnectors.box.description": "在 Box 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.box.name": "Box", - "searchConnectorsPlugin.content.nativeConnectors.confluence_data_center.name": "Confluence 数据中心", - "searchConnectorsPlugin.content.nativeConnectors.confluence.description": "在 Confluence Cloud 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.confluence.name": "Confluence Cloud 和 Confluence Server", - "searchConnectorsPlugin.content.nativeConnectors.confluenceDataCenter.description": "在 Confluence 数据中心上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.description": "搜索存储在定制数据源上的数据。", - "searchConnectorsPlugin.content.nativeConnectors.customConnector.name": "定制连接器", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.description": "搜索存储在 Dropbox 上的文件和文件夹。", - "searchConnectorsPlugin.content.nativeConnectors.dropbox.name": "Dropbox", - "searchConnectorsPlugin.content.nativeConnectors.github.description": "搜索 GitHub 上的项目和存储库。", - "searchConnectorsPlugin.content.nativeConnectors.github.name": "GitHub 和 GitHub Enterprise Server", - "searchConnectorsPlugin.content.nativeConnectors.gmail.description": "在 Gmail 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.gmail.name": "Gmail", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.description": "在 Google Cloud Storage 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.googleCloud.name": "Google Cloud Storage", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.description": "在 Google 云端硬盘上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.googleDrive.name": "Google 云端硬盘", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.description": "使用 GraphQL 搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.graphQL.name": "GraphQL", - "searchConnectorsPlugin.content.nativeConnectors.jira_data_center.name": "Jira 数据中心", - "searchConnectorsPlugin.content.nativeConnectors.jira.description": "在 Jira Cloud 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.jira.name": "Jira Cloud", - "searchConnectorsPlugin.content.nativeConnectors.jiraDataCenter.description": "在 Jira 数据中心上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.description": "在 Jira Server 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.jiraServer.name": "Jira Server", - "searchConnectorsPlugin.content.nativeConnectors.microsoftSQL.name": "Microsoft SQL", - "searchConnectorsPlugin.content.nativeConnectors.mongoDB.description": "搜索您的 MongoDB 内容。", - "searchConnectorsPlugin.content.nativeConnectors.mongodb.name": "MongoDB", - "searchConnectorsPlugin.content.nativeConnectors.msSql.description": "在 Microsoft SQL Server 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.mysql.description": "搜索您的 MySQL 内容。", - "searchConnectorsPlugin.content.nativeConnectors.mysql.name": "MySQL", - "searchConnectorsPlugin.content.nativeConnectors.netowkrDrive.description": "搜索您的网络驱动器内容。", - "searchConnectorsPlugin.content.nativeConnectors.networkDrive.name": "网络驱动器", - "searchConnectorsPlugin.content.nativeConnectors.notion.description": "在 Notion 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.notion.name": "Notion", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.description": "在 OneDrive 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.oneDrive.name": "OneDrive", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.description": "在 OpenText Documentum 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.openTextDocumentum.name": "OpenText Documentum", - "searchConnectorsPlugin.content.nativeConnectors.oracle.description": "在 Oracle 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.oracle.name": "Oracle", - "searchConnectorsPlugin.content.nativeConnectors.outlook.description": "在 Outlook 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.outlook.name": "Outlook", - "searchConnectorsPlugin.content.nativeConnectors.postgreSQL.description": "在 PostgreSQL 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.postgresql.name": "PostgreSQL", - "searchConnectorsPlugin.content.nativeConnectors.redis.description": "在 Redis 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.redis.name": "Redis", - "searchConnectorsPlugin.content.nativeConnectors.s3.description": "在 Amazon S3 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.s3.name": "S3", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.description": "在 Salesforce 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.salesforce.name": "Salesforce", - "searchConnectorsPlugin.content.nativeConnectors.salesforceBox.name": "Salesforce Sandbox", - "searchConnectorsPlugin.content.nativeConnectors.salesforceSandbox.description": "在 Salesforce Sandbox 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.description": "在 ServiceNow 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.serviceNow.name": "ServiceNow", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.description": "在 SharePoint Online 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.sharepointOnline.name": "Sharepoint", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.description": "在 SharePoint Server 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.sharepointServer.name": "SharePoint Server", - "searchConnectorsPlugin.content.nativeConnectors.slack.description": "在 Slack 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.slack.name": "Slack", - "searchConnectorsPlugin.content.nativeConnectors.teams.description": "在 Teams 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.teams.name": "Teams", - "searchConnectorsPlugin.content.nativeConnectors.zoom.description": "在 Zoom 上搜索您的内容。", - "searchConnectorsPlugin.content.nativeConnectors.zoom.name": "缩放", "searchErrors.errors.fetchError": "检查您的网络连接,然后重试。", "searchErrors.esError.unknownRootCause": "未知", "searchErrors.esError.viewDetailsButtonLabel": "查看详情", From b4bdd125621f5381669230108f64174e75dc40da Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Wed, 6 Nov 2024 09:45:32 -0600 Subject: [PATCH 14/16] skip failing test suites (#185046, #185879) --- .../components/case_view/components/custom_fields.test.tsx | 3 ++- .../plugins/cases/public/components/description/index.test.tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/cases/public/components/case_view/components/custom_fields.test.tsx b/x-pack/plugins/cases/public/components/case_view/components/custom_fields.test.tsx index 67d8f8fd05764..31d4395fc3d7a 100644 --- a/x-pack/plugins/cases/public/components/case_view/components/custom_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/components/custom_fields.test.tsx @@ -16,7 +16,8 @@ import { customFieldsMock, customFieldsConfigurationMock } from '../../../contai import userEvent from '@testing-library/user-event'; import { CustomFieldTypes } from '../../../../common/types/domain'; -describe('Case View Page files tab', () => { +// Failing: See https://github.com/elastic/kibana/issues/185046 +describe.skip('Case View Page files tab', () => { const onSubmit = jest.fn(); let appMockRender: AppMockRenderer; diff --git a/x-pack/plugins/cases/public/components/description/index.test.tsx b/x-pack/plugins/cases/public/components/description/index.test.tsx index 5ce8909a65dc6..678b46eabfbe8 100644 --- a/x-pack/plugins/cases/public/components/description/index.test.tsx +++ b/x-pack/plugins/cases/public/components/description/index.test.tsx @@ -27,7 +27,8 @@ const defaultProps = { isLoadingDescription: false, }; -describe('Description', () => { +// Failing: See https://github.com/elastic/kibana/issues/185879 +describe.skip('Description', () => { const onUpdateField = jest.fn(); let appMockRender: AppMockRenderer; From be3c159cfc9915abc48a409e123ee11070d34dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 6 Nov 2024 17:09:41 +0100 Subject: [PATCH 15/16] [Rendering] Parallelize ES requests (#199124) --- .../src/rendering_service.tsx | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx index 44841ec0fbe3f..ace0399f242af 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx +++ b/packages/core/rendering/core-rendering-server-internal/src/rendering_service.tsx @@ -20,10 +20,10 @@ import type { IUiSettingsClient } from '@kbn/core-ui-settings-server'; import type { UiPlugins } from '@kbn/core-plugins-base-server-internal'; import type { CustomBranding } from '@kbn/core-custom-branding-common'; import { - type UserProvidedValues, type DarkModeValue, parseDarkModeValue, type UiSettingsParams, + type UserProvidedValues, } from '@kbn/core-ui-settings-common'; import { Template } from './views'; import { @@ -148,23 +148,29 @@ export class RenderingService { const basePath = http.basePath.get(request); const { serverBasePath, publicBaseUrl } = http.basePath; - let settingsUserValues: Record = {}; - let globalSettingsUserValues: Record = {}; - - if (!isAnonymousPage) { - const userValues = await Promise.all([ - uiSettings.client?.getUserProvided(), - uiSettings.globalClient?.getUserProvided(), - ]); - - settingsUserValues = userValues[0]; - globalSettingsUserValues = userValues[1]; - } - - const defaultSettings = await withAsyncDefaultValues( - request, - uiSettings.client?.getRegistered() - ); + // Grouping all async HTTP requests to run them concurrently for performance reasons. + const [ + defaultSettings, + settingsUserValues = {}, + globalSettingsUserValues = {}, + userSettingDarkMode, + ] = await Promise.all([ + // All sites + withAsyncDefaultValues(request, uiSettings.client?.getRegistered()), + // Only non-anonymous pages + ...(!isAnonymousPage + ? ([ + uiSettings.client?.getUserProvided(), + uiSettings.globalClient?.getUserProvided(), + // dark mode + userSettings?.getUserSettingDarkMode(request), + ] as [ + Promise>, + Promise>, + Promise | undefined + ]) + : []), + ]); const settings = { defaults: defaultSettings, @@ -196,10 +202,6 @@ export class RenderingService { } // dark mode - const userSettingDarkMode = isAnonymousPage - ? undefined - : await userSettings?.getUserSettingDarkMode(request); - const isThemeOverridden = settings.user['theme:darkMode']?.isOverridden ?? false; let darkMode: DarkModeValue; From 8054aa253fddc5be6c88904024518d30f5d8ae1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Fern=C3=A1ndez=20Haro?= Date: Wed, 6 Nov 2024 17:10:06 +0100 Subject: [PATCH 16/16] Flaky #111821 - Refresh index (#199136) --- .../rollups/integration_tests/daily_rollups.test.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/plugins/kibana_usage_collection/server/collectors/event_loop_delays/rollups/integration_tests/daily_rollups.test.ts b/src/plugins/kibana_usage_collection/server/collectors/event_loop_delays/rollups/integration_tests/daily_rollups.test.ts index c29f8041d8044..3433af684e92c 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/event_loop_delays/rollups/integration_tests/daily_rollups.test.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/event_loop_delays/rollups/integration_tests/daily_rollups.test.ts @@ -8,7 +8,12 @@ */ import moment, { type MomentInput } from 'moment'; -import type { Logger, ISavedObjectsRepository, SavedObject } from '@kbn/core/server'; +import type { + Logger, + ISavedObjectsRepository, + SavedObject, + ElasticsearchClient, +} from '@kbn/core/server'; import { type TestElasticsearchUtils, type TestKibanaUtils, @@ -72,11 +77,11 @@ function createRawEventLoopDelaysDailyDocs() { return { rawEventLoopDelaysDaily, outdatedRawEventLoopDelaysDaily }; } -// Failing: See https://github.com/elastic/kibana/issues/111821 -describe.skip(`daily rollups integration test`, () => { +describe(`daily rollups integration test`, () => { let esServer: TestElasticsearchUtils; let root: TestKibanaUtils['root']; let internalRepository: ISavedObjectsRepository; + let esClient: ElasticsearchClient; let logger: Logger; let rawEventLoopDelaysDaily: Array>; let outdatedRawEventLoopDelaysDaily: Array>; @@ -94,6 +99,7 @@ describe.skip(`daily rollups integration test`, () => { const start = await root.start(); logger = root.logger.get('test daily rollups'); internalRepository = start.savedObjects.createInternalRepository([SAVED_OBJECTS_DAILY_TYPE]); + esClient = start.elasticsearch.client.asInternalUser; // Create the docs now const rawDailyDocs = createRawEventLoopDelaysDailyDocs(); @@ -113,6 +119,7 @@ describe.skip(`daily rollups integration test`, () => { it('deletes documents older that 3 days from the saved objects repository', async () => { await rollDailyData(logger, internalRepository); + await esClient.indices.refresh({ index: `.kibana` }); // Make sure that the changes are searchable const { total, saved_objects: savedObjects } = await internalRepository.find({ type: SAVED_OBJECTS_DAILY_TYPE }); expect(total).toBe(rawEventLoopDelaysDaily.length);