kibana/examples/eso_model_version_example
Luke Elmers b6287708f6
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic
License 2.0, AGPL 3.0, or SSPL 1.0.
2024-09-06 19:02:41 -06: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 Adds AGPL 3.0 license (#192025) 2024-09-06 19:02:41 -06: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.