From 31759d3616d932dddd2102c835f6a8545d0ca265 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 11 Mar 2024 18:02:41 +0100 Subject: [PATCH 1/2] feat(deps): bump oidc dependencies to latest versions See https://github.com/mongodb-js/oidc-plugin/commit/943dd334f3be9560b1bc0119c39a58b7ea27e594 and related tickets for details. --- package-lock.json | 111 ++++++++++++++---------- packages/atlas-service/package.json | 4 +- packages/compass-e2e-tests/package.json | 2 +- packages/data-service/package.json | 4 +- 4 files changed, 70 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 31adf20e5a3..5abaa141828 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8022,20 +8022,24 @@ "link": true }, "node_modules/@mongodb-js/devtools-connect": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-2.4.3.tgz", - "integrity": "sha512-JS288VVm/Mu8+kHL8ybKCpL2/AiA4CWhWun7FR3iRNH5NXbT9c6aovEc2pxjsCbmYUjzuTsRoIo9LTrNoCvNrQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-2.6.0.tgz", + "integrity": "sha512-UIMOCfsfhmIj5TWXRfhMSPTfg7zNSGDphlKGABLZ/SP03aI5cAOi1krHTxBjx4p9iTs5E+A6eF+9GTKOTVXISQ==", "dependencies": { + "@mongodb-js/oidc-http-server-pages": "1.1.0", "lodash.merge": "^4.6.2", "mongodb-connection-string-url": "^3.0.0", + "socks": "^2.7.3", "system-ca": "^1.0.2" }, "optionalDependencies": { + "kerberos": "^2.1.0", + "mongodb-client-encryption": "^6.0.0", "os-dns-native": "^1.2.0", "resolve-mongodb-srv": "^1.1.1" }, "peerDependencies": { - "@mongodb-js/oidc-plugin": "^0.3.0", + "@mongodb-js/oidc-plugin": "^0.4.0", "mongodb": "^5.8.1 || ^6.0.0", "mongodb-log-writer": "^1.2.0" } @@ -8562,10 +8566,15 @@ "resolved": "packages/my-queries-storage", "link": true }, + "node_modules/@mongodb-js/oidc-http-server-pages": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-http-server-pages/-/oidc-http-server-pages-1.1.0.tgz", + "integrity": "sha512-mRzOeYXV1oRnwifRaeV43HZq2s0USLwm9JPYO6Kb0T1oqZhMjzf1VIPSxktiwCf8gKw37uZ8knPdX5aDfQuQ4g==" + }, "node_modules/@mongodb-js/oidc-mock-provider": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-mock-provider/-/oidc-mock-provider-0.7.1.tgz", - "integrity": "sha512-l2yYBoAqDV6Qoqenc7PUOIeEtgr3LDu2t1dvEJ2+mdncIlHpNT0oKSbwR7vjSuRSYk3AZgoj0VOPrw8dJ4XxDQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-mock-provider/-/oidc-mock-provider-0.9.0.tgz", + "integrity": "sha512-VuUkdUz/EZ17lE/tK9DCVy6e8C+lHdJG2pEXWO+TmhWlenn/EmqVLZ5qZGuJIhAmgoHjlsvKZxUIht8GJYg9Xw==", "dev": true, "dependencies": { "yargs": "17.7.2" @@ -8637,14 +8646,14 @@ } }, "node_modules/@mongodb-js/oidc-plugin": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-0.3.1.tgz", - "integrity": "sha512-oEM7/AVyjH8C63WM4Q0JAFVA/Q77ZzlFXJCWPn/rIbDk3a4uVLFC9L8OlH8D0bawdI1fpVii2tsDo6msDtoovQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-0.4.0.tgz", + "integrity": "sha512-tinXSz6O2AmgMAgorXUcCJtDhayghkmsXVVTd5UiXhzSA/NNVtlleZXSVkG6tr46WXGzLISgVX+lUzzcEIiwJQ==", "dependencies": { "abort-controller": "^3.0.0", "express": "^4.18.2", "open": "^9.1.0", - "openid-client": "^5.4.0" + "openid-client": "^5.6.4" }, "engines": { "node": ">= 14.18.0" @@ -28434,9 +28443,9 @@ } }, "node_modules/jose": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", - "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==", + "version": "4.15.5", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.5.tgz", + "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==", "funding": { "url": "https://github.com/sponsors/panva" } @@ -35412,11 +35421,11 @@ } }, "node_modules/openid-client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.2.tgz", - "integrity": "sha512-lIhsdPvJ2RneBm3nGBBhQchpe3Uka//xf7WPHTIglery8gnckvW7Bd9IaQzekzXJvWthCMyi/xVEyGW0RFPytw==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.6.5.tgz", + "integrity": "sha512-5P4qO9nGJzB5PI0LFlhj4Dzg3m4odt0qsJTfyEtZyOlkgpILwEioOhVVJOrS1iVH494S4Ee5OCjjg6Bf5WOj3w==", "dependencies": { - "jose": "^4.14.1", + "jose": "^4.15.5", "lru-cache": "^6.0.0", "object-hash": "^2.2.0", "oidc-token-hash": "^5.0.3" @@ -44848,8 +44857,8 @@ "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-user-data": "^0.1.17", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/devtools-connect": "^2.6.0", + "@mongodb-js/oidc-plugin": "^0.4.0", "compass-preferences-model": "^2.18.1", "electron": "^28.2.5", "hadron-app-registry": "^9.1.8", @@ -46455,7 +46464,7 @@ "@electron/rebuild": "^3.6.0", "@mongodb-js/compass-test-server": "^0.1.13", "@mongodb-js/eslint-config-compass": "^1.0.17", - "@mongodb-js/oidc-mock-provider": "^0.7.1", + "@mongodb-js/oidc-mock-provider": "^0.9.0", "@mongodb-js/prettier-config-compass": "^1.0.1", "@mongodb-js/tsconfig-compass": "^1.0.3", "@types/chai-as-promised": "^7.1.4", @@ -48233,6 +48242,7 @@ "@mongodb-js/compass-components": "^1.22.1", "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-query-bar": "^8.25.1", + "@mongodb-js/connection-storage": "^0.8.1", "bson": "^6.3.0", "compass-preferences-model": "^2.18.1", "hadron-app-registry": "^9.1.8", @@ -49672,8 +49682,8 @@ "dependencies": { "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/devtools-connect": "^2.6.0", + "@mongodb-js/oidc-plugin": "^0.4.0", "@mongodb-js/ssh-tunnel": "^2.1.13", "hadron-app-registry": "^9.1.8", "lodash": "^4.17.21", @@ -58096,10 +58106,10 @@ "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-user-data": "^0.1.17", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", + "@mongodb-js/devtools-connect": "^2.6.0", "@mongodb-js/eslint-config-compass": "^1.0.17", "@mongodb-js/mocha-config-compass": "^1.3.7", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/oidc-plugin": "^0.4.0", "@mongodb-js/prettier-config-compass": "^1.0.1", "@mongodb-js/tsconfig-compass": "^1.0.3", "@testing-library/react": "^12.1.4", @@ -59851,7 +59861,7 @@ "@mongodb-js/compass-components": "^1.22.1", "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-query-bar": "^8.25.1", - "@mongodb-js/connection-storage": "*", + "@mongodb-js/connection-storage": "^0.8.1", "@mongodb-js/eslint-config-compass": "^1.0.17", "@mongodb-js/mocha-config-compass": "^1.3.7", "@mongodb-js/my-queries-storage": "^0.5.1", @@ -61333,14 +61343,18 @@ } }, "@mongodb-js/devtools-connect": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-2.4.3.tgz", - "integrity": "sha512-JS288VVm/Mu8+kHL8ybKCpL2/AiA4CWhWun7FR3iRNH5NXbT9c6aovEc2pxjsCbmYUjzuTsRoIo9LTrNoCvNrQ==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/devtools-connect/-/devtools-connect-2.6.0.tgz", + "integrity": "sha512-UIMOCfsfhmIj5TWXRfhMSPTfg7zNSGDphlKGABLZ/SP03aI5cAOi1krHTxBjx4p9iTs5E+A6eF+9GTKOTVXISQ==", "requires": { + "@mongodb-js/oidc-http-server-pages": "1.1.0", + "kerberos": "^2.1.0", "lodash.merge": "^4.6.2", + "mongodb-client-encryption": "^6.0.0", "mongodb-connection-string-url": "^3.0.0", "os-dns-native": "^1.2.0", "resolve-mongodb-srv": "^1.1.1", + "socks": "^2.7.3", "system-ca": "^1.0.2" }, "dependencies": { @@ -61901,10 +61915,15 @@ } } }, + "@mongodb-js/oidc-http-server-pages": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-http-server-pages/-/oidc-http-server-pages-1.1.0.tgz", + "integrity": "sha512-mRzOeYXV1oRnwifRaeV43HZq2s0USLwm9JPYO6Kb0T1oqZhMjzf1VIPSxktiwCf8gKw37uZ8knPdX5aDfQuQ4g==" + }, "@mongodb-js/oidc-mock-provider": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-mock-provider/-/oidc-mock-provider-0.7.1.tgz", - "integrity": "sha512-l2yYBoAqDV6Qoqenc7PUOIeEtgr3LDu2t1dvEJ2+mdncIlHpNT0oKSbwR7vjSuRSYk3AZgoj0VOPrw8dJ4XxDQ==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-mock-provider/-/oidc-mock-provider-0.9.0.tgz", + "integrity": "sha512-VuUkdUz/EZ17lE/tK9DCVy6e8C+lHdJG2pEXWO+TmhWlenn/EmqVLZ5qZGuJIhAmgoHjlsvKZxUIht8GJYg9Xw==", "dev": true, "requires": { "yargs": "17.7.2" @@ -61960,14 +61979,14 @@ } }, "@mongodb-js/oidc-plugin": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-0.3.1.tgz", - "integrity": "sha512-oEM7/AVyjH8C63WM4Q0JAFVA/Q77ZzlFXJCWPn/rIbDk3a4uVLFC9L8OlH8D0bawdI1fpVii2tsDo6msDtoovQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/oidc-plugin/-/oidc-plugin-0.4.0.tgz", + "integrity": "sha512-tinXSz6O2AmgMAgorXUcCJtDhayghkmsXVVTd5UiXhzSA/NNVtlleZXSVkG6tr46WXGzLISgVX+lUzzcEIiwJQ==", "requires": { "abort-controller": "^3.0.0", "express": "^4.18.2", "open": "^9.1.0", - "openid-client": "^5.4.0" + "openid-client": "^5.6.4" }, "dependencies": { "define-lazy-prop": { @@ -71309,7 +71328,7 @@ "@electron/rebuild": "^3.6.0", "@mongodb-js/compass-test-server": "^0.1.13", "@mongodb-js/eslint-config-compass": "^1.0.17", - "@mongodb-js/oidc-mock-provider": "^0.7.1", + "@mongodb-js/oidc-mock-provider": "^0.9.0", "@mongodb-js/prettier-config-compass": "^1.0.1", "@mongodb-js/tsconfig-compass": "^1.0.3", "@types/chai-as-promised": "^7.1.4", @@ -80209,9 +80228,9 @@ } }, "jose": { - "version": "4.14.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", - "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==" + "version": "4.15.5", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.15.5.tgz", + "integrity": "sha512-jc7BFxgKPKi94uOvEmzlSWFFe2+vASyXaKUpdQKatWAESU2MWjDfFf0fdfc83CDKcA5QecabZeNLyfhe3yKNkg==" }, "js-sha256": { "version": "0.9.0", @@ -83998,11 +84017,11 @@ "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-test-server": "^0.1.13", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", + "@mongodb-js/devtools-connect": "^2.6.0", "@mongodb-js/devtools-docker-test-envs": "^1.3.2", "@mongodb-js/eslint-config-compass": "^1.0.17", "@mongodb-js/mocha-config-compass": "^1.3.7", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/oidc-plugin": "^0.4.0", "@mongodb-js/prettier-config-compass": "^1.0.1", "@mongodb-js/ssh-tunnel": "^2.1.13", "@mongodb-js/tsconfig-compass": "^1.0.3", @@ -86001,11 +86020,11 @@ "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" }, "openid-client": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.2.tgz", - "integrity": "sha512-lIhsdPvJ2RneBm3nGBBhQchpe3Uka//xf7WPHTIglery8gnckvW7Bd9IaQzekzXJvWthCMyi/xVEyGW0RFPytw==", + "version": "5.6.5", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.6.5.tgz", + "integrity": "sha512-5P4qO9nGJzB5PI0LFlhj4Dzg3m4odt0qsJTfyEtZyOlkgpILwEioOhVVJOrS1iVH494S4Ee5OCjjg6Bf5WOj3w==", "requires": { - "jose": "^4.14.1", + "jose": "^4.15.5", "lru-cache": "^6.0.0", "object-hash": "^2.2.0", "oidc-token-hash": "^5.0.3" diff --git a/packages/atlas-service/package.json b/packages/atlas-service/package.json index ae52d6ba80b..8acd2e74dcb 100644 --- a/packages/atlas-service/package.json +++ b/packages/atlas-service/package.json @@ -77,8 +77,8 @@ "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-user-data": "^0.1.17", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/devtools-connect": "^2.6.0", + "@mongodb-js/oidc-plugin": "^0.4.0", "hadron-app-registry": "^9.1.8", "compass-preferences-model": "^2.18.1", "electron": "^28.2.5", diff --git a/packages/compass-e2e-tests/package.json b/packages/compass-e2e-tests/package.json index 3722b542215..ccba8baf762 100644 --- a/packages/compass-e2e-tests/package.json +++ b/packages/compass-e2e-tests/package.json @@ -32,7 +32,7 @@ "@electron/rebuild": "^3.6.0", "@mongodb-js/compass-test-server": "^0.1.13", "@mongodb-js/eslint-config-compass": "^1.0.17", - "@mongodb-js/oidc-mock-provider": "^0.7.1", + "@mongodb-js/oidc-mock-provider": "^0.9.0", "@mongodb-js/prettier-config-compass": "^1.0.1", "@mongodb-js/tsconfig-compass": "^1.0.3", "@types/chai-as-promised": "^7.1.4", diff --git a/packages/data-service/package.json b/packages/data-service/package.json index 3e9e24d27e6..2adffeb43c8 100644 --- a/packages/data-service/package.json +++ b/packages/data-service/package.json @@ -61,8 +61,8 @@ "dependencies": { "@mongodb-js/compass-logging": "^1.2.14", "@mongodb-js/compass-utils": "^0.6.1", - "@mongodb-js/devtools-connect": "^2.4.2", - "@mongodb-js/oidc-plugin": "^0.3.1", + "@mongodb-js/devtools-connect": "^2.6.0", + "@mongodb-js/oidc-plugin": "^0.4.0", "@mongodb-js/ssh-tunnel": "^2.1.13", "hadron-app-registry": "^9.1.8", "lodash": "^4.17.21", From 6ad07160d7fd82f0095c1ffa8aeece42d1d71f5d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 11 Mar 2024 18:50:03 +0100 Subject: [PATCH 2/2] fixup: adjust listener count test --- packages/atlas-service/src/main.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/atlas-service/src/main.spec.ts b/packages/atlas-service/src/main.spec.ts index f8018d3df33..29b88aa650c 100644 --- a/packages/atlas-service/src/main.spec.ts +++ b/packages/atlas-service/src/main.spec.ts @@ -339,7 +339,7 @@ describe('CompassAuthServiceMain', function () { } as any; await CompassAuthService.init(preferences); CompassAuthService['config'] = defaultConfig; - expect(getListenerCount(logger)).to.eq(26); + expect(getListenerCount(logger)).to.eq(28); // We did all preparations, reset sinon history for easier assertions sandbox.resetHistory();