Skip to content

Commit 6d144d4

Browse files
committed
wording suggestions
1 parent 1169224 commit 6d144d4

File tree

2 files changed

+30
-28
lines changed

2 files changed

+30
-28
lines changed

source/client-side-encryption/client-side-encryption.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,6 +1348,9 @@ server to insert or query. Drivers MUST document the following behavior:
13481348
> To insert or query with an "Indexed", "Range", or "TextPreview" encrypted payload, use a `MongoClient` configured with
13491349
> `AutoEncryptionOpts`. `AutoEncryptionOpts.bypassQueryAnalysis` may be true. `AutoEncryptionOpts.bypassAutoEncryption`
13501350
> must be false.
1351+
> The "TextPreview" algorithm is in preview and should be used for experimental workloads only. These features are
1352+
> unstable and their security is not guaranteed until released as Generally Available (GA). The GA version of these
1353+
> features may not be backwards compatible with the preview version.
13511354
13521355
#### contentionFactor
13531356
@@ -1365,7 +1368,7 @@ One of the strings:
13651368
- "substringPreview"
13661369
13671370
queryType only applies when algorithm is "Indexed", "Range", or "TextPreview". libmongocrypt returns an error if
1368-
queryType is set for a non-applicable queryType.
1371+
queryType is set for a non-applicable algorithm.
13691372
13701373
#### rangeOpts
13711374
@@ -2517,8 +2520,6 @@ explicit session parameter as described in the [Drivers Sessions Specification](
25172520

25182521
## Changelog
25192522

2520-
- 2025-08-06: Add `TextPreview` prose tests.
2521-
25222523
- 2025-08-06: Add `TextPreview` algorithm.
25232524

25242525
- 2024-02-19: Add custom options AWS credential provider.

source/client-side-encryption/tests/README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3783,7 +3783,7 @@ as `key1Document`.
37833783
Read the `"_id"` field of `key1Document` as `key1ID`.
37843784

37853785
Drop and create the collection `db.explicit_encryption` using `encryptedFields` as an option. See
3786-
[FLE 2 CreateCollection() and Collection.Drop()](../client-side-encryption.md#create-collection-helper).
3786+
[QE CreateCollection() and Collection.Drop()](../client-side-encryption.md#create-collection-helper).
37873787

37883788
Drop and create the collection `keyvault.datakeys`.
37893789

@@ -3811,6 +3811,30 @@ class AutoEncryptionOpts {
38113811
}
38123812
```
38133813

3814+
Use `clientEncryption` to encrypt the string `"foobarbaz"`.
3815+
3816+
Encrypt using the following `EncryptOpts`:
3817+
3818+
```typescript
3819+
class EncryptOpts {
3820+
keyId : <key1ID>,
3821+
algorithm: "TextPreview",
3822+
contentionFactor: 0,
3823+
textOpts: TextOpts {
3824+
caseSensitive: true,
3825+
diacriticSensitive: true,
3826+
prefix: <PrefixOpts>,
3827+
suffix: <SuffixOpts>
3828+
},
3829+
}
3830+
```
3831+
3832+
Use `encryptedClient` to insert the following document into `db.explicit_encryption`:
3833+
3834+
```javascript
3835+
{ "_id": 0, "encryptedText": <encrypted "foobarbaz"> }
3836+
```
3837+
38143838
The remaining tasks require setting `TextOpts`. [Test Setup: TextOpts](#test-setup-textopts) lists the values to use for
38153839
`TextOpts` for each of the supported data types.
38163840

@@ -3823,6 +3847,7 @@ This section lists the values to use for `TextOpts` for each query type. Include
38233847
class EncryptOpts {
38243848
keyId : <key1ID>,
38253849
algorithm: "TextPreview",
3850+
queryType: "<prefix/suffix/substring>Preview",
38263851
contentionFactor: 0,
38273852
textOpts: TextOpts {
38283853
caseSensitive: true,
@@ -3860,30 +3885,6 @@ class EncryptOpts {
38603885
}
38613886
```
38623887

3863-
Use `clientEncryption` to encrypt the string `"foobarbaz"`.
3864-
3865-
Encrypt using the following `EncryptOpts`:
3866-
3867-
```typescript
3868-
class EncryptOpts {
3869-
keyId : <key1ID>,
3870-
algorithm: "TextPreview",
3871-
contentionFactor: 0,
3872-
textOpts: TextOpts {
3873-
caseSensitive: true,
3874-
diacriticSensitive: true,
3875-
prefix: <PrefixOpts>,
3876-
suffix: <SuffixOpts>
3877-
},
3878-
}
3879-
```
3880-
3881-
Use `encryptedClient` to insert the following document into `db.explicit_encryption`:
3882-
3883-
```javascript
3884-
{ "_id": 0, "encryptedText": <encrypted "foobarbaz"> }
3885-
```
3886-
38873888
#### Case 1: can find a document by prefix
38883889

38893890
Use `clientEncryption.encrypt()` to encrypt the string `"foo"`:

0 commit comments

Comments
 (0)