mongodb-data-service 22.8.0 → 22.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/connect-mongo-client.d.ts +4 -2
- package/lib/connect-mongo-client.d.ts.map +1 -1
- package/lib/connect-mongo-client.js +45 -18
- package/lib/connect-mongo-client.js.map +1 -1
- package/lib/connection-options.d.ts +4 -1
- package/lib/connection-options.d.ts.map +1 -1
- package/lib/csfle-collection-tracker.js +24 -35
- package/lib/csfle-collection-tracker.js.map +1 -1
- package/lib/data-service.d.ts +8 -0
- package/lib/data-service.d.ts.map +1 -1
- package/lib/data-service.js +85 -60
- package/lib/data-service.js.map +1 -1
- package/lib/index-detail-helper.js +4 -4
- package/lib/index-detail-helper.js.map +1 -1
- package/lib/index.d.ts +3 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -14
- package/lib/index.js.map +1 -1
- package/lib/instance-detail-helper.d.ts +1 -1
- package/lib/instance-detail-helper.d.ts.map +1 -1
- package/lib/instance-detail-helper.js +35 -46
- package/lib/instance-detail-helper.js.map +1 -1
- package/lib/redact.js +2 -3
- package/lib/redact.js.map +1 -1
- package/lib/run-command.js +1 -2
- package/lib/run-command.js.map +1 -1
- package/lib/ssh-tunnel.js +3 -3
- package/lib/ssh-tunnel.js.map +1 -1
- package/package.json +14 -19
- package/lib/connection-info.d.ts +0 -12
- package/lib/connection-info.d.ts.map +0 -1
- package/lib/connection-info.js +0 -3
- package/lib/connection-info.js.map +0 -1
- package/lib/connection-secrets.d.ts +0 -17
- package/lib/connection-secrets.d.ts.map +0 -1
- package/lib/connection-secrets.js +0 -135
- package/lib/connection-secrets.js.map +0 -1
- package/lib/connection-storage.d.ts +0 -8
- package/lib/connection-storage.d.ts.map +0 -1
- package/lib/connection-storage.js +0 -79
- package/lib/connection-storage.js.map +0 -1
- package/lib/connection-title.d.ts +0 -3
- package/lib/connection-title.d.ts.map +0 -1
- package/lib/connection-title.js +0 -22
- package/lib/connection-title.js.map +0 -1
- package/lib/encrypt.d.ts +0 -16
- package/lib/encrypt.d.ts.map +0 -1
- package/lib/encrypt.js +0 -104
- package/lib/encrypt.js.map +0 -1
- package/lib/import-export-connection.d.ts +0 -16
- package/lib/import-export-connection.d.ts.map +0 -1
- package/lib/import-export-connection.js +0 -123
- package/lib/import-export-connection.js.map +0 -1
- package/lib/legacy/legacy-connection-model.d.ts +0 -95
- package/lib/legacy/legacy-connection-model.d.ts.map +0 -1
- package/lib/legacy/legacy-connection-model.js +0 -264
- package/lib/legacy/legacy-connection-model.js.map +0 -1
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { SshTunnelConfig } from '@mongodb-js/ssh-tunnel';
|
|
2
|
-
import type { AmpersandMethodOptions } from '@mongodb-js/compass-utils';
|
|
3
|
-
import type { MongoClientOptions, ReadPreferenceLike } from 'mongodb';
|
|
4
|
-
import type { ConnectionInfo } from '../connection-info';
|
|
5
|
-
import type { ConnectionSecrets } from '../connection-secrets';
|
|
6
|
-
type SslMethod = 'NONE' | 'SYSTEMCA' | 'IFAVAILABLE' | 'UNVALIDATED' | 'SERVER' | 'ALL';
|
|
7
|
-
export interface LegacyConnectionModelProperties {
|
|
8
|
-
_id: string;
|
|
9
|
-
hostname: string;
|
|
10
|
-
port: number;
|
|
11
|
-
ns?: string;
|
|
12
|
-
connectionInfo?: ConnectionInfo;
|
|
13
|
-
secrets?: ConnectionSecrets;
|
|
14
|
-
authStrategy: 'NONE' | 'MONGODB' | 'X509' | 'KERBEROS' | 'LDAP' | 'SCRAM-SHA-256';
|
|
15
|
-
hosts?: Array<{
|
|
16
|
-
host: string;
|
|
17
|
-
port: number;
|
|
18
|
-
}>;
|
|
19
|
-
isSrvRecord?: boolean;
|
|
20
|
-
replicaSet?: string;
|
|
21
|
-
connectTimeoutMS?: number;
|
|
22
|
-
socketTimeoutMS?: number;
|
|
23
|
-
compression?: any;
|
|
24
|
-
maxPoolSize?: number;
|
|
25
|
-
minPoolSize?: number;
|
|
26
|
-
maxIdleTimeMS?: number;
|
|
27
|
-
waitQueueMultiple?: number;
|
|
28
|
-
waitQueueTimeoutMS?: number;
|
|
29
|
-
w?: any;
|
|
30
|
-
wTimeoutMS?: number;
|
|
31
|
-
journal?: boolean;
|
|
32
|
-
readConcernLevel?: string;
|
|
33
|
-
readPreference: ReadPreferenceLike;
|
|
34
|
-
maxStalenessSeconds?: number;
|
|
35
|
-
readPreferenceTags?: string[];
|
|
36
|
-
authSource?: string;
|
|
37
|
-
authMechanism?: string;
|
|
38
|
-
authMechanismProperties?: any;
|
|
39
|
-
gssapiServiceName?: string;
|
|
40
|
-
gssapiServiceRealm?: string;
|
|
41
|
-
gssapiCanonicalizeHostName?: string;
|
|
42
|
-
localThresholdMS?: number;
|
|
43
|
-
serverSelectionTimeoutMS?: number;
|
|
44
|
-
serverSelectionTryOnce?: boolean;
|
|
45
|
-
hearbeatFrequencyMS?: number;
|
|
46
|
-
appname?: string;
|
|
47
|
-
retryWrites?: boolean;
|
|
48
|
-
uuidRepresentation?: 'standard' | 'csharpLegacy' | 'javaLegacy' | 'pythonLegacy';
|
|
49
|
-
directConnection?: boolean;
|
|
50
|
-
loadBalanced?: boolean;
|
|
51
|
-
mongodbUsername?: string;
|
|
52
|
-
mongodbPassword?: string;
|
|
53
|
-
mongodbDatabaseName?: string;
|
|
54
|
-
promoteValues?: boolean;
|
|
55
|
-
kerberosServiceName?: string;
|
|
56
|
-
kerberosPrincipal?: string;
|
|
57
|
-
kerberosServiceRealm?: string;
|
|
58
|
-
kerberosCanonicalizeHostname: boolean;
|
|
59
|
-
ldapUsername?: string;
|
|
60
|
-
ldapPassword?: string;
|
|
61
|
-
x509Username?: string;
|
|
62
|
-
ssl?: any;
|
|
63
|
-
sslMethod: SslMethod;
|
|
64
|
-
sslCA?: string[];
|
|
65
|
-
sslCert?: any;
|
|
66
|
-
sslKey?: any;
|
|
67
|
-
sslPass?: string;
|
|
68
|
-
sshTunnel?: 'NONE' | 'USER_PASSWORD' | 'IDENTITY_FILE';
|
|
69
|
-
sshTunnelHostname?: string;
|
|
70
|
-
sshTunnelPort: number;
|
|
71
|
-
sshTunnelBindToLocalPort?: number;
|
|
72
|
-
sshTunnelUsername?: string;
|
|
73
|
-
sshTunnelPassword?: string;
|
|
74
|
-
sshTunnelIdentityFile?: string | string[];
|
|
75
|
-
sshTunnelPassphrase?: string;
|
|
76
|
-
lastUsed?: Date;
|
|
77
|
-
isFavorite: boolean;
|
|
78
|
-
name: string;
|
|
79
|
-
title?: string;
|
|
80
|
-
color?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface LegacyConnectionModel extends LegacyConnectionModelProperties {
|
|
83
|
-
readonly driverUrl: string;
|
|
84
|
-
readonly driverUrlWithSsh: string;
|
|
85
|
-
readonly driverOptions: MongoClientOptions;
|
|
86
|
-
readonly sshTunnelOptions?: SshTunnelConfig;
|
|
87
|
-
toJSON(): LegacyConnectionModelProperties;
|
|
88
|
-
save: (attributes?: Partial<LegacyConnectionModel>, options?: AmpersandMethodOptions<LegacyConnectionModel>) => void;
|
|
89
|
-
destroy: (options?: AmpersandMethodOptions<LegacyConnectionModel>) => void;
|
|
90
|
-
once: (event: string, handler: () => void) => void;
|
|
91
|
-
}
|
|
92
|
-
export declare function convertConnectionModelToInfo(model: LegacyConnectionModelProperties): ConnectionInfo;
|
|
93
|
-
export declare function convertConnectionInfoToModel(connectionInfo: ConnectionInfo): Promise<LegacyConnectionModel>;
|
|
94
|
-
export {};
|
|
95
|
-
//# sourceMappingURL=legacy-connection-model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-connection-model.d.ts","sourceRoot":"","sources":["../../src/legacy/legacy-connection-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE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B,GACrC,cAAc,CAmEhB;AAgMD,wBAAsB,4BAA4B,CAChD,cAAc,EAAE,cAAc,GAC7B,OAAO,CAAC,qBAAqB,CAAC,CAUhC"}
|
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.convertConnectionInfoToModel = exports.convertConnectionModelToInfo = void 0;
|
|
7
|
-
const mongodb_connection_string_url_1 = __importDefault(require("mongodb-connection-string-url"));
|
|
8
|
-
const util_1 = __importDefault(require("util"));
|
|
9
|
-
const connection_secrets_1 = require("../connection-secrets");
|
|
10
|
-
const ConnectionModel = require('mongodb-connection-model');
|
|
11
|
-
function deleteCompassAppNameParam(connectionInfo) {
|
|
12
|
-
let connectionStringUrl;
|
|
13
|
-
try {
|
|
14
|
-
connectionStringUrl = new mongodb_connection_string_url_1.default(connectionInfo.connectionOptions.connectionString);
|
|
15
|
-
}
|
|
16
|
-
catch (_a) {
|
|
17
|
-
return connectionInfo;
|
|
18
|
-
}
|
|
19
|
-
if (/^mongodb compass/i.exec(connectionStringUrl.searchParams.get('appName') || '')) {
|
|
20
|
-
connectionStringUrl.searchParams.delete('appName');
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
...connectionInfo,
|
|
24
|
-
connectionOptions: {
|
|
25
|
-
...connectionInfo.connectionOptions,
|
|
26
|
-
connectionString: connectionStringUrl.href,
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function convertConnectionModelToInfo(model) {
|
|
31
|
-
var _a;
|
|
32
|
-
const legacyModel = model instanceof ConnectionModel ? model : new ConnectionModel(model);
|
|
33
|
-
if (legacyModel.connectionInfo) {
|
|
34
|
-
const connectionInfo = (0, connection_secrets_1.mergeSecrets)(legacyModel.connectionInfo, (_a = legacyModel.secrets) !== null && _a !== void 0 ? _a : {});
|
|
35
|
-
if (connectionInfo.lastUsed) {
|
|
36
|
-
connectionInfo.lastUsed = new Date(connectionInfo.lastUsed);
|
|
37
|
-
}
|
|
38
|
-
return deleteCompassAppNameParam(connectionInfo);
|
|
39
|
-
}
|
|
40
|
-
const info = {
|
|
41
|
-
id: legacyModel._id,
|
|
42
|
-
connectionOptions: {
|
|
43
|
-
connectionString: legacyModel.driverUrl,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
modelSslPropertiesToConnectionOptions(legacyModel.driverOptions, info.connectionOptions);
|
|
47
|
-
const sshTunnel = modelTunnelToConnectionOptions(legacyModel);
|
|
48
|
-
if (sshTunnel) {
|
|
49
|
-
info.connectionOptions.sshTunnel = sshTunnel;
|
|
50
|
-
}
|
|
51
|
-
if (legacyModel.driverOptions.directConnection !== undefined) {
|
|
52
|
-
setConnectionStringParam(info.connectionOptions, 'directConnection', legacyModel.driverOptions.directConnection ? 'true' : 'false');
|
|
53
|
-
}
|
|
54
|
-
if (legacyModel.driverOptions.readPreference !== undefined) {
|
|
55
|
-
setConnectionStringParam(info.connectionOptions, 'readPreference', typeof legacyModel.driverOptions.readPreference === 'string'
|
|
56
|
-
? legacyModel.driverOptions.readPreference
|
|
57
|
-
: legacyModel.driverOptions.readPreference.preference);
|
|
58
|
-
}
|
|
59
|
-
if (legacyModel.isFavorite) {
|
|
60
|
-
info.favorite = {
|
|
61
|
-
name: legacyModel.name,
|
|
62
|
-
color: legacyModel.color,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
if (legacyModel.lastUsed) {
|
|
66
|
-
info.lastUsed = legacyModel.lastUsed;
|
|
67
|
-
}
|
|
68
|
-
return deleteCompassAppNameParam(setDirectConnectionForSingleHosts(info));
|
|
69
|
-
}
|
|
70
|
-
exports.convertConnectionModelToInfo = convertConnectionModelToInfo;
|
|
71
|
-
function setDirectConnectionForSingleHosts(connectionInfo) {
|
|
72
|
-
let connectionStringUrl;
|
|
73
|
-
try {
|
|
74
|
-
connectionStringUrl = new mongodb_connection_string_url_1.default(connectionInfo.connectionOptions.connectionString);
|
|
75
|
-
}
|
|
76
|
-
catch (_a) {
|
|
77
|
-
return connectionInfo;
|
|
78
|
-
}
|
|
79
|
-
const isLoadBalanced = connectionStringUrl.searchParams.get('loadBalanced') === 'true';
|
|
80
|
-
const isReplicaSet = connectionStringUrl.isSRV ||
|
|
81
|
-
connectionStringUrl.hosts.length > 1 ||
|
|
82
|
-
connectionStringUrl.searchParams.has('replicaSet');
|
|
83
|
-
const hasDirectConnection = connectionStringUrl.searchParams.has('directConnection');
|
|
84
|
-
if (!isReplicaSet && !isLoadBalanced && !hasDirectConnection) {
|
|
85
|
-
connectionStringUrl.searchParams.set('directConnection', 'true');
|
|
86
|
-
}
|
|
87
|
-
return {
|
|
88
|
-
...connectionInfo,
|
|
89
|
-
connectionOptions: {
|
|
90
|
-
...connectionInfo.connectionOptions,
|
|
91
|
-
connectionString: connectionStringUrl.href,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function setConnectionStringParam(connectionOptions, param, value) {
|
|
96
|
-
const url = new mongodb_connection_string_url_1.default(connectionOptions.connectionString);
|
|
97
|
-
url.typedSearchParams().set(param, value);
|
|
98
|
-
connectionOptions.connectionString = url.toString();
|
|
99
|
-
}
|
|
100
|
-
function modelSslPropertiesToConnectionOptions(driverOptions, connectionOptions) {
|
|
101
|
-
const url = new mongodb_connection_string_url_1.default(connectionOptions.connectionString);
|
|
102
|
-
const searchParams = url.typedSearchParams();
|
|
103
|
-
if (driverOptions.sslValidate === false) {
|
|
104
|
-
searchParams.set('tlsAllowInvalidCertificates', 'true');
|
|
105
|
-
}
|
|
106
|
-
if (driverOptions.tlsAllowInvalidHostnames) {
|
|
107
|
-
searchParams.set('tlsAllowInvalidHostnames', 'true');
|
|
108
|
-
}
|
|
109
|
-
const sslCA = getSslDriverOptionsFile(driverOptions.sslCA);
|
|
110
|
-
const sslCert = getSslDriverOptionsFile(driverOptions.sslCert);
|
|
111
|
-
const sslKey = getSslDriverOptionsFile(driverOptions.sslKey);
|
|
112
|
-
if (sslCA) {
|
|
113
|
-
searchParams.set('tlsCAFile', sslCA);
|
|
114
|
-
}
|
|
115
|
-
if (sslCert && sslCert !== sslKey) {
|
|
116
|
-
searchParams.set('tlsCertificateFile', sslCert);
|
|
117
|
-
}
|
|
118
|
-
if (sslKey) {
|
|
119
|
-
searchParams.set('tlsCertificateKeyFile', sslKey);
|
|
120
|
-
}
|
|
121
|
-
if (driverOptions.sslPass) {
|
|
122
|
-
searchParams.set('tlsCertificateKeyFilePassword', driverOptions.sslPass);
|
|
123
|
-
}
|
|
124
|
-
if (searchParams.get('ssl') === 'true' &&
|
|
125
|
-
searchParams.get('tls') === 'true') {
|
|
126
|
-
searchParams.delete('ssl');
|
|
127
|
-
}
|
|
128
|
-
connectionOptions.connectionString = url.toString();
|
|
129
|
-
}
|
|
130
|
-
function getSslDriverOptionsFile(value) {
|
|
131
|
-
if (!Array.isArray(value)) {
|
|
132
|
-
return value;
|
|
133
|
-
}
|
|
134
|
-
return value[0];
|
|
135
|
-
}
|
|
136
|
-
function modelTunnelToConnectionOptions(model) {
|
|
137
|
-
if (model.sshTunnel === 'NONE' ||
|
|
138
|
-
!model.sshTunnelHostname ||
|
|
139
|
-
!model.sshTunnelUsername) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
const sshTunnel = {
|
|
143
|
-
host: model.sshTunnelHostname,
|
|
144
|
-
port: model.sshTunnelPort,
|
|
145
|
-
username: model.sshTunnelUsername,
|
|
146
|
-
};
|
|
147
|
-
if (model.sshTunnelPassword !== undefined) {
|
|
148
|
-
sshTunnel.password = model.sshTunnelPassword;
|
|
149
|
-
}
|
|
150
|
-
if (model.sshTunnelIdentityFile !== undefined) {
|
|
151
|
-
sshTunnel.identityKeyFile = Array.isArray(model.sshTunnelIdentityFile)
|
|
152
|
-
? model.sshTunnelIdentityFile[0]
|
|
153
|
-
: model.sshTunnelIdentityFile;
|
|
154
|
-
}
|
|
155
|
-
if (model.sshTunnelPassphrase !== undefined) {
|
|
156
|
-
sshTunnel.identityKeyPassphrase = model.sshTunnelPassphrase;
|
|
157
|
-
}
|
|
158
|
-
return sshTunnel;
|
|
159
|
-
}
|
|
160
|
-
async function tryConvertBackwardCompatibleOptions(connectionInfo) {
|
|
161
|
-
try {
|
|
162
|
-
const legacyConnectionModelProperties = {};
|
|
163
|
-
const connection = await util_1.default.promisify(ConnectionModel.from)(removeAWSParams(connectionInfo.connectionOptions.connectionString));
|
|
164
|
-
convertSslOptionsToLegacyProperties(connectionInfo.connectionOptions, legacyConnectionModelProperties);
|
|
165
|
-
const connectionOptions = connectionInfo.connectionOptions;
|
|
166
|
-
if (connectionOptions.sshTunnel) {
|
|
167
|
-
legacyConnectionModelProperties.sshTunnel = !connectionOptions.sshTunnel
|
|
168
|
-
.identityKeyFile
|
|
169
|
-
? 'USER_PASSWORD'
|
|
170
|
-
: 'IDENTITY_FILE';
|
|
171
|
-
legacyConnectionModelProperties.sshTunnelPort =
|
|
172
|
-
connectionOptions.sshTunnel.port;
|
|
173
|
-
legacyConnectionModelProperties.sshTunnelHostname =
|
|
174
|
-
connectionOptions.sshTunnel.host;
|
|
175
|
-
legacyConnectionModelProperties.sshTunnelUsername =
|
|
176
|
-
connectionOptions.sshTunnel.username;
|
|
177
|
-
legacyConnectionModelProperties.sshTunnelPassword =
|
|
178
|
-
connectionOptions.sshTunnel.password;
|
|
179
|
-
legacyConnectionModelProperties.sshTunnelIdentityFile =
|
|
180
|
-
connectionOptions.sshTunnel.identityKeyFile;
|
|
181
|
-
legacyConnectionModelProperties.sshTunnelPassphrase =
|
|
182
|
-
connectionOptions.sshTunnel.identityKeyPassphrase;
|
|
183
|
-
}
|
|
184
|
-
if (connectionInfo.favorite) {
|
|
185
|
-
legacyConnectionModelProperties.isFavorite = true;
|
|
186
|
-
legacyConnectionModelProperties.name = connectionInfo.favorite.name;
|
|
187
|
-
legacyConnectionModelProperties.color = connectionInfo.favorite.color;
|
|
188
|
-
}
|
|
189
|
-
if (connectionInfo.lastUsed) {
|
|
190
|
-
legacyConnectionModelProperties.lastUsed = connectionInfo.lastUsed;
|
|
191
|
-
}
|
|
192
|
-
return {
|
|
193
|
-
...connection.toJSON(),
|
|
194
|
-
...legacyConnectionModelProperties,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
catch (e) {
|
|
198
|
-
return {};
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
async function convertConnectionInfoToModel(connectionInfo) {
|
|
202
|
-
return new ConnectionModel({
|
|
203
|
-
...(await tryConvertBackwardCompatibleOptions(connectionInfo)),
|
|
204
|
-
_id: connectionInfo.id,
|
|
205
|
-
...(0, connection_secrets_1.extractSecrets)(connectionInfo),
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
exports.convertConnectionInfoToModel = convertConnectionInfoToModel;
|
|
209
|
-
function convertSslOptionsToLegacyProperties(options, properties) {
|
|
210
|
-
const url = new mongodb_connection_string_url_1.default(options.connectionString);
|
|
211
|
-
const searchParams = url.typedSearchParams();
|
|
212
|
-
const tlsCAFile = searchParams.get('tlsCAFile');
|
|
213
|
-
const tlsCertificateKeyFile = searchParams.get('tlsCertificateKeyFile');
|
|
214
|
-
const tlsCertificateKeyFilePassword = searchParams.get('tlsCertificateKeyFilePassword');
|
|
215
|
-
const tlsCertificateFile = searchParams.get('tlsCertificateFile');
|
|
216
|
-
if (tlsCAFile) {
|
|
217
|
-
properties.sslCA = [tlsCAFile];
|
|
218
|
-
}
|
|
219
|
-
if (tlsCertificateKeyFile) {
|
|
220
|
-
properties.sslKey = tlsCertificateKeyFile;
|
|
221
|
-
}
|
|
222
|
-
if (tlsCertificateKeyFilePassword) {
|
|
223
|
-
properties.sslPass = tlsCertificateKeyFilePassword;
|
|
224
|
-
}
|
|
225
|
-
if (tlsCertificateFile) {
|
|
226
|
-
properties.sslCert = tlsCertificateFile;
|
|
227
|
-
}
|
|
228
|
-
properties.sslMethod = optionsToSslMethod(options);
|
|
229
|
-
}
|
|
230
|
-
function optionsToSslMethod(options) {
|
|
231
|
-
const url = new mongodb_connection_string_url_1.default(options.connectionString);
|
|
232
|
-
const searchParams = url.typedSearchParams();
|
|
233
|
-
const tls = searchParams.get('tls') || searchParams.get('ssl');
|
|
234
|
-
const tlsAllowInvalidCertificates = searchParams.get('tlsAllowInvalidCertificates');
|
|
235
|
-
const tlsAllowInvalidHostnames = searchParams.get('tlsAllowInvalidHostnames');
|
|
236
|
-
const tlsInsecure = searchParams.get('tlsInsecure');
|
|
237
|
-
const tlsCAFile = searchParams.get('tlsCAFile');
|
|
238
|
-
const tlsCertificateKeyFile = searchParams.get('tlsCertificateKeyFile');
|
|
239
|
-
if (tls === 'false') {
|
|
240
|
-
return 'NONE';
|
|
241
|
-
}
|
|
242
|
-
if (tlsCertificateKeyFile) {
|
|
243
|
-
return 'ALL';
|
|
244
|
-
}
|
|
245
|
-
if (tlsCAFile) {
|
|
246
|
-
return 'SERVER';
|
|
247
|
-
}
|
|
248
|
-
if (tlsInsecure === 'true' ||
|
|
249
|
-
(tlsAllowInvalidCertificates === 'true' &&
|
|
250
|
-
tlsAllowInvalidHostnames === 'true')) {
|
|
251
|
-
return 'UNVALIDATED';
|
|
252
|
-
}
|
|
253
|
-
return 'SYSTEMCA';
|
|
254
|
-
}
|
|
255
|
-
function removeAWSParams(connectionString) {
|
|
256
|
-
const url = new mongodb_connection_string_url_1.default(connectionString);
|
|
257
|
-
const searchParams = url.typedSearchParams();
|
|
258
|
-
if (searchParams.get('authMechanism') === 'MONGODB-AWS') {
|
|
259
|
-
searchParams.delete('authMechanism');
|
|
260
|
-
searchParams.delete('authMechanismProperties');
|
|
261
|
-
}
|
|
262
|
-
return url.href;
|
|
263
|
-
}
|
|
264
|
-
//# sourceMappingURL=legacy-connection-model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legac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