@@ -128,12 +128,12 @@ enterprise-only feature. If you only intend to use explicit encryption, you may
128128skip this step.
129129
130130Mongocryptd comes pre-packaged with enterprise builds of the MongoDB server
131- (versions 4.2 and newer). For installation instructions, see
132- `the MongoDB manual <https://mongodb.com/docs/manual/reference/security-client-side-encryption-appendix/#installation>`_.
131+ (versions 4.2 and newer). For installation instructions, see the
132+ `MongoDB manual <https://mongodb.com/docs/manual/reference/security-client-side-encryption-appendix/#installation>`_.
133133
134134In order to configure mongocryptd (for example, which port it listens on or the
135135path used to spawn the daemon), it is necessary to pass different options to the
136- ``Mongo::Client`` performing automatic encryption. See the `:extra_options`_
136+ ``Mongo::Client`` performing automatic encryption. See the :ref: `:extra_options <cse-extra-options>`
137137section of this tutorial for more information.
138138
139139Automatic Encryption
@@ -274,8 +274,8 @@ The example above demonstrates using automatic encryption with a local master ke
274274For more information about using other key management services to create a
275275master key and create data keys, see the following sections of this tutorial:
276276
277- - `Creating A Master Key`_
278- - `Creating A Data Key`_
277+ - :ref: `Creating A Master Key <creating-a-master-key>`
278+ - :ref: `Creating A Data Key <creating-a-data-key>`
279279
280280Explicit Encryption
281281===================
@@ -372,8 +372,8 @@ The example above demonstrates using explicit encryption with a local master key
372372For more information about using other key management services to create a
373373master key and create data keys, see the following sections of this tutorial:
374374
375- - `Creating A Master Key`_,
376- - `Creating A Data Key`_,
375+ - :ref: `Creating A Master Key <creating-a-master-key>`
376+ - :ref: `Creating A Data Key <creating-a-data-key>`
377377
378378Queryable Encryption
379379====================
@@ -485,8 +485,8 @@ The example above demonstrates using automatic encryption with a local master ke
485485For more information about using other key management services to create a
486486master key and create data keys, see the following sections of this tutorial:
487487
488- - `Creating A Master Key`_
489- - `Creating A Data Key`_
488+ - :ref: `Creating A Master Key <creating-a-master-key>`
489+ - :ref: `Creating A Data Key <creating-a-data-key>`
490490
491491Below is an example of explicit queryable encryption.
492492
@@ -598,6 +598,7 @@ Below is an example of explicit queryable encryption.
598598 find_result = client['encryption_coll'].find(encrypted_field: find_payload).first['encrypted_field']
599599 # => 'sensitive data'
600600
601+ .. _creating-a-master-key:
601602
602603Creating a Master Key
603604=====================
@@ -608,6 +609,8 @@ local key, or by creating a key in a key management service. Currently
608609Ruby driver supports AWS Key Management Service (KMS), Azure Key Vault, and
609610Google Cloud Key Management (GCP KMS).
610611
612+ .. _local-master-key:
613+
611614Local Master Key
612615~~~~~~~~~~~~~~~~
613616
@@ -626,17 +629,21 @@ Run the following code to generate a local master key using Ruby:
626629 local_master_key = SecureRandom.random_bytes(96)
627630 # => "\xB2\xBE\x8EN\xD4\x14\xC2\x13\xC3..." (a binary blob)
628631
632+ .. _remote-master-key:
633+
629634Remote Master Key
630635~~~~~~~~~~~~~~~~~
631636It is recommended that you use a remote Key Management Service to create and
632637store your master key. To do so, follow steps of the
633- :drivers: `"Set up a Remote Master Key" section</security/client-side-field-level-encryption-local-key-to-kms/ #set-up-a-remote-master-key>`
638+ `"Set up a Remote Master Key" <https://www.mongodb.com/docs/manual/core/csfle/tutorials/ #set-up-a-remote-master-key>`_
634639in the MongoDB Client-Side Encryption documentation.
635640
636641For more information about creating a master key, see the
637- :drivers: `Create a Master Key </security/client-side-field-level-encryption-guide/ #a.-create-a-master-key>`
642+ `Create a Master Key <https://www.mongodb.com/docs/manual/core/csfle/ #a.-create-a-master-key>`_
638643section of the MongoDB manual.
639644
645+ .. _creating-a-data-key:
646+
640647Creating a Data Key
641648===================
642649
@@ -679,8 +686,8 @@ key with the following code snippet:
679686 data_key_id = client_encryption.create_data_key('local')
680687 # => <BSON::Binary... type=ciphertext...>
681688
682- See the `Local Master Key`_ section for more information about generating a new
683- local master key.
689+ See the :ref: `Local Master Key <local-master-key>` section for more information
690+ about generating a new local master key.
684691
685692Create a Data Key Using a Remote Master Key
686693~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -788,12 +795,12 @@ certificate and private key to authenticate to KMIP server.
788795 )
789796 # => <BSON::Binary... type=ciphertext...>
790797
791- See the `Remote Master Key`_ section of this tutorial for more information about
792- generating a new remote master key and finding the information you need to
793- create data keys.
798+ See the :ref: `Remote Master Key <remote-master-key>` section of this tutorial
799+ for more information about generating a new remote master key and finding the
800+ information you need to create data keys.
794801
795802For more information about creating a data key, see the
796- :drivers: `Create a Data Encryption Key </security/client-side-field-level-encryption-guide/ #b.-create-a-data-encryption-key>`
803+ `Create a Data Encryption Key <https://www.mongodb.com/docs/manual/core/csfle/ #b.-create-a-data-encryption-key>`_
797804section of the MongoDB manual.
798805
799806For a list of possible KMS TLS options
@@ -974,7 +981,7 @@ When you intend to use your schema map, convert it to a Ruby ``Hash`` using the
974981
975982.. seealso::
976983
977- :drivers: `Specify Encrypted Fields Using JSON Schema</security/client-side-field-level-encryption-guide/ #c-specify-encrypted-fields-using-json-schema>`,
984+ `Specify Encrypted Fields Using JSON Schema <https://www.mongodb.com/docs/manual/core/csfle/ #c-specify-encrypted-fields-using-json-schema>`_ ,
978985 :manual:`Automatic Encryption Rules</reference/security-client-side-automatic-json-schema/>`
979986
980987.. _schema-map-path:
@@ -1012,6 +1019,8 @@ decryption of any previously-encrypted data.
10121019 }
10131020 )
10141021
1022+ .. _cse-extra-options:
1023+
10151024``:extra_options``
10161025~~~~~~~~~~~~~~~~~~
10171026
0 commit comments