[Cases][Connectors] Migrate to using Saved Object References array to reference action saved objects from Cases #107067
Labels
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Team:Threat Hunting
Security Solution Threat Hunting Team
Currently, there are several cases saved object types that directly store the associated actions SO ID instead of utilizing the references array. With alerting planning to make actions share-capable in 8.0.0, the SO IDs for these actions will be re-generated, which will break the association in these cases saved objects.
Cases SO
Stores the associated
action
SO ID in thecases.connector.id
fieldExample `cases` saved object
When the action SO is made share-capable, this error will show in the Cases UI because the ID has changed.
Screenshot of error
Cases User Actions SO
Stores the associated
action
SO ID when the user changes the connector associated with a case. The old and newaction
SO IDs are stored as part of a stringified JSON.Example `cases-user-actions` saved object
When the action SO is made share-capable, the Cases UI will display a user action message of
${user} removed external incident management system
instead of the correct user action.Cases Configure SO
Stores the associated
action
SO ID in theconnector.id
field.Example `cases-configure` saved object
When the action SO is made share-capable, the Configure Cases UI will incorrect state that the associated connector has been deleted.
Screenshot of message
Note that the
cases-connector-mappings
SO correctly uses the references array to store the associated action SO.Recommended approach
The recommended approach is to update the
cases
,cases-user-actions
andcases-configure
saved objects so that associated action SO IDs are stored inside the references array. This requires a code update to extracted the associatedaction
SO ID on create/update from the document into the references array and to inject the ID on find/get. This would also require a migration to update existing SOs of this type to use the references array. Once this is done, the saved object service will takes care of updating the references when action SOs are made share-capable.Alternative approach
Alternatively, the cases team could explore using the .resolve() functionality provided by the saved object service in order to resolve the outdated action SO ID to their re-generated ID. This would require tracking down all the places where the
cases
,cases-user-actions
andcases-configure
saved objects are used to retrieve the associated actiohn SO and injecting the resolve layer to ensure the correct SO is loaded. This seems like a more brittle approach.When does this need to be done?
These changes should be completed by 7.16 FF as the saved object type conversions will be done in 8.0
The text was updated successfully, but these errors were encountered: