Skip to content

Commit 653ea8b

Browse files
authored
PYTHON-4164 Document support for KMIP delegated master_key (#1830)
1 parent b37fb91 commit 653ea8b

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

doc/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ PyMongo 4.9 brings a number of improvements including:
1111
- Added support for In-Use Encryption range queries with MongoDB 8.0.
1212
Added :attr:`~pymongo.encryption.Algorithm.RANGE`.
1313
``sparsity`` and ``trim_factor`` are now optional in :class:`~pymongo.encryption_options.RangeOpts`.
14+
- Added support for the "delegated" option for the KMIP ``master_key`` in
15+
:meth:`~pymongo.encryption.ClientEncryption.create_data_key`.
1416
- pymongocrypt>=1.10 is now required for :ref:`In-Use Encryption` support.
1517
- Added :meth:`~pymongo.cursor.Cursor.to_list` to :class:`~pymongo.cursor.Cursor`,
1618
:class:`~pymongo.command_cursor.CommandCursor`,

pymongo/asynchronous/encryption.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@ async def create_data_key(
764764
Secret Data managed object.
765765
- `endpoint` (string): Optional. Host with optional
766766
port, e.g. "example.vault.azure.net:".
767+
- `delegated` (bool): Optional. If True (recommended), the
768+
KMIP server will perform encryption and decryption. If
769+
delegated is not provided, defaults to false.
767770
768771
:param key_alt_names: An optional list of string alternate
769772
names used to reference a key. If a key is created with alternate

pymongo/synchronous/encryption.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,9 @@ def create_data_key(
762762
Secret Data managed object.
763763
- `endpoint` (string): Optional. Host with optional
764764
port, e.g. "example.vault.azure.net:".
765+
- `delegated` (bool): Optional. If True (recommended), the
766+
KMIP server will perform encryption and decryption. If
767+
delegated is not provided, defaults to false.
765768
766769
:param key_alt_names: An optional list of string alternate
767770
names used to reference a key. If a key is created with alternate

test/client-side-encryption/spec/legacy/fle2v2-Rangev2-Compact.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"replicaset",
77
"sharded",
88
"load-balanced"
9-
]
9+
],
10+
"serverless": "forbid"
1011
}
1112
],
1213
"database_name": "default",

0 commit comments

Comments
 (0)