kibana/examples/eso_model_version_example
Gerard Soldevila 852f416a01
APEX-54 Stricter type checking for unsafe_transform functions (#222973)
Address https://github.com/elastic/kibana/issues/216061

Adds an indirection layer in the definition of the `transformFn:`, which
forces devs to explicitly define the types of the documents being
transformed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-06-13 12:29:13 +02:00
..
common Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
public Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06:00
server APEX-54 Stricter type checking for unsafe_transform functions (#222973) 2025-06-13 12:29:13 +02:00
kibana.jsonc Implements Encrypted Saved Objects Model Version API (#166302) 2023-12-07 16:01:29 -05:00
README.md Implements Encrypted Saved Objects Model Version API (#166302) 2023-12-07 16:01:29 -05:00
tsconfig.json Implements Encrypted Saved Objects Model Version API (#166302) 2023-12-07 16:01:29 -05:00

Encrypted Saved Object Model Version Example

This plugin provides a simple use case demonstration of:

  • How to organize versioned saved object and encryption registration definitions
  • How to use the createModelVersion wrapper function of the Encrypted Saved Objects plugin
  • How/when encrypted model versions are migrated and what to expect when they are queried

This is an example plugin to demonstrate implementation of an encrypted saved object with model versions using the new encryptedSavedObjectsPlugin.createModelVersion API.

A good place to start is by reviewing the definitions in examples/eso_model_version_example/server/types. This is where the interfaces and constants that for the example saved object are defined.

In examples/eso_model_version_example/server/plugin.ts the model versions are defined, which include typical changes you might see in a saved object over time only in this case the model version definitions are wrapped by the new createModelVersion API.

Lastly, use the plugin UI to get a sense for how the objects are migrated - you can query the raw documents and then decrypted the migrated objects.

To run this example, use the command yarn start --run-examples.