File: mongoc_client_encryption_opts_set_kms_providers.rst

package info (click to toggle)
mongo-c-driver 1.17.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 37,256 kB
  • sloc: ansic: 152,613; javascript: 7,954; python: 3,259; sh: 138; makefile: 29; xml: 10
file content (45 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
:man_page: mongoc_client_encryption_opts_set_kms_providers

mongoc_client_encryption_opts_set_kms_providers()
=================================================

Synopsis
--------

.. code-block:: c

   void
   mongoc_client_encryption_opts_set_kms_providers (
      mongoc_client_encryption_opts_t *opts, const bson_t *kms_providers);

Parameters
----------

* ``opts``: The :symbol:`mongoc_client_encryption_opts_t`
* ``kms_providers``: A :symbol:`bson_t` containing configuration for an external Key Management Service (KMS).

``kms_providers`` is a BSON document containing configuration for each KMS provider. Currently ``aws`` or ``local`` are supported. At least one must be specified.

The format for "aws" is as follows:

.. code-block:: javascript

   aws: {
      accessKeyId: <string>,
      secretAccessKey: <string>
   }

The format for "local" is as follows:

.. code-block:: javascript

   local: {
      key: <96 byte BSON binary of subtype 0> // The master key used to encrypt/decrypt data keys.
   }


See also
--------

* :symbol:`mongoc_client_encryption_new()`
* The guide for :doc:`Using Client-Side Field Level Encryption <using_client_side_encryption>`