MongoDB\Driver\ClientEncryption::rewrapManyDataKey

(mongodb >=1.15.0)

MongoDB\Driver\ClientEncryption::rewrapManyDataKeyRewraps data keys

Beschreibung

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.

Parameter-Liste

filter (array|object)

Das » Abfrage-Prädikat. Ein leeres Prädikat passt auf alle Dokumente in der Sammlung.

Hinweis: Bei der Auswertung von Abfragekriterien vergleicht MongoDB Typen und Werte gemäß seiner eigenen » Vergleichsregeln für BSON-Typen, die sich von PHPs Regeln für Typenvergleich und Typen-Jonglage unterscheidet. Wenn es eine Übereinstimmung mit einem speziellen BSON-Typ gibt, sollten die Abfragekriterien die entsprechende BSON-Klasse verwenden (z. B. MongoDB\BSON\ObjectId, um auf eine » ObjectId zu passen).

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"-Provider-Optionen
Option Typ Beschreibung
region string Erforderlich
key string Erforderlich; der Amazon-Ressourcenname (ARN) für den AWS-Kundenhauptschlüssel (CMK).
endpoint string Optional; ein alternativer Host-Bezeichner, an den KMS-Anfragen gesendet werden; kann die Portnummer enthalten.

"azure"-Provider-Optionen
Option Typ Beschreibung
keyVaultEndpoint string Erforderlich; der Host mit optionalem Port (z. B. "example.vault.azure.net").
keyName string Erforderlich
keyVersion string Optional; eine bestimmte Version des genannten Schlüssels. Standardmäßig wird die primäre Version des Schlüssels verwendet.

"gcp"-Provider-Optionen
Option Typ Beschreibung
projectId string Erforderlich
location string Erforderlich
keyRing string Erforderlich
keyName string Erforderlich
keyVersion string Optional; eine bestimmte Version des genannten Schlüssels. Standardmäßig wird die primäre Version des Schlüssels verwendet.
endpoint string Optional; der Host mit optionalem Port. Der Standardwert ist "cloudkms.googleapis.com".

"kmip"-Provider-Optionen
Option Typ Beschreibung
keyId string Optional; der eindeutige Bezeichner für ein 96 Byte großes, verwaltetes geheimes KMIP-Datenobjekt. Wenn nicht angegeben, erstellt der Treiber ein zufälliges geheimes KMIP-Datenobjekt mit 96 Byte.
endpoint string Optional; der Host mit optionalem Port.

Rückgabewerte

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.

Fehler/Exceptions

add a note

User Contributed Notes

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