feat(NODE-5287): deprecate ssl options #3743
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Deprecates duplicate SSL options in favour of spec compliant TLS options.
What is changing?
Deprecates:
Is there new documentation needed for these changes?
None
What is the motivation for this change?
NODE-5287
Legacy SSL options deprecated
In an effort to simplify TLS setup and use with the driver we're paring down the number of custom options to the ones that are common to all drivers. This should reduce inadvertent misconfiguration due to conflicting options.
The legacy "ssl-" options have been deprecated, each has a corresponding "tls-" option listed in the table below (except for
sslCRL
, you may directly use the Node.jscrl
option instead).tlsCertificateFile
has also been deprecated, please usetlsCertificateKeyFile
or pass thecert
directly to the MongoClient constructor.In addition to the common driver options, the Node.js driver also passes through Node.js TLS options provided on the MongoClient to Node.js' tls.connect API, which may be convenient to reuse with other Node.js APIs.
ca
tlsCAFile
sslCA
string
crl
sslCRL
string
cert
tlsCertificateKeyFile
sslCert
string
key
tlsCertificateKeyFile
sslKey
string
passphrase
tlsCertificateKeyFilePassword
sslPass
string
rejectUnauthorized
tlsAllowInvalidCertificates
sslValidate
boolean
Double check the following
npm run check:lint
scripttype(NODE-xxxx)[!]: description
feat(NODE-1234)!: rewriting everything in coffeescript