-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[SavedObjects] Ability to allow a type to be importable without it showing in the UI #110146
Comments
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/security-threat-hunting (Team:Threat Hunting) |
cc: @kobelb |
The ability to import/export Cases is a dependency of #82020. If there's any way to address this limitation by 7.16, it'd be greatly appreciated. |
I met with @XavierM @pgayvallet @rudolf to discuss how to move forward for 7.16. For now we're going to implement the export functionality using the available flags. This will result in the associated objects showing up in the saved objects management UI. The core team is going to try and get changes implemented for 7.16 to give us the ability to hide these associated objects. If that work is completed in time, Cases will include it for 7.16. |
@pgayvallet @rudolf initially I thought I could use Here's an example ndjson file:
|
We went back and forth numerous times on if we should, or not, dissociate a type's exportability status of its visibility in the SOM section. Until now, we didn't identify any concrete use case of this need. However the current issue seems to be a perfect example of why we need to allow type owners to dissociate these meta. Currently,
I should the easiest and obvious solution to split these two would be to introduce an additional property to add control on an exportable type's visibility in the SOM page. For BWC, the new property should be optional, and default the old behavior if unspecified. For this reason, I think it would be more logical to add an opt-out flag rather than an opt-in. I propose to add a new
Note: |
I agree about splitting these two very different things. My vote goes for |
Just to be sure we're all on the same page: We're all aware that the suggested approach will only allow to exclude exportable objects from the SO management UI by specifying If allowing the latest would eventually make sense, we don't have any identified needs for such configuration and given the additional amount of work that this would require, it doesn't seem worth it, at least for now. |
Yeah that's fine for Cases. |
The Cases app leverages inbound references for a few of the saved objects. The Comments and User Actions saved objects within cases reference the parent Case saved object. On exporting of a Case, we've implemented the
onExport
hook to handle finding the inbound associations to that case and including them in the exported ndjson file.We run into a problem when trying to import the file because the Comments and User Actions don't have valid types to be imported. We can get around this by setting the
importableAndExportable
flag on Comments and User Actions but it causes those saved objects to show up in the Saved Object Management UIWe can prevent Comments and User Actions from being exported by themselves using the
isExportable
hook but this means that the UI is going to list every user action and comment for all cases and might be confusing to the user as to which items need to be selected for export.Ideally we'd have a way to only show the Cases saved objects and hide all the associated saved objects that point to that case from the UI.
WIP PR for exporting cases: #110148
The text was updated successfully, but these errors were encountered: