Skip to content

Allow usage of saved object references in alerts #87992

@timroes

Description

@timroes

When storing alerts at the moment there is no way (as far as I could tell) for the alert type (implementation) to make use of saved object references if the alert itself needs to reference other saved objects.

As an example the discover alert will serialize a search source and thus have a reference onto an index pattern saved object stored inside the alert. If this is not properly put into the saved object references when storing, this would break sharing between spaces (and other security related efforts) again. As soon as you'd share an index pattern now with another space its id will be changed and all existing alerts on that index pattern would be broken, since they reference a now non existing id.

Thus an alert need to be able to emit SavedObjectReferences besides it's params when saving and needs to get the parameters and saved object references back for injection in all places the alert is "loaded"/"used" again (like the executor).

This is blocking building any alerts that would make use/reference any other saved object (like index pattern).

cc @legrego

Metadata

Metadata

Assignees

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