Skip to content

Rules exceptions subfeatures#243095

Closed
dhurley14 wants to merge 136 commits intoelastic:mainfrom
dhurley14:rules-exceptions-subfeatures
Closed

Rules exceptions subfeatures#243095
dhurley14 wants to merge 136 commits intoelastic:mainfrom
dhurley14:rules-exceptions-subfeatures

Conversation

@dhurley14
Copy link
Copy Markdown
Contributor

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

Identify risks

Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.

rylnd and others added 30 commits October 29, 2025 16:12
This does not include changes to existing roles, nor the role migration
machinery.
These changes were made automatically in an initial commit that added
our new features to roles; those changes have since been reverted
(320c34f), and thus there should not currently be any behavioral
changes in these files, which makes these stylistic changes even more
unnecessary.

Note: I also noticed that a few old references had (accidentally?)
remained in `security_roles.json` after `320c34f485`; this cleans those
up as well.
Instead of requiring siemVX read/all, it now requires securitySolutionRulesV1 read/all
It is unclear on wether "dashboards" and "integrations" should be exclusive to `siemV5` or `securitySolutionRulesV1`. So for now we are showing it when the user has either of those.
Now it requires the `securitySolutionRulesV1.all` privilege
No security subfeature is required in all spaces anymore. The test was failing because the `siemV5` feature file never got updated and it was still referencing a feature flag that has been enabled and removed in `main`.
The feature flag in question is `endpointManagementSpaceAwarenessEnabled` which was being used to override the subfeature configuration by setting `requireAllSpaces=false` and `privilegesTooltip=undefined`. Now that the feature flag doesn't exist, it makes sense to remove these properties directly in the subfeature configuration instead of overriding them outside of it.
The logic to show it was relying on the old siemPrivileges, however value lists is now under rules.
Reshuffling privileges and removal of alerting privileges from siemV5. These alerting privileges exist exclusively in securitySolutionRulesV1
This notably includes the fix to the infinite loop on the alerts page
when a role lacks sufficient lists privileges.
The test broke after merging main into the branch
dplumlee and others added 24 commits December 3, 2025 10:16
This will ensure behaviors are correct for all intermediate SIEM
features.
…ions-subfeatures

Files conflicting: x-pack/solutions/security/plugins/security_solution/common/index.ts
…endpoint exceptions tests stop failing. Added a TODO for discussion on how to move forward with the eventual plan to make lists it's own feature
 Conflicts:
	x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_tables.tsx
	x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.ts
	x-pack/solutions/security/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.ts
	x-pack/solutions/security/test/serverless/api_integration/test_suites/platform_security/authorization.ts
…e route, if exceptions list is the only field 'updated' then we can use the special patch function from alerting
…n't interfere with prebuilt rules customization logic
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Dec 9, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #53 / Actions APIs - Trial License/Complete Tier @serverless @ess update_actions updating actions @skipInServerlessMKI should be able to create a new webhook action, attach it to an immutable rule and the count of prepackaged rules should not increase. If this fails, suspect the immutable tags are not staying on the rule correctly.
  • [job] [logs] FTR Configs #55 / Actions APIs - Trial License/Complete Tier @serverless @ess update_actions updating actions @skipInServerlessMKI should be able to create a new webhook action, attach it to an immutable rule and the count of prepackaged rules should not increase. If this fails, suspect the immutable tags are not staying on the rule correctly.
  • [job] [logs] FTR Configs #53 / Actions APIs - Trial License/Complete Tier @serverless @ess update_actions updating actions @skipInServerlessMKI should be able to create a new webhook action, attach it to an immutable rule and the count of prepackaged rules should not increase. If this fails, suspect the immutable tags are not staying on the rule correctly.
  • [job] [logs] FTR Configs #55 / Actions APIs - Trial License/Complete Tier @serverless @ess update_actions updating actions @skipInServerlessMKI should be able to create a new webhook action, attach it to an immutable rule and the count of prepackaged rules should not increase. If this fails, suspect the immutable tags are not staying on the rule correctly.
  • [job] [logs] Jest Tests #17 / calculateRuleSourceForImport calculates as external with customizations if a matching asset/version is found
  • [job] [logs] Jest Tests #17 / calculateRuleSourceForImport calculates as external with customizations if a matching asset/version is found
  • [job] [logs] Jest Tests #17 / DetectionRulesClient.updateRule calls the rulesClient when updating a system action groupingBy property from agent.name to agent.type
  • [job] [logs] Jest Tests #17 / DetectionRulesClient.updateRule calls the rulesClient when updating a system action groupingBy property from agent.name to agent.type
  • [job] [logs] Jest Tests #17 / EntityStoreCrudClient update entities bulk when valid create entities
  • [job] [logs] Jest Tests #17 / EntityStoreCrudClient update entities bulk when valid create entities
  • [job] [logs] Jest Tests #17 / EntityStoreCrudClient update entities bulk when valid create entity using force
  • [job] [logs] Jest Tests #17 / EntityStoreCrudClient update entities bulk when valid create entity using force
  • [job] [logs] FTR Configs #62 / Rules Management - Prebuilt Rules Customization (Customization Enabled) @ess @serverless @skipInServerlessMKI Skip customization detection for unaffected prebuilt rule fields when base version is available "is_customized" calculation is not affected by "exceptions_list" field
  • [job] [logs] FTR Configs #119 / Rules Management - Prebuilt Rules Customization (Customization Enabled) @ess @serverless @skipInServerlessMKI Skip customization detection for unaffected prebuilt rule fields when base version is available "is_customized" calculation is not affected by "exceptions_list" field
  • [job] [logs] FTR Configs #62 / Rules Management - Prebuilt Rules Customization (Customization Enabled) @ess @serverless @skipInServerlessMKI Skip customization detection for unaffected prebuilt rule fields when base version is available "is_customized" calculation is not affected by "exceptions_list" field
  • [job] [logs] FTR Configs #119 / Rules Management - Prebuilt Rules Customization (Customization Enabled) @ess @serverless @skipInServerlessMKI Skip customization detection for unaffected prebuilt rule fields when base version is available "is_customized" calculation is not affected by "exceptions_list" field
  • [job] [logs] FTR Configs #119 / Rules Management - Rule Update APIs @ess @serverless @skipInServerlessMKI update_rules update rules should overwrite exception list value on update - non additive
  • [job] [logs] FTR Configs #137 / Rules Management - Rule Update APIs @ess @serverless @skipInServerlessMKI update_rules update rules should overwrite exception list value on update - non additive
  • [job] [logs] FTR Configs #119 / Rules Management - Rule Update APIs @ess @serverless @skipInServerlessMKI update_rules update rules should overwrite exception list value on update - non additive
  • [job] [logs] FTR Configs #137 / Rules Management - Rule Update APIs @ess @serverless @skipInServerlessMKI update_rules update rules should overwrite exception list value on update - non additive
  • [job] [logs] FTR Configs #114 / Serverless security API Platform security APIs security/authorization available features composite features
  • [job] [logs] FTR Configs #114 / Serverless security API Platform security APIs security/authorization available features composite features
  • [job] [logs] Jest Tests #17 / synchronizing 2-way and 3-way rule diff calculations non-customizable fields "exceptions_list" field
  • [job] [logs] Jest Tests #17 / synchronizing 2-way and 3-way rule diff calculations non-customizable fields "exceptions_list" field

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
alerting 342 343 +1
securitySolution 8476 8478 +2
total +3

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/security-solution-features 30 31 +1
securitySolution 134 135 +1
total +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.1MB 11.1MB -331.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/security-solution-features 10 11 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
securitySolution 169.6KB 170.2KB +647.0B
securitySolutionEss 34.4KB 34.5KB +85.0B
securitySolutionServerless 46.1KB 46.2KB +81.0B
total +813.0B
Unknown metric groups

API count

id before after diff
@kbn/security-solution-features 36 37 +1
securitySolution 204 205 +1
total +2

History

cc @dhurley14 @dplumlee

@rylnd
Copy link
Copy Markdown
Contributor

rylnd commented Dec 10, 2025

This PR was based on (the now squashed/merged) #239634 . Closing in favor of the squashed/rebased #245722.

@rylnd rylnd closed this Dec 10, 2025
dhurley14 added a commit that referenced this pull request Jan 31, 2026
## Summary

Squashed commits from: #243095

Epic: elastic/security-team#9533

Adds a new subfeature to the Rules RBAC feature implemented
[here](#239634) for rule
exceptions permissions.


---------

Co-authored-by: Devin Hurley <devin.hurley@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:cloud-deploy Create or update a Cloud deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants