.\" Man page generated from reStructuredText. . .TH "MONGOC_AUTO_ENCRYPTION_OPTS_SET_SCHEMA_MAP" "3" "Jun 04, 2021" "1.17.6" "libmongoc" .SH NAME mongoc_auto_encryption_opts_set_schema_map \- mongoc_auto_encryption_opts_set_schema_map() . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C void mongoc_auto_encryption_opts_set_schema_map (mongoc_auto_encryption_opts_t *opts, const bson_t *schema_map); .ft P .fi .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBopts\fP: The \fBmongoc_auto_encryption_opts_t\fP .IP \(bu 2 \fBschema_map\fP: A \fI\%bson_t\fP where keys are collection namespaces and values are JSON schemas. .UNINDENT .sp Supplying a schema map provides more security than relying on JSON Schemas obtained from the server. It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending unencrypted data that should be encrypted. .sp Schemas supplied in the schema map only apply to configuring automatic encryption for client side encryption. Other validation rules in the JSON schema will not be enforced by the driver and will result in an error. .sp The following is an example of a schema map which configures automatic encryption for the collection \fBdb.coll\fP: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C { "db.coll": { "properties": { "encrypted_string": { "encrypt": { "keyId": [ { "$binary": { "base64": "AAAAAAAAAAAAAAAAAAAAAA==", "subType": "04" } } ], "bsonType": "string", "algorithm": "AEAD_AES_256_CBC_HMAC_SHA_512\-Deterministic" } } }, "bsonType": "object" } } .ft P .fi .UNINDENT .UNINDENT .SH SEE ALSO .INDENT 0.0 .IP \(bu 2 \fBmongoc_client_enable_auto_encryption()\fP .IP \(bu 2 The guide for Using Client\-Side Field Level Encryption .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .