MongoDB\Driver\Manager::createClientEncryption
PHP function
Edit on GitHub ✎
(mongodb >=1.7.0)
Create a new ClientEncryption object
Description
MongoDB\Driver\Manager::createClientEncryption(array $options): MongoDB\Driver\ClientEncryption
Constructs a new MongoDB\Driver\ClientEncryption object with the specified options.
Parameters
optionsOption Type Description
Return Values
Returns a new MongoDB\Driver\ClientEncryption instance.
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\RuntimeExceptionif the extension was compiled without libmongocrypt support
Changelog
| Version | Description |
|---|---|
| PECL mongodb 1.16.0 | The AWS KMS provider for client-side encryption now accepts a "sessionToken" option, which can be used to authenticate with temporary AWS credentials.Added "tlsDisableOCSPEndpointCheck" to the "tlsOptions" option.If an empty document is specified for the "azure" or "gcp" KMS provider, the driver will attempt to configure the provider using Automatic Credentials. |
| PECL mongodb 1.15.0 | If an empty document is specified for the "aws" KMS provider, the driver will attempt to configure the provider using Automatic Credentials. |
| PECL mongodb 1.12.0 | KMIP is now supported as a KMS provider for client-side encryption and may be configured in the "kmsProviders" option.Added the "tlsOptions" option. |
| PECL mongodb 1.10.0 | Azure and GCP are now supported as KMS providers for client-side encryption and may be configured in the "kmsProviders" option. Base64-encoded strings are now accepted as an alternative to MongoDB\BSON\Binary for options within "kmsProviders". |
See Also
MongoDB\Driver\ClientEncryption::__construct()- Explicit (Manual) Client-Side Field Level Encryption in the MongoDB manual