KMSBlob type and stored as a FlatBuffer next to the index keystore.
KMS key wrapping is advanced and optional, and primarily intended for the service layer. Embedded SDK users who supply their own KEK directly (see Managing Encryption Keys) can ignore these functions entirely, or use
provider="none", in which case nothing key-derived is stored and the caller supplies the plaintext KEK per request.The KMS Envelope
Each index is encrypted with AES-256-GCM under a 32-byte KEK. The KMS envelope records how that KEK is wrapped so it can be unwrapped later. Supported providers:"aws"— the KEK is wrapped with AES-256-GCM under a value stored in AWS Secrets Manager."aws-kms"— the KEK is wrapped viakms.Encryptusing an AWS KMS key."none"— no external wrapping; the caller supplies the plaintext KEK per request and nothing is stored.
KMSBlob, whose fields are: kms_name, provider, key_id, region (strings), wrapped_kek (bytes), version (int), and created_at (unix epoch seconds).
Storing an Envelope
Usecreate_index_kms for a strict insert (fails if an envelope already exists) or push_index_kms for an idempotent upsert. Both take a config_location (StorageConfig) identifying where the index keystore lives, the index name, and the KMSBlob.
Reading and Deleting an Envelope
get_index_kms returns the stored KMSBlob; delete_index_kms removes it (idempotent). A service layer typically reads the envelope, unwraps the KEK with the external KMS, then uses the plaintext KEK when loading the index.
API Reference
For full signatures and theKMSBlob type, refer to the API Reference:
Python API Reference
API reference for the KMS module functions and
KMSBlob in PythonC++ API Reference
API reference for the KMS module functions and
KMSBlob in C++