(mongodb >=1.14.0)
MongoDB\Driver\ClientEncryption::__construct — Create a new ClientEncryption object
Constructs a new MongoDB\Driver\ClientEncryption object with the specified options.
options
| Option | Type | Description |
|---|---|---|
| keyVaultClient | MongoDB\Driver\Manager | The Manager used to route data key queries. This option is required (unlike with MongoDB\Driver\Manager::createClientEncryption()). |
| keyVaultNamespace | string | Повна назва простору імен (напр.
"databaseName.collectionName"), що позначає
колекцію, яка містить усі ключі даних, що використовуються для
шифрування та дешифрування. Цей параметр є обов'язковим. |
| kmsProviders | array |
Документ, що містить налаштування для одного або кількох
KMS-провайдерів, які використовуються для шифрування ключів даних.
Підтримувані провайдери:
Якщо вказано порожній документ для
Формат для aws: {
accessKeyId: <string>,
secretAccessKey: <string>,
sessionToken: <string (необов'язковий)>
}
Формат для azure: {
tenantId: <string>,
clientId: <string>,
clientSecret: <string>,
identityPlatformEndpoint: <string (необов'язковий)> // Початково: "login.microsoftonline.com"
}
Формат для gcp: {
email: <string>,
privateKey: <base64 string>|<MongoDB\BSON\Binary>,
endpoint: <string (необов'язковий)> // Початково: "oauth2.googleapis.com"
}
Формат для kmip: {
endpoint: <string>
}
Формат для local: {
// 96-байтний головний ключ, що застосовується для шифрування/дешифрування ключів даних
key: <base64 string>|<MongoDB\BSON\Binary>
}
|
| tlsOptions | array |
Документ, який містить налаштування TLS для одного або кількох
KMS-провайдерів. Підтримуються такі провайдери:
<provider>: {
tlsCaFile: <string> (необов'язковий),
tlsCertificateKeyFile: <string> (необов'язковий),
tlsCertificateKeyFilePassword: <string> (необов'язковий),
tlsDisableOCSPEndpointCheck: <bool> (необов'язковий)
}
|
| Версія | Опис |
|---|---|
| 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.
|