KMSBlob type and stored as a FlatBuffer next to the index keystore.
KMS is an advanced / optional feature primarily for the service layer. Embedded SDK users who supply their own KEK can ignore it entirely, or use
provider="none" (the SDK supplies the plaintext KEK per request and nothing key-derived is stored).Envelope model. Each index is encrypted with AES-256-GCM under a 32-byte KEK. The KMS envelope records how that KEK is wrapped by an external KMS so a service layer can unwrap it at request time. 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.
"aws-kms", not yet for the other providers.By default the plaintext KEK lives in caller process memory; the wrapped KEK lives next to the index keystore (StorageConfig).config_location (StorageConfig) identifying where the index keystore lives, plus the index name.
create_index_kms
Creates a KMS envelope for an index. Strict insert — fails if an envelope already exists forindex_name.
Parameters
Example Usage
push_index_kms
Stores a KMS envelope for an index. Idempotent upsert — creates the envelope if missing, otherwise overwrites it.Parameters
Example Usage
get_index_kms
Retrieves the KMS envelope for an index.Parameters
Returns
KMSBlob: The stored KMS envelope for the index.
Example Usage
delete_index_kms
Deletes the KMS envelope for an index. Idempotent — deleting a non-existent envelope is a no-op.Parameters
Example Usage
Rotation
To rotate the wrapped KEK, re-wrap it with your external KMS and store the new envelope withpush_index_kms (an idempotent upsert), bumping version: