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  Field  Level Encryption. Other validation
27       rules in the JSON schema will not be enforced by the  driver  and  will
28       result in an 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
55       The schema map does not apply to collections encrypted with:  Queryable
56       Encryption.  Use mongoc_auto_encryption_opts_set_encrypted_fields_map()
57       instead.
58
59       SEE ALSO:
60          mongoc_client_enable_auto_encryption()
61
62          In-Use Encryption
63
64

AUTHOR

66       MongoDB, Inc
67
69       2017-present, MongoDB, Inc
70
71
72
73
741.24.3                           AMuOgNG1O7C,_A2U0T2O3_ENCRYPTION_OPTS_SET_SCHEMA_MAP(3)
Impressum