@@ -109,7 +109,7 @@ def kms_request(self, kms_context):
109109 message = kms_context .message
110110 provider = kms_context .kms_provider
111111 ctx = self .opts ._kms_ssl_contexts .get (provider )
112- if not ctx :
112+ if ctx is None :
113113 # Enable strict certificate verification, OCSP, match hostname, and
114114 # SNI using the system default CA certificates.
115115 ctx = get_ssl_context (
@@ -378,9 +378,8 @@ def __init__(self, kms_providers, key_vault_namespace, key_vault_client,
378378 See :ref:`explicit-client-side-encryption` for an example.
379379
380380 :Parameters:
381- - `kms_providers`: Map of KMS provider options. Two KMS providers
382- are supported: "aws" and "local". The kmsProviders map values
383- differ by provider:
381+ - `kms_providers`: Map of KMS provider options. The `kms_providers`
382+ map values differ by provider:
384383
385384 - `aws`: Map with "accessKeyId" and "secretAccessKey" as strings.
386385 These are the AWS access key ID and AWS secret access key used
@@ -396,6 +395,8 @@ def __init__(self, kms_providers, key_vault_namespace, key_vault_client,
396395 Additionally, "endpoint" may also be specified as a string
397396 (defaults to 'oauth2.googleapis.com'). These are the
398397 credentials used to generate Google Cloud KMS messages.
398+ - `kmip`: Map with "endpoint" as a host with required port.
399+ For example: ``{"endpoint": "example.com:443"}``.
399400 - `local`: Map with "key" as `bytes` (96 bytes in length) or
400401 a base64 encoded string which decodes
401402 to 96 bytes. "key" is the master key used to encrypt/decrypt
@@ -424,7 +425,7 @@ def __init__(self, kms_providers, key_vault_namespace, key_vault_client,
424425 kms_tls_options={'kmip': {'tlsCAFile': certifi.where()}}
425426
426427 .. versionchanged:: 4.0
427- Added the `kms_tls_options` parameter.
428+ Added the `kms_tls_options` parameter and the "kmip" KMS provider .
428429
429430 .. versionadded:: 3.9
430431 """
@@ -458,7 +459,7 @@ def create_data_key(self, kms_provider, master_key=None,
458459
459460 :Parameters:
460461 - `kms_provider`: The KMS provider to use. Supported values are
461- "aws" and "local".
462+ "aws", "azure", "gcp", "kmip", and "local".
462463 - `master_key`: Identifies a KMS-specific key used to encrypt the
463464 new data key. If the kmsProvider is "local" the `master_key` is
464465 not applicable and may be omitted.
@@ -493,6 +494,16 @@ def create_data_key(self, kms_provider, master_key=None,
493494 - `endpoint` (string): Optional. Host with optional port.
494495 Defaults to "cloudkms.googleapis.com".
495496
497+ If the `kms_provider` is "kmip" it is optional and has the
498+ following fields::
499+
500+ - `keyId` (string): Optional. `keyId` is the KMIP Unique
501+ Identifier to a 96 byte KMIP Secret Data managed object. If
502+ keyId is omitted, the driver creates a random 96 byte KMIP
503+ Secret Data managed object.
504+ - `endpoint` (string): Optional. Host with optional
505+ port, e.g. "example.vault.azure.net:".
506+
496507 - `key_alt_names` (optional): An optional list of string alternate
497508 names used to reference a key. If a key is created with alternate
498509 names, then encryption may refer to the key by the unique alternate
0 commit comments