W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
(mongoDB >=1.7.0)
MongoDB\Driver\Manager::createClientEncryption — 創(chuàng)建新的 ClientEncryption 對象
final public MongoDB\Driver\Manager::createClientEncryption(array $options): MongoDB\Driver\ClientEncryption
使用指定的選項構(gòu)造新的 MongoDB\Driver\ClientEncryption 對象。
options
選擇 | 類型 | 描述 |
---|---|---|
keyVaultClient | MongoDB\驅(qū)動程序\管理器 | 用于將數(shù)據(jù)密鑰查詢路由到單獨的 MongoDB 集群的管理器。默認情況下,使用當前 Manager 和集群。 |
keyVaultNamespace | 字符串 | 一個完全限定的命名空間(例如 ),表示包含用于加密和解密的所有數(shù)據(jù)密鑰的集合。此選項是必需的。"databaseName.collectionName" |
kms提供程序 | 數(shù)組 | 包含一個或多個 KMS 提供程序的配置的文檔,這些提供程序用于加密數(shù)據(jù)密鑰。支持的提供程序包括 、 、 、 和 ,并且必須至少指定一個。 如果為 、 或 驅(qū)動程序指定了空文檔 將嘗試使用 ? 自動憑據(jù)配置提供程序。 格式如下: 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> } The format for is as follows: local: { // 96-byte master key used to encrypt/decrypt data keys key: <base64 string>|<MongoDB\BSON\Binary> } |
tlsOptions | array | A document containing the TLS configuration for one or more KMS providers. Supported providers include , , , and . All providers support the following options: <provider>: { tlsCaFile: <optional string>, tlsCertificateKeyFile: <optional string>, tlsCertificateKeyFilePassword: <optional string>, tlsDisableOCSPEndpointCheck: <optional bool> } |
Returns a new MongoDB\Driver\ClientEncryption instance.
版本 | 說明 |
---|---|
PECL mongodb 1.16.0 | 用于客戶端加密的 AWS KMS 提供商現(xiàn)在接受一個選項,該選項可用于 使用臨時 AWS 憑證進行身份驗證。 已添加到選項中。 如果為 或 KMS 提供程序指定了空文檔,驅(qū)動程序?qū)L試 使用 ? 自動憑據(jù)配置提供程序。 |
PECL mongodb 1.15.0 | 如果為 KMS 指定了空文檔 provider,驅(qū)動程序?qū)L試使用 ? 自動憑據(jù)配置提供程序。 |
PECL mongodb 1.12.0 | 現(xiàn)在支持將 KMIP 作為 KMS 提供商進行客戶端加密和 可以在選項中配置。 添加了選項。 |
PECL mongodb 1.10.0 | 現(xiàn)在支持將 Azure 和 GCP 作為客戶端的 KMS 提供程序 加密,并且可以在選項中進行配置。Base64 編碼的字符串現(xiàn)在是 被接受為 MongoDB\BSON\Binary 的替代方法,用于 ."kmsProviders" "kmsProviders" |
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: