-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discuss] Referential integrity with Saved Objects #71453
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Pinging @elastic/kibana-security (Team:Security) |
I believe the security team is looking to implement this as part of #27004 although it's unclear from that issue exactly when that's planned. |
Referential integrity checks would be part of phase 3 if I'm not mistaken (we are currently on Phase 1.5). It's important to note that this will be a best-effort check. It won't be possible to guarantee that references will always be correct. |
Our planned work for "referential integrity checks" is only to support converting (existing) single-namespace types to (new) multi-namespace types.
WRT multi-namespace objects: fortunately, we changed "Delete" so it only removes the object from the current Space. In a nutshell, this check is not more complex for multi-namespace objects, because we only have to check references in the current Space 👍 The other way an object may get deleted is when an entire Space is deleted (
I like this idea (I've been calling these "inbound references" while working with them) |
I think this all makes a lot of sense.
We could simply add a
AFAIK it's pretty simple, at least for single namespaced SO, it's a plain client.find({
hasReference: { type, id }
}) So exposing this a public API should be easy. Just need to be cautious regarding namespace scope: Do we want/need to be able to retrieve referencing objects from all namespaces, or always ONLY from the current one?
Ah, the famous cascade delete in a non-transactional world. Been there, done that with mongo. Would wait to have an actual use case to open this discussion imho, as error handling in the middle of the cascade is something I wouldn't want my worse enemy to have to implement. |
Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment. |
TLDR; This thread is to discuss extending Saved Objects service to add referential integrity.
Right now referential integrity in Kibana is not enforced. For example, you can delete a visualization, which is used by one or more dashboards, and those dashboards will render with empty panels for that visualization, as the visualization is not removed from the dashboards. Another example is you can have alerts that reference non-existing actions. One more example, is you can have a Dashboard drilldown that references a deleted dashboard.
Some ideas:
Related:
The text was updated successfully, but these errors were encountered: