Skip to content

Commit 1f8e7fa

Browse files
authored
fix(docs): correctly document that default for sslValidate is false
Fixes NODE-1918
1 parent 75ef350 commit 1f8e7fa

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

docs/reference/content/reference/connecting/connection-settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The table below shows all settings and what topology they affect.
4141
| :----------| :------------------ | :------ | :------ |:------------- |
4242
| **poolSize** | Server, ReplicaSet, Mongos | integer | 5 | Set the maximum poolSize for each individual server or proxy connection.|
4343
| **ssl** | Server, ReplicaSet, Mongos | boolean | false | Use ssl connection |
44-
| **sslValidate** | Server, ReplicaSet, Mongos | boolean | true | Validate mongod server certificate against ca |
44+
| **sslValidate** | Server, ReplicaSet, Mongos | boolean | false | Validate mongod server certificate against ca |
4545
| **sslCA** | Server, ReplicaSet, Mongos | Array | null | Array of valid certificates either as Buffers or Strings |
4646
| **sslCert** | Server, ReplicaSet, Mongos | Buffer/String | null | String or buffer containing the certificate we wish to present |
4747
| **sslKey** | Server, ReplicaSet, Mongos | Buffer/String | null | String or buffer containing the certificate private key we wish to present |

docs/reference/content/tutorials/connect/ssl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The following TLS/SSL options are available.
145145
| Parameter | Type | Description |
146146
| :----------| :------------- | :------------- |
147147
| `ssl` | {Boolean, default: false} | Use ssl connection |
148-
| `sslValidate` | {Boolean, default: true} | Validate server certificate against certificate authority. |
148+
| `sslValidate` | {Boolean, default: false} | Validate server certificate against certificate authority. |
149149
| `sslCA` | {Buffer[]\|string[], default: null} | Array of valid certificates for Certificate Authority either as Buffers or Strings. |
150150
| `sslCRL` | {Buffer[]\|string[], default: null} | Array of revocation certificates as Buffers or Strings. |
151151
| `sslCert` | {Buffer\|string, default: null} | String or buffer containing the client certificate. |

lib/mongo_client.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const closeOperation = require('./operations/mongo_client_ops').closeOperation;
5353
* @param {object} [options] Optional settings
5454
* @param {number} [options.poolSize=5] The maximum size of the individual server pool
5555
* @param {boolean} [options.ssl=false] Enable SSL connection.
56-
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against Certificate Authority
56+
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against Certificate Authority
5757
* @param {buffer} [options.sslCA=undefined] SSL Certificate store binary buffer
5858
* @param {buffer} [options.sslCert=undefined] SSL Certificate binary buffer
5959
* @param {buffer} [options.sslKey=undefined] SSL Key file binary buffer
@@ -265,7 +265,7 @@ MongoClient.prototype.isConnected = function(options) {
265265
* @param {object} [options] Optional settings
266266
* @param {number} [options.poolSize=5] The maximum size of the individual server pool
267267
* @param {boolean} [options.ssl=false] Enable SSL connection.
268-
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against Certificate Authority
268+
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against Certificate Authority
269269
* @param {buffer} [options.sslCA=undefined] SSL Certificate store binary buffer
270270
* @param {buffer} [options.sslCert=undefined] SSL Certificate binary buffer
271271
* @param {buffer} [options.sslKey=undefined] SSL Key file binary buffer

lib/topologies/mongos.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var legalOptionNames = [
7070
* @param {number} [options.acceptableLatencyMS=15] Cutoff latency point in MS for MongoS proxy selection
7171
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
7272
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
73-
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
73+
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
7474
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
7575
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
7676
* @param {string} [options.ciphers] Passed directly through to tls.createSecureContext. See https://nodejs.org/dist/latest-v9.x/docs/api/tls.html#tls_tls_createsecurecontext_options for more info.

lib/topologies/replset.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ var legalOptionNames = [
8080
* @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
8181
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
8282
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
83-
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
83+
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
8484
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
8585
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
8686
* @param {(Buffer|string)} [options.sslCert] String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher.

lib/topologies/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var legalOptionNames = [
7070
* @param {object} [options] Optional settings.
7171
* @param {number} [options.poolSize=5] Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons.
7272
* @param {boolean} [options.ssl=false] Use ssl connection (needs to have a mongod server with ssl support)
73-
* @param {boolean} [options.sslValidate=true] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
73+
* @param {boolean} [options.sslValidate=false] Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher)
7474
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
7575
* @param {array} [options.sslCA] Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)
7676
* @param {array} [options.sslCRL] Array of revocation certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher)

0 commit comments

Comments
 (0)