From ca6ffe330f3c4c6e7618ccc7e1ce05dd8e008f0a Mon Sep 17 00:00:00 2001 From: Nicolas Chaulet Date: Thu, 19 Nov 2020 08:43:14 -0500 Subject: [PATCH] [Fleet] Rename ingestManager plugin ID fleet (#83200) --- docs/developer/plugin-list.asciidoc | 8 +-- packages/kbn-optimizer/limits.yml | 2 +- .../setup-custom-kibana-user-role.ts | 4 +- x-pack/plugins/fleet/README.md | 4 +- .../plugins/fleet/common/constants/plugin.ts | 2 +- .../common/services/decode_cloud_id.test.ts | 2 +- .../services/is_agent_upgradeable.test.ts | 2 +- .../services/is_diff_path_protocol.test.ts | 2 +- .../services/is_valid_namespace.test.ts | 2 +- .../package_policies_to_agent_inputs.test.ts | 2 +- .../package_to_package_policy.test.ts | 2 +- x-pack/plugins/fleet/common/types/index.ts | 2 +- x-pack/plugins/fleet/kibana.json | 2 +- x-pack/plugins/fleet/package.json | 4 +- .../fleet/constants/page_paths.ts | 2 +- .../fleet/hooks/use_capabilities.ts | 2 +- .../applications/fleet/hooks/use_config.ts | 4 +- .../applications/fleet/hooks/use_deps.ts | 6 +- .../fleet/public/applications/fleet/index.tsx | 20 +++---- .../has_invalid_but_required_var.test.ts | 2 +- .../services/is_advanced_var.test.ts | 2 +- .../services/validate_package_policy.test.ts | 4 +- .../components/agent_unenroll_modal/index.tsx | 2 +- .../fleet/sections/agents/index.tsx | 6 +- x-pack/plugins/fleet/public/index.ts | 6 +- x-pack/plugins/fleet/public/plugin.ts | 59 +++++++++++-------- .../server/collectors/config_collectors.ts | 4 +- .../fleet/server/collectors/register.ts | 4 +- x-pack/plugins/fleet/server/index.ts | 13 ++-- x-pack/plugins/fleet/server/mocks.ts | 4 +- x-pack/plugins/fleet/server/plugin.ts | 54 ++++++++--------- .../fleet/server/routes/agent/index.ts | 4 +- .../server/routes/limited_concurrency.test.ts | 8 +-- .../server/routes/limited_concurrency.ts | 4 +- .../server/routes/setup/handlers.test.ts | 10 ++-- .../fleet/server/routes/setup/handlers.ts | 2 +- .../fleet/server/routes/setup/index.ts | 16 ++--- .../fleet/server/services/app_context.ts | 16 ++--- .../plugins/fleet/server/services/config.ts | 10 ++-- .../home/data_streams_tab.test.ts | 6 +- x-pack/plugins/index_management/kibana.json | 14 +---- .../public/application/app_context.tsx | 4 +- .../application/mount_management_section.ts | 6 +- .../data_stream_list/data_stream_list.tsx | 8 +-- .../plugins/index_management/public/plugin.ts | 4 +- .../plugins/index_management/public/types.ts | 4 +- .../index.tsx | 16 ++--- .../public/pages/landing/index.tsx | 4 +- x-pack/plugins/security_solution/kibana.json | 4 +- .../public/app/home/setup.tsx | 10 ++-- .../__snapshots__/link_to_app.test.tsx.snap | 10 ++-- .../components/endpoint/link_to_app.test.tsx | 28 ++++----- .../common/hooks/endpoint/ingest_enabled.ts | 12 ++-- .../use_navigate_to_app_event_handler.ts | 2 +- .../mock/endpoint/app_context_render.tsx | 2 +- .../mock/endpoint/app_root_provider.tsx | 2 +- .../mock/endpoint/dependencies_start_mock.ts | 6 +- .../public/common/store/types.ts | 4 +- .../pages/endpoint_hosts/view/hooks.ts | 12 ++-- .../pages/endpoint_hosts/view/index.test.tsx | 18 +++--- .../pages/endpoint_hosts/view/index.tsx | 16 ++--- .../endpoint_policy_edit_extension.tsx | 14 ++--- .../pages/policy/view/policy_list.tsx | 6 +- .../security_solution/public/plugin.tsx | 4 +- .../plugins/security_solution/public/types.ts | 4 +- .../endpoint/endpoint_app_context_services.ts | 6 +- .../server/endpoint/mocks.ts | 10 ++-- .../endpoint/routes/metadata/metadata.test.ts | 2 +- .../routes/metadata/metadata_v1.test.ts | 2 +- .../security_solution/server/plugin.ts | 14 ++--- .../translations/translations/ja-JP.json | 10 ---- .../translations/translations/zh-CN.json | 10 ---- .../apis/features/features/features.ts | 2 +- .../apis/security/privileges.ts | 2 +- .../apis/security/privileges_basic.ts | 2 +- .../apis/agents/delete.ts | 4 +- .../fleet_api_integration/apis/agents/list.ts | 4 +- ...gest_manager_create_package_policy_page.ts | 2 +- 78 files changed, 277 insertions(+), 317 deletions(-) rename x-pack/plugins/observability/public/components/app/{ingest_manager_panel => fleet_panel}/index.tsx (74%) diff --git a/docs/developer/plugin-list.asciidoc b/docs/developer/plugin-list.asciidoc index 198b0372d9254..5ee7131610584 100644 --- a/docs/developer/plugin-list.asciidoc +++ b/docs/developer/plugin-list.asciidoc @@ -377,6 +377,10 @@ and actions. |Backend and core front-end react-components for GeoJson file upload. Only supports the Maps plugin. +|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[fleet] +|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false) + + |{kib-repo}blob/{branch}/x-pack/plugins/global_search/README.md[globalSearch] |The GlobalSearch plugin provides an easy way to search for various objects, such as applications or dashboards from the Kibana instance, from both server and client-side plugins @@ -413,10 +417,6 @@ Index Management by running this series of requests in Console: the infrastructure monitoring use-case within Kibana. -|{kib-repo}blob/{branch}/x-pack/plugins/fleet/README.md[ingestManager] -|Fleet needs to have Elasticsearch API keys enabled, and also to have TLS enabled on kibana, (if you want to run Kibana without TLS you can provide the following config flag --xpack.fleet.agents.tlsCheckDisabled=false) - - |{kib-repo}blob/{branch}/x-pack/plugins/ingest_pipelines/README.md[ingestPipelines] |The ingest_pipelines plugin provides Kibana support for Elasticsearch's ingest nodes. Please refer to the Elasticsearch documentation for more details. diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 7cdbe844c2901..a97104fcf1a8d 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -36,7 +36,7 @@ pageLoadAssetSize: indexManagement: 140608 indexPatternManagement: 154222 infra: 197873 - ingestManager: 415829 + fleet: 415829 ingestPipelines: 58003 inputControlVis: 172675 inspector: 148711 diff --git a/x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts b/x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts index cf17c9dbbf2e3..11383f23964f8 100644 --- a/x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts +++ b/x-pack/plugins/apm/scripts/kibana-security/setup-custom-kibana-user-role.ts @@ -148,7 +148,7 @@ async function init() { indexPatterns: ['read'], savedObjectsManagement: ['read'], stackAlerts: ['read'], - ingestManager: ['read'], + fleet: ['read'], actions: ['read'], }, }, @@ -181,7 +181,7 @@ async function init() { indexPatterns: ['all'], savedObjectsManagement: ['all'], stackAlerts: ['all'], - ingestManager: ['all'], + fleet: ['all'], actions: ['all'], }, }, diff --git a/x-pack/plugins/fleet/README.md b/x-pack/plugins/fleet/README.md index 614e1aba2ab86..b1f52dbed9cfb 100644 --- a/x-pack/plugins/fleet/README.md +++ b/x-pack/plugins/fleet/README.md @@ -1,4 +1,4 @@ -# Ingest Manager +# Fleet ## Plugin @@ -46,6 +46,8 @@ One common development workflow is: This plugin follows the `common`, `server`, `public` structure from the [Architecture Style Guide ](https://github.com/elastic/kibana/blob/master/style_guides/architecture_style_guide.md#file-and-folder-structure). We also follow the pattern of developing feature branches under your personal fork of Kibana. +Note: The plugin was previously named Ingest Manager it's possible that some variables are still named with that old plugin name. + ### Tests #### API integration tests diff --git a/x-pack/plugins/fleet/common/constants/plugin.ts b/x-pack/plugins/fleet/common/constants/plugin.ts index c2390bb433953..e7262761c4dcf 100644 --- a/x-pack/plugins/fleet/common/constants/plugin.ts +++ b/x-pack/plugins/fleet/common/constants/plugin.ts @@ -3,4 +3,4 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -export const PLUGIN_ID = 'ingestManager'; +export const PLUGIN_ID = 'fleet'; diff --git a/x-pack/plugins/fleet/common/services/decode_cloud_id.test.ts b/x-pack/plugins/fleet/common/services/decode_cloud_id.test.ts index dcec54f47440a..8a5fee3ee2172 100644 --- a/x-pack/plugins/fleet/common/services/decode_cloud_id.test.ts +++ b/x-pack/plugins/fleet/common/services/decode_cloud_id.test.ts @@ -5,7 +5,7 @@ */ import { decodeCloudId } from './decode_cloud_id'; -describe('Ingest Manager - decodeCloudId', () => { +describe('Fleet - decodeCloudId', () => { it('parses various CloudID formats', () => { const tests = [ { diff --git a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts index dc61f4898478d..1a9e5f09f6670 100644 --- a/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts +++ b/x-pack/plugins/fleet/common/services/is_agent_upgradeable.test.ts @@ -94,7 +94,7 @@ const getAgent = ({ } return agent; }; -describe('Ingest Manager - isAgentUpgradeable', () => { +describe('Fleet - isAgentUpgradeable', () => { it('returns false if agent reports not upgradeable with agent version < kibana version', () => { expect(isAgentUpgradeable(getAgent({ version: '7.9.0' }), '8.0.0')).toBe(false); }); diff --git a/x-pack/plugins/fleet/common/services/is_diff_path_protocol.test.ts b/x-pack/plugins/fleet/common/services/is_diff_path_protocol.test.ts index c488d552d7676..6c49bba49a582 100644 --- a/x-pack/plugins/fleet/common/services/is_diff_path_protocol.test.ts +++ b/x-pack/plugins/fleet/common/services/is_diff_path_protocol.test.ts @@ -5,7 +5,7 @@ */ import { isDiffPathProtocol } from './is_diff_path_protocol'; -describe('Ingest Manager - isDiffPathProtocol', () => { +describe('Fleet - isDiffPathProtocol', () => { it('returns true for different paths', () => { expect( isDiffPathProtocol([ diff --git a/x-pack/plugins/fleet/common/services/is_valid_namespace.test.ts b/x-pack/plugins/fleet/common/services/is_valid_namespace.test.ts index 3ed9e3a087a92..8d60c4aa61dca 100644 --- a/x-pack/plugins/fleet/common/services/is_valid_namespace.test.ts +++ b/x-pack/plugins/fleet/common/services/is_valid_namespace.test.ts @@ -5,7 +5,7 @@ */ import { isValidNamespace } from './is_valid_namespace'; -describe('Ingest Manager - isValidNamespace', () => { +describe('Fleet - isValidNamespace', () => { it('returns true for valid namespaces', () => { expect(isValidNamespace('default').valid).toBe(true); expect(isValidNamespace('namespace-with-dash').valid).toBe(true); diff --git a/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts b/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts index 1df06df1de275..f721afb639141 100644 --- a/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts +++ b/x-pack/plugins/fleet/common/services/package_policies_to_agent_inputs.test.ts @@ -6,7 +6,7 @@ import { PackagePolicy, PackagePolicyInput } from '../types'; import { storedPackagePoliciesToAgentInputs } from './package_policies_to_agent_inputs'; -describe('Ingest Manager - storedPackagePoliciesToAgentInputs', () => { +describe('Fleet - storedPackagePoliciesToAgentInputs', () => { const mockPackagePolicy: PackagePolicy = { id: 'some-uuid', name: 'mock-package-policy', diff --git a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts index e81207300a5f3..ae4de55ffa9a8 100644 --- a/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts +++ b/x-pack/plugins/fleet/common/services/package_to_package_policy.test.ts @@ -7,7 +7,7 @@ import { installationStatuses } from '../constants'; import { PackageInfo } from '../types'; import { packageToPackagePolicy, packageToPackagePolicyInputs } from './package_to_package_policy'; -describe('Ingest Manager - packageToPackagePolicy', () => { +describe('Fleet - packageToPackagePolicy', () => { const mockPackage: PackageInfo = { name: 'mock-package', title: 'Mock package', diff --git a/x-pack/plugins/fleet/common/types/index.ts b/x-pack/plugins/fleet/common/types/index.ts index ba76194b1d9b9..e0827ef7cf40f 100644 --- a/x-pack/plugins/fleet/common/types/index.ts +++ b/x-pack/plugins/fleet/common/types/index.ts @@ -6,7 +6,7 @@ export * from './models'; export * from './rest_spec'; -export interface IngestManagerConfigType { +export interface FleetConfigType { enabled: boolean; registryUrl?: string; registryProxyUrl?: string; diff --git a/x-pack/plugins/fleet/kibana.json b/x-pack/plugins/fleet/kibana.json index 5ea6d21e1282e..81b56682b47e1 100644 --- a/x-pack/plugins/fleet/kibana.json +++ b/x-pack/plugins/fleet/kibana.json @@ -1,5 +1,5 @@ { - "id": "ingestManager", + "id": "fleet", "version": "kibana", "server": true, "ui": true, diff --git a/x-pack/plugins/fleet/package.json b/x-pack/plugins/fleet/package.json index d2bb7a1621d9f..e374dabb82458 100644 --- a/x-pack/plugins/fleet/package.json +++ b/x-pack/plugins/fleet/package.json @@ -1,7 +1,7 @@ { "author": "Elastic", - "name": "ingest-manager", + "name": "fleet", "version": "8.0.0", "private": true, "license": "Elastic-License" -} \ No newline at end of file +} diff --git a/x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts b/x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts index 1273fb9b86ca9..9963753651671 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/constants/page_paths.ts @@ -31,7 +31,7 @@ export interface DynamicPagePathValues { [key: string]: string; } -export const BASE_PATH = '/app/ingestManager'; +export const BASE_PATH = '/app/fleet'; // If routing paths are changed here, please also check to see if // `pagePathGetters()`, below, needs any modifications diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_capabilities.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_capabilities.ts index 0a16c4a62a7d1..d8535183bb84e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_capabilities.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_capabilities.ts @@ -8,5 +8,5 @@ import { useCore } from './'; export function useCapabilities() { const core = useCore(); - return core.application.capabilities.ingestManager; + return core.application.capabilities.fleet; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts index d3f27a180cfd0..e12265d162423 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_config.ts @@ -5,9 +5,9 @@ */ import React, { useContext } from 'react'; -import { IngestManagerConfigType } from '../../../plugin'; +import { FleetConfigType } from '../../../plugin'; -export const ConfigContext = React.createContext(null); +export const ConfigContext = React.createContext(null); export function useConfig() { const config = useContext(ConfigContext); diff --git a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_deps.ts b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_deps.ts index 25e4ee8fca43c..bf8f33297882e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/hooks/use_deps.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/hooks/use_deps.ts @@ -5,11 +5,11 @@ */ import React, { useContext } from 'react'; -import { IngestManagerSetupDeps, IngestManagerStartDeps } from '../../../plugin'; +import { FleetSetupDeps, FleetStartDeps } from '../../../plugin'; export const DepsContext = React.createContext<{ - setup: IngestManagerSetupDeps; - start: IngestManagerStartDeps; + setup: FleetSetupDeps; + start: FleetStartDeps; } | null>(null); export function useSetupDeps() { diff --git a/x-pack/plugins/fleet/public/applications/fleet/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/index.tsx index d4e652ad95831..51c897b3661cc 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/index.tsx @@ -14,11 +14,7 @@ import { EuiErrorBoundary, EuiPanel, EuiEmptyPrompt, EuiCode } from '@elastic/eu import { CoreStart, AppMountParameters } from 'src/core/public'; import { KibanaContextProvider } from '../../../../../../src/plugins/kibana_react/public'; import { EuiThemeProvider } from '../../../../xpack_legacy/common'; -import { - IngestManagerSetupDeps, - IngestManagerConfigType, - IngestManagerStartDeps, -} from '../../plugin'; +import { FleetSetupDeps, FleetConfigType, FleetStartDeps } from '../../plugin'; import { PAGE_ROUTING_PATHS } from './constants'; import { DefaultLayout, WithoutHeaderLayout } from './layouts'; import { Loading, Error } from './components'; @@ -241,9 +237,9 @@ const IngestManagerApp = ({ }: { basepath: string; coreStart: CoreStart; - setupDeps: IngestManagerSetupDeps; - startDeps: IngestManagerStartDeps; - config: IngestManagerConfigType; + setupDeps: FleetSetupDeps; + startDeps: FleetStartDeps; + config: FleetConfigType; history: AppMountParameters['history']; kibanaVersion: string; extensions: UIExtensionsStorage; @@ -271,9 +267,9 @@ const IngestManagerApp = ({ export function renderApp( coreStart: CoreStart, { element, appBasePath, history }: AppMountParameters, - setupDeps: IngestManagerSetupDeps, - startDeps: IngestManagerStartDeps, - config: IngestManagerConfigType, + setupDeps: FleetSetupDeps, + startDeps: FleetStartDeps, + config: FleetConfigType, kibanaVersion: string, extensions: UIExtensionsStorage ) { @@ -296,7 +292,7 @@ export function renderApp( }; } -export const teardownIngestManager = (coreStart: CoreStart) => { +export const teardownFleet = (coreStart: CoreStart) => { coreStart.chrome.docTitle.reset(); coreStart.chrome.setBreadcrumbs([]); licenseService.stop(); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.test.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.test.ts index 679ae4b1456d6..05eb40fecb1c8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/has_invalid_but_required_var.test.ts @@ -5,7 +5,7 @@ */ import { hasInvalidButRequiredVar } from './has_invalid_but_required_var'; -describe('Ingest Manager - hasInvalidButRequiredVar', () => { +describe('Fleet - hasInvalidButRequiredVar', () => { it('returns true for invalid & required vars', () => { expect( hasInvalidButRequiredVar( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/is_advanced_var.test.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/is_advanced_var.test.ts index 67796d69863fa..d58068683086e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/is_advanced_var.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/is_advanced_var.test.ts @@ -5,7 +5,7 @@ */ import { isAdvancedVar } from './is_advanced_var'; -describe('Ingest Manager - isAdvancedVar', () => { +describe('Fleet - isAdvancedVar', () => { it('returns true for vars that should be show under advanced options', () => { expect( isAdvancedVar({ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts index 8d46fed1ff14e..e3e29134d405e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/services/validate_package_policy.test.ts @@ -7,7 +7,7 @@ import { installationStatuses } from '../../../../../../../common/constants'; import { PackageInfo, NewPackagePolicy, RegistryPolicyTemplate } from '../../../../types'; import { validatePackagePolicy, validationHasErrors } from './validate_package_policy'; -describe('Ingest Manager - validatePackagePolicy()', () => { +describe('Fleet - validatePackagePolicy()', () => { const mockPackage = ({ name: 'mock-package', title: 'Mock package', @@ -496,7 +496,7 @@ describe('Ingest Manager - validatePackagePolicy()', () => { }); }); -describe('Ingest Manager - validationHasErrors()', () => { +describe('Fleet - validationHasErrors()', () => { it('returns true for stream validation results with errors', () => { expect( validationHasErrors({ diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx index 74f2303c70c0a..1b3935a86f65c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_unenroll_modal/index.tsx @@ -144,7 +144,7 @@ export const AgentUnenrollAgentModal: React.FunctionComponent = ({ }} > { useBreadcrumbs('fleet'); - const core = useCore(); const { agents } = useConfig(); + const capabilities = useCapabilities(); const fleetStatus = useFleetStatus(); @@ -35,7 +35,7 @@ export const FleetApp: React.FunctionComponent = () => { /> ); } - if (!core.application.capabilities.ingestManager.read) { + if (!capabilities.read) { return ; } diff --git a/x-pack/plugins/fleet/public/index.ts b/x-pack/plugins/fleet/public/index.ts index 1de001a6fc69e..be53af77f4b46 100644 --- a/x-pack/plugins/fleet/public/index.ts +++ b/x-pack/plugins/fleet/public/index.ts @@ -4,12 +4,12 @@ * you may not use this file except in compliance with the Elastic License. */ import { PluginInitializerContext } from 'src/core/public'; -import { IngestManagerPlugin } from './plugin'; +import { FleetPlugin } from './plugin'; -export { IngestManagerSetup, IngestManagerStart } from './plugin'; +export { FleetSetup, FleetStart } from './plugin'; export const plugin = (initializerContext: PluginInitializerContext) => { - return new IngestManagerPlugin(initializerContext); + return new FleetPlugin(initializerContext); }; export type { NewPackagePolicy } from './applications/fleet/types'; diff --git a/x-pack/plugins/fleet/public/plugin.ts b/x-pack/plugins/fleet/public/plugin.ts index 377ba770b5ca2..7e523b3fa594a 100644 --- a/x-pack/plugins/fleet/public/plugin.ts +++ b/x-pack/plugins/fleet/public/plugin.ts @@ -11,7 +11,7 @@ import { CoreStart, } from 'src/core/public'; import { i18n } from '@kbn/i18n'; -import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public'; +import { DEFAULT_APP_CATEGORIES, AppNavLinkStatus } from '../../../../src/core/public'; import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../../src/plugins/data/public'; import { HomePublicPluginSetup, @@ -21,7 +21,7 @@ import { LicensingPluginSetup } from '../../licensing/public'; import { PLUGIN_ID, CheckPermissionsResponse, PostIngestSetupResponse } from '../common'; import { BASE_PATH } from './applications/fleet/constants'; -import { IngestManagerConfigType } from '../common/types'; +import { FleetConfigType } from '../common/types'; import { setupRouteService, appRoutesService } from '../common'; import { licenseService } from './applications/fleet/hooks/use_license'; import { setHttpClient } from './applications/fleet/hooks/use_request/use_request'; @@ -33,44 +33,42 @@ import { import { createExtensionRegistrationCallback } from './applications/fleet/services/ui_extensions'; import { UIExtensionRegistrationCallback, UIExtensionsStorage } from './applications/fleet/types'; -export { IngestManagerConfigType } from '../common/types'; +export { FleetConfigType } from '../common/types'; -// We need to provide an object instead of void so that dependent plugins know when Ingest Manager +// We need to provide an object instead of void so that dependent plugins know when Fleet // is disabled. // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface IngestManagerSetup {} +export interface FleetSetup {} /** - * Describes public IngestManager plugin contract returned at the `start` stage. + * Describes public Fleet plugin contract returned at the `start` stage. */ -export interface IngestManagerStart { +export interface FleetStart { registerExtension: UIExtensionRegistrationCallback; isInitialized: () => Promise; } -export interface IngestManagerSetupDeps { +export interface FleetSetupDeps { licensing: LicensingPluginSetup; data: DataPublicPluginSetup; home?: HomePublicPluginSetup; } -export interface IngestManagerStartDeps { +export interface FleetStartDeps { data: DataPublicPluginStart; } -export class IngestManagerPlugin - implements - Plugin { - private config: IngestManagerConfigType; +export class FleetPlugin implements Plugin { + private config: FleetConfigType; private kibanaVersion: string; private extensions: UIExtensionsStorage = {}; constructor(private readonly initializerContext: PluginInitializerContext) { - this.config = this.initializerContext.config.get(); + this.config = this.initializerContext.config.get(); this.kibanaVersion = initializerContext.env.packageInfo.version; } - public setup(core: CoreSetup, deps: IngestManagerSetupDeps) { + public setup(core: CoreSetup, deps: FleetSetupDeps) { const config = this.config; const kibanaVersion = this.kibanaVersion; const extensions = this.extensions; @@ -81,7 +79,7 @@ export class IngestManagerPlugin // Set up license service licenseService.start(deps.licensing.license$); - // Register main Ingest Manager app + // Register main Fleet app core.application.register({ id: PLUGIN_ID, category: DEFAULT_APP_CATEGORIES.management, @@ -91,10 +89,10 @@ export class IngestManagerPlugin async mount(params: AppMountParameters) { const [coreStart, startDeps] = (await core.getStartServices()) as [ CoreStart, - IngestManagerStartDeps, - IngestManagerStart + FleetStartDeps, + FleetStart ]; - const { renderApp, teardownIngestManager } = await import('./applications/fleet/'); + const { renderApp, teardownFleet } = await import('./applications/fleet/'); const unmount = renderApp( coreStart, params, @@ -107,11 +105,26 @@ export class IngestManagerPlugin return () => { unmount(); - teardownIngestManager(coreStart); + teardownFleet(coreStart); }; }, }); + // BWC < 7.11 redirect /app/ingestManager to /app/fleet + core.application.register({ + id: 'ingestManager', + category: DEFAULT_APP_CATEGORIES.management, + navLinkStatus: AppNavLinkStatus.hidden, + title: i18n.translate('xpack.fleet.oldAppTitle', { defaultMessage: 'Ingest Manager' }), + async mount(params: AppMountParameters) { + const [coreStart] = await core.getStartServices(); + coreStart.application.navigateToApp('fleet', { + path: params.history.location.hash, + }); + return () => {}; + }, + }); + // Register components for home/add data integration if (deps.home) { deps.home.tutorials.registerDirectoryNotice(PLUGIN_ID, TutorialDirectoryNotice); @@ -119,7 +132,7 @@ export class IngestManagerPlugin deps.home.tutorials.registerModuleNotice(PLUGIN_ID, TutorialModuleNotice); deps.home.featureCatalogue.register({ - id: 'ingestManager', + id: 'fleet', title: i18n.translate('xpack.fleet.featureCatalogueTitle', { defaultMessage: 'Add Elastic Agent', }), @@ -137,8 +150,8 @@ export class IngestManagerPlugin return {}; } - public async start(core: CoreStart): Promise { - let successPromise: ReturnType; + public async start(core: CoreStart): Promise { + let successPromise: ReturnType; return { isInitialized: () => { diff --git a/x-pack/plugins/fleet/server/collectors/config_collectors.ts b/x-pack/plugins/fleet/server/collectors/config_collectors.ts index c201d1d4dfa25..8fb4924a2ccf0 100644 --- a/x-pack/plugins/fleet/server/collectors/config_collectors.ts +++ b/x-pack/plugins/fleet/server/collectors/config_collectors.ts @@ -4,8 +4,8 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IngestManagerConfigType } from '..'; +import { FleetConfigType } from '..'; -export const getIsFleetEnabled = (config: IngestManagerConfigType) => { +export const getIsFleetEnabled = (config: FleetConfigType) => { return config.agents.enabled; }; diff --git a/x-pack/plugins/fleet/server/collectors/register.ts b/x-pack/plugins/fleet/server/collectors/register.ts index cb39e6a5be579..e7d95a7e83773 100644 --- a/x-pack/plugins/fleet/server/collectors/register.ts +++ b/x-pack/plugins/fleet/server/collectors/register.ts @@ -10,7 +10,7 @@ import { getIsFleetEnabled } from './config_collectors'; import { AgentUsage, getAgentUsage } from './agent_collectors'; import { getInternalSavedObjectsClient } from './helpers'; import { PackageUsage, getPackageUsage } from './package_collectors'; -import { IngestManagerConfigType } from '..'; +import { FleetConfigType } from '..'; interface Usage { fleet_enabled: boolean; @@ -20,7 +20,7 @@ interface Usage { export function registerIngestManagerUsageCollector( core: CoreSetup, - config: IngestManagerConfigType, + config: FleetConfigType, usageCollection: UsageCollectionSetup | undefined ): void { // usageCollection is an optional dependency, so make sure to return if it is not registered. diff --git a/x-pack/plugins/fleet/server/index.ts b/x-pack/plugins/fleet/server/index.ts index 3d34e37592ddd..3d30acd3f8e01 100644 --- a/x-pack/plugins/fleet/server/index.ts +++ b/x-pack/plugins/fleet/server/index.ts @@ -5,7 +5,7 @@ */ import { schema, TypeOf } from '@kbn/config-schema'; import { PluginConfigDescriptor, PluginInitializerContext } from 'src/core/server'; -import { IngestManagerPlugin } from './plugin'; +import { FleetPlugin } from './plugin'; import { AGENT_POLICY_ROLLOUT_RATE_LIMIT_INTERVAL_MS, AGENT_POLICY_ROLLOUT_RATE_LIMIT_REQUEST_PER_INTERVAL, @@ -14,12 +14,7 @@ import { export { default as apm } from 'elastic-apm-node'; export { AgentService, ESIndexPatternService, getRegistryUrl, PackageService } from './services'; -export { - IngestManagerSetupContract, - IngestManagerSetupDeps, - IngestManagerStartContract, - ExternalCallback, -} from './plugin'; +export { FleetSetupContract, FleetSetupDeps, FleetStartContract, ExternalCallback } from './plugin'; export const config: PluginConfigDescriptor = { exposeToBrowser: { @@ -65,10 +60,10 @@ export const config: PluginConfigDescriptor = { }), }; -export type IngestManagerConfigType = TypeOf; +export type FleetConfigType = TypeOf; export { PackagePolicyServiceInterface } from './services/package_policy'; export const plugin = (initializerContext: PluginInitializerContext) => { - return new IngestManagerPlugin(initializerContext); + return new FleetPlugin(initializerContext); }; diff --git a/x-pack/plugins/fleet/server/mocks.ts b/x-pack/plugins/fleet/server/mocks.ts index 18b58b5673651..c8aef287e4432 100644 --- a/x-pack/plugins/fleet/server/mocks.ts +++ b/x-pack/plugins/fleet/server/mocks.ts @@ -5,12 +5,12 @@ */ import { loggingSystemMock, savedObjectsServiceMock } from 'src/core/server/mocks'; -import { IngestManagerAppContext } from './plugin'; +import { FleetAppContext } from './plugin'; import { encryptedSavedObjectsMock } from '../../encrypted_saved_objects/server/mocks'; import { securityMock } from '../../security/server/mocks'; import { PackagePolicyServiceInterface } from './services/package_policy'; -export const createAppContextStartContractMock = (): IngestManagerAppContext => { +export const createAppContextStartContractMock = (): FleetAppContext => { return { encryptedSavedObjectsStart: encryptedSavedObjectsMock.createStart(), savedObjects: savedObjectsServiceMock.createStartContract(), diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index bf5b2aac50643..47692d478b760 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -51,7 +51,7 @@ import { registerSettingsRoutes, registerAppRoutes, } from './routes'; -import { EsAssetReference, IngestManagerConfigType, NewPackagePolicy } from '../common'; +import { EsAssetReference, FleetConfigType, NewPackagePolicy } from '../common'; import { appContextService, licenseService, @@ -72,7 +72,7 @@ import { agentCheckinState } from './services/agents/checkin/state'; import { registerIngestManagerUsageCollector } from './collectors/register'; import { getInstallation } from './services/epm/packages'; -export interface IngestManagerSetupDeps { +export interface FleetSetupDeps { licensing: LicensingPluginSetup; security?: SecurityPluginSetup; features?: FeaturesPluginSetup; @@ -81,13 +81,13 @@ export interface IngestManagerSetupDeps { usageCollection?: UsageCollectionSetup; } -export type IngestManagerStartDeps = object; +export type FleetStartDeps = object; -export interface IngestManagerAppContext { +export interface FleetAppContext { encryptedSavedObjectsStart: EncryptedSavedObjectsPluginStart; encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup; security?: SecurityPluginSetup; - config$?: Observable; + config$?: Observable; savedObjects: SavedObjectsServiceStart; isProductionMode: PluginInitializerContext['env']['mode']['prod']; kibanaVersion: PluginInitializerContext['env']['packageInfo']['version']; @@ -97,7 +97,7 @@ export interface IngestManagerAppContext { httpSetup?: HttpServiceSetup; } -export type IngestManagerSetupContract = void; +export type FleetSetupContract = void; const allSavedObjectTypes = [ OUTPUT_SAVED_OBJECT_TYPE, @@ -110,7 +110,7 @@ const allSavedObjectTypes = [ ]; /** - * Callbacks supported by the Ingest plugin + * Callbacks supported by the Fleet plugin */ export type ExternalCallback = [ 'packagePolicyCreate', @@ -124,52 +124,46 @@ export type ExternalCallback = [ export type ExternalCallbacksStorage = Map>; /** - * Describes public IngestManager plugin contract returned at the `startup` stage. + * Describes public Fleet plugin contract returned at the `startup` stage. */ -export interface IngestManagerStartContract { +export interface FleetStartContract { esIndexPatternService: ESIndexPatternService; packageService: PackageService; agentService: AgentService; /** - * Services for Ingest's package policies + * Services for Fleet's package policies */ packagePolicyService: typeof packagePolicyService; /** - * Register callbacks for inclusion in ingest API processing + * Register callbacks for inclusion in fleet API processing * @param args */ registerExternalCallback: (...args: ExternalCallback) => void; } -export class IngestManagerPlugin - implements - Plugin< - IngestManagerSetupContract, - IngestManagerStartContract, - IngestManagerSetupDeps, - IngestManagerStartDeps - > { +export class FleetPlugin + implements Plugin { private licensing$!: Observable; - private config$: Observable; + private config$: Observable; private security: SecurityPluginSetup | undefined; private cloud: CloudSetup | undefined; private logger: Logger | undefined; - private isProductionMode: IngestManagerAppContext['isProductionMode']; - private kibanaVersion: IngestManagerAppContext['kibanaVersion']; - private kibanaBranch: IngestManagerAppContext['kibanaBranch']; + private isProductionMode: FleetAppContext['isProductionMode']; + private kibanaVersion: FleetAppContext['kibanaVersion']; + private kibanaBranch: FleetAppContext['kibanaBranch']; private httpSetup: HttpServiceSetup | undefined; private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; constructor(private readonly initializerContext: PluginInitializerContext) { - this.config$ = this.initializerContext.config.create(); + this.config$ = this.initializerContext.config.create(); this.isProductionMode = this.initializerContext.env.mode.prod; this.kibanaVersion = this.initializerContext.env.packageInfo.version; this.kibanaBranch = this.initializerContext.env.packageInfo.branch; this.logger = this.initializerContext.logger.get(); } - public async setup(core: CoreSetup, deps: IngestManagerSetupDeps) { + public async setup(core: CoreSetup, deps: FleetSetupDeps) { this.httpSetup = core.http; this.licensing$ = deps.licensing.license$; if (deps.security) { @@ -186,15 +180,15 @@ export class IngestManagerPlugin if (deps.features) { deps.features.registerKibanaFeature({ id: PLUGIN_ID, - name: 'Ingest Manager', + name: 'Fleet', category: DEFAULT_APP_CATEGORIES.management, app: [PLUGIN_ID, 'kibana'], - catalogue: ['ingestManager'], + catalogue: ['fleet'], privileges: { all: { api: [`${PLUGIN_ID}-read`, `${PLUGIN_ID}-all`], app: [PLUGIN_ID, 'kibana'], - catalogue: ['ingestManager'], + catalogue: ['fleet'], savedObject: { all: allSavedObjectTypes, read: [], @@ -204,7 +198,7 @@ export class IngestManagerPlugin read: { api: [`${PLUGIN_ID}-read`], app: [PLUGIN_ID, 'kibana'], - catalogue: ['ingestManager'], // TODO: check if this is actually available to read user + catalogue: ['fleet'], // TODO: check if this is actually available to read user savedObject: { all: [], read: allSavedObjectTypes, @@ -264,7 +258,7 @@ export class IngestManagerPlugin plugins: { encryptedSavedObjects: EncryptedSavedObjectsPluginStart; } - ): Promise { + ): Promise { await appContextService.start({ encryptedSavedObjectsStart: plugins.encryptedSavedObjects, encryptedSavedObjectsSetup: this.encryptedSavedObjectsSetup, diff --git a/x-pack/plugins/fleet/server/routes/agent/index.ts b/x-pack/plugins/fleet/server/routes/agent/index.ts index 2f97a6bcde42c..39b80c6d096de 100644 --- a/x-pack/plugins/fleet/server/routes/agent/index.ts +++ b/x-pack/plugins/fleet/server/routes/agent/index.ts @@ -55,7 +55,7 @@ import * as AgentService from '../../services/agents'; import { postNewAgentActionHandlerBuilder } from './actions_handlers'; import { appContextService } from '../../services'; import { postAgentUnenrollHandler, postBulkAgentsUnenrollHandler } from './unenroll_handler'; -import { IngestManagerConfigType } from '../..'; +import { FleetConfigType } from '../..'; import { postAgentUpgradeHandler, postBulkAgentsUpgradeHandler } from './upgrade_handler'; const ajv = new Ajv({ @@ -81,7 +81,7 @@ function makeValidator(jsonSchema: any) { }; } -export const registerRoutes = (router: IRouter, config: IngestManagerConfigType) => { +export const registerRoutes = (router: IRouter, config: FleetConfigType) => { // Get one router.get( { diff --git a/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts b/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts index cc358c32528c9..ff304d82cb50f 100644 --- a/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts +++ b/x-pack/plugins/fleet/server/routes/limited_concurrency.test.ts @@ -10,12 +10,12 @@ import { isLimitedRoute, registerLimitedConcurrencyRoutes, } from './limited_concurrency'; -import { IngestManagerConfigType } from '../index'; +import { FleetConfigType } from '../index'; describe('registerLimitedConcurrencyRoutes', () => { test(`doesn't call registerOnPreAuth if maxConcurrentConnections is 0`, async () => { const mockSetup = coreMock.createSetup(); - const mockConfig = { agents: { maxConcurrentConnections: 0 } } as IngestManagerConfigType; + const mockConfig = { agents: { maxConcurrentConnections: 0 } } as FleetConfigType; registerLimitedConcurrencyRoutes(mockSetup, mockConfig); expect(mockSetup.http.registerOnPreAuth).not.toHaveBeenCalled(); @@ -23,7 +23,7 @@ describe('registerLimitedConcurrencyRoutes', () => { test(`calls registerOnPreAuth once if maxConcurrentConnections is 1`, async () => { const mockSetup = coreMock.createSetup(); - const mockConfig = { agents: { maxConcurrentConnections: 1 } } as IngestManagerConfigType; + const mockConfig = { agents: { maxConcurrentConnections: 1 } } as FleetConfigType; registerLimitedConcurrencyRoutes(mockSetup, mockConfig); expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1); @@ -31,7 +31,7 @@ describe('registerLimitedConcurrencyRoutes', () => { test(`calls registerOnPreAuth once if maxConcurrentConnections is 1000`, async () => { const mockSetup = coreMock.createSetup(); - const mockConfig = { agents: { maxConcurrentConnections: 1000 } } as IngestManagerConfigType; + const mockConfig = { agents: { maxConcurrentConnections: 1000 } } as FleetConfigType; registerLimitedConcurrencyRoutes(mockSetup, mockConfig); expect(mockSetup.http.registerOnPreAuth).toHaveBeenCalledTimes(1); diff --git a/x-pack/plugins/fleet/server/routes/limited_concurrency.ts b/x-pack/plugins/fleet/server/routes/limited_concurrency.ts index 609428f5477f1..060d7d6b99050 100644 --- a/x-pack/plugins/fleet/server/routes/limited_concurrency.ts +++ b/x-pack/plugins/fleet/server/routes/limited_concurrency.ts @@ -11,7 +11,7 @@ import { OnPreAuthToolkit, } from 'kibana/server'; import { LIMITED_CONCURRENCY_ROUTE_TAG } from '../../common'; -import { IngestManagerConfigType } from '../index'; +import { FleetConfigType } from '../index'; export class MaxCounter { constructor(private readonly max: number = 1) {} @@ -74,7 +74,7 @@ export function createLimitedPreAuthHandler({ }; } -export function registerLimitedConcurrencyRoutes(core: CoreSetup, config: IngestManagerConfigType) { +export function registerLimitedConcurrencyRoutes(core: CoreSetup, config: FleetConfigType) { const max = config.agents.maxConcurrentConnections; if (!max) return; diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts index 56c2eab385291..4d6f375ddf160 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -9,7 +9,7 @@ import { httpServerMock } from 'src/core/server/mocks'; import { PostIngestSetupResponse } from '../../../common'; import { RegistryError } from '../../errors'; import { createAppContextStartContractMock } from '../../mocks'; -import { ingestManagerSetupHandler } from './handlers'; +import { FleetSetupHandler } from './handlers'; import { appContextService } from '../../services/app_context'; import { setupIngestManager } from '../../services/setup'; @@ -21,7 +21,7 @@ jest.mock('../../services/setup', () => { const mockSetupIngestManager = setupIngestManager as jest.MockedFunction; -describe('ingestManagerSetupHandler', () => { +describe('FleetSetupHandler', () => { let context: ReturnType; let response: ReturnType; let request: ReturnType; @@ -44,7 +44,7 @@ describe('ingestManagerSetupHandler', () => { it('POST /setup succeeds w/200 and body of resolved value', async () => { mockSetupIngestManager.mockImplementation(() => Promise.resolve({ isIntialized: true })); - await ingestManagerSetupHandler(context, request, response); + await FleetSetupHandler(context, request, response); const expectedBody: PostIngestSetupResponse = { isInitialized: true }; expect(response.customError).toHaveBeenCalledTimes(0); @@ -55,7 +55,7 @@ describe('ingestManagerSetupHandler', () => { mockSetupIngestManager.mockImplementation(() => Promise.reject(new Error('SO method mocked to throw')) ); - await ingestManagerSetupHandler(context, request, response); + await FleetSetupHandler(context, request, response); expect(response.customError).toHaveBeenCalledTimes(1); expect(response.customError).toHaveBeenCalledWith({ @@ -71,7 +71,7 @@ describe('ingestManagerSetupHandler', () => { Promise.reject(new RegistryError('Registry method mocked to throw')) ); - await ingestManagerSetupHandler(context, request, response); + await FleetSetupHandler(context, request, response); expect(response.customError).toHaveBeenCalledTimes(1); expect(response.customError).toHaveBeenCalledWith({ statusCode: 502, diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.ts index 0bd7b4e875062..b2ad9591bc2ee 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.ts @@ -72,7 +72,7 @@ export const createFleetSetupHandler: RequestHandler< } }; -export const ingestManagerSetupHandler: RequestHandler = async (context, request, response) => { +export const FleetSetupHandler: RequestHandler = async (context, request, response) => { const soClient = context.core.savedObjects.client; const callCluster = context.core.elasticsearch.legacy.client.callAsCurrentUser; diff --git a/x-pack/plugins/fleet/server/routes/setup/index.ts b/x-pack/plugins/fleet/server/routes/setup/index.ts index 6672a7e8933a8..35715600d37df 100644 --- a/x-pack/plugins/fleet/server/routes/setup/index.ts +++ b/x-pack/plugins/fleet/server/routes/setup/index.ts @@ -6,15 +6,11 @@ import { IRouter } from 'src/core/server'; import { PLUGIN_ID, AGENTS_SETUP_API_ROUTES, SETUP_API_ROUTE } from '../../constants'; -import { IngestManagerConfigType } from '../../../common'; -import { - getFleetStatusHandler, - createFleetSetupHandler, - ingestManagerSetupHandler, -} from './handlers'; +import { FleetConfigType } from '../../../common'; +import { getFleetStatusHandler, createFleetSetupHandler, FleetSetupHandler } from './handlers'; import { PostFleetSetupRequestSchema } from '../../types'; -export const registerIngestManagerSetupRoute = (router: IRouter) => { +export const registerFleetSetupRoute = (router: IRouter) => { router.post( { path: SETUP_API_ROUTE, @@ -23,7 +19,7 @@ export const registerIngestManagerSetupRoute = (router: IRouter) => { // and will see `Unable to initialize Ingest Manager` in the UI options: { tags: [`access:${PLUGIN_ID}-read`] }, }, - ingestManagerSetupHandler + FleetSetupHandler ); }; @@ -49,9 +45,9 @@ export const registerGetFleetStatusRoute = (router: IRouter) => { ); }; -export const registerRoutes = (router: IRouter, config: IngestManagerConfigType) => { +export const registerRoutes = (router: IRouter, config: FleetConfigType) => { // Ingest manager setup - registerIngestManagerSetupRoute(router); + registerFleetSetupRoute(router); if (!config.agents.enabled) { return; diff --git a/x-pack/plugins/fleet/server/services/app_context.ts b/x-pack/plugins/fleet/server/services/app_context.ts index 7f82670a4d02c..5c4e33d50b480 100644 --- a/x-pack/plugins/fleet/server/services/app_context.ts +++ b/x-pack/plugins/fleet/server/services/app_context.ts @@ -12,26 +12,26 @@ import { } from '../../../encrypted_saved_objects/server'; import packageJSON from '../../../../../package.json'; import { SecurityPluginSetup } from '../../../security/server'; -import { IngestManagerConfigType } from '../../common'; -import { ExternalCallback, ExternalCallbacksStorage, IngestManagerAppContext } from '../plugin'; +import { FleetConfigType } from '../../common'; +import { ExternalCallback, ExternalCallbacksStorage, FleetAppContext } from '../plugin'; import { CloudSetup } from '../../../cloud/server'; class AppContextService { private encryptedSavedObjects: EncryptedSavedObjectsClient | undefined; private encryptedSavedObjectsSetup: EncryptedSavedObjectsPluginSetup | undefined; private security: SecurityPluginSetup | undefined; - private config$?: Observable; - private configSubject$?: BehaviorSubject; + private config$?: Observable; + private configSubject$?: BehaviorSubject; private savedObjects: SavedObjectsServiceStart | undefined; - private isProductionMode: IngestManagerAppContext['isProductionMode'] = false; - private kibanaVersion: IngestManagerAppContext['kibanaVersion'] = packageJSON.version; - private kibanaBranch: IngestManagerAppContext['kibanaBranch'] = packageJSON.branch; + private isProductionMode: FleetAppContext['isProductionMode'] = false; + private kibanaVersion: FleetAppContext['kibanaVersion'] = packageJSON.version; + private kibanaBranch: FleetAppContext['kibanaBranch'] = packageJSON.branch; private cloud?: CloudSetup; private logger: Logger | undefined; private httpSetup?: HttpServiceSetup; private externalCallbacks: ExternalCallbacksStorage = new Map(); - public async start(appContext: IngestManagerAppContext) { + public async start(appContext: FleetAppContext) { this.encryptedSavedObjects = appContext.encryptedSavedObjectsStart?.getClient(); this.encryptedSavedObjectsSetup = appContext.encryptedSavedObjectsSetup; this.security = appContext.security; diff --git a/x-pack/plugins/fleet/server/services/config.ts b/x-pack/plugins/fleet/server/services/config.ts index 23cd38cc123ce..f1f5611a20a0f 100644 --- a/x-pack/plugins/fleet/server/services/config.ts +++ b/x-pack/plugins/fleet/server/services/config.ts @@ -4,21 +4,21 @@ * you may not use this file except in compliance with the Elastic License. */ import { Observable, Subscription } from 'rxjs'; -import { IngestManagerConfigType } from '../'; +import { FleetConfigType } from '../'; /** * Kibana config observable service, *NOT* agent policy */ class ConfigService { - private observable: Observable | null = null; + private observable: Observable | null = null; private subscription: Subscription | null = null; - private config: IngestManagerConfigType | null = null; + private config: FleetConfigType | null = null; - private updateInformation(config: IngestManagerConfigType) { + private updateInformation(config: FleetConfigType) { this.config = config; } - public start(config$: Observable) { + public start(config$: Observable) { this.observable = config$; this.subscription = this.observable.subscribe(this.updateInformation.bind(this)); } diff --git a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts index a76d5dc99cbaf..8ce307c103f4c 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts +++ b/x-pack/plugins/index_management/__jest__/client_integration/home/data_streams_tab.test.ts @@ -67,9 +67,9 @@ describe('Data Streams tab', () => { expect(exists('templateList')).toBe(true); }); - test('when Ingest Manager is enabled, links to Ingest Manager', async () => { + test('when Fleet is enabled, links to Fleet', async () => { testBed = await setup({ - plugins: { ingestManager: { hi: 'ok' } }, + plugins: { fleet: { hi: 'ok' } }, }); await act(async () => { @@ -80,7 +80,7 @@ describe('Data Streams tab', () => { component.update(); // Assert against the text because the href won't be available, due to dependency upon our core mock. - expect(findEmptyPromptIndexTemplateLink().text()).toBe('Ingest Manager'); + expect(findEmptyPromptIndexTemplateLink().text()).toBe('Fleet'); }); }); diff --git a/x-pack/plugins/index_management/kibana.json b/x-pack/plugins/index_management/kibana.json index 4e4ad9b8e1d31..5dcff0ba942e1 100644 --- a/x-pack/plugins/index_management/kibana.json +++ b/x-pack/plugins/index_management/kibana.json @@ -3,18 +3,8 @@ "version": "kibana", "server": true, "ui": true, - "requiredPlugins": [ - "home", - "licensing", - "management", - "features", - "share" - ], - "optionalPlugins": [ - "security", - "usageCollection", - "ingestManager" - ], + "requiredPlugins": ["home", "licensing", "management", "features", "share"], + "optionalPlugins": ["security", "usageCollection", "fleet"], "configPath": ["xpack", "index_management"], "requiredBundles": [ "kibanaReact", diff --git a/x-pack/plugins/index_management/public/application/app_context.tsx b/x-pack/plugins/index_management/public/application/app_context.tsx index 5094aa2763a01..c9337767365fa 100644 --- a/x-pack/plugins/index_management/public/application/app_context.tsx +++ b/x-pack/plugins/index_management/public/application/app_context.tsx @@ -10,7 +10,7 @@ import { ManagementAppMountParams } from 'src/plugins/management/public'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; import { CoreSetup, CoreStart } from '../../../../../src/core/public'; -import { IngestManagerSetup } from '../../../fleet/public'; +import { FleetSetup } from '../../../fleet/public'; import { IndexMgmtMetricsType } from '../types'; import { UiMetricService, NotificationService, HttpService } from './services'; import { ExtensionsService } from '../services'; @@ -25,7 +25,7 @@ export interface AppDependencies { }; plugins: { usageCollection: UsageCollectionSetup; - ingestManager?: IngestManagerSetup; + fleet?: FleetSetup; }; services: { uiMetricService: UiMetricService; diff --git a/x-pack/plugins/index_management/public/application/mount_management_section.ts b/x-pack/plugins/index_management/public/application/mount_management_section.ts index c15af4f19827b..13e25f6d29a14 100644 --- a/x-pack/plugins/index_management/public/application/mount_management_section.ts +++ b/x-pack/plugins/index_management/public/application/mount_management_section.ts @@ -9,7 +9,7 @@ import { CoreSetup } from 'src/core/public'; import { ManagementAppMountParams } from 'src/plugins/management/public/'; import { UsageCollectionSetup } from 'src/plugins/usage_collection/public'; -import { IngestManagerSetup } from '../../../fleet/public'; +import { FleetSetup } from '../../../fleet/public'; import { PLUGIN } from '../../common/constants'; import { ExtensionsService } from '../services'; import { IndexMgmtMetricsType, StartDependencies } from '../types'; @@ -32,7 +32,7 @@ export async function mountManagementSection( usageCollection: UsageCollectionSetup, services: InternalServices, params: ManagementAppMountParams, - ingestManager?: IngestManagerSetup + fleet?: FleetSetup ) { const { element, setBreadcrumbs, history } = params; const [core, startDependencies] = await coreSetup.getStartServices(); @@ -57,7 +57,7 @@ export async function mountManagementSection( }, plugins: { usageCollection, - ingestManager, + fleet, }, services, history, diff --git a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx index 0df5697a4281a..bc7df7a70196e 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/data_stream_list/data_stream_list.tsx @@ -49,7 +49,7 @@ export const DataStreamList: React.FunctionComponent {' ' /* We need this space to separate these two sentences. */} - {ingestManager ? ( + {fleet ? ( {i18n.translate( 'xpack.idxMgmt.dataStreamList.emptyPrompt.noDataStreamsCtaIngestManagerLink', { - defaultMessage: 'Ingest Manager', + defaultMessage: 'Fleet', } )} diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 855486528b797..58103688e6103 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -40,7 +40,7 @@ export class IndexMgmtUIPlugin { plugins: SetupDependencies ): IndexManagementPluginSetup { const { http, notifications } = coreSetup; - const { ingestManager, usageCollection, management } = plugins; + const { fleet, usageCollection, management } = plugins; httpService.setup(http); notificationService.setup(notifications); @@ -58,7 +58,7 @@ export class IndexMgmtUIPlugin { uiMetricService: this.uiMetricService, extensionsService: this.extensionsService, }; - return mountManagementSection(coreSetup, usageCollection, services, params, ingestManager); + return mountManagementSection(coreSetup, usageCollection, services, params, fleet); }, }); diff --git a/x-pack/plugins/index_management/public/types.ts b/x-pack/plugins/index_management/public/types.ts index 34d060d935415..ee763ac83697c 100644 --- a/x-pack/plugins/index_management/public/types.ts +++ b/x-pack/plugins/index_management/public/types.ts @@ -5,7 +5,7 @@ */ import { ExtensionsSetup } from './services'; -import { IngestManagerSetup } from '../../fleet/public'; +import { FleetSetup } from '../../fleet/public'; import { UsageCollectionSetup } from '../../../../src/plugins/usage_collection/public'; import { ManagementSetup } from '../../../../src/plugins/management/public'; import { SharePluginStart } from '../../../../src/plugins/share/public'; @@ -17,7 +17,7 @@ export interface IndexManagementPluginSetup { } export interface SetupDependencies { - ingestManager?: IngestManagerSetup; + fleet?: FleetSetup; usageCollection: UsageCollectionSetup; management: ManagementSetup; } diff --git a/x-pack/plugins/observability/public/components/app/ingest_manager_panel/index.tsx b/x-pack/plugins/observability/public/components/app/fleet_panel/index.tsx similarity index 74% rename from x-pack/plugins/observability/public/components/app/ingest_manager_panel/index.tsx rename to x-pack/plugins/observability/public/components/app/fleet_panel/index.tsx index 5d0c8a40ed3de..dfe683cf82c86 100644 --- a/x-pack/plugins/observability/public/components/app/ingest_manager_panel/index.tsx +++ b/x-pack/plugins/observability/public/components/app/fleet_panel/index.tsx @@ -13,14 +13,14 @@ import { EuiText } from '@elastic/eui'; import { EuiLink } from '@elastic/eui'; import { usePluginContext } from '../../../hooks/use_plugin_context'; -export function IngestManagerPanel() { +export function FleetPanel() { const { core } = usePluginContext(); return ( @@ -28,24 +28,24 @@ export function IngestManagerPanel() {

- {i18n.translate('xpack.observability.ingestManager.title', { - defaultMessage: 'Have you seen our new Ingest Manager?', + {i18n.translate('xpack.observability.fleet.title', { + defaultMessage: 'Have you seen our new Fleet?', })}

- {i18n.translate('xpack.observability.ingestManager.text', { + {i18n.translate('xpack.observability.fleet.text', { defaultMessage: 'The Elastic Agent provides a simple, unified way to add monitoring for logs, metrics, and other types of data to your hosts. You no longer need to install multiple Beats and other agents, making it easier and faster to deploy configurations across your infrastructure.', })} - - {i18n.translate('xpack.observability.ingestManager.button', { - defaultMessage: 'Try Ingest Manager Beta', + + {i18n.translate('xpack.observability.fleet.button', { + defaultMessage: 'Try Fleet Beta', })} diff --git a/x-pack/plugins/observability/public/pages/landing/index.tsx b/x-pack/plugins/observability/public/pages/landing/index.tsx index 24620f641c204..7377a1ca0ea52 100644 --- a/x-pack/plugins/observability/public/pages/landing/index.tsx +++ b/x-pack/plugins/observability/public/pages/landing/index.tsx @@ -18,7 +18,7 @@ import { import { i18n } from '@kbn/i18n'; import React, { useContext } from 'react'; import styled, { ThemeContext } from 'styled-components'; -import { IngestManagerPanel } from '../../components/app/ingest_manager_panel'; +import { FleetPanel } from '../../components/app/fleet_panel'; import { WithHeaderLayout } from '../../components/app/layout/with_header'; import { usePluginContext } from '../../hooks/use_plugin_context'; import { useTrackPageview } from '../../hooks/use_track_metric'; @@ -122,7 +122,7 @@ export function LandingPage() { - + diff --git a/x-pack/plugins/security_solution/kibana.json b/x-pack/plugins/security_solution/kibana.json index 145e34c4fc99c..e7dbe6e46686e 100644 --- a/x-pack/plugins/security_solution/kibana.json +++ b/x-pack/plugins/security_solution/kibana.json @@ -20,7 +20,7 @@ ], "optionalPlugins": [ "encryptedSavedObjects", - "ingestManager", + "fleet", "ml", "newsfeed", "security", @@ -33,5 +33,5 @@ ], "server": true, "ui": true, - "requiredBundles": ["esUiShared", "ingestManager", "kibanaUtils", "kibanaReact", "lists", "ml"] + "requiredBundles": ["esUiShared", "fleet", "kibanaUtils", "kibanaReact", "lists", "ml"] } diff --git a/x-pack/plugins/security_solution/public/app/home/setup.tsx b/x-pack/plugins/security_solution/public/app/home/setup.tsx index c3567e34a0411..1ec62d63bd7f3 100644 --- a/x-pack/plugins/security_solution/public/app/home/setup.tsx +++ b/x-pack/plugins/security_solution/public/app/home/setup.tsx @@ -6,12 +6,12 @@ import * as React from 'react'; import { i18n } from '@kbn/i18n'; import { NotificationsStart } from 'kibana/public'; -import { IngestManagerStart } from '../../../../fleet/public'; +import { FleetStart } from '../../../../fleet/public'; export const Setup: React.FunctionComponent<{ - ingestManager: IngestManagerStart; + fleet: FleetStart; notifications: NotificationsStart; -}> = ({ ingestManager, notifications }) => { +}> = ({ fleet, notifications }) => { React.useEffect(() => { const defaultText = i18n.translate('xpack.securitySolution.endpoint.ingestToastMessage', { defaultMessage: 'Ingest Manager failed during its setup.', @@ -32,8 +32,8 @@ export const Setup: React.FunctionComponent<{ }); }; - ingestManager.isInitialized().catch((error: Error) => displayToastWithModal(error.message)); - }, [ingestManager, notifications.toasts]); + fleet.isInitialized().catch((error: Error) => displayToastWithModal(error.message)); + }, [fleet, notifications.toasts]); return null; }; diff --git a/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap index 6838b673b90d8..da8f0d8dcb6b7 100644 --- a/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/endpoint/__snapshots__/link_to_app.test.tsx.snap @@ -2,16 +2,16 @@ exports[`LinkToApp component should render with href 1`] = ` @@ -23,7 +23,7 @@ exports[`LinkToApp component should render with href 1`] = ` exports[`LinkToApp component should render with minimum input 1`] = ` { }); it('should render with minimum input', () => { - expect(render({'link'})).toMatchSnapshot(); + expect(render({'link'})).toMatchSnapshot(); }); it('should render with href', () => { expect( render( - + {'link'} ) @@ -46,7 +46,7 @@ describe('LinkToApp component', () => { // Take `_event` (even though it is not used) so that `jest.fn` will have a type that expects to be called with an event const spyOnClickHandler: LinkToAppOnClickMock = jest.fn().mockImplementation((_event) => {}); const renderResult = render( - + {'link'} ); @@ -57,19 +57,19 @@ describe('LinkToApp component', () => { expect(spyOnClickHandler).toHaveBeenCalled(); expect(clickEventArg.preventDefault).toBeInstanceOf(Function); expect(clickEventArg.isDefaultPrevented()).toBe(true); - expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('ingestManager', { + expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('fleet', { path: undefined, state: undefined, }); }); it('should navigate to App with specific path', () => { const renderResult = render( - + {'link'} ); renderResult.find('EuiLink').simulate('click', { button: 0 }); - expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('ingestManager', { + expect(fakeCoreStart.application.navigateToApp).toHaveBeenCalledWith('fleet', { path: '/some/path', state: undefined, }); @@ -77,9 +77,9 @@ describe('LinkToApp component', () => { it('should passes through EuiLinkProps', () => { const renderResult = render( { className: 'my-class', color: 'primary', 'data-test-subj': 'my-test-subject', - href: '/app/ingest', + href: '/app/fleet', onClick: expect.any(Function), }); }); @@ -105,7 +105,7 @@ describe('LinkToApp component', () => { try { } catch (e) { const renderResult = render( - + {'link'} ); @@ -119,7 +119,7 @@ describe('LinkToApp component', () => { ev.preventDefault(); }); const renderResult = render( - + {'link'} ); @@ -127,13 +127,13 @@ describe('LinkToApp component', () => { expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled(); }); it('should not to navigate if it was not left click', () => { - const renderResult = render({'link'}); + const renderResult = render({'link'}); renderResult.find('EuiLink').simulate('click', { button: 1 }); expect(fakeCoreStart.application.navigateToApp).not.toHaveBeenCalled(); }); it('should not to navigate if it includes an anchor target', () => { const renderResult = render( - + {'link'} ); @@ -142,7 +142,7 @@ describe('LinkToApp component', () => { }); it('should not to navigate if if meta|alt|ctrl|shift keys are pressed', () => { const renderResult = render( - + {'link'} ); diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/ingest_enabled.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/ingest_enabled.ts index e48f48e501903..97e73380d9e2e 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/ingest_enabled.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/ingest_enabled.ts @@ -7,7 +7,7 @@ import { ApplicationStart } from 'src/core/public'; import { useKibana } from '../../../../../../../src/plugins/kibana_react/public'; /** - * Returns an object which ingest permissions are allowed + * Returns an object which fleet permissions are allowed */ export const useIngestEnabledCheck = (): { allEnabled: boolean; @@ -17,12 +17,12 @@ export const useIngestEnabledCheck = (): { } => { const { services } = useKibana<{ application: ApplicationStart }>(); - // Check if Ingest Manager is present in the configuration - const show = Boolean(services.application.capabilities.ingestManager?.show); - const write = Boolean(services.application.capabilities.ingestManager?.write); - const read = Boolean(services.application.capabilities.ingestManager?.read); + // Check if Fleet is present in the configuration + const show = Boolean(services.application.capabilities.fleet?.show); + const write = Boolean(services.application.capabilities.fleet?.write); + const read = Boolean(services.application.capabilities.fleet?.read); - // Check if all Ingest Manager permissions are enabled + // Check if all Fleet permissions are enabled const allEnabled = show && read && write ? true : false; return { diff --git a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts index 943b30925a54c..30371f76f8eea 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/endpoint/use_navigate_to_app_event_handler.ts @@ -25,7 +25,7 @@ type EventHandlerCallback = MouseEventHandlerSee policies */ export const useNavigateToAppEventHandler = ( diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx index 1b9e95f7d0737..e55210e1dc09a 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_context_render.tsx @@ -29,7 +29,7 @@ export interface AppContextTestRender { store: Store; history: ReturnType; coreStart: ReturnType; - depsStart: Pick; + depsStart: Pick; middlewareSpy: MiddlewareActionSpyHelper; /** * A wrapper around `AppRootContext` component. Uses the mocked modules as input to the diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx index fd6a483e538b8..149d948a53fc4 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/app_root_provider.tsx @@ -24,7 +24,7 @@ export const AppRootProvider = memo<{ store: Store; history: History; coreStart: CoreStart; - depsStart: Pick; + depsStart: Pick; children: ReactNode | ReactNode[]; }>( ({ diff --git a/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts b/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts index 3388fb5355845..864b5e9df8043 100644 --- a/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts +++ b/x-pack/plugins/security_solution/public/common/mock/endpoint/dependencies_start_mock.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { IngestManagerStart } from '../../../../../fleet/public'; +import { FleetStart } from '../../../../../fleet/public'; import { dataPluginMock, Start as DataPublicStartMock, @@ -33,7 +33,7 @@ type DataMock = Omit & { */ export interface DepsStartMock { data: DataMock; - ingestManager: IngestManagerStart; + fleet: FleetStart; } /** @@ -56,7 +56,7 @@ export const depsStartMock: () => DepsStartMock = () => { return { data: dataMock, - ingestManager: { + fleet: { isInitialized: () => Promise.resolve(true), registerExtension: jest.fn(), }, diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index 189aa05b91f4b..97cf14751cb26 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -76,7 +76,7 @@ export type ImmutableMiddleware = ( */ export type ImmutableMiddlewareFactory = ( coreStart: CoreStart, - depsStart: Pick + depsStart: Pick ) => ImmutableMiddleware; /** @@ -87,7 +87,7 @@ export type ImmutableMiddlewareFactory = ( */ export type SecuritySubPluginMiddlewareFactory = ( coreStart: CoreStart, - depsStart: Pick + depsStart: Pick ) => Array>>>; /** diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts index a9c84678c88a9..012bbed25d747 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/hooks.ts @@ -24,22 +24,22 @@ export function useEndpointSelector(selector: (state: EndpointState) } /** - * Returns an object that contains Ingest app and URL information + * Returns an object that contains Fleet app and URL information */ export const useIngestUrl = (subpath: string): { url: string; appId: string; appPath: string } => { const { services } = useKibana(); return useMemo(() => { const appPath = `#/${subpath}`; return { - url: `${services.application.getUrlForApp('ingestManager')}${appPath}`, - appId: 'ingestManager', + url: `${services.application.getUrlForApp('fleet')}${appPath}`, + appId: 'fleet', appPath, }; }, [services.application, subpath]); }; /** - * Returns an object that contains Ingest app and URL information + * Returns an object that contains Fleet app and URL information */ export const useAgentDetailsIngestUrl = ( agentId: string @@ -48,8 +48,8 @@ export const useAgentDetailsIngestUrl = ( return useMemo(() => { const appPath = `#/fleet/agents/${agentId}/activity`; return { - url: `${services.application.getUrlForApp('ingestManager')}${appPath}`, - appId: 'ingestManager', + url: `${services.application.getUrlForApp('fleet')}${appPath}`, + appId: 'fleet', appPath, }; }, [services.application, agentId]); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx index d785e3b3a131a..4b955f2fe2959 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.test.tsx @@ -612,19 +612,19 @@ describe('when on the list page', () => { }); it('should include the link to reassignment in Ingest', async () => { - coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); + coreStart.application.getUrlForApp.mockReturnValue('/app/fleet'); const renderResult = await renderAndWaitForData(); const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest'); expect(linkToReassign).not.toBeNull(); expect(linkToReassign.textContent).toEqual('Reassign Policy'); expect(linkToReassign.getAttribute('href')).toEqual( - `/app/ingestManager#/fleet/agents/${elasticAgentId}/activity?openReassignFlyout=true` + `/app/fleet#/fleet/agents/${elasticAgentId}/activity?openReassignFlyout=true` ); }); describe('when link to reassignment in Ingest is clicked', () => { beforeEach(async () => { - coreStart.application.getUrlForApp.mockReturnValue('/app/ingestManager'); + coreStart.application.getUrlForApp.mockReturnValue('/app/fleet'); const renderResult = await renderAndWaitForData(); const linkToReassign = await renderResult.findByTestId('endpointDetailsLinkToIngest'); reactTestingLibrary.act(() => { @@ -820,8 +820,8 @@ describe('when on the list page', () => { switch (appName) { case 'securitySolution': return '/app/security'; - case 'ingestManager': - return '/app/ingestManager'; + case 'fleet': + return '/app/fleet'; } return appName; }); @@ -852,9 +852,7 @@ describe('when on the list page', () => { }); const agentPolicyLink = await renderResult.findByTestId('agentPolicyLink'); - expect(agentPolicyLink.getAttribute('href')).toEqual( - `/app/ingestManager#/policies/${agentPolicyId}` - ); + expect(agentPolicyLink.getAttribute('href')).toEqual(`/app/fleet#/policies/${agentPolicyId}`); }); it('navigates to the Ingest Agent Details page', async () => { const renderResult = await renderAndWaitForData(); @@ -864,9 +862,7 @@ describe('when on the list page', () => { }); const agentDetailsLink = await renderResult.findByTestId('agentDetailsLink'); - expect(agentDetailsLink.getAttribute('href')).toEqual( - `/app/ingestManager#/fleet/agents/${agentId}` - ); + expect(agentDetailsLink.getAttribute('href')).toEqual(`/app/fleet#/fleet/agents/${agentId}`); }); }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index a37f256e359b9..2b40a7507da88 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -177,7 +177,7 @@ export const EndpointList = () => { ); const handleCreatePolicyClick = useNavigateToAppEventHandler( - 'ingestManager', + 'fleet', { path: `#/integrations${ endpointPackageVersion ? `/endpoint-${endpointPackageVersion}/add-integration` : '' @@ -219,7 +219,7 @@ export const EndpointList = () => { const handleDeployEndpointsClick = useNavigateToAppEventHandler< AgentPolicyDetailsDeployAgentAction - >('ingestManager', { + >('fleet', { path: `#/policies/${selectedPolicyId}?openEnrollmentFlyout=true`, state: { onDoneNavigateTo: [ @@ -443,14 +443,14 @@ export const EndpointList = () => { icon="logoObservability" key="agentConfigLink" data-test-subj="agentPolicyLink" - navigateAppId="ingestManager" + navigateAppId="fleet" navigateOptions={{ path: `#${pagePathGetters.policy_details({ policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id], })}`, }} href={`${services?.application?.getUrlForApp( - 'ingestManager' + 'fleet' )}#${pagePathGetters.policy_details({ policyId: agentPolicies[item.metadata.Endpoint.policy.applied.id], })}`} @@ -467,14 +467,14 @@ export const EndpointList = () => { icon="logoObservability" key="agentDetailsLink" data-test-subj="agentDetailsLink" - navigateAppId="ingestManager" + navigateAppId="fleet" navigateOptions={{ path: `#${pagePathGetters.fleet_agent_details({ agentId: item.metadata.elastic.agent.id, })}`, }} href={`${services?.application?.getUrlForApp( - 'ingestManager' + 'fleet' )}#${pagePathGetters.fleet_agent_details({ agentId: item.metadata.elastic.agent.id, })}`} @@ -591,12 +591,12 @@ export const EndpointList = () => { values={{ agentsLink: ( (() => { return [ - 'ingestManager', + 'fleet', { path: `#${pagePathGetters.edit_integration({ policyId: agentPolicyId, @@ -99,11 +99,11 @@ const EditFlowMessage = memo<{ path: getTrustedAppsListPath(), state: { backButtonUrl: navigateBackToIngest[1]?.path - ? `${getUrlForApp('ingestManager')}${navigateBackToIngest[1].path}` + ? `${getUrlForApp('fleet')}${navigateBackToIngest[1].path}` : undefined, onBackButtonNavigateTo: navigateBackToIngest, backButtonLabel: i18n.translate( - 'xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel', + 'xpack.securitySolution.endpoint.fleet.editPackagePolicy.trustedAppsMessageReturnBackLabel', { defaultMessage: 'Back to Edit Integration' } ), }, @@ -120,7 +120,7 @@ const EditFlowMessage = memo<{ data-test-subj="endpointActions" > @@ -135,7 +135,7 @@ const EditFlowMessage = memo<{ data-test-subj="securityPolicy" > , @@ -145,7 +145,7 @@ const EditFlowMessage = memo<{ data-test-subj="trustedAppsAction" > , @@ -156,7 +156,7 @@ const EditFlowMessage = memo<{ diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx index 274032eea0c5d..a3d6cbea3ddc7 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_list.tsx @@ -147,7 +147,7 @@ export const PolicyList = React.memo(() => { } = usePolicyListSelector(selector); const handleCreatePolicyClick = useNavigateToAppEventHandler( - 'ingestManager', + 'fleet', { // We redirect to Ingest's Integaration page if we can't get the package version, and // to the Integration Endpoint Package Add Integration if we have package information. @@ -339,9 +339,9 @@ export const PolicyList = React.memo(() => { diff --git a/x-pack/plugins/security_solution/public/plugin.tsx b/x-pack/plugins/security_solution/public/plugin.tsx index 5cc0d79a3f9a3..f97bec65d269a 100644 --- a/x-pack/plugins/security_solution/public/plugin.tsx +++ b/x-pack/plugins/security_solution/public/plugin.tsx @@ -331,8 +331,8 @@ export class Plugin implements IPlugin + Pick > & { logger: Logger; manifestManager?: ManifestManager; @@ -74,7 +74,7 @@ export type EndpointAppContextServiceStartContract = Partial< security: SecurityPluginSetup; alerts: AlertsPluginStartContract; config: ConfigType; - registerIngestCallback?: IngestManagerStartContract['registerExternalCallback']; + registerIngestCallback?: FleetStartContract['registerExternalCallback']; savedObjectsStart: SavedObjectsServiceStart; }; diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks.ts index 588404fd516d0..7a1a0f06a2267 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks.ts @@ -11,7 +11,7 @@ import { alertsMock } from '../../../alerts/server/mocks'; import { xpackMocks } from '../../../../mocks'; import { AgentService, - IngestManagerStartContract, + FleetStartContract, ExternalCallback, PackageService, } from '../../../fleet/server'; @@ -74,8 +74,8 @@ export const createMockEndpointAppContextServiceStartContract = (): jest.Mocked< alerts: alertsMock.createStart(), config, registerIngestCallback: jest.fn< - ReturnType, - Parameters + ReturnType, + Parameters >(), }; }; @@ -109,9 +109,7 @@ export const createMockAgentService = (): jest.Mocked => { * @param indexPattern a string index pattern to return when called by a test * @returns the same value as `indexPattern` parameter */ -export const createMockIngestManagerStartContract = ( - indexPattern: string -): IngestManagerStartContract => { +export const createMockFleetStartContract = (indexPattern: string): FleetStartContract => { return { esIndexPatternService: { getESIndexPattern: jest.fn().mockResolvedValue(indexPattern), diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 46a4363936b3d..1f90c689a688f 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -55,7 +55,7 @@ describe('test endpoint route', () => { let routeHandler: RequestHandler; // eslint-disable-next-line @typescript-eslint/no-explicit-any let routeConfig: RouteConfig; - // tests assume that ingestManager is enabled, and thus agentService is available + // tests assume that fleet is enabled, and thus agentService is available let mockAgentService: Required< ReturnType >['agentService']; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata_v1.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata_v1.test.ts index 26f216f0474c2..2c7d1e9e48404 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata_v1.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata_v1.test.ts @@ -50,7 +50,7 @@ describe('test endpoint route v1', () => { let routeHandler: RequestHandler; // eslint-disable-next-line @typescript-eslint/no-explicit-any let routeConfig: RouteConfig; - // tests assume that ingestManager is enabled, and thus agentService is available + // tests assume that fleet is enabled, and thus agentService is available let mockAgentService: Required< ReturnType >['agentService']; diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index 036c94cf50050..8a33b1df4caa8 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -34,7 +34,7 @@ import { ListPluginSetup } from '../../lists/server'; import { EncryptedSavedObjectsPluginSetup as EncryptedSavedObjectsSetup } from '../../encrypted_saved_objects/server'; import { SpacesPluginSetup as SpacesSetup } from '../../spaces/server'; import { ILicense, LicensingPluginStart } from '../../licensing/server'; -import { IngestManagerStartContract, ExternalCallback } from '../../fleet/server'; +import { FleetStartContract, ExternalCallback } from '../../fleet/server'; import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server'; import { initServer } from './init_server'; import { compose } from './lib/compose/kibana'; @@ -93,7 +93,7 @@ export interface SetupPlugins { export interface StartPlugins { alerts: AlertPluginStartContract; data: DataPluginStart; - ingestManager?: IngestManagerStartContract; + fleet?: FleetStartContract; licensing: LicensingPluginStart; taskManager?: TaskManagerStartContract; telemetry?: TelemetryPluginStart; @@ -326,27 +326,27 @@ export class Plugin implements IPlugin void) | undefined; const exceptionListsStartEnabled = () => { - return this.lists && plugins.taskManager && plugins.ingestManager; + return this.lists && plugins.taskManager && plugins.fleet; }; if (exceptionListsStartEnabled()) { const exceptionListClient = this.lists!.getExceptionListClient(savedObjectsClient, 'kibana'); const artifactClient = new ArtifactClient(savedObjectsClient); - registerIngestCallback = plugins.ingestManager!.registerExternalCallback; + registerIngestCallback = plugins.fleet!.registerExternalCallback; manifestManager = new ManifestManager({ savedObjectsClient, artifactClient, exceptionListClient, - packagePolicyService: plugins.ingestManager!.packagePolicyService, + packagePolicyService: plugins.fleet!.packagePolicyService, logger: this.logger, cache: this.exceptionsCache, }); } this.endpointAppContextService.start({ - agentService: plugins.ingestManager?.agentService, - packageService: plugins.ingestManager?.packageService, + agentService: plugins.fleet?.agentService, + packageService: plugins.fleet?.packageService, appClientFactory: this.appClientFactory, security: this.setupPlugins!.security!, alerts: plugins.alerts, diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 7115f8c6eeb6f..beb6325e4fecd 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -15130,10 +15130,6 @@ "xpack.observability.home.sectionsubtitle": "ログ、メトリック、トレースを大規模に、1つのスタックにまとめて、環境内のあらゆる場所で生じるイベントの監視、分析、対応を行います。", "xpack.observability.home.sectionTitle": "エコシステム全体の一元的な可視性", "xpack.observability.home.title": "オブザーバビリティ", - "xpack.observability.ingestManager.beta": "ベータ", - "xpack.observability.ingestManager.button": "Ingest Managerベータを試す", - "xpack.observability.ingestManager.text": "Elasticエージェントでは、シンプルかつ統合された方法で、ログ、メトリック、他の種類のデータの監視をホストに追加することができます。複数のBeatsと他のエージェントをインストールする必要はありません。このため、インフラストラクチャ全体での構成のデプロイが簡単で高速になりました。", - "xpack.observability.ingestManager.title": "新しいIngest Managerをご覧になりましたか?", "xpack.observability.landing.breadcrumb": "はじめて使う", "xpack.observability.news.readFullStory": "詳細なストーリーを読む", "xpack.observability.news.title": "新機能", @@ -17435,12 +17431,6 @@ "xpack.securitySolution.endpoint.details.policyResponse.workflow": "ワークフロー", "xpack.securitySolution.endpoint.details.policyStatus": "ポリシー応答", "xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失敗} other {不明}}", - "xpack.securitySolution.endpoint.ingestManager.createPackagePolicy.endpointConfiguration": "推奨のデフォルト値で統合が保存されます。後からこれを変更するには、エージェントポリシー内でEndpoint Security統合を編集します。", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionSecurityPolicy": "セキュリティポリシーを編集", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionTrustedApps": "信頼できるアプリケーションを表示", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.menuButton": "アクション", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.message": "詳細構成オプションを表示するには、メニューからアクションを選択します。", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel": "統合の編集に戻る", "xpack.securitySolution.endpoint.ingestToastMessage": "Ingest Managerが設定中に失敗しました。", "xpack.securitySolution.endpoint.ingestToastTitle": "アプリを初期化できませんでした", "xpack.securitySolution.endpoint.list.actionmenu": "開く", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b945c443741b6..d069d43de7404 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -15148,10 +15148,6 @@ "xpack.observability.home.sectionsubtitle": "通过根据需要将日志、指标和跟踪都置于单个堆栈上,来监测、分析和响应环境中任何位置发生的事件。", "xpack.observability.home.sectionTitle": "整个生态系统的统一可见性", "xpack.observability.home.title": "可观测性", - "xpack.observability.ingestManager.beta": "公测版", - "xpack.observability.ingestManager.button": "试用采集管理器公测版", - "xpack.observability.ingestManager.text": "通过 Elastic 代理,可以简单统一的方式将日志、指标和其他类型数据的监测添加到主机。不再需要安装多个 Beats 和其他代理,这简化和加快了将配置部署到整个基础设施的过程。", - "xpack.observability.ingestManager.title": "是否见过我们的新型采集管理器?", "xpack.observability.landing.breadcrumb": "入门", "xpack.observability.news.readFullStory": "详细了解", "xpack.observability.news.title": "最近的新闻", @@ -17453,12 +17449,6 @@ "xpack.securitySolution.endpoint.details.policyResponse.workflow": "工作流", "xpack.securitySolution.endpoint.details.policyStatus": "策略响应", "xpack.securitySolution.endpoint.details.policyStatusValue": "{policyStatus, select, success {成功} warning {警告} failure {失败} other {未知}}", - "xpack.securitySolution.endpoint.ingestManager.createPackagePolicy.endpointConfiguration": "我们将使用建议的默认值保存您的集成。稍后,您可以通过在代理策略中编辑 Endpoint Security 集成对其进行更改。", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionSecurityPolicy": "编辑安全策略", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.actionTrustedApps": "查看受信任的应用程序", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.menuButton": "操作", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.message": "通过从菜单中选择操作可找到更多高级配置选项", - "xpack.securitySolution.endpoint.ingestManager.editPackagePolicy.trustedAppsMessageReturnBackLabel": "返回以编辑集成", "xpack.securitySolution.endpoint.ingestToastMessage": "采集管理器在其设置期间失败。", "xpack.securitySolution.endpoint.ingestToastTitle": "应用无法初始化", "xpack.securitySolution.endpoint.list.actionmenu": "打开", diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index bc1df21773a71..4b1c8c073b5ee 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -115,7 +115,7 @@ export default function ({ getService }: FtrProviderContext) { 'maps', 'uptime', 'siem', - 'ingestManager', + 'fleet', ].sort() ); }); diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index b6f77e9842296..843dd983adf85 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -38,7 +38,7 @@ export default function ({ getService }: FtrProviderContext) { apm: ['all', 'read'], ml: ['all', 'read'], siem: ['all', 'read'], - ingestManager: ['all', 'read'], + fleet: ['all', 'read'], stackAlerts: ['all', 'read'], actions: ['all', 'read'], }, diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index 679e96dd21514..5df4d597efaaa 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) { apm: ['all', 'read'], ml: ['all', 'read'], siem: ['all', 'read'], - ingestManager: ['all', 'read'], + fleet: ['all', 'read'], stackAlerts: ['all', 'read'], actions: ['all', 'read'], }, diff --git a/x-pack/test/fleet_api_integration/apis/agents/delete.ts b/x-pack/test/fleet_api_integration/apis/agents/delete.ts index 39f518cb93696..b12a4513faef9 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/delete.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/delete.ts @@ -15,7 +15,7 @@ export default function ({ getService }: FtrProviderContext) { fleet_user: { permissions: { feature: { - ingestManager: ['read'], + fleet: ['read'], }, spaces: ['*'], }, @@ -25,7 +25,7 @@ export default function ({ getService }: FtrProviderContext) { fleet_admin: { permissions: { feature: { - ingestManager: ['all'], + fleet: ['all'], }, spaces: ['*'], }, diff --git a/x-pack/test/fleet_api_integration/apis/agents/list.ts b/x-pack/test/fleet_api_integration/apis/agents/list.ts index cb7d97f49c9e1..e6a62274d34ab 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/list.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/list.ts @@ -26,7 +26,7 @@ export default function ({ getService }: FtrProviderContext) { fleet_user: { permissions: { feature: { - ingestManager: ['read'], + fleet: ['read'], }, spaces: ['*'], }, @@ -36,7 +36,7 @@ export default function ({ getService }: FtrProviderContext) { fleet_admin: { permissions: { feature: { - ingestManager: ['all'], + fleet: ['all'], }, spaces: ['*'], }, diff --git a/x-pack/test/security_solution_endpoint/page_objects/ingest_manager_create_package_policy_page.ts b/x-pack/test/security_solution_endpoint/page_objects/ingest_manager_create_package_policy_page.ts index 38ba50b08d507..747b62a9550c6 100644 --- a/x-pack/test/security_solution_endpoint/page_objects/ingest_manager_create_package_policy_page.ts +++ b/x-pack/test/security_solution_endpoint/page_objects/ingest_manager_create_package_policy_page.ts @@ -98,7 +98,7 @@ export function IngestManagerCreatePackagePolicy({ * Navigates to the Ingest Agent configuration Edit Package Policy page */ async navigateToAgentPolicyEditPackagePolicy(agentPolicyId: string, packagePolicyId: string) { - await pageObjects.common.navigateToApp('ingestManager', { + await pageObjects.common.navigateToApp('fleet', { hash: `/policies/${agentPolicyId}/edit-integration/${packagePolicyId}`, }); await this.ensureOnEditPageOrFail();