Skip to content

Commit 49e32f7

Browse files
DOCSP-29387 - CSFLE - Change references from mongocryptd to Shared Library (#4290)
* Change references from mongocryptd to Shared Library * add to toc * add readers and remove mongocryptd from tutorial text * add csfle shared library note * fix link to learn more note * Chris feedback csfle * Chris feedback qe * remove libmongocrypt note * caps * Cynthia feedback
1 parent ca040cf commit 49e32f7

File tree

37 files changed

+197
-398
lines changed

37 files changed

+197
-398
lines changed

source/core/csfle/install.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ What You Need
2525
Before you can use {+csfle-abbrev+}, you must set up the following items
2626
in your development environment:
2727

28+
- (Optional) Download the :ref:`{+shared-library+} <csfle-reference-shared-library-download>`.
29+
The shared library is a preferred alternative to :ref:`mongocryptd <csfle-mongocryptd>` and
30+
does not require spawning a new process. `mongocryptd` is still supported.
2831
- Install :manual:`MongoDB Enterprise Edition version 4.2 or later </installation/#mongodb-enterprise-edition-installation-tutorials>`.
2932
- Install a :ref:`MongoDB Driver Compatible with CSFLE <csfle-driver-compatibility>`.
3033
- Start a
3134
:manual:`MongoDB instance </tutorial/manage-mongodb-processes/#start-mongod-processes>`
3235
or
3336
:atlas:`Atlas Cluster </getting-started?jmp=docs>`.
34-
- Grant file system permissions. The client application or a privileged
35-
user needs permissions to start the :ref:`mongocryptd
36-
<csfle-reference-mongocryptd>` process on the host.
3737
- Install specific driver dependencies. To see the list of
3838
dependencies for your driver, select the tab corresponding to the language you
3939
would like to use to complete this guide:

source/core/csfle/reference.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ of the {+csfle+} ({+csfle-abbrev+}) feature:
2727
- :ref:`csfle-reference-encryption-components`
2828
- :ref:`csfle-reference-decryption`
2929
- :ref:`csfle-reference-cryptographic-primitives`
30+
- :ref:`csfle-reference-shared-library`
3031
- :ref:`csfle-reference-mongocryptd`
3132
- :ref:`csfle-reference-libmongocrypt`
3233

@@ -43,5 +44,6 @@ of the {+csfle+} ({+csfle-abbrev+}) feature:
4344
/core/csfle/reference/encryption-components
4445
/core/csfle/reference/decryption
4546
/core/csfle/reference/cryptographic-primitives
47+
/core/csfle/reference/shared-library
4648
/core/csfle/reference/mongocryptd
4749
/core/csfle/reference/libmongocrypt

source/core/csfle/reference/encryption-schemas.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ Definition
107107

108108
If :autoencryptkeyword:`~encrypt.keyId` or
109109
:autoencryptkeyword:`~encrypt.algorithm` are omitted, the
110-
:ref:`mongocryptd` checks the full tree of parent fields and attempts
111-
to construct those options from the nearest
110+
:ref:`Shared Library <csfle-reference-shared-library>` checks all parent
111+
fields and attempts to construct those options from the nearest
112112
:autoencryptkeyword:`encryptMetadata` object that specifies the
113113
option. :autoencryptkeyword:`~encrypt.bsonType` cannot be inherited
114114
and *may* be required depending on the value of
115115
:autoencryptkeyword:`~encrypt.algorithm`.
116116

117-
If ``mongocryptd`` cannot construct the full ``encrypt`` object using
117+
If the Shared Library cannot construct the full ``encrypt`` object using
118118
the fields specified to the object and any required
119119
``encryptMetadata``-inherited keys, automatic encryption fails and
120120
returns an error.
@@ -133,10 +133,10 @@ Definition
133133
For complete documentation on the encryption algorithms, see
134134
:ref:`csfle-reference-encryption-algorithms`.
135135

136-
If omitted, :ref:`<csfle-reference-mongocryptd>` checks the full tree of parent fields
137-
for the nearest :autoencryptkeyword:`encryptMetadata.algorithm` key
138-
and inherits that value. If no parent
139-
:autoencryptkeyword:`~encryptMetadata.algorithm` exists, automatic
136+
If omitted, the :ref:`Shared Library <csfle-reference-shared-library>` checks
137+
all parent fields for the closest ancestor containing an
138+
:autoencryptkeyword:`encryptMetadata.algorithm` key and inherits that value.
139+
If no parent :autoencryptkeyword:`~encryptMetadata.algorithm` exists, automatic
140140
field level encryption fails and returns an error.
141141

142142
- If ``encrypt.algorithm`` or its inherited value is
@@ -196,8 +196,8 @@ Definition
196196

197197
Specify *one* string inside the array.
198198

199-
If omitted, :ref:`mongocryptd` checks the full tree of parent
200-
fields for the nearest
199+
If omitted, the :ref:`Shared Library <csfle-reference-shared-library>` checks
200+
all parent fields for the closest ancestor containing an
201201
:autoencryptkeyword:`encryptMetadata.keyId` key and inherits
202202
that value. If no parent
203203
:autoencryptkeyword:`~encryptMetadata.keyId` exists,
@@ -239,7 +239,7 @@ Definition
239239
Defines encryption options which an :autoencryptkeyword:`encrypt`
240240
object nested in the sibling ``properties`` may inherit. If an
241241
:autoencryptkeyword:`encrypt` is missing an option required to support
242-
encryption, ``mongocryptd`` searches the entire tree of parent objects
242+
encryption, the Shared Library searches all parent objects
243243
to locate an :autoencryptkeyword:`encryptMetadata` object that
244244
specifies the missing option.
245245

@@ -263,8 +263,8 @@ Definition
263263

264264
The encryption algorithm to use to encrypt a given field. If an
265265
:autoencryptkeyword:`encrypt` object is missing the
266-
:autoencryptkeyword:`~encrypt.algorithm` field, ``mongocryptd``
267-
searches the entire tree of parent objects to locate an
266+
:autoencryptkeyword:`~encrypt.algorithm` field, the Shared Library
267+
searches all parent objects to locate an
268268
:autoencryptkeyword:`encryptMetadata` object that specifies
269269
:autoencryptkeyword:`encryptMetadata.algorithm`.
270270

@@ -290,8 +290,8 @@ Definition
290290
Specify *one* string inside the array.
291291

292292
If an :autoencryptkeyword:`encrypt` object is missing the
293-
:autoencryptkeyword:`~encrypt.keyId` field, ``mongocryptd``
294-
searches the entire tree of parent objects to locate
293+
:autoencryptkeyword:`~encrypt.keyId` field, the Shared Library
294+
searches all parent objects to locate
295295
an :autoencryptkeyword:`encryptMetadata` object that
296296
specifies :autoencryptkeyword:`encryptMetadata.keyId`.
297297

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

source/core/queryable-encryption/reference/shared-library.txt

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ A dynamic library is a set of functionality accessed
2121
by an application at runtime rather than compile time.
2222
The {+shared-library+} performs the following tasks:
2323

24-
- Uses your {+enc-fields-map+} to mark fields in
25-
read and write operations for encryption
24+
- Reads the {+enc-fields-map+} to determine which fields to encrypt or decrypt
2625
- Prevents your application from executing unsupported operations on encrypted
2726
fields
2827

29-
The {+shared-library+} does not perform any of the following tasks:
28+
The {+shared-library+} *does not* do any of the following:
3029

31-
- The {+shared-library+} *does not* perform encryption or decryption itself
32-
- The {+shared-library+} *does not* access any encryption key material
33-
- The {+shared-library+} *does not* listen over the network
30+
- Perform data encryption or decryption
31+
- Access the encryption key material
32+
- Listen for data over the network
3433

3534
.. important:: Supported MongoDB Server Products
3635

@@ -42,40 +41,35 @@ The {+shared-library+} does not perform any of the following tasks:
4241
Automatic {+qe+} is not available in any version of MongoDB
4342
Community Server.
4443

45-
The {+shared-library+} provides the same functionality as ``mongocryptd``,
46-
but does not require you to spawn another process to perform automatic
47-
encryption.
44+
The {+shared-library+} is a preferred alternative to ``mongocryptd`` and does
45+
not require you to spawn another process to perform automatic encryption.
4846

49-
To learn more about automatic encryption, see
50-
:ref:`<qe-features>`.
51-
52-
To learn more about ``mongocryptd``, see
53-
:ref:`<qe-reference-mongocryptd>`.
47+
.. tip::
48+
49+
While we recommend using the {+shared-library+}, ``mongocryptd`` is still supported.
5450

55-
.. note:: libmongocrypt Performs Encryption
51+
To learn more about ``mongocryptd``, see :ref:`<qe-reference-mongocryptd>`.
5652

57-
Drivers compatible with MongoDB 6.0 and later use the
58-
Apache-licensed `libmongocrypt
59-
<https://github.com/mongodb/libmongocrypt>`__ library for performing
60-
encryption and decryption.
53+
To learn more about automatic encryption, see
54+
:ref:`<qe-features>`.
6155

6256
.. _qe-reference-shared-library-download:
6357

6458
Download the {+shared-library+}
6559
------------------------------------------------
6660

67-
Download the {+shared-library+} using one of the following methods:
61+
Download the {+shared-library+} from the `MongoDB Download Center <https://www.mongodb.com/try/download/enterprise>`__ by selecting the
62+
version and platform, then the library:
6863

69-
* Download the latest {+shared-library-package+} library archive for your
70-
platform from `MongoDB Enterprise Downloads <https://www.mongodb.com/download-center/enterprise/releases>`__.
64+
#. In the :guilabel:`Version` dropdown, select ``{+shared-library-version-drop-down+}``.
65+
#. In the :guilabel:`Platform` dropdown, select your platform.
66+
#. In the :guilabel:`Package` dropdown, select ``crypt_shared``.
67+
#. Click :guilabel:`Download`.
7168

72-
* Download the {+shared-library+} from the `MongoDB Download Center <https://www.mongodb.com/try/download/enterprise>`__ by selecting the
73-
version and platform, then the library:
69+
.. tip::
7470

75-
#. In the **Version** dropdown, select ``{+shared-library-version-drop-down+}``.
76-
#. In the **Platform** dropdown, select your platform.
77-
#. In the **Package** dropdown, select ``crypt_shared``.
78-
#. Click **Download**.
71+
To view an expanded list of available releases and packages, see
72+
`MongoDB Enterprise Downloads <https://www.mongodb.com/download-center/enterprise/releases>`__.
7973

8074
.. _qe-reference-shared-library-configuration:
8175

source/includes/generated/in-use-encryption/csfle/dotnet/aws/reader/CSFLE/InsertEncryptedDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ public static void Insert()
113113

114114

115115
// start-extra-options
116-
var mongoBinariesPath = "<Path to mongocryptd binary>";
116+
var mongoBinariesPath = "<Full path to your Automatic Encryption Shared Library>";
117117
var extraOptions = new Dictionary<string, object>()
118118
{
119-
{ "mongocryptdSpawnPath", mongoBinariesPath },
119+
{ "cryptSharedLibPath", mongoBinariesPath },
120120
};
121121
// end-extra-options
122122

source/includes/generated/in-use-encryption/csfle/dotnet/azure/reader/CSFLE/InsertEncryptedDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ public static void Insert()
114114

115115

116116
// start-extra-options
117-
var mongoBinariesPath = "<Path to mongocryptd binary>";
117+
var mongoBinariesPath = "<Full path to your Automatic Encryption Shared Library>";
118118
var extraOptions = new Dictionary<string, object>()
119119
{
120-
{ "mongocryptdSpawnPath", mongoBinariesPath },
120+
{ "cryptSharedLibPath", mongoBinariesPath },
121121
};
122122
// end-extra-options
123123

source/includes/generated/in-use-encryption/csfle/dotnet/gcp/reader/CSFLE/InsertEncryptedDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ public static void Insert()
113113

114114

115115
// start-extra-options
116-
var mongoBinariesPath = "<Path to mongocryptd binary>";
116+
var mongoBinariesPath = "<Full path to your Automatic Encryption Shared Library>";
117117
var extraOptions = new Dictionary<string, object>()
118118
{
119-
{ "mongocryptdSpawnPath", mongoBinariesPath },
119+
{ "cryptSharedLibPath", mongoBinariesPath },
120120
};
121121
// end-extra-options
122122

source/includes/generated/in-use-encryption/csfle/dotnet/kmip/reader/CSFLE/InsertEncryptedDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ public static void Insert()
122122
// end-create-tls
123123

124124
// start-extra-options
125-
var mongoBinariesPath = "<Path to mongocryptd binary>";
125+
var mongoBinariesPath = "<Full path to your Automatic Encryption Shared Library>";
126126
var extraOptions = new Dictionary<string, object>()
127127
{
128-
{ "mongocryptdSpawnPath", mongoBinariesPath },
128+
{ "cryptSharedLibPath", mongoBinariesPath },
129129
};
130130
// end-extra-options
131131

source/includes/generated/in-use-encryption/csfle/dotnet/local/reader/CSFLE/InsertEncryptedDocument.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@ public static void Insert()
116116

117117

118118
// start-extra-options
119-
var mongoBinariesPath = "<Path to mongocryptd binary>";
119+
var mongoBinariesPath = "<Full path to your Automatic Encryption Shared Library>";
120120
var extraOptions = new Dictionary<string, object>()
121121
{
122-
{ "mongocryptdSpawnPath", mongoBinariesPath },
122+
{ "cryptSharedLibPath", mongoBinariesPath },
123123
};
124124
// end-extra-options
125125

0 commit comments

Comments
 (0)