Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/arg-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"mongodb-connection-string-url": "^3.0.1"
},
"devDependencies": {
"@mongodb-js/devtools-connect": "^3.9.3",
"@mongodb-js/devtools-connect": "^3.9.4",
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
"@mongodb-js/prettier-config-devtools": "^1.0.1",
"@mongodb-js/tsconfig-mongosh": "^1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
}
},
"dependencies": {
"@mongodb-js/devtools-proxy-support": "^0.5.2",
"@mongodb-js/devtools-proxy-support": "^0.5.3",
"@mongosh/arg-parser": "^3.16.0",
"@mongosh/autocomplete": "^3.20.0",
"@mongosh/editor": "^3.20.0",
Expand Down
30 changes: 29 additions & 1 deletion packages/e2e-tests/test/e2e-oidc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { TestShell } from './test-shell';
import path from 'path';
import { expect } from 'chai';
import { createServer as createHTTPSServer } from 'https';
import { getCertPath, useTmpdir } from './repl-helpers';
import { getCertPath, readReplLogFile, useTmpdir } from './repl-helpers';
import {
baseOidcServerConfig,
commonOidcServerArgs,
Expand Down Expand Up @@ -530,6 +530,34 @@ describe('OIDC auth e2e', function () {
shell.assertContainsOutput(/"refreshToken": "(?!debugid:)/);
});

it('logs OIDC HTTP calls', async function () {
shell = this.startTestShell({
args: [
await testServer.connectionString(),
'--authenticationMechanism=MONGODB-OIDC',
'--oidcRedirectUri=http://localhost:0/',
`--browser=${fetchBrowserFixture}`,
'--eval=log.getPath()',
'--quiet',
'--json',
],
env: {
...process.env,
HOME: tmpdir.path,
LOCALAPPDATA: tmpdir.path,
APPDATA: tmpdir.path,
},
});
await shell.waitForSuccessfulExit();
const logs = await readReplLogFile(JSON.parse(shell.output));
const inbound = logs.find((e) => e.id === 1_002_000_024);
const outbound = logs.find((e) => e.id === 1_002_000_023);
expect(inbound?.attr.url).to.be.a('string');
expect(inbound?.s).to.equal('D1');
expect(outbound?.attr.url).to.be.a('string');
expect(outbound?.s).to.equal('D1');
});

it('can successfully authenticate using workload OIDC', async function () {
// Get a token from the OIDC server, store it to disk, then pass that to mongosh
const tokenFile = path.join(tmpdir.path, 'token');
Expand Down
2 changes: 1 addition & 1 deletion packages/logging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@mongodb-js/device-id": "^0.2.1",
"@mongodb-js/devtools-connect": "^3.9.3",
"@mongodb-js/devtools-connect": "^3.9.4",
"@mongosh/errors": "2.4.4",
"@mongosh/history": "2.4.8",
"@mongosh/types": "^3.12.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/logging/src/logging-and-telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,9 @@ export class LoggingAndTelemetry implements MongoshLoggingAndTelemetry {
hookLogger(
this.bus,
{
debug: (...args: Parameters<typeof this.log.debug>) => {
return this.log.debug(...args);
},
info: (...args: Parameters<typeof this.log.info>) => {
return this.log.info(...args);
},
Expand Down
2 changes: 1 addition & 1 deletion packages/service-provider-node-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}
},
"dependencies": {
"@mongodb-js/devtools-connect": "^3.9.3",
"@mongodb-js/devtools-connect": "^3.9.4",
"@mongodb-js/oidc-plugin": "^2.0.3",
"@mongosh/errors": "2.4.4",
"@mongosh/service-provider-core": "3.3.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/snippet-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"unitTestsOnly": true
},
"dependencies": {
"@mongodb-js/devtools-proxy-support": "^0.5.2",
"@mongodb-js/devtools-proxy-support": "^0.5.3",
"@mongosh/errors": "2.4.4",
"@mongosh/shell-api": "^3.20.0",
"@mongosh/types": "^3.12.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"unitTestsOnly": true
},
"dependencies": {
"@mongodb-js/devtools-connect": "^3.9.3"
"@mongodb-js/devtools-connect": "^3.9.4"
},
"devDependencies": {
"@mongodb-js/eslint-config-mongosh": "^1.0.0",
Expand Down
Loading