1MONGOC_AUTO_ENCRYPTION_OPTS_SET_SCMHOElNMiGAbO_mCMo_AnAPgU(oT3cO)_ENCRYPTION_OPTS_SET_SCHEMA_MAP(3)
2
3
4

NAME

6       mongoc_auto_encryption_opts_set_schema_map     -    mongoc_auto_encryp‐
7       tion_opts_set_schema_map()
8

SYNOPSIS

10          void
11          mongoc_auto_encryption_opts_set_schema_map (mongoc_auto_encryption_opts_t *opts,
12                                                      const bson_t *schema_map);
13

PARAMETERS

15opts: The mongoc_auto_encryption_opts_t
16
17schema_map: A bson_t where keys are collection namespaces and  values
18         are JSON schemas.
19
20       Supplying  a  schema  map  provides  more security than relying on JSON
21       Schemas obtained from the  server.  It  protects  against  a  malicious
22       server  advertising  a  false JSON Schema, which could trick the client
23       into sending unencrypted data that should be encrypted.
24
25       Schemas supplied in the schema map only apply to configuring  automatic
26       encryption  for  client  side encryption. Other validation rules in the
27       JSON schema will not be enforced by the driver and will  result  in  an
28       error.
29
30       The  following is an example of a schema map which configures automatic
31       encryption for the collection db.coll:
32
33          {
34               "db.coll": {
35                   "properties": {
36                   "encrypted_string": {
37                       "encrypt": {
38                       "keyId": [
39                           {
40                           "$binary": {
41                               "base64": "AAAAAAAAAAAAAAAAAAAAAA==",
42                               "subType": "04"
43                           }
44                           }
45                       ],
46                       "bsonType": "string",
47                       "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
48                       }
49                   }
50                   },
51                   "bsonType": "object"
52               }
53           }
54

SEE ALSO

56mongoc_client_enable_auto_encryption()
57
58       • The guide for Using Client-Side Field Level Encryption
59

AUTHOR

61       MongoDB, Inc
62
64       2017-present, MongoDB, Inc
65
66
67
68
691.17.6                           JMuOnNG0O3C,_A2U0T2O1_ENCRYPTION_OPTS_SET_SCHEMA_MAP(3)
Impressum