(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 | Der Manager, der verwendet wird, um Datenschlüssel-Abfragen auf einen anderen MongoDB-Cluster zu routen. Standardmäßig werden der aktuelle Manager und Cluster verwendet. |
| keyVaultNamespace | string | Ein vollständig qualifizierter Namensraum (z. B. "databaseName.collectionName"), der die Kollektion bezeichnet, die alle Datenschlüssel enthält, die für Ver- und Entschlüsselung verwendet werden. Diese Option muss angegeben werden. |
| kmsProviders | array |
Ein Dokument, das die Konfiguration für einen oder mehrere KMS-Provider enthält, die verwendet werden, um Datenschlüssel zu verschlüsseln. Zu den unterstützten Providern gehören
Wenn für
Das Format für aws: {
accessKeyId: <string>,
secretAccessKey: <string>,
sessionToken: <optional string>
}
Das Format für azure: {
tenantId: <string>,
clientId: <string>,
clientSecret: <string>,
identityPlatformEndpoint: <optional string> // Der Standardwert ist "login.microsoftonline.com"
}
Das Format für gcp: {
email: <string>,
privateKey: <base64 string>|<MongoDB\BSON\Binary>,
endpoint: <optional string> // Der Standardwert ist "oauth2.googleapis.com"
}
Das Format für kmip: {
endpoint: <string>
}
Das Format für local: {
// Der 96-Byte-Hauptschlüssel, der zur Ver- und Entschlüsselung von
// Datenschlüsseln verwendet wird
key: <base64 string>|<MongoDB\BSON\Binary>
}
|
| tlsOptions | array |
Ein Dokument, das die TLS-Konfiguration für einen oder mehrere KMS-Provider enthält. Zu den unterstützten Providern gehören <provider>: {
tlsCaFile: <optionale Zeichenkette>,
tlsCertificateKeyFile: <optionale Zeichenkette>,
tlsCertificateKeyFilePassword: <optionale Zeichenkette>,
tlsDisableOCSPEndpointCheck: <optionaler Boolean>
}
|
Returns a new MongoDB\Driver\ClientEncryption instance.
| Version | Beschreibung |
|---|---|
| PECL mongodb 1.16.0 |
The AWS KMS provider for client-side encryption now accepts a
Added
If an empty document is specified for the |
| PECL mongodb 1.15.0 |
If an empty document is specified for the |
| 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".
|