Skip to content

Commit 631455d

Browse files
authored
docs(NODE-4724): update fle docs to use "in use encryption" terminology (#3448)
1 parent 7a8b186 commit 631455d

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

src/collection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ export class Collection<TSchema extends Document = Document> {
288288
options = {};
289289
}
290290

291-
// CSFLE passes in { w: 'majority' } to ensure the lib works in both 3.x and 4.x
292-
// we support that option style here only
291+
// versions of mongodb-client-encryption before v1.2.6 pass in hardcoded { w: 'majority' }
292+
// specifically to an insertOne call in createDataKey, so we want to support this only here
293293
if (options && Reflect.get(options, 'w')) {
294294
options.writeConcern = WriteConcern.fromOptions(Reflect.get(options, 'w'));
295295
}

src/deps.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ export interface AutoEncryptionOptions {
306306
*
307307
* **NOTE**: Supplying options.schemaMap provides more security than relying on JSON Schemas obtained from the server.
308308
* It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending decrypted data that should be encrypted.
309-
* Schemas supplied in the schemaMap only apply to configuring automatic encryption for client side encryption.
309+
* Schemas supplied in the schemaMap only apply to configuring automatic encryption for Client-Side Field Level Encryption.
310310
* Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.
311311
*/
312312
schemaMap?: Document;

src/error.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export interface ErrorDescription extends Document {
111111
* @category Error
112112
*
113113
* @privateRemarks
114-
* CSFLE has a dependency on this error, it uses the constructor with a string argument
114+
* mongodb-client-encryption has a dependency on this error, it uses the constructor with a string argument
115115
*/
116116
export class MongoError extends Error {
117117
/** @internal */
@@ -568,7 +568,7 @@ export class MongoNetworkError extends MongoError {
568568
* @category Error
569569
*
570570
* @privateRemarks
571-
* CSFLE has a dependency on this error with an instanceof check
571+
* mongodb-client-encryption has a dependency on this error with an instanceof check
572572
*/
573573
export class MongoNetworkTimeoutError extends MongoNetworkError {
574574
constructor(message: string, options?: MongoNetworkErrorOptions) {

src/mongo_client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export interface MongoClientOptions extends BSONSerializeOptions, SupportedNodeC
243243
/** Server API version */
244244
serverApi?: ServerApi | ServerApiVersion;
245245
/**
246-
* Optionally enable client side auto encryption
246+
* Optionally enable in-use auto encryption
247247
*
248248
* @remarks
249249
* Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error

src/sdam/topology.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ export class Topology extends TypedEventEmitter<TopologyEvents> {
252252
) => this.selectServer(selector, options, callback as any)
253253
);
254254

255-
// Legacy CSFLE support
255+
// Saving a reference to these BSON functions
256+
// supports v2.2.0 and older versions of mongodb-client-encryption
256257
this.bson = Object.create(null);
257258
this.bson.serialize = serialize;
258259
this.bson.deserialize = deserialize;

0 commit comments

Comments
 (0)