Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongodb

Package Overview
Dependencies
Maintainers
8
Versions
590
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb - npm Package Compare versions

Comparing version 6.10.0-dev.20241107.sha.e5582ed7 to 6.10.0-dev.20241108.sha.fd7acde6

lib/cmap/auth/mongodb_oidc/k8s_machine_workflow.js

3

lib/cmap/auth/mongo_credentials.js

@@ -26,3 +26,4 @@ "use strict";

'azure',
'gcp'
'gcp',
'k8s'
];

@@ -29,0 +30,0 @@ const ALLOWED_HOSTS_ERROR = 'Auth mechanism property ALLOWED_HOSTS must be an array of strings.';

@@ -8,2 +8,3 @@ "use strict";

const gcp_machine_workflow_1 = require("./mongodb_oidc/gcp_machine_workflow");
const k8s_machine_workflow_1 = require("./mongodb_oidc/k8s_machine_workflow");
const token_cache_1 = require("./mongodb_oidc/token_cache");

@@ -20,2 +21,3 @@ const token_machine_workflow_1 = require("./mongodb_oidc/token_machine_workflow");

exports.OIDC_WORKFLOWS.set('gcp', () => new gcp_machine_workflow_1.GCPMachineWorkflow(new token_cache_1.TokenCache()));
exports.OIDC_WORKFLOWS.set('k8s', () => new k8s_machine_workflow_1.K8SMachineWorkflow(new token_cache_1.TokenCache()));
/**

@@ -22,0 +24,0 @@ * OIDC auth provider.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerType = exports.TopologyType = exports.STATE_CONNECTED = exports.STATE_CONNECTING = exports.STATE_CLOSED = exports.STATE_CLOSING = void 0;
exports.drainTimerQueue = drainTimerQueue;
exports._advanceClusterTime = _advanceClusterTime;
const timers_1 = require("timers");
// shared state names

@@ -40,7 +38,2 @@ exports.STATE_CLOSING = 'closing';

});
/** @internal */
function drainTimerQueue(queue) {
queue.forEach(timers_1.clearTimeout);
queue.clear();
}
/** Shared function to determine clusterTime for a given topology or session */

@@ -47,0 +40,0 @@ function _advanceClusterTime(entity, $clusterTime) {

@@ -98,4 +98,2 @@ "use strict";

clusterTime: undefined,
// timer management
connectionTimers: new Set(),
detectShardedTopology: ev => this.detectShardedTopology(ev),

@@ -165,3 +163,2 @@ detectSrvRecords: ev => this.detectSrvRecords(ev)

}
return this;
}

@@ -239,3 +236,2 @@ async _connect(options) {

drainWaitQueue(this[kWaitQueue], new error_1.MongoTopologyClosedError());
(0, common_1.drainTimerQueue)(this.s.connectionTimers);
if (this.s.srvPoller) {

@@ -242,0 +238,0 @@ this.s.srvPoller.stop();

{
"name": "mongodb",
"version": "6.10.0-dev.20241107.sha.e5582ed7",
"version": "6.10.0-dev.20241108.sha.fd7acde6",
"description": "The official MongoDB driver for Node.js",

@@ -154,2 +154,3 @@ "main": "lib/index.js",

"check:oidc-gcp": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts",
"check:oidc-k8s": "mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts",
"check:ocsp": "mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js",

@@ -156,0 +157,0 @@ "check:kerberos": "nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts",

@@ -34,3 +34,4 @@ // Resolves the default auth mechanism according to

'azure',
'gcp'
'gcp',
'k8s'
];

@@ -66,3 +67,3 @@ const ALLOWED_HOSTS_ERROR = 'Auth mechanism property ALLOWED_HOSTS must be an array of strings.';

/** The OIDC environment. Note that 'test' is for internal use only. */
ENVIRONMENT?: 'test' | 'azure' | 'gcp';
ENVIRONMENT?: 'test' | 'azure' | 'gcp' | 'k8s';
/** Allowed hosts that OIDC auth can connect to. */

@@ -69,0 +70,0 @@ ALLOWED_HOSTS?: string[];

@@ -9,2 +9,3 @@ import type { Document } from '../../bson';

import { GCPMachineWorkflow } from './mongodb_oidc/gcp_machine_workflow';
import { K8SMachineWorkflow } from './mongodb_oidc/k8s_machine_workflow';
import { TokenCache } from './mongodb_oidc/token_cache';

@@ -92,3 +93,3 @@ import { TokenMachineWorkflow } from './mongodb_oidc/token_machine_workflow';

type EnvironmentName = 'test' | 'azure' | 'gcp' | undefined;
type EnvironmentName = 'test' | 'azure' | 'gcp' | 'k8s' | undefined;

@@ -123,2 +124,3 @@ /** @internal */

OIDC_WORKFLOWS.set('gcp', () => new GCPMachineWorkflow(new TokenCache()));
OIDC_WORKFLOWS.set('k8s', () => new K8SMachineWorkflow(new TokenCache()));

@@ -125,0 +127,0 @@ /**

@@ -564,3 +564,3 @@ import { Admin } from './admin';

export type { AsyncDisposable } from './resource_management';
export type { ClusterTime, TimerQueue } from './sdam/common';
export type { ClusterTime } from './sdam/common';
export type {

@@ -567,0 +567,0 @@ Monitor,

@@ -1,3 +0,1 @@

import { clearTimeout } from 'timers';
import type { Binary, Long, Timestamp } from '../bson';

@@ -49,11 +47,2 @@ import type { ClientSession } from '../sessions';

/** @internal */
export type TimerQueue = Set<NodeJS.Timeout>;
/** @internal */
export function drainTimerQueue(queue: TimerQueue): void {
queue.forEach(clearTimeout);
queue.clear();
}
/**

@@ -60,0 +49,0 @@ * @public

@@ -53,3 +53,2 @@ import type { BSONSerializeOptions, Document } from '../bson';

type ClusterTime,
drainTimerQueue,
ServerType,

@@ -60,3 +59,2 @@ STATE_CLOSED,

STATE_CONNECTING,
type TimerQueue,
TopologyType

@@ -137,4 +135,2 @@ } from './common';

clusterTime?: ClusterTime;
/** timers created for the initial connect to a server */
connectionTimers: TimerQueue;

@@ -331,4 +327,2 @@ /** related to srv polling */

// timer management
connectionTimers: new Set<NodeJS.Timeout>(),
detectShardedTopology: ev => this.detectShardedTopology(ev),

@@ -422,4 +416,2 @@ detectSrvRecords: ev => this.detectSrvRecords(ev)

}
return this;
}

@@ -523,3 +515,2 @@

drainWaitQueue(this[kWaitQueue], new MongoTopologyClosedError());
drainTimerQueue(this.s.connectionTimers);

@@ -526,0 +517,0 @@ if (this.s.srvPoller) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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