Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
7a7d60f
create alerts feature
denar50 Dec 16, 2025
29b2c23
create `securitySolutionRulesV3`
denar50 Dec 16, 2025
a59710c
remove unused component
denar50 Dec 16, 2025
19ca27a
avoid showing the rule name as a link in the alerts table
denar50 Dec 16, 2025
c6a9bd3
update alert privileges in the server routes
denar50 Dec 17, 2025
48d484c
make export of product feature getters consistent
denar50 Dec 18, 2025
791d6e0
fix product feature service mocks
denar50 Dec 18, 2025
c6ce29e
fix redirection to rule details page
denar50 Dec 18, 2025
9b5e196
update UserPrivilegesContext and useAlertsPrivileges
denar50 Dec 18, 2025
10022c6
update useMissingPrivileges hook to show missing alerts all privileges
denar50 Dec 18, 2025
1c92349
allow access to security solution for users with alerts only permissions
denar50 Dec 18, 2025
5b57b64
bake index checks into hasAlertsAll and hasAlertsRead
denar50 Dec 18, 2025
90f2482
use hasAlertsRead in dashboards > overview
denar50 Dec 18, 2025
e00cc21
allow access to the landing page and onboarding components
denar50 Dec 18, 2025
7719682
allow access to the alerts page
denar50 Dec 18, 2025
b389f5c
avoid showing the alerts tab in the rule details page
denar50 Dec 18, 2025
faf0bf2
disable the query that fetches rule by id when the user doesn't have …
denar50 Dec 18, 2025
b9d3cb0
avoid showing a link to the alert in the execution log when the user …
denar50 Dec 18, 2025
42c8155
avoid showing a link when the preview link component renders for a ru…
denar50 Dec 18, 2025
4a4942d
alert flyout description: disable rule summary link when the user doe…
denar50 Dec 18, 2025
bcc6fc4
show no privileges when user doesn't have access to alerts
denar50 Dec 18, 2025
f4e537e
update useRuleDetailsLink hook
denar50 Dec 18, 2025
6c293e0
attacks page: display permissions page when there is no access to alerts
denar50 Dec 18, 2025
cf283a5
add permission checks for timelines inside useAddBulkToTimelineAction
denar50 Dec 18, 2025
e53d7f7
avoid showing alert actions in the exceptions flyout when there is no…
denar50 Dec 19, 2025
2e3878b
add exception flyout: hide alert actions when the user doesn't have a…
denar50 Dec 19, 2025
2c533e2
avoid showing link to the rule details page when the user does not ha…
denar50 Dec 19, 2025
a74b90f
endpoint exceptions flyout: hide alert actions if the user does not h…
denar50 Dec 19, 2025
5567ccb
avoid displaying alert actions if the user does not have edit privileges
denar50 Dec 19, 2025
b24a1da
update platform tests
denar50 Dec 19, 2025
ab90b8e
Changes from node scripts/styled_components_mapping
kibanamachine Dec 19, 2025
81e5675
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Jan 12, 2026
fd20b57
fix translation label for rules V1 and V3
denar50 Jan 19, 2026
b91144a
remove console.log
denar50 Jan 19, 2026
3a8835d
fix unit tests derived from renaming of exceptions ui permissions
denar50 Jan 19, 2026
c519356
fix tests
denar50 Jan 23, 2026
9a3a431
remove exceptions privilege from rulesV2
denar50 Jan 23, 2026
9f8c242
add privilege to update alerts for legacy roles
denar50 Jan 23, 2026
134e9e3
fix tests
denar50 Jan 27, 2026
af65a0c
add a switcher to support the deprecated alerts ui capabilities
denar50 Jan 27, 2026
fa67e81
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Jan 27, 2026
5b2614e
fix authorization tests
denar50 Jan 28, 2026
901eba7
WIP
denar50 Feb 1, 2026
5c628e7
Changes from node scripts/lint_ts_projects --fix
kibanamachine Feb 1, 2026
3c6064e
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Feb 1, 2026
f78cd3b
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Feb 1, 2026
e42d1ae
fix type issues
denar50 Feb 1, 2026
604d509
fix tests
denar50 Feb 1, 2026
4e73573
Fix bad feature name reference in test comments
rylnd Feb 5, 2026
33c52be
Only attempt to fetch DE privileges when appropriate
rylnd Feb 6, 2026
30faef7
Fix alert acknowledgement compatibility test
rylnd Feb 11, 2026
cb85069
Remove unnecessary second argument to assertion
rylnd Feb 11, 2026
6e9f9cc
Simplify negative assertions/tests
rylnd Feb 11, 2026
5845cac
Categorize some of our selectors
rylnd Feb 11, 2026
8de6415
Remove repeated assertion for selecting alerts
rylnd Feb 11, 2026
de5553e
Fix tests failing due to unmocked values
rylnd Feb 12, 2026
9b6b23e
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 13, 2026
dfb671b
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 17, 2026
d56a77f
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 18, 2026
a7f4526
Remove TODO comment
rylnd Feb 18, 2026
164b934
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 18, 2026
e6ce514
Simplify rule details redirection logic for new Overview tab
rylnd Feb 18, 2026
fbec322
Remove TODO comment, placeholder key
rylnd Feb 19, 2026
8863f31
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 19, 2026
d62eb64
Revert "Remove TODO comment, placeholder key"
rylnd Feb 19, 2026
8a69b95
Fix typescript issue around `ProductFeaturesConfig` types
rylnd Feb 20, 2026
9ae3dfb
Remove placeholder TODO
rylnd Feb 20, 2026
06a4a75
Revert "Fix typescript issue around `ProductFeaturesConfig` types"
rylnd Feb 21, 2026
3f17550
Fix type limitations around the ProductFeature* types
rylnd Feb 21, 2026
cbc49db
Fix one more type issue around FeatureParams
rylnd Feb 21, 2026
b0f002f
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 26, 2026
68da4f7
Merge branch 'main' into rbac-alerts-feature
rylnd Feb 26, 2026
dc8e414
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 3, 2026
9f4755c
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 4, 2026
a66815f
Remove internal privileges re Stack Rules/Alerts management pages
rylnd Mar 4, 2026
84c6d94
Hide Bulk Actions toolbar when there are no actual actions
rylnd Mar 4, 2026
dec7757
Optionally disable rule links on "Open Alerts by Rule" dashboard
rylnd Mar 4, 2026
3be2559
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Mar 4, 2026
94bc7b7
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 4, 2026
633d52f
Add/update tests for Rule links in RuleAlertsTable
rylnd Mar 4, 2026
4a65b47
Fix cypress test logic
rylnd Mar 4, 2026
08c475d
Merge branch 'main' into rbac-alerts-feature
denar50 Mar 6, 2026
d9eabc4
Update inaccurate comment header
rylnd Mar 6, 2026
e4e7779
Reuse existing exported array
rylnd Mar 6, 2026
ac1b06f
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 6, 2026
2e17ac6
Remove tests made obsolete by mocks
rylnd Mar 6, 2026
ec761fb
Change ordering of ruleTypeIds array constant
rylnd Mar 6, 2026
13ab31a
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 9, 2026
621643f
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 10, 2026
2fbb7e7
"Missing privileges" callout on Alerts flyout
rylnd Mar 11, 2026
2158f8d
Guard v2 flyout with Alerts Read (if relevant)
rylnd Mar 11, 2026
25a5975
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Mar 11, 2026
7c6a393
Fix warning in callout color usage
rylnd Mar 12, 2026
ff76f06
Extract callout component to its own file
rylnd Mar 12, 2026
1824f6b
fix unit test: mock useAlertsPrivileges in useFetchAlerts
denar50 Mar 12, 2026
a57cc74
fix unit test: mock useAlertsPrivileges in tests that render Correlat…
denar50 Mar 12, 2026
24e4de1
fix unit test: mock useAlertsPrivileges in CorrelationsDetailsAlertsT…
denar50 Mar 12, 2026
4010149
Merge remote-tracking branch 'upstream/main' into rbac-alerts-feature
denar50 Mar 12, 2026
9fda17e
add privileges check to the new OverviewTabWrapper
denar50 Mar 12, 2026
f0687ce
Attack Discovery requires Alerts:Read feature
rylnd Mar 12, 2026
9f40ccd
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Mar 12, 2026
7a6f6fd
fix ftr: attack discovery routes now require ALERTS_API_READ
denar50 Mar 13, 2026
b0e71fb
Merge branch 'main' into rbac-alerts-feature
denar50 Mar 13, 2026
94e53bd
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Mar 13, 2026
1726097
Reuse existing NoPrivileges component
rylnd Mar 13, 2026
37ec32b
Remove unnecessary permissions check in Correlation Table
rylnd Mar 13, 2026
50e04ee
Add back logic for guarding the Correlation table
rylnd Mar 13, 2026
3059d0b
Extract helper method to shared location
rylnd Mar 13, 2026
d4a8768
Move privileges check to child component
rylnd Mar 13, 2026
727b92f
Annotate props interface
rylnd Mar 13, 2026
9f7ba0d
Move permission-checking logic out of useEventDetails hook
rylnd Mar 13, 2026
30bcc83
Add unit tests for new missing privileges component
rylnd Mar 13, 2026
33e2c75
Apply permission checks to OverviewTab component
rylnd Mar 13, 2026
3f80da1
Update unified_alerts routes with new alerting privileges
rylnd Mar 13, 2026
2ced3ca
Fix Unified Alerts integration tests with new privileges
rylnd Mar 13, 2026
72e1531
Changes from node scripts/lint_ts_projects --fix
kibanamachine Mar 13, 2026
2161a70
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Mar 13, 2026
c999601
Merge branch 'main' into rbac-alerts-feature
denar50 Mar 16, 2026
db86c73
Add full rule permissions back to v3 Rules feature
rylnd Mar 16, 2026
6ba1108
Password is optional on `withUser` scoping
rylnd Mar 17, 2026
ca1544a
Integration test: Rules feature allows rules to be toggled
rylnd Mar 17, 2026
ed96ccd
Changes from yarn openapi:generate
kibanamachine Mar 17, 2026
857acbe
Changes from yarn openapi:generate
kibanamachine Mar 17, 2026
d4da241
fix flyout logic
PhilippeOberti Mar 17, 2026
f6c7421
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 18, 2026
13dfdef
Fix tests broken in d4da241
rylnd Mar 18, 2026
3dd699f
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 19, 2026
b914878
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 19, 2026
2192687
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 19, 2026
2129efe
Fix Related Attacks unit tests
rylnd Mar 19, 2026
f52d9c6
Add additional unit test for "no alert privileges" case
rylnd Mar 19, 2026
bedeb2b
Merge branch 'main' into rbac-alerts-feature
denar50 Mar 23, 2026
3d38c19
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 23, 2026
2ce14bd
Fix bad imports causing linter failures
rylnd Mar 23, 2026
3eed09b
Fill out features README with Security, Rules, and Alerts feature des…
rylnd Mar 23, 2026
5517d72
Add a high-level rendering test for the Alerts page
rylnd Mar 23, 2026
ca54f79
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 24, 2026
b7ef23a
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 24, 2026
094253d
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 24, 2026
30057ab
Fix incomplete merge
rylnd Mar 24, 2026
db369f3
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 24, 2026
44305f8
Fix added tests broken by upstream changes
rylnd Mar 24, 2026
3093b7b
Merge branch 'main' into rbac-alerts-feature
rylnd Mar 24, 2026
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
1 change: 0 additions & 1 deletion packages/kbn-babel-preset/styled_components_files.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export function SecuritySolutionApiProvider({ getService }: FtrProviderContext)

return {
...securitySolutionApiServiceFactory(supertestService),
withUser: (user: { username: string; password: string }) => {
withUser: (user: { username: string; password?: string }) => {
const kbnUrl = formatUrl({ ...config.get('servers.kibana'), auth: false });

return securitySolutionApiServiceFactory(
supertest_.agent(kbnUrl).auth(user.username, user.password)
supertest_.agent(kbnUrl).auth(user.username, user.password ?? 'changeme')
);
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const THRESHOLD_RULE_TYPE_ID = `${RULE_TYPE_PREFIX}.thresholdRule` as con
export const NEW_TERMS_RULE_TYPE_ID = `${RULE_TYPE_PREFIX}.newTermsRule` as const;

export const SECURITY_SOLUTION_RULE_TYPE_IDS = [
EQL_RULE_TYPE_ID,
ESQL_RULE_TYPE_ID,
EQL_RULE_TYPE_ID,
INDICATOR_RULE_TYPE_ID,
ML_RULE_TYPE_ID,
QUERY_RULE_TYPE_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,10 @@ export const useGetToolbarVisibility = ({
const defaultVisibility = useGetDefaultVisibility(defaultVisibilityProps);
const options = useMemo(() => {
const isBulkActionsActive =
selectedRowsCount === 0 || selectedRowsCount === undefined || bulkActions.length === 0;
selectedRowsCount === 0 ||
selectedRowsCount === undefined ||
bulkActions.length === 0 ||
!bulkActions.some((panel) => panel.items?.length);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was it a bug not taking panel.items into account?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, that's why I fixed it 😉 . However, it wasn't a bug prior to this branch, since there wasn't previously a user who could see the alerts table but lacked alert actions. I detailed this in 84c6d94.


if (isBulkActionsActive) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36169,7 +36169,6 @@
"xpack.securitySolution.flyout.entityDetails.riskInputs": "Risikobeiträge anzeigen",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToExistingCase": "Zu einem bestehenden Fall hinzufügen",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewCase": "Zu einem neuen Fall hinzufügen",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewTimeline": "Zur neuen Zeitleiste hinzufügen",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.ariaLabel": "Aktionen",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.title": "Risikoeingang: {description}",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.titleDescription": "{quantity} ausgewählt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36547,7 +36547,6 @@
"xpack.securitySolution.flyout.entityDetails.riskInputs": "Voir les contributions au risque",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToExistingCase": "Ajouter à un cas existant",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewCase": "Ajouter au nouveau cas",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewTimeline": "Ajouter une nouvelle chronologie",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.ariaLabel": "Actions",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.title": "Entrée des risques : {description}",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.titleDescription": "{quantity} sélectionnée",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36602,7 +36602,6 @@
"xpack.securitySolution.flyout.entityDetails.riskInputs": "リスク寄与を表示",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToExistingCase": "既存のケースに追加",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewCase": "新しいケースに追加",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewTimeline": "新規タイムラインに追加",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.ariaLabel": "アクション",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.title": "リスクインプット:{description}",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.titleDescription": "{quantity}選択済み",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36582,7 +36582,6 @@
"xpack.securitySolution.flyout.entityDetails.riskInputs": "查看风险贡献",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToExistingCase": "添加到现有案例",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewCase": "添加到新案例",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.addToNewTimeline": "添加到新时间线",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.ariaLabel": "操作",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.title": "风险输入:{description}",
"xpack.securitySolution.flyout.entityDetails.riskInputs.actions.titleDescription": "{quantity} 个已选定",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ export default function ({ getService }: FtrProviderContext) {
'securitySolutionCasesV3',
'securitySolutionTimeline',
'securitySolutionNotes',
'securitySolutionRulesV2',
'securitySolutionRulesV3',
'securitySolutionAlertsV1',
'securitySolutionSiemMigrations',
'workflowsManagement',
'fleet',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,14 @@ export default function ({ getService }: FtrProviderContext) {
'minimal_read',
'security_solution_exceptions_all',
],
securitySolutionRulesV3: [
'all',
'read',
'minimal_all',
'minimal_read',
'security_solution_exceptions_all',
],
securitySolutionAlertsV1: ['all', 'read', 'minimal_all', 'minimal_read'],
infrastructure: ['all', 'read', 'minimal_all', 'minimal_read'],
logs: ['all', 'read', 'minimal_all', 'minimal_read'],
dataQuality: ['all', 'read', 'minimal_all', 'minimal_read', 'manage_rules', 'manage_alerts'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export default function ({ getService }: FtrProviderContext) {
siemV5: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionRulesV1: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionRulesV2: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionRulesV3: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionAlertsV1: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionAssistant: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionAttackDiscovery: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read'],
Expand Down Expand Up @@ -420,6 +422,14 @@ export default function ({ getService }: FtrProviderContext) {
'minimal_read',
'security_solution_exceptions_all',
],
securitySolutionRulesV3: [
'all',
'read',
'minimal_all',
'minimal_read',
'security_solution_exceptions_all',
],
securitySolutionAlertsV1: ['all', 'read', 'minimal_all', 'minimal_read'],
securitySolutionAssistant: [
'all',
'read',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,20 @@ function getUserCredentials(username: string) {
return `Basic ${Buffer.from(`${username}:changeme`).toString('base64')}`;
}

const deprecatedApiActions: Record<string, Set<string>> = {
'api:alerts-signal-update-deprecated-privilege': new Set([
'siem',
'siemV2',
'siemV3',
'siemV4',
'securitySolutionRulesV1',
'securitySolutionRulesV2',
]),
};

const isDeprecatedApiAction = ({ featureId, action }: { featureId: string; action: string }) =>
deprecatedApiActions[action]?.has(featureId) ?? false;

export default function ({ getService }: FtrProviderContext) {
describe('deprecated features', function () {
const supertest = getService('supertest');
Expand Down Expand Up @@ -190,6 +204,7 @@ export default function ({ getService }: FtrProviderContext) {
"securitySolutionCases",
"securitySolutionCasesV2",
"securitySolutionRulesV1",
"securitySolutionRulesV2",
"siem",
"siemV2",
"siemV3",
Expand Down Expand Up @@ -224,6 +239,8 @@ export default function ({ getService }: FtrProviderContext) {
'siemV2',
'siemV3',
'siemV4',
'securitySolutionRulesV1',
'securitySolutionRulesV2',
]);
for (const feature of features) {
if (
Expand Down Expand Up @@ -321,6 +338,7 @@ export default function ({ getService }: FtrProviderContext) {
for (const deprecatedAction of deprecatedActions) {
if (
isReplaceableAction(deprecatedAction) &&
!isDeprecatedApiAction({ featureId: feature.id, action: deprecatedAction }) &&
!replacementActions.delete(deprecatedAction)
) {
throw new Error(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ export function createTestSuiteFactory({ getService }: DeploymentAgnosticFtrProv
'infrastructure',
'logs',
'observabilityCasesV3',
'securitySolutionAlertsV1',
'securitySolutionAssistant',
'securitySolutionAttackDiscovery',
'securitySolutionCasesV3',
'securitySolutionNotes',
'securitySolutionRulesV2',
'securitySolutionRulesV3',
'securitySolutionSiemMigrations',
'securitySolutionTimeline',
'siemV5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,12 @@ export function getTestSuiteFactory(context: DeploymentAgnosticFtrProviderContex
'infrastructure',
'logs',
'observabilityCasesV3',
'securitySolutionAlertsV1',
'securitySolutionAssistant',
'securitySolutionAttackDiscovery',
'securitySolutionCasesV3',
'securitySolutionNotes',
'securitySolutionRulesV2',
'securitySolutionRulesV3',
'securitySolutionSiemMigrations',
'securitySolutionTimeline',
'siemV5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@ const ALL_SPACE_RESULTS: Space[] = [
'infrastructure',
'logs',
'observabilityCasesV3',
'securitySolutionAlertsV1',
'securitySolutionAssistant',
'securitySolutionAttackDiscovery',
'securitySolutionCasesV3',
'securitySolutionNotes',
'securitySolutionRulesV2',
'securitySolutionRulesV3',
'securitySolutionSiemMigrations',
'securitySolutionTimeline',
'siemV5',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export default function ({ getService }: FtrProviderContext) {
siemV5: 0,
securitySolutionRulesV1: 0,
securitySolutionRulesV2: 0,
securitySolutionRulesV3: 0,
securitySolutionAlertsV1: 0,
securitySolutionCases: 0,
securitySolutionCasesV2: 0,
securitySolutionCasesV3: 0,
Expand Down
84 changes: 82 additions & 2 deletions x-pack/solutions/security/packages/features/README.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,84 @@
## Security Solution App Features
# Security Solution Kibana features

This package provides resources to be used for Security Solution app features
This package (`@kbn/security-solution-features`) defines **Kibana feature registry** entries used by Elastic Security: base feature metadata, **privileges** (UI, API, saved objects, alerting), **sub-features** where applicable, and **product-feature** overlays that turn specific product capabilities on or off.

---

## Security

**Feature id:** `siemV5` (`SECURITY_FEATURE_ID_V5`)

**Display name:** Security

**Role:** Controls access to the main Security Solution experience and related apps. It is the umbrella feature for navigating and using Security, including integration with **Cloud Security Posture** (`csp`) and **Defend for containers** (`cloudDefend`) apps where configured.

**Base privileges**

- **`all` / `read`:** Gate the Security Solution catalogue entry and apps (`securitySolution`, CSP, Cloud Defend, `kibana`).
- **UI:** `show` (read path) and `crud` (all path) map to broad Security UI capabilities.
- **API:** Core Security APIs, RAC (`rac`), list APIs (`lists-*`), user read, and `initialize-security-solution`.
- **Saved objects:** Read/write patterns depend on the privilege level and the saved-object types passed in at registration time; the `all` privilege includes the `alert` saved object type plus Security-related types from parameters.

**Sub-features (v5):** Security is built as a **sub-feature–first** feature. The registry description states that **each sub-feature privilege must be assigned individually** when your pricing plan supports granular privileges; global assignment is only used when the plan does not allow per–sub-feature control.

Sub-features include (non-exhaustive): endpoint host list and workflow insights, SOC management, global artifact management, trusted applications and devices, host isolation exceptions, blocklist, event filters, endpoint exceptions, policy and scripts management, response-actions history, host isolation, process/file operations, execute/scan actions, and related Endpoint capabilities. Some entries are gated by experimental feature flags.

**Product features:** Additional keys in `ProductFeatureSecurityKey` (see `src/product_features_keys.ts` and `src/security/product_feature_config.ts`) layer **extra UI/API privileges** onto Security when those product capabilities are enabled—for example advanced insights, detections-related UI, threat intelligence, investigation guides, and Endpoint-specific behaviors.

**Versioning:** Older Security feature ids (`siem`, `siemV2`–`siemV4`) exist for backward compatibility and migration; current work targets **`siemV5`**.

---

## Rules

**Feature id (current):** `securitySolutionRulesV3` (`RULES_FEATURE_ID_V3`, `RULES_FEATURE_LATEST`)

**Display name:** Rules and Exceptions

**Role:** Governs **creation, editing, and management of Security detection rules** and related **exception lists**, separate from the **Alerts** feature. It wires Security Solution rule types into Kibana **alerting** (rule-level privileges: create, enable, manual run, manage settings, read) and grants access to the **Stack Management → Rules** area (`insightsAndAlerting` / `triggersActions`).

**Apps / catalogue:** Uses the `securitySolutionRules` app and the Security Solution catalogue id.

**Base privileges**

- **`all`:** Full rule and list APIs (`rules-*`, `lists-*`), user read, RAC, initialization; saved-object access for rule-related types (with exceptions for namespace-aware exception lists as defined in code).
- **`read`:** Read-only rule and list access, read exceptions API, and read-only alerting rule privileges.

**Sub-features (v3):** **Exceptions** (`RulesSubFeatureId.exceptions`) is registered as a sub-feature so exception-list access can be granted with **minimal** privilege combinations alongside base Rules privileges.

**Product features:** `ProductFeatureRulesKey` entries (for example `detections`, `externalDetections`) add targeted UI/API privileges—such as CSP-related APIs for detections—when those product slices are enabled. See `src/rules/product_feature_config.ts`.

**Older versions**

- **`securitySolutionRulesV1`:** Original combined rules feature.
- **`securitySolutionRulesV2`:** Deprecated; display name was “Rules, Alerts, and Exceptions.” Privileges were split so that **`securitySolutionRulesV3` + `securitySolutionAlertsV1`** replace the older combined model (`replacedBy` mappings in the v2 config).

---

## Alerts

**Feature id:** `securitySolutionAlertsV1` (`ALERTS_FEATURE_ID`)

**Display name:** Alerts

**Role:** Controls access to **alert documents** for Security detection and legacy notification rule types: viewing and updating alerts (status, assignment, tags, and so on), without bundling full **rule authoring** into the same feature. Alerting **alert** privileges (not rule management) are scoped to the same rule type ids as Rules (including `siem.notifications` where applicable).

**Apps:** Uses `securitySolutionAlertsV1`, `kibana`, and `securitySolution` app ids so the Alerts surface can be authorized independently of Rules.

**Base privileges**

- **`all`:** `read_alerts` and `edit_alerts` UI capabilities; `alerts-read` / `alerts-all` APIs; RAC; user read; read access to **data views** (`index-pattern`) for querying alerts.
- **`read`:** Read-only alerts UI and APIs, read-only alerting alert privileges.

**Product features:** `ProductFeatureAlertsKey` entries (`detections`, `externalDetections`) add UI flags such as `detections` / `external_detections` and optional APIs (for example `bulkGetUserProfiles` for detections on `all`). See `src/alerts/product_feature_config.ts`.

**Compatibility:** Deprecated privilege strings (`alerts-signal-update-deprecated-privilege`, `edit_alerts-update-deprecated-privilege`) exist so older role assignments that implied alert updates under read APIs continue to work where explicitly mapped (for example in deprecated Rules v2).

---

## How these pieces fit together

- **Security (`siemV5`)** is the primary application and platform access feature for the Security UI, lists, and broad saved-object/API access; granular Endpoint and workflow controls are expressed as **sub-features**.
- **Rules** and **Alerts** split **rule lifecycle** vs **alert workflow** so administrators can assign detection engineers vs analysts with narrower scopes.

For exact privilege strings and merge behavior, follow the source of truth in `src/constants.ts` and the corresponding `kibana_features.ts` / `kibana_sub_features.ts` files for each version.
1 change: 1 addition & 0 deletions x-pack/solutions/security/packages/features/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependsOn:
- '@kbn/securitysolution-rules'
- '@kbn/securitysolution-list-constants'
- '@kbn/elastic-assistant-common'
- '@kbn/data-views-plugin'
tags:
- shared-common
- package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export { getAttackDiscoveryFeature } from './src/attack_discovery';
export { getTimelineFeature } from './src/timeline';
export { getNotesFeature } from './src/notes';
export { getSiemMigrationsFeature } from './src/siem_migrations';
export { getRulesFeature, getRulesV2Feature } from './src/rules';
export { getRulesFeature, getRulesV2Feature, getRulesV3Feature } from './src/rules';
export { getAlertsFeature } from './src/alerts';
18 changes: 18 additions & 0 deletions x-pack/solutions/security/packages/features/src/alerts/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* 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 { ProductFeatureAlertsKey } from '../product_features_keys';
import { getAlertsBaseKibanaFeature } from './kibana_features';
import type { ProductFeatureParams } from '../types';
import { alertsDefaultProductFeaturesConfig } from './product_feature_config';

export const getAlertsFeature = (): ProductFeatureParams<ProductFeatureAlertsKey, string> => ({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder whether we should comment on what a security feature does. We have increasing number of security features where the boundary might be not 100% clear. There is a Google Sheet(s) describing the behavior but it lives separately. A comment could make the description clearer to the code.

WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree. I see we already had a README; I've added dev-oriented documentation for the Security, Rules, and Alerts features in 3eed09b.

baseKibanaFeature: getAlertsBaseKibanaFeature(),
baseKibanaSubFeatureIds: [],
subFeaturesMap: new Map(),
productFeatureConfig: alertsDefaultProductFeaturesConfig,
});
Loading
Loading