Skip to content

Commit 68d8034

Browse files
p-mongop
andauthored
MONGOID-5319 Permit driver FLE configuration to be specified in Mongoid config file (#5251)
* MONGOID-5319 Permit driver FLE configuration to be specified in Mongoid config file * remove documentation for loading schema map from file Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent baad046 commit 68d8034

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

source/reference/configuration.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,44 @@ be executed sequentially during socket creation.
732732
For more information about TLS context hooks, including best practices for
733733
assigning and removing them, see `the Ruby driver documentation <https://mongodb.com/docs/ruby-driver/current/reference/create-client/#modifying-sslcontext>`_.
734734

735+
736+
Client-Side Encryption
737+
======================
738+
739+
When loading the configuration file, Mongoid permits the file to contain
740+
``BSON::Binary`` instances which are used for specifying ``keyId`` in
741+
the schema map for `client-side encryption
742+
<https://www.mongodb.com/docs/ruby-driver/current/reference/client-side-encryption/>`_,
743+
as the following example shows:
744+
745+
.. code-block:: yaml
746+
747+
development:
748+
clients:
749+
default:
750+
database: blog_development
751+
hosts: [localhost:27017]
752+
options:
753+
auto_encryption_options:
754+
key_vault_namespace: 'keyvault.datakeys'
755+
kms_providers:
756+
local:
757+
key: "z7iYiYKLuYymEWtk4kfny1ESBwwFdA58qMqff96A8ghiOcIK75lJGPUIocku8LOFjQuEgeIP4xlln3s7r93FV9J5sAE7zg8U"
758+
schema_map:
759+
blog_development.comments:
760+
properties:
761+
message:
762+
encrypt:
763+
keyId:
764+
- !ruby/object:BSON::Binary
765+
data: !binary |-
766+
R/AgNcxASFiiJWKXqWGo5w==
767+
type: :uuid
768+
bsonType: "string"
769+
algorithm: "AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
770+
bsonType: "object"
771+
772+
735773
Usage with Forking Servers
736774
==========================
737775

0 commit comments

Comments
 (0)