diff --git a/packages/deeplinks/security/deep_links.ts b/packages/deeplinks/security/deep_links.ts index 54b18dcaf920..644691bd5b8b 100644 --- a/packages/deeplinks/security/deep_links.ts +++ b/packages/deeplinks/security/deep_links.ts @@ -86,6 +86,7 @@ export enum SecurityPageName { entityAnalytics = 'entity_analytics', entityAnalyticsManagement = 'entity_analytics-management', entityAnalyticsAssetClassification = 'entity_analytics-asset-classification', + entityAnalyticsEntityStoreManagement = 'entity_analytics-entity_store_management', coverageOverview = 'coverage-overview', notes = 'notes', } diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index f94736911203..9ce1144e7d22 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -122,6 +122,8 @@ export const ENTITY_ANALYTICS_PATH = '/entity_analytics' as const; export const ENTITY_ANALYTICS_MANAGEMENT_PATH = `/entity_analytics_management` as const; export const ENTITY_ANALYTICS_ASSET_CRITICALITY_PATH = `/entity_analytics_asset_criticality` as const; +export const ENTITY_ANALYTICS_ENTITY_STORE_MANAGEMENT_PATH = + `/entity_analytics_entity_store` as const; export const APP_ALERTS_PATH = `${APP_PATH}${ALERTS_PATH}` as const; export const APP_CASES_PATH = `${APP_PATH}${CASES_PATH}` as const; export const APP_ENDPOINTS_PATH = `${APP_PATH}${ENDPOINTS_PATH}` as const; diff --git a/x-pack/plugins/security_solution/public/app/solution_navigation/categories.ts b/x-pack/plugins/security_solution/public/app/solution_navigation/categories.ts index 86324b9ce992..8d815ded5a3c 100644 --- a/x-pack/plugins/security_solution/public/app/solution_navigation/categories.ts +++ b/x-pack/plugins/security_solution/public/app/solution_navigation/categories.ts @@ -50,7 +50,7 @@ export const CATEGORIES: Array> = [ type: LinkCategoryType.separator, linkIds: [ SecurityPageName.entityAnalyticsManagement, - SecurityPageName.entityAnalyticsAssetClassification, + SecurityPageName.entityAnalyticsEntityStoreManagement, ], // Linked from the management cards landing. }, ]; diff --git a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/settings_links.ts b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/settings_links.ts index ed08596fe6c7..abe7cc68603b 100644 --- a/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/settings_links.ts +++ b/x-pack/plugins/security_solution/public/app/solution_navigation/links/sections/settings_links.ts @@ -12,7 +12,7 @@ import * as i18n from './settings_translations'; const ENTITY_ANALYTICS_LINKS = [ SecurityPageName.entityAnalyticsManagement, - SecurityPageName.entityAnalyticsAssetClassification, + SecurityPageName.entityAnalyticsEntityStoreManagement, ]; export const createSettingsLinksFromManage = (manageLink: LinkItem): LinkItem[] => { diff --git a/x-pack/plugins/security_solution/public/app/translations.ts b/x-pack/plugins/security_solution/public/app/translations.ts index 97f07ee6706b..709bb5f614f7 100644 --- a/x-pack/plugins/security_solution/public/app/translations.ts +++ b/x-pack/plugins/security_solution/public/app/translations.ts @@ -25,6 +25,10 @@ export const ENTITY_ANALYTICS_RISK_SCORE = i18n.translate( } ); +export const ENTITY_STORE = i18n.translate('xpack.securitySolution.navigation.entityStore', { + defaultMessage: 'Entity Store', +}); + export const NOTES = i18n.translate('xpack.securitySolution.navigation.notes', { defaultMessage: 'Notes', }); diff --git a/x-pack/plugins/security_solution/public/common/links/links.test.tsx b/x-pack/plugins/security_solution/public/common/links/links.test.tsx index aeffa1d44f82..c0f8c8cc48da 100644 --- a/x-pack/plugins/security_solution/public/common/links/links.test.tsx +++ b/x-pack/plugins/security_solution/public/common/links/links.test.tsx @@ -547,7 +547,7 @@ describe('Security links', () => { describe('isLinkUiSettingsAllowed', () => { const SETTING_KEY = 'test setting'; const mockedLink: LinkItem = { - id: SecurityPageName.entityAnalyticsAssetClassification, + id: SecurityPageName.entityAnalyticsEntityStoreManagement, title: 'test title', path: '/test_path', }; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/entity_store.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/entity_store.ts index 5f8723f7f929..34789402c89a 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/entity_store.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/entity_store.ts @@ -6,12 +6,14 @@ */ import { useMemo } from 'react'; import type { + DeleteEntityEngineResponse, + EntityType, GetEntityEngineResponse, InitEntityEngineResponse, ListEntityEnginesResponse, + StopEntityEngineResponse, } from '../../../common/api/entity_analytics'; import { API_VERSIONS } from '../../../common/entity_analytics/constants'; -import type { EntityType } from '../../../common/api/entity_analytics/entity_store/common.gen'; import { useKibana } from '../../common/lib/kibana/kibana_react'; export const useEntityStoreRoutes = () => { @@ -26,6 +28,14 @@ export const useEntityStoreRoutes = () => { }); }; + const stopEntityStore = async (entityType: EntityType) => { + return http.fetch(`/api/entity_store/engines/${entityType}/stop`, { + method: 'POST', + version: API_VERSIONS.public.v1, + body: JSON.stringify({}), + }); + }; + const getEntityEngine = async (entityType: EntityType) => { return http.fetch(`/api/entity_store/engines/${entityType}`, { method: 'GET', @@ -33,6 +43,13 @@ export const useEntityStoreRoutes = () => { }); }; + const deleteEntityEngine = async (entityType: EntityType) => { + return http.fetch(`/api/entity_store/engines/${entityType}`, { + method: 'DELETE', + version: API_VERSIONS.public.v1, + }); + }; + const listEntityEngines = async () => { return http.fetch(`/api/entity_store/engines`, { method: 'GET', @@ -42,7 +59,9 @@ export const useEntityStoreRoutes = () => { return { initEntityStore, + stopEntityStore, getEntityEngine, + deleteEntityEngine, listEntityEngines, }; }, [http]); diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_engine_status.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_engine_status.ts index 32b40c7a6bcc..854c2613b25a 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_engine_status.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_engine_status.ts @@ -11,7 +11,7 @@ import type { ListEntityEnginesResponse } from '../../../../../common/api/entity import { useEntityStoreRoutes } from '../../../api/entity_store'; import { useRiskEngineStatus } from '../../../api/hooks/use_risk_engine_status'; -const ENTITY_STORE_ENGINE_STATUS = 'ENTITY_STORE_ENGINE_STATUS'; +export const ENTITY_STORE_ENGINE_STATUS = 'ENTITY_STORE_ENGINE_STATUS'; interface Options { disabled?: boolean; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts index 8329cced1bc2..b6fa7d4d319e 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/entity_store/hooks/use_entity_store.ts @@ -5,11 +5,17 @@ * 2.0. */ -import { useQuery } from '@tanstack/react-query'; +import type { UseMutationOptions } from '@tanstack/react-query'; +import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; import { useCallback, useState } from 'react'; -import { useEntityEngineStatus } from './use_entity_engine_status'; +import type { + DeleteEntityEngineResponse, + InitEntityEngineResponse, + StopEntityEngineResponse, +} from '../../../../../common/api/entity_analytics'; import { useEntityStoreRoutes } from '../../../api/entity_store'; +import { ENTITY_STORE_ENGINE_STATUS, useEntityEngineStatus } from './use_entity_engine_status'; const ENTITY_STORE_ENABLEMENT_INIT = 'ENTITY_STORE_ENABLEMENT_INIT'; @@ -45,3 +51,70 @@ export const useEntityStoreEnablement = () => { return { enable }; }; + +export const INIT_ENTITY_ENGINE_STATUS_KEY = ['POST', 'INIT_ENTITY_ENGINE']; + +export const useInvalidateEntityEngineStatusQuery = () => { + const queryClient = useQueryClient(); + + return useCallback(() => { + queryClient.invalidateQueries([ENTITY_STORE_ENGINE_STATUS], { + refetchType: 'active', + }); + }, [queryClient]); +}; + +export const useInitEntityEngineMutation = (options?: UseMutationOptions<{}>) => { + const invalidateEntityEngineStatusQuery = useInvalidateEntityEngineStatusQuery(); + const { initEntityStore } = useEntityStoreRoutes(); + return useMutation<[InitEntityEngineResponse]>(() => Promise.all([initEntityStore('user')]), { + ...options, + mutationKey: INIT_ENTITY_ENGINE_STATUS_KEY, + onSettled: (...args) => { + invalidateEntityEngineStatusQuery(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + }); +}; + +export const STOP_ENTITY_ENGINE_STATUS_KEY = ['POST', 'STOP_ENTITY_ENGINE']; + +export const useStopEntityEngineMutation = (options?: UseMutationOptions<{}>) => { + const invalidateEntityEngineStatusQuery = useInvalidateEntityEngineStatusQuery(); + const { stopEntityStore } = useEntityStoreRoutes(); + return useMutation<[StopEntityEngineResponse]>(() => Promise.all([stopEntityStore('user')]), { + ...options, + mutationKey: STOP_ENTITY_ENGINE_STATUS_KEY, + onSettled: (...args) => { + invalidateEntityEngineStatusQuery(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + }); +}; + +export const DELETE_ENTITY_ENGINE_STATUS_KEY = ['POST', 'STOP_ENTITY_ENGINE']; + +export const useDeleteEntityEngineMutation = (options?: UseMutationOptions<{}>) => { + const invalidateEntityEngineStatusQuery = useInvalidateEntityEngineStatusQuery(); + const { deleteEntityEngine } = useEntityStoreRoutes(); + return useMutation<[DeleteEntityEngineResponse]>( + () => Promise.all([deleteEntityEngine('user')]), + { + ...options, + mutationKey: DELETE_ENTITY_ENGINE_STATUS_KEY, + onSettled: (...args) => { + invalidateEntityEngineStatusQuery(); + + if (options?.onSettled) { + options.onSettled(...args); + } + }, + } + ); +}; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/pages/asset_criticality_upload_page.tsx b/x-pack/plugins/security_solution/public/entity_analytics/pages/asset_criticality_upload_page.tsx deleted file mode 100644 index eced6e59031a..000000000000 --- a/x-pack/plugins/security_solution/public/entity_analytics/pages/asset_criticality_upload_page.tsx +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiIcon, - EuiLink, - EuiPageHeader, - EuiPanel, - EuiSpacer, - EuiText, - EuiTitle, - EuiEmptyPrompt, - EuiCallOut, - EuiCode, -} from '@elastic/eui'; -import React from 'react'; -import { FormattedMessage } from '@kbn/i18n-react'; -import { ASSET_CRITICALITY_INDEX_PATTERN } from '../../../common/entity_analytics/asset_criticality'; -import { useUiSetting$, useKibana } from '../../common/lib/kibana'; -import { ENABLE_ASSET_CRITICALITY_SETTING } from '../../../common/constants'; -import { AssetCriticalityFileUploader } from '../components/asset_criticality_file_uploader/asset_criticality_file_uploader'; -import { useAssetCriticalityPrivileges } from '../components/asset_criticality/use_asset_criticality'; -import { useHasSecurityCapability } from '../../helper_hooks'; - -export const AssetCriticalityUploadPage = () => { - const { docLinks } = useKibana().services; - const entityAnalyticsLinks = docLinks.links.securitySolution.entityAnalytics; - const hasEntityAnalyticsCapability = useHasSecurityCapability('entity-analytics'); - const [isAssetCriticalityEnabled] = useUiSetting$(ENABLE_ASSET_CRITICALITY_SETTING); - const { - data: privileges, - error: privilegesError, - isLoading, - } = useAssetCriticalityPrivileges('AssetCriticalityUploadPage'); - const hasWritePermissions = privileges?.has_write_permissions; - - if (isLoading) { - // Wait for permission before rendering content to avoid flickering - return null; - } - - if ( - !hasEntityAnalyticsCapability || - !isAssetCriticalityEnabled || - privilegesError?.body.status_code === 403 - ) { - const errorMessage = privilegesError?.body.message ?? ( - - ); - - return ( - - - - } - body={

{errorMessage}

} - /> - ); - } - - if (!hasWritePermissions) { - return ( - - } - color="primary" - iconType="iInCircle" - > - - {ASSET_CRITICALITY_INDEX_PATTERN}, - }} - /> - - - ); - } - - return ( - <> - - } - /> - - - - - -

- -

-
- - - - - - -
- - - - - - -

- -

-
- - - - - - -

- -

-
- - - - - -
-
-
- - ); -}; - -AssetCriticalityUploadPage.displayName = 'AssetCriticalityUploadPage'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx new file mode 100644 index 000000000000..49d58bd630e9 --- /dev/null +++ b/x-pack/plugins/security_solution/public/entity_analytics/pages/entity_store_management_page.tsx @@ -0,0 +1,392 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + EuiFlexGroup, + EuiFlexItem, + EuiConfirmModal, + EuiHorizontalRule, + EuiIcon, + EuiLink, + EuiPageHeader, + EuiPanel, + EuiSpacer, + EuiText, + EuiTitle, + EuiCallOut, + EuiCode, + EuiSwitch, + EuiHealth, + EuiButton, + EuiLoadingSpinner, +} from '@elastic/eui'; +import React, { useState } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useEntityEngineStatus } from '../components/entity_store/hooks/use_entity_engine_status'; +import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; +import { ASSET_CRITICALITY_INDEX_PATTERN } from '../../../common/entity_analytics/asset_criticality'; +import { useUiSetting$, useKibana } from '../../common/lib/kibana'; +import { ENABLE_ASSET_CRITICALITY_SETTING } from '../../../common/constants'; +import { AssetCriticalityFileUploader } from '../components/asset_criticality_file_uploader/asset_criticality_file_uploader'; +import { useAssetCriticalityPrivileges } from '../components/asset_criticality/use_asset_criticality'; +import { useHasSecurityCapability } from '../../helper_hooks'; +import { + useDeleteEntityEngineMutation, + useInitEntityEngineMutation, + useStopEntityEngineMutation, +} from '../components/entity_store/hooks/use_entity_store'; + +export const EntityStoreManagementPage = () => { + const { docLinks } = useKibana().services; + const entityAnalyticsLinks = docLinks.links.securitySolution.entityAnalytics; + const hasEntityAnalyticsCapability = useHasSecurityCapability('entity-analytics'); + const isEntityStoreFeatureFlagEnabled = useIsExperimentalFeatureEnabled('entityStoreEnabled'); + const [isAssetCriticalityEnabled] = useUiSetting$(ENABLE_ASSET_CRITICALITY_SETTING); + const { + data: assetCriticalityPrivileges, + error: assetCriticalityPrivilegesError, + isLoading: assetCriticalityIsLoading, + } = useAssetCriticalityPrivileges('AssetCriticalityUploadPage'); + const hasAssetCriticalityWritePermissions = assetCriticalityPrivileges?.has_write_permissions; + + const entityStoreStatus = useEntityEngineStatus(); + const initEntityEngineMutation = useInitEntityEngineMutation(); + const stopEntityEngineMutation = useStopEntityEngineMutation(); + const deleteEntityEngineMutation = useDeleteEntityEngineMutation(); + + const [isClearModalVisible, setIsClearModalVisible] = useState(false); + + const closeClearModal = () => setIsClearModalVisible(false); + const showClearModal = () => setIsClearModalVisible(true); + + if (assetCriticalityIsLoading) { + // Wait for permission before rendering content to avoid flickering + return null; + } + + const InsufficientAssetCriticalityPrivilegesCallout: React.FC = () => { + return ( + + } + color="primary" + iconType="iInCircle" + > + + {ASSET_CRITICALITY_INDEX_PATTERN}, + }} + /> + + + ); + }; + + const AssetCriticalityIssueCallout: React.FC = () => { + const errorMessage = assetCriticalityPrivilegesError?.body.message ?? ( + + ); + + return ( + + + } + color="primary" + iconType="iInCircle" + > + {errorMessage} + + + ); + }; + + const EntityStoreFeatureFlagNotAvailableCallout: React.FC = () => { + return ( + <> + + + } + color="primary" + iconType="iInCircle" + > + + + + + + ); + }; + + const EntityStoreHealth: React.FC<{ currentEntityStoreStatus: string }> = ({ + currentEntityStoreStatus, + }) => { + return ( + + {entityStoreEnabledStatuses.includes(currentEntityStoreStatus) ? 'On' : 'Off'} + + ); + }; + + const ClearEntityDataPanel: React.FC = () => { + return ( + <> + + +

+ +

+ + +
+ + { + showClearModal(); + }} + > + + +
+ {isClearModalVisible && ( + { + closeClearModal(); + deleteEntityEngineMutation.mutate(); + }} + cancelButtonText="Keep Entities" + confirmButtonText="Clear All Entities" + buttonColor="danger" + defaultFocusedButton="confirm" + > + + + )} + + ); + }; + + const WhatIsAssetCriticalityPanel: React.FC = () => { + return ( + + + + +

+ +

+
+
+ + + + + + +

+ +

+
+ + + + + +
+ ); + }; + + const FileUploadSection = () => { + if ( + !hasEntityAnalyticsCapability || + !isAssetCriticalityEnabled || + assetCriticalityPrivilegesError?.body.status_code === 403 + ) { + return ; + } + if (!hasAssetCriticalityWritePermissions) { + return ; + } + return ( + + +

+ +

+
+ + + + + + +
+ ); + }; + + const entityStoreEnabledStatuses = ['enabled', 'installing']; + const switchDisabledStatuses = ['error', 'loading']; + const canDeleteEntityEngine = !['not_installed', 'loading'].includes(entityStoreStatus.status); + + const onSwitchClick = () => { + if (switchDisabledStatuses.includes(entityStoreStatus.status)) { + return; + } + + if (entityStoreEnabledStatuses.includes(entityStoreStatus.status)) { + stopEntityEngineMutation.mutate(); + } else { + initEntityEngineMutation.mutate(); + } + }; + + const EnablementButton = () => { + return ( + + {(initEntityEngineMutation.isLoading || + stopEntityEngineMutation.isLoading || + deleteEntityEngineMutation.isLoading) && ( + + + + )} + + + + ); + }; + + return ( + <> + + } + alignItems="center" + rightSideItems={isEntityStoreFeatureFlagEnabled ? [] : []} + /> + + + + + {!isEntityStoreFeatureFlagEnabled && } + + + + + + + + {isEntityStoreFeatureFlagEnabled && canDeleteEntityEngine && } + + + + + ); +}; + +EntityStoreManagementPage.displayName = 'EntityStoreManagementPage'; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/routes.tsx b/x-pack/plugins/security_solution/public/entity_analytics/routes.tsx index 048b37915e0f..634027da6560 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/routes.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/routes.tsx @@ -15,12 +15,13 @@ import { NotFoundPage } from '../app/404'; import { ENTITY_ANALYTICS_ASSET_CRITICALITY_PATH, + ENTITY_ANALYTICS_ENTITY_STORE_MANAGEMENT_PATH, ENTITY_ANALYTICS_MANAGEMENT_PATH, SecurityPageName, } from '../../common/constants'; import { EntityAnalyticsManagementPage } from './pages/entity_analytics_management_page'; import { PluginTemplateWrapper } from '../common/components/plugin_template_wrapper'; -import { AssetCriticalityUploadPage } from './pages/asset_criticality_upload_page'; +import { EntityStoreManagementPage } from './pages/entity_store_management_page'; const EntityAnalyticsManagementTelemetry = () => ( @@ -48,7 +49,7 @@ EntityAnalyticsManagementContainer.displayName = 'EntityAnalyticsManagementConta const EntityAnalyticsAssetClassificationTelemetry = () => ( - + @@ -70,6 +71,30 @@ const EntityAnalyticsAssetClassificationContainer: React.FC = React.memo(() => { EntityAnalyticsAssetClassificationContainer.displayName = 'EntityAnalyticsAssetClassificationContainer'; +const EntityAnalyticsEntityStoreTelemetry = () => ( + + + + + + +); + +const EntityAnalyticsEntityStoreContainer: React.FC = React.memo(() => { + return ( + + + + + ); +}); + +EntityAnalyticsEntityStoreContainer.displayName = 'EntityAnalyticsEntityStoreContainer'; + export const routes = [ { path: ENTITY_ANALYTICS_MANAGEMENT_PATH, @@ -79,4 +104,8 @@ export const routes = [ path: ENTITY_ANALYTICS_ASSET_CRITICALITY_PATH, component: EntityAnalyticsAssetClassificationContainer, }, + { + path: ENTITY_ANALYTICS_ENTITY_STORE_MANAGEMENT_PATH, + component: EntityAnalyticsEntityStoreContainer, + }, ]; diff --git a/x-pack/plugins/security_solution/public/management/links.ts b/x-pack/plugins/security_solution/public/management/links.ts index bc64f26a768a..c83a7360910f 100644 --- a/x-pack/plugins/security_solution/public/management/links.ts +++ b/x-pack/plugins/security_solution/public/management/links.ts @@ -15,9 +15,8 @@ import { } from '../../common/endpoint/service/authz'; import { BLOCKLIST_PATH, - ENABLE_ASSET_CRITICALITY_SETTING, ENDPOINTS_PATH, - ENTITY_ANALYTICS_ASSET_CRITICALITY_PATH, + ENTITY_ANALYTICS_ENTITY_STORE_MANAGEMENT_PATH, ENTITY_ANALYTICS_MANAGEMENT_PATH, EVENT_FILTERS_PATH, HOST_ISOLATION_EXCEPTIONS_PATH, @@ -39,8 +38,8 @@ import { RESPONSE_ACTIONS_HISTORY, TRUSTED_APPLICATIONS, ENTITY_ANALYTICS_RISK_SCORE, - ASSET_CRITICALITY, NOTES, + ENTITY_STORE, } from '../app/translations'; import { licenseService } from '../common/hooks/use_license'; import type { LinkItem } from '../common/links/types'; @@ -64,7 +63,7 @@ const categories = [ }), linkIds: [ SecurityPageName.entityAnalyticsManagement, - SecurityPageName.entityAnalyticsAssetClassification, + SecurityPageName.entityAnalyticsEntityStoreManagement, ], }, { @@ -196,20 +195,16 @@ export const links: LinkItem = { licenseType: 'platinum', }, { - id: SecurityPageName.entityAnalyticsAssetClassification, - title: ASSET_CRITICALITY, - description: i18n.translate( - 'xpack.securitySolution.appLinks.assetClassificationDescription', - { - defaultMessage: 'Represents the criticality of an asset to your business infrastructure.', - } - ), + id: SecurityPageName.entityAnalyticsEntityStoreManagement, + title: ENTITY_STORE, + description: i18n.translate('xpack.securitySolution.appLinks.entityStoreDescription', { + defaultMessage: "Allows comprehensive monitoring of your system's hosts and users.", + }), landingIcon: IconAssetCriticality, - path: ENTITY_ANALYTICS_ASSET_CRITICALITY_PATH, + path: ENTITY_ANALYTICS_ENTITY_STORE_MANAGEMENT_PATH, skipUrlState: true, hideTimeline: true, capabilities: [`${SERVER_APP_ID}.entity-analytics`], - uiSettingRequired: ENABLE_ASSET_CRITICALITY_SETTING, }, { id: SecurityPageName.responseActionsHistory, diff --git a/x-pack/test/security_solution_cypress/cypress/screens/asset_criticality.ts b/x-pack/test/security_solution_cypress/cypress/screens/asset_criticality.ts index 6af6826227b6..a397716d0c50 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/asset_criticality.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/asset_criticality.ts @@ -7,7 +7,7 @@ import { getDataTestSubjectSelector } from '../helpers/common'; -export const PAGE_TITLE = getDataTestSubjectSelector('assetCriticalityUploadPage'); +export const PAGE_TITLE = getDataTestSubjectSelector('entityStoreManagementPage'); export const FILE_PICKER = getDataTestSubjectSelector('asset-criticality-file-picker'); export const ASSIGN_BUTTON = getDataTestSubjectSelector('asset-criticality-assign-button'); export const RESULT_STEP = getDataTestSubjectSelector('asset-criticality-result-step-success');