(mongodb >=1.14.0)
MongoDB\Driver\ClientEncryption::__construct — 建立新的 ClientEncryption 物件
使用指定的選項建立新的 MongoDB\Driver\ClientEncryption 物件。
options
| 選項 | 類型 | 描述 |
|---|---|---|
| keyVaultClient | MongoDB\Driver\Manager | 用於路由資料金鑰查詢的 Manager。此選項為必要 (與 MongoDB\Driver\Manager::createClientEncryption() 不同)。 |
| keyVaultNamespace | 字串 | 完整限定的命名空間 (例如 "databaseName.collectionName"),表示包含所有用於加密和解密的資料金鑰的集合。此選項為必要。 |
| kmsProviders | 陣列 |
一個包含一個或多個 KMS 提供者配置的文件,用於加密資料金鑰。支援的提供者包括 如果為
aws: {
accessKeyId: <string>,
secretAccessKey: <string>,
sessionToken: <optional string>
}
azure: {
tenantId: <string>,
clientId: <string>,
clientSecret: <string>,
identityPlatformEndpoint: <optional string> // Defaults to "login.microsoftonline.com"
}
gcp: {
email: <string>,
privateKey: <base64 string>|<MongoDB\BSON\Binary>,
endpoint: <optional string> // Defaults to "oauth2.googleapis.com"
}
kmip: {
endpoint: <string>
}
local: {
// 96-byte master key used to encrypt/decrypt data keys
key: <base64 string>|<MongoDB\BSON\Binary>
}
|
| tlsOptions | 陣列 |
一個包含一個或多個 KMS 提供者 TLS 配置的文件。支援的提供者包括 <provider>: {
tlsCaFile: <optional string>,
tlsCertificateKeyFile: <optional string>,
tlsCertificateKeyFilePassword: <optional string>,
tlsDisableOCSPEndpointCheck: <optional bool>
}
|
| 版本 | 描述 |
|---|---|
| PECL mongodb 1.16.0 |
用於用戶端加密的 AWS KMS 提供者現在接受 在 如果為 |
| PECL mongodb 1.15.0 |
如果為 |