Skip to content

Commit 5e27c4f

Browse files
authored
fix(cli-repl): use tls allowPartialTrustChain flag MONGOSH-1878 (#2181)
This should bring back startup performance to pre-2.3.1 levels. Also pins kerberos to 2.1.0, since bumping it actually broke our Windows build.
1 parent 7863068 commit 5e27c4f

File tree

11 files changed

+295
-75
lines changed

11 files changed

+295
-75
lines changed

package-lock.json

Lines changed: 122 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"husky": "^9.0.11",
112112
"mocha": "^10.2.0",
113113
"mongodb": "^6.9.0",
114-
"mongodb-runner": "^5.6.1",
114+
"mongodb-runner": "^5.7.0",
115115
"node-gyp": "^9.0.0",
116116
"nyc": "^15.1.0",
117117
"pkg-up": "^3.1.0",

packages/arg-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"mongodb-connection-string-url": "^3.0.1"
4141
},
4242
"devDependencies": {
43-
"@mongodb-js/devtools-connect": "^3.2.11",
43+
"@mongodb-js/devtools-connect": "^3.3.0",
4444
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
4545
"@mongodb-js/prettier-config-devtools": "^1.0.1",
4646
"@mongodb-js/tsconfig-mongosh": "^1.0.0",

packages/cli-repl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
},
6363
"dependencies": {
64-
"@mongodb-js/devtools-proxy-support": "^0.3.10",
64+
"@mongodb-js/devtools-proxy-support": "^0.4.0",
6565
"@mongosh/arg-parser": "0.0.0-dev.0",
6666
"@mongosh/autocomplete": "0.0.0-dev.0",
6767
"@mongosh/editor": "0.0.0-dev.0",

packages/cli-repl/src/run.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ import { TimingCategories } from '@mongosh/types';
3434
import './webpack-self-inspection';
3535
import { systemCA } from '@mongodb-js/devtools-proxy-support';
3636

37+
if ('boxednode' in process) {
38+
// compiled executable
39+
// https://github.com/mongodb-js/devtools-shared/pull/476
40+
(process as any).__tlsSupportsAllowPartialTrustChainFlag = true;
41+
}
42+
3743
// TS does not yet have type definitions for v8.startupSnapshot
3844
if ((v8 as any)?.startupSnapshot?.isBuildingSnapshot?.()) {
3945
// Import a few nested deps of dependencies that cannot be included in the

packages/e2e-tests/test/e2e-tls.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ describe('e2e TLS', function () {
165165
const result = await shell.waitForPromptOrExit();
166166
expect(result.state).to.equal('exit');
167167
shell.assertContainsOutput(
168-
/unable to verify the first certificate|self[- ]signed certificate in certificate chain/
168+
/unable to verify the first certificate|self[- ]signed certificate in certificate chain|unable to get (local )?issuer certificate/
169169
);
170170
});
171171

@@ -182,7 +182,7 @@ describe('e2e TLS', function () {
182182
const result = await shell.waitForPromptOrExit();
183183
expect(result.state).to.equal('exit');
184184
shell.assertContainsOutput(
185-
/unable to verify the first certificate|self[- ]signed certificate in certificate chain/
185+
/unable to verify the first certificate|self[- ]signed certificate in certificate chain|unable to get (local )?issuer certificate/
186186
);
187187
});
188188

packages/logging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"node": ">=14.15.1"
1818
},
1919
"dependencies": {
20-
"@mongodb-js/devtools-connect": "^3.2.11",
20+
"@mongodb-js/devtools-connect": "^3.3.0",
2121
"@mongosh/errors": "0.0.0-dev.0",
2222
"@mongosh/history": "0.0.0-dev.0",
2323
"@mongosh/types": "0.0.0-dev.0",

packages/service-provider-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
}
4848
},
4949
"dependencies": {
50-
"@mongodb-js/devtools-connect": "^3.2.11",
50+
"@mongodb-js/devtools-connect": "^3.3.0",
5151
"@mongodb-js/oidc-plugin": "^1.1.1",
5252
"@mongosh/errors": "0.0.0-dev.0",
5353
"@mongosh/service-provider-core": "0.0.0-dev.0",
@@ -58,7 +58,7 @@
5858
"socks": "^2.8.3"
5959
},
6060
"optionalDependencies": {
61-
"kerberos": "^2.2.0",
61+
"kerberos": "2.1.0",
6262
"mongodb-client-encryption": "^6.1.0"
6363
},
6464
"devDependencies": {

packages/snippet-manager/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"unitTestsOnly": true
3636
},
3737
"dependencies": {
38-
"@mongodb-js/devtools-proxy-support": "^0.3.10",
38+
"@mongodb-js/devtools-proxy-support": "^0.4.0",
3939
"@mongosh/errors": "0.0.0-dev.0",
4040
"@mongosh/shell-api": "0.0.0-dev.0",
4141
"@mongosh/types": "0.0.0-dev.0",

packages/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"unitTestsOnly": true
3939
},
4040
"dependencies": {
41-
"@mongodb-js/devtools-connect": "^3.2.11"
41+
"@mongodb-js/devtools-connect": "^3.3.0"
4242
},
4343
"devDependencies": {
4444
"@mongodb-js/eslint-config-mongosh": "^1.0.0",

0 commit comments

Comments
 (0)