#include <mongocxx/v_noabi/mongocxx/options/client_encryption.hpp>
Used by mongocxx::v_noabi::client_encryption.
Public Types | |
| using | ns_pair = std::pair<std::string, std::string> |
| Represents the name of a database and a collection. | |
Public Member Functions | |
| client_encryption ()=default | |
| Default initialization. | |
| bsoncxx::v_noabi::stdx::optional< v_noabi::client * > const & | key_vault_client () const |
| Gets the key vault client. | |
| client_encryption & | key_vault_client (v_noabi::client *client) |
| When the key vault collection is on a separate MongoDB cluster, sets the optional client to use to route data key queries to that cluster. | |
| bsoncxx::v_noabi::stdx::optional< ns_pair > const & | key_vault_namespace () const |
| Gets the key vault namespace. | |
| client_encryption & | key_vault_namespace (ns_pair ns) |
| Sets the namespace to use to access the key vault collection, which contains all data keys used for encryption and decryption. This option must be set: | |
| bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | kms_providers () const |
| Gets the KMS providers. | |
| client_encryption & | kms_providers (bsoncxx::v_noabi::document::view_or_value kms_providers) |
| Sets the KMS providers to use for client side encryption. | |
| bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & | tls_opts () const |
| Gets the TLS options. | |
| client_encryption & | tls_opts (bsoncxx::v_noabi::document::view_or_value tls_opts) |
| Sets the TLS options to use for client side encryption with a given KMS provider. | |
| using mongocxx::v_noabi::options::client_encryption::ns_pair = std::pair<std::string, std::string> |
Represents the name of a database and a collection.
Default initialization.
|
inline |
Gets the key vault client.
|
inline |
When the key vault collection is on a separate MongoDB cluster, sets the optional client to use to route data key queries to that cluster.
| client | A client to use for routing queries to the key vault collection. |
|
inline |
Gets the key vault namespace.
|
inline |
Sets the namespace to use to access the key vault collection, which contains all data keys used for encryption and decryption. This option must be set:
client_encryption.key_vault_namespace({ "db", "coll" });
| ns | A std::pair of strings representing the db and collection to use to access the key vault. |
|
inline |
Gets the KMS providers.
|
inline |
Sets the KMS providers to use for client side encryption.
Multiple KMS providers may be specified. KMS providers are specified as a string of the form <KMS-provider-type> or <KMS-provider-type>:<KMS-provider-name>. The supported KMS provider types are aws, azure, gcp, local, and kmip. The optional name enables configuring multiple KMS providers with the same KMS provider type (e.g. aws:name1 and aws:name2 can refer to different AWS accounts). At least one KMS provider must be specified.
Supported forms of the KMS provider type aws include:
Supported forms of the KMS provider type local include:
Supported forms of the KMS provider type azure include:
Supported forms of the KMS provider type gcp include:
Supported forms of the KMS provider type kmip include:
KMS providers may include an optional name suffix separated with a colon. This enables configuring multiple KMS providers with the same KMS provider type. Example:
| kms_providers | A document containing the KMS providers. |
|
inline |
Gets the TLS options.
|
inline |
Sets the TLS options to use for client side encryption with a given KMS provider.
Multiple KMS providers may be specified. Supported KMS providers are "aws", "azure", "gcp", and "kmip". The map value has the same form for all supported providers:
| tls_opts | A document containing the TLS options. |