Context
The KEK key/store design requires a new interface module. This module will need to be specified as “early_load=true” (like WT_FILE_SYSTEM), and will be called during startup
The WT_FILE_SYSTEM should look something like:
/*
* These are arguments to the load_key_blob method, called
* when a checkpoint is loaded, either at startup or when
* a new checkpoint is picked up on a follower.
*
* Fields in this structure are set by WiredTiger and should
* not be changed by the key management extension.
*/
struct WT_KEY_MANAGEMENT_LOAD_ARGS {
void *blob_data;
void size_t blob_size;
};
/*
* These are arguments to the get_key_blob and get_key_complete
* methods, which are called when WiredTiger is writing a
* checkpoint.
*
* Fields in this structure, except for returned_lsn,
* are set by the key management extension, and are
* not changed by WiredTiger. If has_changes is true,
* blob_data and blob_size must be set by the extension,
* and define the data that is written by WiredTiger. In
* that case, when the blob write has completed,
* get_complete_key is called. If has_changes is false,
* no write is done by WiredTiger, and get_key_complete
* is not called as a result.
*/
struct WT_KEY_MANAGEMENT_GET_ARGS {
void *blob_data; /*
void size_t blob_size;
boolean has_changes; /* Blob has changed since last call */
uint64_t returned_lsn; /* Set by WiredTiger for get_key_complete */
};
/*
* The interface to the key management module, loaded at startup.
* Each function is a callback made by WiredTiger.
*/
struct WT_KEY_MANAGEMENT {
/* Called by WiredTiger when a checkpoint is loaded. */
void load_key_blob(WT_KEY_MANAGEMENT *km,
WT_KEY_MANAGEMENT_LOAD_ARGS *args);
/* Called by WiredTiger when storing a checkpoint. */
void get_key_blob(WT_KEY_MANAGEMENT *km,
WT_KEY_MANAGEMENT_GET_ARGS *args);
/*
* Called by WiredTiger after the get_key_blob call,
* when the key blob has been persisted.
*/
void get_key_complete(WT_KEY_MANAGEMENT *km,
WT_KEY_MANAGEMENT_GET_ARGS *args);
};
Definition of Done
- Interface module and mock KEK module has been created
- WiredTiger uses WT_KEY_MANAGEMENT extension module and calls load_key_blob during start up.
- Basic python testing using an example module has been correctly loaded during startup
- causes
-
WT-16193 Palite segfaults in Config::open_config_parser due to calling __conn_set_key_provider
-
- Closed
-
- is depended on by
-
WT-16054 Implement KEK write path mechanism
-
- In Progress
-
- is related to
-
WT-16199 Revamp WT_KEY_PROVIDER extension interface
-
- Closed
-
- related to
-
WT-16055 Implement KEK read path mechanism
-
- Open
-