Skip to content

[Change Proposal] Allow security_rule objects to have rule IDs different from the object IDs #459

@xcrzx

Description

@xcrzx

Security Solution migrates the detection rules package from storing a single saved object per rule to multiple saved objects. See elastic/kibana#137420 for more context regarding the change.

The package will contain rule saved objects with rule id and version in the name (security_rule/[ruleId]_[ruleVersion].json) with the following content:

{
  "id": "[ruleId]_[ruleVersion]",
  "type": "security-rule",
  "attributes": {
    "rule_id": "[ruleId]",
    "version": "[ruleVersion]",
    // Other rule attributes
  }
}

So the saved object ID and the rule ID do not match anymore, making this validation check always return an error:

if ruleID != objectID {
errs = append(errs, errors.New("rule ID is different from the object ID"))
continue
}

I would like to know why that validation exists in the first place and if we could remove or update it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussIssue needs discussion

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions