[Saved Objects] Add ability to know when a onCopy happens vs onExport #109190
Labels
Feature:Detection Alerts
Security Solution Detection Alerts Feature
Feature:Saved Objects
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Team:Detections and Resp
Security Detection Response Team
Parent Meta: #109169
Describe the feature:
In the existing implementation, the Kibana core
onExport
is called for both copying and for exporting saved objects. The export option for rules already removes particular fields such as apiKey, apiKeyOwner, scheduledTaskId. Export also sets the value of enabled to be false.However, on copying a rule and its references, we will need to re-provision the apiKey, apiKeyOwner and then update other fields such as updated_at, updated_by as well as do deep copying of exception lists so that the list_id and any other fields are not shallow linked between each other.
Describe a specific use case for the feature:
As a platform engineer, when I export vs. when I do a copy I need the Saved Object (SO) types of rules, exception lists, etc... to behave in two different ways.
The export functionality should preserve common fields such as updated_by, updated_at, etc...
The copying functionality should update these values to new values of last updated, who last updated it, etc.... The created_at, created_by should change to the author of who is copying it unless other examples show something different.
The text was updated successfully, but these errors were encountered: