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

SYNOPSIS

6          void
7          mongoc_auto_encryption_opts_set_schema_map (mongoc_auto_encryption_opts_t *opts,
8                                                      const bson_t *schema_map);
9

PARAMETERS

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

AUTHOR

62       MongoDB, Inc
63
65       2017-present, MongoDB, Inc
66
67
68
69
701.25.1                           NMoOvNG0O8C,_A2U0T2O3_ENCRYPTION_OPTS_SET_SCHEMA_MAP(3)
Impressum