(mongodb >=1.7.0)
MongoDB\Driver\Manager::createClientEncryption — Create a new ClientEncryption object
$options): MongoDB\Driver\ClientEncryptionConstructs a new MongoDB\Driver\ClientEncryption object with the specified options.
options
| Option | Type | Description |
|---|---|---|
| keyVaultClient | MongoDB\Driver\Manager | Le Manager utilisé pour router les requêtes de clés de données à un cluster MongoDB différent. Par défaut, le Manager et cluster courant et utilisé. |
| keyVaultNamespace | chaîne de caractères | Un nom d'espace complètement qualifié (par exemple "databaseName.collectionName") dénotant la collection qui contient toutes les clés de données utilisé pour le chiffrement et déchiffrement. Cette option est requise. |
| kmsProviders | tableau |
Un document contenant la configuration d'un ou plusieurs
fournisseurs KMS, qui sont utilisés pour chiffrer les clés de données.
Les fournisseurs supporté sont
Le format pour aws: {
accessKeyId: <string>,
secretAccessKey: <string>,
sessionToken: <optional string>
}
Le format pour azure: {
tenantId: <string>,
clientId: <string>,
clientSecret: <string>,
identityPlatformEndpoint: <optional string> // Defaults to "login.microsoftonline.com"
}
Le format pour gcp: {
email: <string>,
privateKey: <base64 string>|<MongoDB\BSON\Binary>,
endpoint: <optional string> // Defaults to "oauth2.googleapis.com"
}
Le format pour kmip: {
endpoint: <string>
}
Le format pour local: {
// 96-byte master key used to encrypt/decrypt data keys
key: <base64 string>|<MongoDB\BSON\Binary>
}
|
| tlsOptions | array |
Un document contenant la configuration TLS d'un ou plusieurs
fournisseurs KMS.
Les fournisseurs supporté sont <provider>: {
tlsCaFile: <optional string>,
tlsCertificateKeyFile: <optional string>,
tlsCertificateKeyFilePassword: <optional string>,
tlsDisableOCSPEndpointCheck: <optional bool>
}
|
Returns a new MongoDB\Driver\ClientEncryption instance.
| Version | Description |
|---|---|
| PECL mongodb 1.16.0 |
The AWS KMS provider for client-side encryption now accepts a
|
| PECL mongodb 1.12.0 |
KMIP is now supported as a KMS provider for client-side encryption and
may be configured in the
Added the |
| 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".
|