Skip to content

Commit

Permalink
fix security feature app list
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Sep 3, 2024
1 parent 1a92a4b commit 5b69f49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion x-pack/packages/security-solution/features/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
* 2.0.
*/

// Same as the plugin id defined by Security Solution
// The Security Solution ID used for the catalog, cases, and API actions
export const APP_ID = 'securitySolution' as const;
// The ID of Security Solution UI plugin registered in Kibana
export const APP_UI_ID = 'securitySolutionUI' as const;
export const SERVER_APP_ID = 'siem' as const;

export const CASES_FEATURE_ID = 'securitySolutionCases' as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import type { BaseKibanaFeatureConfig } from '../types';
import {
APP_ID,
APP_UI_ID,
SERVER_APP_ID,
LEGACY_NOTIFICATIONS_ID,
CLOUD_POSTURE_APP_ID,
Expand All @@ -40,6 +41,9 @@ const SECURITY_RULE_TYPES = [
NEW_TERMS_RULE_TYPE_ID,
];

// List of apps IDs that are considered part of Security Solution
const app = [APP_UI_ID, CLOUD_POSTURE_APP_ID, CLOUD_DEFEND_APP_ID, 'kibana'];

export const getSecurityBaseKibanaFeature = ({
savedObjects,
}: SecurityFeatureParams): BaseKibanaFeatureConfig => ({
Expand All @@ -52,15 +56,15 @@ export const getSecurityBaseKibanaFeature = ({
),
order: 1100,
category: DEFAULT_APP_CATEGORIES.security,
app: [APP_ID, CLOUD_POSTURE_APP_ID, CLOUD_DEFEND_APP_ID, 'kibana'],
app,
catalogue: [APP_ID],
management: {
insightsAndAlerting: ['triggersActions'],
},
alerting: SECURITY_RULE_TYPES,
privileges: {
all: {
app: [APP_ID, CLOUD_POSTURE_APP_ID, CLOUD_DEFEND_APP_ID, 'kibana'],
app,
catalogue: [APP_ID],
api: [
APP_ID,
Expand Down Expand Up @@ -91,7 +95,7 @@ export const getSecurityBaseKibanaFeature = ({
ui: ['show', 'crud'],
},
read: {
app: [APP_ID, CLOUD_POSTURE_APP_ID, CLOUD_DEFEND_APP_ID, 'kibana'],
app,
catalogue: [APP_ID],
api: [APP_ID, 'lists-read', 'rac', 'cloud-security-posture-read', 'cloud-defend-read'],
savedObject: {
Expand Down

0 comments on commit 5b69f49

Please sign in to comment.