Interface ClientEncryptionOptions

Additional settings to provide when creating a new ClientEncryption instance.

interface ClientEncryptionOptions {
    credentialProviders?: CredentialProviders;
    keyExpirationMS?: number;
    keyVaultClient?: MongoClient;
    keyVaultNamespace: string;
    kmsProviders?: KMSProviders;
    proxyOptions?: ProxyOptions;
    timeoutMS?: number;
    tlsOptions?: CSFLEKMSTlsOptions;
}

Properties

credentialProviders?: CredentialProviders

Options for user provided custom credential providers.

keyExpirationMS?: number

Sets the expiration time for the DEK in the cache in milliseconds. Defaults to 60000. 0 means no timeout.

keyVaultClient?: MongoClient

A MongoClient used to fetch keys from a key vault. Defaults to client.

keyVaultNamespace: string

The namespace of the key vault, used to store encryption keys

kmsProviders?: KMSProviders

Options for specific KMS providers to use

proxyOptions?: ProxyOptions

Options for specifying a Socks5 proxy to use for connecting to the KMS.

timeoutMS?: number

timeoutMS has no effect and will be removed in a future release.

tlsOptions?: CSFLEKMSTlsOptions

TLS options for kms providers to use.