Skip to content

Commit cd6a6e6

Browse files
authored
RUBY-1962 Consistently use new or old tls options in spec readme (#1556)
1 parent 116a046 commit cd6a6e6

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

spec/README.md

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,28 @@ other tests require a sharded cluster with more than one shard. Tests requiring
8989
a single shard can be run against a deployment with multiple shards by
9090
specifying only one mongos address in MONGODB_URI.
9191

92+
## Note Regarding SSL/TLS Arguments
93+
94+
MongoDB 4.2 (server and shell) added new command line options for setting TLS
95+
parameters. These options follow the naming of URI options used by both the
96+
shell and MongoDB drivers starting with MongoDB 4.2. The new options start with
97+
the `--tls` prefix.
98+
99+
Old options, starting with the `--ssl` prefix, are still supported for backwards
100+
compatibility, but their use is deprecated. As of this writing, mlaunch only
101+
supports the old `--ssl` prefix options.
102+
103+
In the rest of this document, when TLS options are given for `mongo` or
104+
`mongod` they use the new `--tls` prefixed arguments, and when the same options
105+
are given to `mlaunch` they use the old `--ssl` prefixed forms. The conversion
106+
table of the options used herein is as follows:
107+
108+
| --tls prefixed option | --ssl prefixed option |
109+
| ----------------------- | --------------------- |
110+
| --tls | --ssl |
111+
| --tlsCAFile | --sslCAFile |
112+
| --tlsCertificateKeyFile | --sslPEMKeyFile |
113+
92114
## TLS With Verification
93115

94116
The test suite includes a set of TLS certificates for configuring a server
@@ -209,16 +231,16 @@ Use the MongoDB shell to execute this command:
209231
Verify that authentication is required by running the following command, which
210232
should fail:
211233

212-
mongo --ssl \
213-
--sslCAFile `pwd`/spec/support/certificates/ca.crt \
214-
--sslPEMKeyFile `pwd`/spec/support/certificates/client-x509.pem \
234+
mongo --tls \
235+
--tlsCAFile `pwd`/spec/support/certificates/ca.crt \
236+
--tlsCertificateKeyFile `pwd`/spec/support/certificates/client-x509.pem \
215237
--eval 'db.serverStatus()'
216238

217239
Verify that X.509 authentication works by running the following command:
218240

219-
mongo --ssl \
220-
--sslCAFile `pwd`/spec/support/certificates/ca.crt \
221-
--sslPEMKeyFile `pwd`/spec/support/certificates/client-x509.pem \
241+
mongo --tls \
242+
--tlsCAFile `pwd`/spec/support/certificates/ca.crt \
243+
--tlsCertificateKeyFile `pwd`/spec/support/certificates/client-x509.pem \
222244
--authenticationDatabase '$external' \
223245
--authenticationMechanism MONGODB-X509 \
224246
--eval 'db.serverStatus()'

0 commit comments

Comments
 (0)