[Security Solution] [PRC Milestone 3] Update API and internal rule schemas with new fields #175680
Labels
Feature:Prebuilt Detection Rules
Security Solution Prebuilt Detection Rules area
release_note:enhancement
Team:Detection Rule Management
Security Detection Rule Management Team
Team:Detections and Resp
Security Detection Response Team
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Prebuilt Rule Customization Epic - Milestone 3: #174168
Main Epic: https://github.com/elastic/security-team/issues/1974 (internal)
Additional Material:
- Milestone 3 - Software Design RFC
- Prebuilt Rules Customization Technical Design
Description:
Update our rule schemas as detailed in the
Necessary rule schema changes
of the software design document.Concretely, the changes needed are:
1. In the API schema
prebuilt
field and itsisCustomized
andelasticUpdateDate
subfields as common attributes in: x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yamlprebuilt
field as a non-required field in the Response Fields: x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.schema.yamlRuleImport
schema in x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/rule_to_import.ts with two changes:immutable
optional, but now accept the valuetrue
prebuilt
as an optional importable field2. In the internal rule schema
prebuilt
as an optional field toBaseRuleParams
in x-pack/plugins/security_solution/server/lib/detection_engine/rule_schema/model/rule_schemas.tsPrebuiltRuleAsset
schema to include the optionalelasticUpdateDate
field in x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.ts. This field is currently being added by the TRaDE team to new version of rules.main
or a feature branch without making braking changes.immutable
schema forRuleImport
will change the behaviour of our app, and allow users to import prebuilt rules, which is a breaking change. So on a first phase, we can limit this change to be: only update this schema to accept theprebuilt
field and leave theimmutable
field untouched to keep the behaviour the same. Then create as follow up another ticket to complete the migration, once we are ready to accept the importing of prebuilt rules.The text was updated successfully, but these errors were encountered: