mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Closes #161002 Closes #170073 ## Summary This PR implements a createModelVersion API in the Encrypted Saved Objects plugin to support upward migrations for model version encrypted saved objects. Much like how the `createMigration` API provided a way to wrap migration functions to support migration of encrypted saved objects prior to the model version paradigm, the new `createModelVersion` API provides a way to wrap a model version definition for the same purpose. `createModelVersion` manipulates the changes defined for a model version ('unsafe_transform', 'data_backfill', 'data_removal'), merging them into a single transform function in which the saved object document is decrypted, transformed, and then encrypted again. The document is decrypted with the `encrypted saved object type registration` provided by the required `inputType` parameter. Similarly, the document is by encrypted with the `encrypted saved object type registration` provided by the required `outputType` parameter. An example plugin (`examples/eso_model_version_example`) provides a demonstration of how the createModelVersion API should be used. The UI of the example plugin gives an idea of what the encrypted saved objects look like before and after the model version changes are applied. ## Testing ### Manual Testing - Modify the example plugin implementation in `examples/eso_model_version_example` to include different changes or additional model versions. ### Unit Tests - `x-pack/plugins/encrypted_saved_objects/server/create_model_version.test.ts` ### Functional Tests - `x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_api.ts` - `x-pack/test/encrypted_saved_objects_api_integration/tests/encrypted_saved_objects_decryption.ts` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
bfetch_explorer | ||
content_management_examples | ||
controls_example | ||
data_view_field_editor_example | ||
developer_examples | ||
discover_customization_examples | ||
embeddable_examples | ||
embeddable_explorer | ||
error_boundary | ||
eso_model_version_example | ||
expressions_explorer | ||
feature_control_examples | ||
field_formats_example | ||
files_example | ||
guided_onboarding_example | ||
hello_world | ||
locator_examples | ||
locator_explorer | ||
partial_results_example | ||
portable_dashboards_example | ||
preboot_example | ||
resizable_layout_examples | ||
response_stream | ||
routing_example | ||
screenshot_mode_example | ||
search_examples | ||
share_examples | ||
state_containers_examples | ||
ui_action_examples | ||
ui_actions_explorer | ||
unified_doc_viewer | ||
unified_field_list_examples | ||
user_profile_examples | ||
v8_profiler_examples | ||
README.asciidoc |
[[example-plugins]] == Example plugins This folder contains example plugins. To run the plugins in this folder, use the `--run-examples` flag, via [source,bash] ---- yarn start --run-examples ----