Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cases] [Security Solution] New cases subfeatures, add comments and reopen cases #194898

Merged
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
151f3e8
Cases new subfeatures, add comments and reopen cases
kqualters-elastic Oct 2, 2024
fa4cd43
Fix types
kqualters-elastic Oct 4, 2024
ad8b154
Add to obs and security solution
kqualters-elastic Oct 4, 2024
c7e7ffd
Remove unneeded changes
kqualters-elastic Oct 4, 2024
b15b1f5
Update snapshots
kqualters-elastic Oct 7, 2024
9fe5c56
Update tests
kqualters-elastic Oct 8, 2024
25ccd1e
Partial pr feedback
kqualters-elastic Oct 10, 2024
10d5265
complete pr feedback
michaelolo24 Oct 11, 2024
8346f14
security solution changes
michaelolo24 Oct 14, 2024
ec76101
observability changes
michaelolo24 Oct 14, 2024
a157ada
migrate general cases
michaelolo24 Oct 14, 2024
185d0ff
wip tests
michaelolo24 Oct 14, 2024
c37c224
update tests, and add feature mock
michaelolo24 Oct 15, 2024
01c1e73
update create refs to createComment where appropriate
michaelolo24 Oct 15, 2024
21fcf2c
additional test fixes
michaelolo24 Oct 15, 2024
9cbadd8
Fix jest tests
kqualters-elastic Oct 16, 2024
910f979
remove _v2 references
michaelolo24 Oct 16, 2024
2084b46
test fixes
michaelolo24 Oct 16, 2024
00a5213
add create_comment tests
michaelolo24 Oct 17, 2024
28c9c1c
pr feedback
michaelolo24 Oct 17, 2024
e707106
fix imports
michaelolo24 Oct 17, 2024
e21459f
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
michaelolo24 Oct 17, 2024
bca4b76
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Oct 17, 2024
f05411f
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Oct 22, 2024
1755f43
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Oct 23, 2024
8c25a54
Fix lint, update tests
kqualters-elastic Oct 23, 2024
355ad62
Merge remote-tracking branch 'origin/cases-subfeatures-main' into cas…
kqualters-elastic Oct 23, 2024
de8f012
Update failing tests, possibly revert after feature migrations fix th…
kqualters-elastic Oct 25, 2024
8447c29
Update ensureAuthorized to take an array of operations, add tests
kqualters-elastic Oct 25, 2024
dc001ea
Add jests tests from pr review
kqualters-elastic Oct 25, 2024
a9b9fc1
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Oct 25, 2024
728a479
Fix types
kqualters-elastic Oct 25, 2024
3ec1a7b
Fix failing cypress tests
kqualters-elastic Oct 25, 2024
8db6f3e
Add new permissions integration tests for cases
kqualters-elastic Oct 29, 2024
a32a26b
Add test for form vis
kqualters-elastic Oct 29, 2024
a3f3322
PR feedback
kqualters-elastic Oct 29, 2024
1ee0f75
Fix failing test
kqualters-elastic Oct 29, 2024
29f22e8
fix missing import
kqualters-elastic Oct 29, 2024
3c9a0ae
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Oct 29, 2024
c5688d5
Tie createComment to files create api tag
kqualters-elastic Oct 30, 2024
bc66e94
Update snapshots
kqualters-elastic Oct 30, 2024
af31474
Remove commented out code
kqualters-elastic Oct 31, 2024
cf33281
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Oct 31, 2024
8532f42
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Oct 31, 2024
54da9c3
PR feedback, add re-open tests
kqualters-elastic Nov 5, 2024
042b461
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 5, 2024
709e653
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Nov 5, 2024
c32846d
Use read and minimal_read for read perms in v2
kqualters-elastic Nov 5, 2024
d735c65
Fix types
kqualters-elastic Nov 5, 2024
ac1eb26
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 7, 2024
4927d34
Remove unneeded changes, add api int tests, fix some types
kqualters-elastic Nov 13, 2024
4daca54
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 13, 2024
9b6b3ef
PR feedback, fix tests/types
kqualters-elastic Nov 13, 2024
38cce3f
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 13, 2024
5caf97e
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Nov 13, 2024
5cb7c46
Remove create_comment from cases v1
kqualters-elastic Nov 13, 2024
c307b1c
Merge remote-tracking branch 'origin/cases-subfeatures-main' into cas…
kqualters-elastic Nov 13, 2024
45cd5dd
Fix create/createComment with v1
kqualters-elastic Nov 13, 2024
f5dd06c
Fix Jest tests
kqualters-elastic Nov 13, 2024
d449b8e
Fix types
kqualters-elastic Nov 14, 2024
ca96951
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 14, 2024
13241af
Fix types/tests
kqualters-elastic Nov 14, 2024
8f4e89d
Fix bad change to mock roles
kqualters-elastic Nov 15, 2024
cacb5d1
Fix remaining tests/ui bugs
kqualters-elastic Nov 15, 2024
e8ddbe1
Fix remaining tests/ui bugs
kqualters-elastic Nov 15, 2024
f8eafdd
Merge remote-tracking branch 'origin/cases-subfeatures-main' into cas…
kqualters-elastic Nov 15, 2024
f46aa01
Merge branch 'main' into cases-subfeatures-main
michaelolo24 Nov 18, 2024
ffe55a3
Update app ids
kqualters-elastic Nov 18, 2024
262b23f
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 18, 2024
10f100e
Update feature definitions to not overgrant new privileges
kqualters-elastic Nov 19, 2024
bb519e5
Merge remote-tracking branch 'upstream/main' into cases-subfeatures-main
kqualters-elastic Nov 19, 2024
d5b638f
Add reopen, create comment to minimal_all
kqualters-elastic Nov 19, 2024
e0b6ea5
Fix autocomplete induced typo
kqualters-elastic Nov 19, 2024
245fd3c
Skip failing timeline test
kqualters-elastic Nov 19, 2024
3aa925d
PR feedback
kqualters-elastic Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ viewer:
- feature_siem.read
- feature_siem.read_alerts
- feature_siem.endpoint_list_read
- feature_securitySolutionCases.read
Copy link
Contributor

@michaelolo24 michaelolo24 Oct 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azasypkin is the expectation to keep both versions since the original feature_securitySolutionCases isn't "technically" gone, just deprecated? What would be the expectations be for serverless roles?

Copy link
Member

@azasypkin azasypkin Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

This file is used for development, so you can safely remove the old privileges. However, for the real predefined roles defined in the ES controller Helm chart values, you’ll want to keep the old definitions until your changes are fully promoted to all environments, as there will be pods with different Kibana versions interacting with ES at the same time. Once your changes are fully deployed in Serverless production, you should be able to safely update the definitions in the ES controller to replace the privileges of the deprecated features.

(Corrected my original message, I shouldn’t write comments at night 🙈)

- feature_securitySolutionCasesV2.read
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these new privileges for all these roles also updated in the elasticsearch-controller repo? The privileges in this file here should be a copy of those. If not, I'd suggest you create a PR on the other repo first, to update the privileges before merging this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The privileges in roles.yml, security_roles.json, roles.yml and project_controller_security_roles.yml need to be in sync with the ones in elasticsearch-controller for our testing needs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not, I'd suggest you create a PR on the other repo first, to update the privileges before merging this PR.

As I explained in https://github.com/elastic/kibana/pull/194898/files#r1801715345, it might be easier to do it the other way around: first merge the PR, wait until the changes reach production, and then drop legacy privileges from the predefined roles. Alternatively, you could update the predefined roles first, but you’d need to keep both old and new privileges since we’ll have Kibana pods running on different versions simultaneously, and later update predefined roles once again to remove legacy privileges.

- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -126,7 +126,7 @@ editor:
- feature_siem.process_operations_all
- feature_siem.actions_log_management_all # Response actions history
- feature_siem.file_operations_all
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -175,7 +175,7 @@ t1_analyst:
- feature_siem.read
- feature_siem.read_alerts
- feature_siem.endpoint_list_read
- feature_securitySolutionCases.read
- feature_securitySolutionCasesV2.read
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -230,7 +230,7 @@ t2_analyst:
- feature_siem.read
- feature_siem.read_alerts
- feature_siem.endpoint_list_read
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -300,7 +300,7 @@ t3_analyst:
- feature_siem.actions_log_management_all # Response actions history
- feature_siem.file_operations_all
- feature_siem.scan_operations_all
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -362,7 +362,7 @@ threat_intelligence_analyst:
- feature_siem.all
- feature_siem.endpoint_list_read
- feature_siem.blocklist_all
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -430,7 +430,7 @@ rule_author:
- feature_siem.host_isolation_exceptions_read
- feature_siem.blocklist_all # Elastic Defend Policy Management
- feature_siem.actions_log_management_read
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.read
Expand Down Expand Up @@ -502,7 +502,7 @@ soc_manager:
- feature_siem.file_operations_all
- feature_siem.execute_operations_all
- feature_siem.scan_operations_all
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.all
Expand Down Expand Up @@ -562,7 +562,7 @@ detections_admin:
- feature_siem.all
- feature_siem.read_alerts
- feature_siem.crud_alerts
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.all
Expand Down Expand Up @@ -621,7 +621,7 @@ platform_engineer:
- feature_siem.host_isolation_exceptions_all
- feature_siem.blocklist_all # Elastic Defend Policy Management
- feature_siem.actions_log_management_read
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.all
Expand Down Expand Up @@ -694,7 +694,7 @@ endpoint_operations_analyst:
- feature_siem.file_operations_all
- feature_siem.execute_operations_all
- feature_siem.scan_operations_all
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.all
Expand Down Expand Up @@ -769,7 +769,7 @@ endpoint_policy_manager:
- feature_siem.event_filters_all
- feature_siem.host_isolation_exceptions_all
- feature_siem.blocklist_all # Elastic Defend Policy Management
- feature_securitySolutionCases.all
- feature_securitySolutionCasesV2.all
- feature_securitySolutionAssistant.all
- feature_securitySolutionAttackDiscovery.all
- feature_actions.all
Expand Down
14 changes: 7 additions & 7 deletions packages/kbn-es/src/serverless_resources/security_roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"siem": ["read", "read_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["read"],
"securitySolutionCasesV2": ["read"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here @azasypkin - should both versions be kept?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer here: you can keep just the latest in dev-only files, but production will require a bit of coordination.

"actions": ["read"],
"builtInAlerts": ["read"]
},
Expand Down Expand Up @@ -82,7 +82,7 @@
"siem": ["read", "read_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["read"],
"securitySolutionCasesV2": ["read"],
"actions": ["read"],
"builtInAlerts": ["read"]
},
Expand Down Expand Up @@ -150,7 +150,7 @@
"actions_log_management_all",
"file_operations_all"
],
"securitySolutionCases": ["all"],
"securitySolutionCasesV2": ["all"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"actions": ["read"],
Expand Down Expand Up @@ -210,7 +210,7 @@
"siem": ["all", "read_alerts", "crud_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["all"],
"securitySolutionCasesV2": ["all"],
"actions": ["read"],
"builtInAlerts": ["all"]
},
Expand Down Expand Up @@ -263,7 +263,7 @@
"siem": ["all", "read_alerts", "crud_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["all"],
"securitySolutionCasesV2": ["all"],
"actions": ["all"],
"builtInAlerts": ["all"]
},
Expand Down Expand Up @@ -311,7 +311,7 @@
"siem": ["all", "read_alerts", "crud_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["all"],
"securitySolutionCasesV2": ["all"],
"actions": ["read"],
"builtInAlerts": ["all"],
"dev_tools": ["all"]
Expand Down Expand Up @@ -366,7 +366,7 @@
"siem": ["all", "read_alerts", "crud_alerts"],
"securitySolutionAssistant": ["all"],
"securitySolutionAttackDiscovery": ["all"],
"securitySolutionCases": ["all"],
"securitySolutionCasesV2": ["all"],
"actions": ["all"],
"builtInAlerts": ["all"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
*/

export { getSecurityFeature } from './src/security';
export { getCasesFeature } from './src/cases';
export { getCasesFeature, getCasesV2Feature } from './src/cases';
export { getAssistantFeature } from './src/assistant';
export { getAttackDiscoveryFeature } from './src/attack_discovery';
23 changes: 21 additions & 2 deletions x-pack/packages/security-solution/features/src/cases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,33 @@
*/
import type { CasesSubFeatureId } from '../product_features_keys';
import type { ProductFeatureParams } from '../types';
import { getCasesBaseKibanaFeature } from './kibana_features';
import { getCasesBaseKibanaSubFeatureIds, getCasesSubFeaturesMap } from './kibana_sub_features';
import { getCasesBaseKibanaFeature } from './v1_features/kibana_features';
import {
getCasesBaseKibanaSubFeatureIds,
getCasesSubFeaturesMap,
} from './v1_features/kibana_sub_features';
import type { CasesFeatureParams } from './types';
import { getCasesBaseKibanaFeatureV2 } from './v2_features/kibana_features';
import {
getCasesBaseKibanaSubFeatureIdsV2,
getCasesSubFeaturesMapV2,
} from './v2_features/kibana_sub_features';

/**
* @deprecated Use getCasesV2Feature instead
*/
export const getCasesFeature = (
params: CasesFeatureParams
): ProductFeatureParams<CasesSubFeatureId> => ({
baseKibanaFeature: getCasesBaseKibanaFeature(params),
baseKibanaSubFeatureIds: getCasesBaseKibanaSubFeatureIds(),
subFeaturesMap: getCasesSubFeaturesMap(params),
});

export const getCasesV2Feature = (
params: CasesFeatureParams
): ProductFeatureParams<CasesSubFeatureId> => ({
baseKibanaFeature: getCasesBaseKibanaFeatureV2(params),
baseKibanaSubFeatureIds: getCasesBaseKibanaSubFeatureIdsV2(),
subFeaturesMap: getCasesSubFeaturesMapV2(params),
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { CasesUiCapabilities, CasesApiTags } from '@kbn/cases-plugin/common';
import type { ProductFeatureCasesKey, CasesSubFeatureId } from '../product_features_keys';
import type { ProductFeatureKibanaConfig } from '../types';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
* 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 { i18n } from '@kbn/i18n';

import { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common';
import { KibanaFeatureScope } from '@kbn/features-plugin/common';
import type { BaseKibanaFeatureConfig } from '../../types';
import { APP_ID, CASES_FEATURE_ID, CASES_FEATURE_ID_V2 } from '../../constants';
import type { CasesFeatureParams } from '../types';

/**
* @deprecated Use getCasesBaseKibanaFeatureV2 instead
*/
export const getCasesBaseKibanaFeature = ({
uiCapabilities,
apiTags,
savedObjects,
}: CasesFeatureParams): BaseKibanaFeatureConfig => {
return {
deprecated: {
notice: i18n.translate(
'securitySolutionPackages.features.featureRegistry.linkSecuritySolutionCase.deprecationMessage',
{
defaultMessage:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

We don’t need to do anything right now, but eventually, when we start displaying this to our users, we might need to rephrase it since interactive users won’t understand what CASES_FEATURE_ID_V2 means.

'The {currentId} permissions are deprecated, please see {casesFeatureIdV2}.',
values: {
currentId: CASES_FEATURE_ID,
casesFeatureIdV2: CASES_FEATURE_ID_V2,
},
}
),
},
id: CASES_FEATURE_ID,
name: i18n.translate(
'securitySolutionPackages.features.featureRegistry.linkSecuritySolutionCaseTitleDeprecated',
{
defaultMessage: 'Cases (Deprecated)',
}
),
order: 1100,
category: DEFAULT_APP_CATEGORIES.security,
scope: [KibanaFeatureScope.Spaces, KibanaFeatureScope.Security],
app: [CASES_FEATURE_ID, 'kibana'],
catalogue: [APP_ID],
cases: [APP_ID],
privileges: {
all: {
api: apiTags.all,
app: [CASES_FEATURE_ID, 'kibana'],
catalogue: [APP_ID],
cases: {
create: [APP_ID],
read: [APP_ID],
update: [APP_ID],
},
savedObject: {
all: [...savedObjects.files],
read: [...savedObjects.files],
},
ui: uiCapabilities.all,
replacedBy: [
{
feature: CASES_FEATURE_ID_V2,
privileges: ['minimal_all', 'create_comment', 'case_reopen'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see: https://github.com/elastic/kibana/pull/186800/files/de7a1d15b0c0cccd00b1d8595b9c25142af5dcd6#diff-d887981d43bbe30cda039340b906b0fa7649ba80230be4de8eda326036f10f6fR32-R35

Users currently with 'allhave the ability tocreate_commentandcase_reopen`. Since these are being broken out into sub-privileges, they need to be provided here so when a customer that has modified the sub features upgrade upgrades, they will still retain the same behavior

For more on minimal_all: https://github.com/elastic/kibana/blob/main/x-pack/packages/security/authorization_core_common/src/privileges/minimal_privileges.ts#L9-L23

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

I believe we agreed in #194898 (comment) to use "extended" syntax to have separate definition for default and minimal privilege variants (for both all and read)?

},
],
},
read: {
api: apiTags.read,
app: [CASES_FEATURE_ID, 'kibana'],
catalogue: [APP_ID],
cases: {
read: [APP_ID],
},
savedObject: {
all: [],
read: [...savedObjects.files],
},
ui: uiCapabilities.read,
replacedBy: [{ feature: CASES_FEATURE_ID_V2, privileges: ['read'] }],
},
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import { i18n } from '@kbn/i18n';
import type { SubFeatureConfig } from '@kbn/features-plugin/common';
import { CasesSubFeatureId } from '../product_features_keys';
import { APP_ID } from '../constants';
import type { CasesFeatureParams } from './types';
import { CasesSubFeatureId } from '../../product_features_keys';
import { APP_ID, CASES_FEATURE_ID_V2 } from '../../constants';
import type { CasesFeatureParams } from '../types';

/**
* Sub-features that will always be available for Security Cases
Expand All @@ -21,7 +21,8 @@ export const getCasesBaseKibanaSubFeatureIds = (): CasesSubFeatureId[] => [
];

/**
* Defines all the Security Assistant subFeatures available.
* @deprecated Use getCasesSubFeaturesMapV2 instead
* @description - Defines all the Security Solution Cases available.
* The order of the subFeatures is the order they will be displayed
*/
export const getCasesSubFeaturesMap = ({
Expand Down Expand Up @@ -55,6 +56,7 @@ export const getCasesSubFeaturesMap = ({
delete: [APP_ID],
},
ui: uiCapabilities.delete,
replacedBy: [{ feature: CASES_FEATURE_ID_V2, privileges: ['cases_delete'] }],
},
],
},
Expand Down Expand Up @@ -89,6 +91,7 @@ export const getCasesSubFeaturesMap = ({
settings: [APP_ID],
},
ui: uiCapabilities.settings,
replacedBy: [{ feature: CASES_FEATURE_ID_V2, privileges: ['cases_settings'] }],
},
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { ProductFeatureCasesKey, CasesSubFeatureId } from '../../product_features_keys';
import type { ProductFeatureKibanaConfig } from '../../types';

export type DefaultCasesProductFeaturesConfig = Record<
ProductFeatureCasesKey,
ProductFeatureKibanaConfig<CasesSubFeatureId>
>;
Loading