.\" Man page generated from reStructuredText. . . .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 .. .TH "MONGOC_AUTO_ENCRYPTION_OPTS_SET_SCHEMA_MAP" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX void mongoc_auto_encryption_opts_set_schema_map (mongoc_auto_encryption_opts_t *opts, const bson_t *schema_map); .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBopts\fP: The \fI\%mongoc_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 \fI\%Client\-Side Field Level Encryption\fP\&. 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 .EX { \(dqdb.coll\(dq: { \(dqproperties\(dq: { \(dqencrypted_string\(dq: { \(dqencrypt\(dq: { \(dqkeyId\(dq: [ { \(dq$binary\(dq: { \(dqbase64\(dq: \(dqAAAAAAAAAAAAAAAAAAAAAA==\(dq, \(dqsubType\(dq: \(dq04\(dq } } ], \(dqbsonType\(dq: \(dqstring\(dq, \(dqalgorithm\(dq: \(dqAEAD_AES_256_CBC_HMAC_SHA_512\-Deterministic\(dq } } }, \(dqbsonType\(dq: \(dqobject\(dq } } .EE .UNINDENT .UNINDENT .sp The schema map does not apply to collections encrypted with: \fI\%Queryable Encryption\fP\&. Use \fI\%mongoc_auto_encryption_opts_set_encrypted_fields_map()\fP instead. .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 .nf \fI\%mongoc_client_enable_auto_encryption()\fP .fi .sp .nf \fI\%In\-Use Encryption\fP .fi .sp .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .