Dutch PHP Conference 2025 - Call For Papers

MongoDB\Driver\ClientEncryption::rewrapManyDataKey

(mongodb >=1.15.0)

MongoDB\Driver\ClientEncryption::rewrapManyDataKeyRewraps data keys

Опис

final public MongoDB\Driver\ClientEncryption::rewrapManyDataKey(array|object $filter, ?array $options = null): object

Rewraps (i.e. decrypts and re-encrypts) zero or more data keys in the key vault collection that match the given filter.

If the "provider" option is not specified, matching data keys will be rewrapped with their current KMS provider. Otherwise, matching data keys will be re-encrypted according to the specified "provider" and "masterKey" options.

Параметри

filter (array|object)

» Предикат запиту. Порожній предикат відповідає всім документам у колекції.

Зауваження: Під час виконання критеріїв запиту MongoDB порівнює типи та значення за власними » правилами порівняння BSON-типів, що відрізняється від правил порівняння і перетворення типів в PHP. Для вибірки даних спеціальних BSON-типів, критерії запиту повинні використовувати відповідний клас BSON (напр. MongoDB\BSON\ObjectId для вибірки » ObjectId).

options

RewrapManyDataKey options
Option Type Description
provider string

The KMS provider (e.g. "local", "aws") that will be used to re-encrypt the matched data keys.

If a KMS provider is not specified, matched data keys will be re-encrypted with their current KMS provider.

masterKey array

The masterKey identifies a KMS-specific key used to encrypt the new data key. This option should not be specified without the "provider" option. This option is required if "provider" is specified and not "local".

Налаштування провейдера "aws"
Назва Тип Опис
region string Обов'язковий.
key string Обов'язковий. Amazon Resource Name (ARN) для AWS customer master key (CMK).
endpoint string Необов'язковий. Додатковий ідентифікатор хоста для надсилання запитів KMS. Може містити номер порту.

Налаштування провейдера "azure"
Назва Тип Опис
keyVaultEndpoint string Обов'язковий. Хост (може бути з портом) (напр. "example.vault.azure.net").
keyName string Обов'язковий.
keyVersion string Необов'язковий. Певна версія названого ключа. Стандартно вказується версія головного ключа.

Налаштування провейдера "gcp"
Назва Тип Опис
projectId string Обов'язковий.
location string Обов'язковий.
keyRing string Обов'язковий.
keyName string Обов'язковий.
keyVersion string Необов'язковий. Певна версія названого ключа. Стандартно вказується версія головного ключа.
endpoint string Необов'язковий. Хост (може бути з портом) (напр. "cloudkms.googleapis.com").

Налаштування провейдера "kmip"
Назва Тип Опис
keyId string Необов'язковий. Унікальний ідентифікатор для 96-байтного об'єкта керування секретними даними KMIP. Якщо не вказано, об'єкт генерується випадковим чином.
endpoint string Необов'язковий. Хост (може бути з портом).

Значення, що повертаються

Returns an object, which will have an optional bulkWriteResult property containing the result of the internal bulkWrite operation as an object. If no data keys matched the filter or the write was unacknowledged, the bulkWriteResult property will be null.

Помилки/виключення

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top