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

[Security Solution][Detections] Supporting alerts-on-alerts Pre-packaged Rules #124756

Open
Tracked by #165878
spong opened this issue Feb 4, 2022 · 5 comments
Open
Tracked by #165878
Assignees
Labels
enhancement New value added to drive a business result Feature:Detection Rules Security Solution rules and Detection Engine Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: simp_prot_mgmt Security Solution Simplified Protection Management Theme

Comments

@spong
Copy link
Member

spong commented Feb 4, 2022

The detection-rules repo is looking to start shipping Pre-packaged Rules leveraging alerts-on-alerts (AOA from here) functionality (elastic/detection-rules#1755). This will be the first time shipping AOA prebuilt rules and will require some considerations to fully support.

What are AOA Rules?

AOA Rules are not a specific rule type, but rather a rule configuration who's source index points at an alerts index (hence alerts on alerts). This functionality is often bundled with the Building Block Rules feature to allow flexibility around which tier of alerts are visible to the end user.

Considerations when using AOA with Pre-packaged Rules

  1. Access control of pre-defined source index

Since the alerts index is space aware, it's not possible to pre-define the index field on an AOA rule without using wildcards, as such, there could be unintended crossover between spaces if the Rule Author has access to multiple spaces' alert indices. As a result, we may want to provide either a sentinel value, or programmatically identify when an alerts index is being used in the index field, and then when creating the rule we lock the value into whatever the alerts index is for the space the rule is being created in.

  1. If specifying an index, which index to use? .alerts-* or .siem-signals-*?

Going forward (8.x+), we should reference the alerts index as .alerts-*. This will be backwards compatible for users upgrading from 7.x as their system will the necessary index/field aliases back to their 7.x .siem-signals-* indices.

  1. [Add more considerations here...]
@spong spong added triage_needed enhancement New value added to drive a business result Feature:Detection Rules Security Solution rules and Detection Engine Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team Team:Detection Alerts Security Detection Alerts Area Team Theme: simp_prot_mgmt Security Solution Simplified Protection Management Theme 8.2 candidate considered, but not committed, for 8.2 release labels Feb 4, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@banderror
Copy link
Contributor

@spong thank you for this write-up! Just a few thoughts:

As a result, we may want to provide either a sentinel value, or programmatically identify when an alerts index is being used in the index field

As an alternative, we could explicitly represent a rule as being a "rule-on-alerts" in the API (via a new field) and rule creation/editing UI (e.g. via a checkbox). Similar to what we do for representing "building block" rules. Users wouldn't need to remember any special values that would indicate an alerts index for the current Kibana space.

then when creating the rule we lock the value into whatever the alerts index is for the space the rule is being created in

I think calculating and locking the value of the index on rule creation might not work well in the future with rules sharing between spaces. I'd probably suggest calculating it at runtime at the start of execution.

@spong
Copy link
Member Author

spong commented Feb 7, 2022

As an alternative, we could explicitly represent a rule as being a "rule-on-alerts" in the API (via a new field) and rule creation/editing UI (e.g. via a checkbox). Similar to what we do for representing "building block" rules. Users wouldn't need to remember any special values that would indicate an alerts index for the current Kibana space.

Yeah, good point, a dedicated field would be ideal. I was trying to steer away from adding additional logic to our API wrapper around the Rules API, but that'll add more complexity than just adding a dedicated field. We should touch base with the @elastic/response-ops-ram folks now that they're interested in pre-packaged rules and see if this makes sense in the core alerting API.

I think calculating and locking the value of the index on rule creation might not work well in the future with rules sharing between spaces. I'd probably suggest calculating it at runtime at the start of execution.

++, thanks for the distinction! Sharing security rules between spaces feels pretty nebulous at the moment, and intricacies like this in support of it keep popping up. Do you know if there's a meta issue floating around for supporting sharing security rules that we can use to document considerations like these? (edit: I didn't see one for security, but this framework level ones: #107161, #100067, #104316) I still need to make an issue for supporting secondary static id's in the SO client (as part of), so I can make one and reference if not already captured (secondary static id support now being explored in this internal doc) .

@banderror
Copy link
Contributor

Do you know if there's a meta issue floating around for supporting sharing security rules

@spong nope, not aware of any :( I can create a placeholder issue and ping Michelle. It looks like no one has really thought through this yet.

@marshallmain marshallmain removed the 8.2 candidate considered, but not committed, for 8.2 release label Mar 31, 2022
@banderror banderror removed 8.5 candidate Team:Detection Rule Management Security Detection Rule Management Team labels Aug 16, 2022
@yctercero yctercero added Team:Detection Engine Security Solution Detection Engine Area and removed Team:Detection Alerts Security Detection Alerts Area Team labels May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Detection Rules Security Solution rules and Detection Engine Team:Detection Engine Security Solution Detection Engine Area Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Theme: simp_prot_mgmt Security Solution Simplified Protection Management Theme
Projects
None yet
Development

No branches or pull requests

6 participants