Socket
Socket
Sign inDemoInstall

mongodb-client-encryption

Package Overview
Dependencies
Maintainers
6
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-client-encryption - npm Package Compare versions

Comparing version 2.6.0 to 2.7.0-alpha.0

lib/providers/aws.js

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

## [2.7.0-alpha.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0...node-v2.7.0-alpha.0) (2023-03-14)
## [2.6.0](https://github.com/mongodb/libmongocrypt/compare/node-v2.6.0-alpha.0...node-v2.6.0) (2023-02-23)

@@ -7,0 +9,0 @@

@@ -66,2 +66,12 @@ import type {

/**
* An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.
*/
export class MongoCryptAzureKMSRequestError extends MongoCryptError {
/* The body of the IMDS request that produced the error, if present. */
body?: Document ;
}
export class MongoCryptKMSRequestNetworkTimeoutError extends MongoCryptError {}
/**
* A set of options for specifying a Socks5 proxy.

@@ -183,3 +193,4 @@ */

accessToken: string;
};
}
| Record<string, never>;

@@ -186,0 +197,0 @@ /**

2

lib/autoEncrypter.js

@@ -12,3 +12,3 @@ 'use strict';

const BSON = modules.mongodb.BSON;
const { loadCredentials } = require('./credentialsProvider');
const { loadCredentials } = require('./providers/index');
const cryptoCallbacks = require('./cryptoCallbacks');

@@ -15,0 +15,0 @@

@@ -16,3 +16,3 @@ 'use strict';

} = require('./errors');
const { loadCredentials } = require('./credentialsProvider');
const { loadCredentials } = require('./providers/index');
const cryptoCallbacks = require('./cryptoCallbacks');

@@ -19,0 +19,0 @@ const { promisify } = require('util');

@@ -52,6 +52,25 @@ 'use strict';

/**
* @class
* An error indicating that mongodb-client-encryption failed to auto-refresh Azure KMS credentials.
*/
class MongoCryptAzureKMSRequestError extends MongoCryptError {
/**
* @param {string} message
* @param {object | undefined} body
*/
constructor(message, body) {
super(message);
this.body = body;
}
}
class MongoCryptKMSRequestNetworkTimeoutError extends MongoCryptError {}
module.exports = {
MongoCryptError,
MongoCryptKMSRequestNetworkTimeoutError,
MongoCryptAzureKMSRequestError,
MongoCryptCreateDataKeyError,
MongoCryptCreateEncryptedCollectionError
};

@@ -15,5 +15,9 @@ 'use strict';

MongoCryptCreateEncryptedCollectionError,
MongoCryptCreateDataKeyError
MongoCryptCreateDataKeyError,
MongoCryptAzureKMSRequestError,
MongoCryptKMSRequestNetworkTimeoutError
} = require('./errors');
const { fetchAzureKMSToken } = require('./providers/index');
function extension(mongodb) {

@@ -26,3 +30,3 @@ const modules = { mongodb };

return {
const exports = {
AutoEncrypter: modules.autoEncrypter.AutoEncrypter,

@@ -32,4 +36,14 @@ ClientEncryption: modules.clientEncryption.ClientEncryption,

MongoCryptCreateEncryptedCollectionError,
MongoCryptCreateDataKeyError
MongoCryptCreateDataKeyError,
MongoCryptAzureKMSRequestError,
MongoCryptKMSRequestNetworkTimeoutError
};
Object.defineProperty(exports, '___azureKMSProseTestExports', {
enumerable: false,
configurable: false,
value: fetchAzureKMSToken
});
return exports;
}

@@ -42,2 +56,4 @@

MongoCryptCreateDataKeyError,
MongoCryptAzureKMSRequestError,
MongoCryptKMSRequestNetworkTimeoutError,
get AutoEncrypter() {

@@ -56,1 +72,7 @@ const m = loadDefaultModule();

};
Object.defineProperty(module.exports, '___azureKMSProseTestExports', {
enumerable: false,
configurable: false,
value: fetchAzureKMSToken
});
{
"name": "mongodb-client-encryption",
"version": "2.6.0",
"version": "2.7.0-alpha.0",
"description": "Official client encryption module for the MongoDB Node.js driver",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc