Skip to content

Commit a18338b

Browse files
v5.0 change references from mongocryptd to Shared Library (#4906)
* test image change * change to shared library * test src constant in svg * update diagram * change mongocryptd references to shared library * typo and TOC * revert snooty formatting changes * change specified version to current * change specified version to current * revert snooty formatting changes
1 parent 25f6b86 commit a18338b

7 files changed

+129
-26
lines changed

snooty.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ pgp-short-fingerprint = "0x4B7C549A058F8B6B"
223223
windows-sha256 = "C777DF7816BB8C9A760FDEA782113949408B6F39D72BE29A2551FA51E2FE0473"
224224
source-available = ":github:`source available and free to use <mongodb/mongo>`"
225225
atlas = "MongoDB Atlas"
226+
shared-library = "Automatic Encryption Shared Library"
227+
shared-library-package = "``crypt_shared``"
228+
226229

227230
[bundle]
228231
manpages = "manpages.tar.gz"
@@ -255,4 +258,4 @@ section = 1
255258
[manpages.mongodb-parameters]
256259
file = "reference/parameters.txt"
257260
title = "MongoDB setParameter Options"
258-
section = 5
261+
section = 5

source/core/security-automatic-client-side-encryption.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ client-side field level encryption, see
2626

2727
Applications must create a database connection object (e.g.
2828
``MongoClient``) with the automatic encryption configuration settings.
29-
The configuration settings must include automatic encryption encryption
29+
The configuration settings must include automatic encryption
3030
rules using a strict subset of the `JSON Schema Draft 4 standard syntax
3131
<https://tools.ietf.org/html/draft-zyp-json-schema-04>`_ and
3232
encryption-specific schema keywords. Applications do not have to modify
@@ -36,7 +36,7 @@ automatic encryption rules.
3636

3737
The official MongoDB 4.2+ compatible drivers, :binary:`~bin.mongosh`,
3838
and the MongoDB 4.2 or later legacy :binary:`~bin.mongo` shell use the
39-
Enterprise-only :ref:`field-level-encryption-mongocryptd` process to
39+
{+shared-library+} to
4040
parse the automatic encryption rules and apply the encryption rules when
4141
reading or writing documents:
4242

@@ -52,6 +52,11 @@ reading or writing documents:
5252
*only if* the driver/shell was configured with access to the keys used
5353
to protect those values.
5454

55+
The {+shared-library+} is a preferred
56+
alternative to :ref:`mongocryptd <mongocryptd>` and does not require spawning a new process.
57+
``mongocryptd`` is still supported. To learn more about the
58+
{+shared-library+}, see :ref:`csfle-reference-shared-library`.
59+
5560
Enabling Automatic Client-Side Field Level Encryption
5661
-----------------------------------------------------
5762

@@ -68,12 +73,11 @@ For a complete example, see
6873
:ref:`mongo-connection-automatic-client-side-encryption-enabled`.
6974

7075
Automatic client-side field level encryption requires access to the
71-
:ref:`mongocryptd` process on the client host machine. See
72-
:ref:`mongocryptd` for complete documentation on installation. The
76+
{+shared-library+} on the client host machine. The
7377
official MongoDB 4.2+ compatible drivers have additional options for
74-
managing the ``mongocryptd`` process. Generally, the 4.2+ compatible
78+
managing the {+shared-library+}. Generally, the 4.2+ compatible
7579
drivers and :binary:`~bin.mongosh` can access the
76-
``mongocryptd`` process if it is in the system ``PATH``.
80+
shared library if it is in the system ``PATH``.
7781

7882
Applications must specify the following components when instantiating
7983
the database connection to enable automatic client-side field level
@@ -138,4 +142,5 @@ encryption enforcement, see
138142

139143
/reference/security-client-side-automatic-json-schema.txt
140144
/reference/security-client-side-query-aggregation-support.txt
145+
/reference/security-client-side-encryption-shared-library.txt
141146
/reference/security-client-side-encryption-appendix.txt

source/core/security-client-side-encryption.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,11 @@ driver and each encryption component:
167167
install or link the library. Defer to driver documentation for more
168168
complete information.
169169

170-
- :ref:`mongocryptd` supports :ref:`field-level-encryption-automatic`
171-
and is only available with MongoDB Enterprise. ``mongocryptd`` does
172-
not perform cryptographic functions.
170+
- The {+shared-library+} supports :ref:`field-level-encryption-automatic`
171+
and is only available with MongoDB Enterprise. {+shared-library+} does
172+
not perform cryptographic functions. The shared library is a preferred
173+
alternative to ``mongocryptd`` and does not require spawning a new process.
174+
``mongocryptd`` is still supported.
173175

174176
- The :ref:`Key Vault <field-level-encryption-keyvault>` is a MongoDB
175177
collection that stores all data encryption keys used to encrypt

source/images/client-side-field-level-encryption-diagram.svg

Lines changed: 1 addition & 1 deletion
Loading

source/reference/security-client-side-automatic-json-schema.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ or read operations to the ``hr.employees`` collection.
148148

149149
If :autoencryptkeyword:`~encrypt.keyId` or
150150
:autoencryptkeyword:`~encrypt.algorithm` are omitted, the
151-
:ref:`mongocryptd` checks the full tree of parent fields and attempts
151+
{+shared-library+} checks the full tree of parent fields and attempts
152152
to construct those options from the nearest
153153
:autoencryptkeyword:`encryptMetadata` object that specifies the
154154
option. :autoencryptkeyword:`~encrypt.bsonType` cannot be inherited
155155
and *may* be required depending on the value of
156156
:autoencryptkeyword:`~encrypt.algorithm`.
157157

158-
If ``mongocryptd`` cannot construct the full ``encrypt`` object using
158+
If the {+shared-library+} cannot construct the full ``encrypt`` object using
159159
the fields specified to the object and any required
160160
``encryptMetadata``-inherited keys, automatic encryption fails and
161161
returns an error.
@@ -174,7 +174,7 @@ or read operations to the ``hr.employees`` collection.
174174
For complete documentation on the encryption algorithms, see
175175
:ref:`field-level-encryption-algorithms`.
176176

177-
If omitted, :ref:`mongocryptd` checks the full tree of parent fields
177+
If omitted, the {+shared-library+} checks the full tree of parent fields
178178
for the nearest :autoencryptkeyword:`encryptMetadata.algorithm` key
179179
and inherits that value. If no parent
180180
:autoencryptkeyword:`~encryptMetadata.algorithm` exists, automatic
@@ -237,8 +237,8 @@ or read operations to the ``hr.employees`` collection.
237237

238238
Specify *one* string inside the array.
239239

240-
If omitted, :ref:`mongocryptd` checks the full tree of parent
241-
fields for the nearest
240+
If omitted, the :ref:`{+shared-library+} <csfle-reference-shared-library>`
241+
checks the full tree of parent fields for the nearest
242242
:autoencryptkeyword:`encryptMetadata.keyId` key and inherits
243243
that value. If no parent
244244
:autoencryptkeyword:`~encryptMetadata.keyId` exists,
@@ -283,7 +283,7 @@ or read operations to the ``hr.employees`` collection.
283283
Defines encryption options which an :autoencryptkeyword:`encrypt`
284284
object nested in the sibling ``properties`` may inherit. If an
285285
:autoencryptkeyword:`encrypt` is missing an option required to support
286-
encryption, ``mongocryptd`` searches the entire tree of parent objects
286+
encryption, the {+shared-library+} searches the entire tree of parent objects
287287
to locate an :autoencryptkeyword:`encryptMetadata` object that
288288
specifies the missing option.
289289

@@ -307,7 +307,7 @@ or read operations to the ``hr.employees`` collection.
307307

308308
The encryption algorithm to use to encrypt a given field. If an
309309
:autoencryptkeyword:`encrypt` object is missing the
310-
:autoencryptkeyword:`~encrypt.algorithm` field, ``mongocryptd``
310+
:autoencryptkeyword:`~encrypt.algorithm` field, the {+shared-library+}
311311
searches the entire tree of parent objects to locate an
312312
:autoencryptkeyword:`encryptMetadata` object that specifies
313313
:autoencryptkeyword:`encryptMetadata.algorithm`.
@@ -334,7 +334,7 @@ or read operations to the ``hr.employees`` collection.
334334
Specify *one* string inside the array.
335335

336336
If an :autoencryptkeyword:`encrypt` object is missing the
337-
:autoencryptkeyword:`~encrypt.keyId` field, ``mongocryptd``
337+
:autoencryptkeyword:`~encrypt.keyId` field, the {+shared-library+}
338338
searches the entire tree of parent objects to locate
339339
an :autoencryptkeyword:`encryptMetadata` object that
340340
specifies :autoencryptkeyword:`encryptMetadata.keyId`.

source/reference/security-client-side-encryption-appendix.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
========
2-
Appendix
3-
========
4-
5-
.. default-domain:: mongodb
1+
===========
2+
mongocryptd
3+
===========
64

75
.. _field-level-encryption-mongocryptd:
86
.. _mongocryptd:
97

108
``mongocryptd``
119
---------------
1210

11+
.. tip:: Use the {+shared-library+}
12+
13+
If you are starting a new project, use the ``crypt_shared`` encryption helper,
14+
referred to as the {+shared-library+}. The {+shared-library+}
15+
replaces ``mongocryptd`` and does not require spawning a new process.
16+
1317
.. include:: /includes/extracts/csfle-enterprise-atlas-only.rst
1418

15-
``mongocryptd`` is required for :ref:`automatic field level encryption
16-
<field-level-encryption-automatic>` and is included as a component in
19+
``mongocryptd`` is included as a component in
1720
the :doc:`MongoDB Enterprise Server
1821
</administration/install-enterprise>` package, or separately as the
1922
``mongodb-enterprise-cryptd`` package. ``mongocryptd`` performs
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
.. _csfle-reference-shared-library:
2+
3+
===================================
4+
{+shared-library+}
5+
===================================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 2
11+
:class: singlecol
12+
13+
Overview
14+
--------
15+
16+
The {+shared-library+} is a **dynamic library** that enables your client
17+
application to perform :ref:`automatic field level encryption
18+
<field-level-encryption-automatic>`.
19+
A dynamic library is a set of functionality accessed
20+
by an application at runtime rather than compile time.
21+
The {+shared-library+} performs the following tasks:
22+
23+
- Reads the encryption schema to determine which fields to encrypt or decrypt
24+
- Prevents your application from executing unsupported operations on encrypted
25+
fields
26+
27+
The {+shared-library+} *does not* do any of the following:
28+
29+
- Perform data encryption or decryption
30+
- Access the encryption key material
31+
- Listen for data over the network
32+
33+
The {+shared-library+} is a preferred alternative to ``mongocryptd`` and does
34+
not require you to spawn another process to perform automatic encryption.
35+
36+
.. tip::
37+
38+
While we recommend using the {+shared-library+}, ``mongocryptd`` is still supported.
39+
40+
To learn more about ``mongocryptd``, see :ref:`<field-level-encryption-mongocryptd>`.
41+
42+
.. _csfle-reference-shared-library-download:
43+
44+
Download the {+shared-library+}
45+
------------------------------------------------
46+
47+
Download the {+shared-library+} from the `MongoDB Download Center <https://www.mongodb.com/try/download/enterprise>`__ by selecting the
48+
version and platform, then the library:
49+
50+
#. In the :guilabel:`Version` dropdown, select the version listed as "current."
51+
#. In the :guilabel:`Platform` dropdown, select your platform.
52+
#. In the :guilabel:`Package` dropdown, select ``crypt_shared``.
53+
#. Click :guilabel:`Download`.
54+
55+
.. tip::
56+
57+
To view an expanded list of available releases and packages, see
58+
`MongoDB Enterprise Downloads <https://www.mongodb.com/download-center/enterprise/releases>`__.
59+
60+
.. _csfle-reference-shared-library-configuration:
61+
62+
Configuration
63+
-------------
64+
65+
You can configure how your driver searches for the {+shared-library+}
66+
through the following parameters:
67+
68+
.. list-table::
69+
:header-rows: 1
70+
:stub-columns: 1
71+
:widths: 30 70
72+
73+
* - Name
74+
- Description
75+
76+
* - cryptSharedLibPath
77+
- | Specifies the absolute path to the {+shared-library+} package,
78+
| {+shared-library-package+}.
79+
| **Default**: ``undefined``
80+
81+
* - cryptSharedLibRequired
82+
- | Specifies if the driver must use the {+shared-library+}. If ``true``,
83+
| the driver raises an error if the {+shared-library+} is unavailable.
84+
| If ``false``, the driver performs the following sequence of actions:
85+
86+
#. Attempts to use the {+shared-library+}.
87+
#. If the {+shared-library+} is unavailable, the driver attempts to
88+
spawn and connect to ``mongocryptd``.
89+
90+
| **Default**: ``false``

0 commit comments

Comments
 (0)