For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

MongoClient Options for Queryable Encryption

On this page, you can learn about the Queryable Encryption-specific configuration options for MongoClient instances.

The following table describes the structure of an AutoEncryptionOptions object:

Property
Data Type
Required?
Description

keyVaultNamespace

String

Yes

The full namespace of the Key Vault collection.

kmsProviders

Object

Yes

The Key Management System (KMS) used by Queryable Encryption for managing your Customer Master Keys (CMKs).

To learn more about kmsProviders objects, see KMS Providers.

To learn more about Customer Master Keys, see Encryption Keys and Key Vaults.

bypassAutoEncryption

Boolean

No

Specify true to bypass automatic encryption rules and perform explicit (manual) per-field encryption.

bypassQueryAnalysis

Boolean

No

Disables automatic analysis of outgoing commands. Specify true to use explicit encryption without the Automatic Encryption Shared Library.

encryptedFieldsMap

Object

No

A schema that specifies which fields to automatically encrypt and the types of queries allowed on those fields.

To learn how to construct an encryption schema, see Encrypted Fields and Enabled Queries.

explicitEncryptionOnly

Boolean

No

If you set explicitEncryptionOnly to true, the driver uses only explicit (manual) per-field encryption and removes automatic encryption settings from the connection. You must encrypt and decrypt field values manually using the ClientEncryption API.

This option only works with CSFLE.

keyVaultClient

MongoClient

No

Specifies the MongoClient that should connect to the MongoDB instance hosting your Key Vault collection.

If you omit this option, the driver uses the current MongoClient instance.

To learn more about Key Vault collections, see Key Vault Collections.

tlsOptions

Object

No

The TLS options to use when connecting to the KMS provider.

Rate this page