Skip to content

Commit 68b5bb8

Browse files
p-mongop
andauthored
RUBY-2398 Use TLS instead of SSL in driver documentation (#2089)
* RUBY-2398 Use TLS instead of SSL in driver documentation * change the docstrings also * chase message change in tests Co-authored-by: Oleg Pudeyev <[email protected]>
1 parent 232d9ad commit 68b5bb8

File tree

4 files changed

+71
-37
lines changed

4 files changed

+71
-37
lines changed

source/installation.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,24 @@ of improvements and changes in each version of the driver.
3333
TLS/SSL and the Ruby Driver
3434
===========================
3535

36-
Industry best practices, and some regulations, require the use of TLS 1.1 or newer. Though no application changes are
37-
required for the Ruby driver to make use of the newest protocols, some operating systems or versions may not provide
38-
an OpenSSL version new enough to support them.
36+
Industry best practices, and some regulations, require the use of TLS 1.1
37+
or newer. Though no application changes are required for the Ruby driver to
38+
make use of the newest protocols, some operating systems or versions may
39+
not provide an OpenSSL version new enough to support them.
3940

40-
Users of macOS older than 10.13 (High Sierra) will need to install Ruby from `rvm`_, `homebrew`_, `macports`_, or
41-
another similar source. See `installation information on ruby-lang.org`_ for more options.
41+
Users of macOS older than 10.13 (High Sierra) will need to install Ruby from
42+
`rvm`_, `homebrew`_, `macports`_, or another similar source. See
43+
`installation information on ruby-lang.org`_ for more options.
4244

4345
Users of Linux or other non-macOS Unix can check their OpenSSL version like this:
4446

4547
.. code-block:: sh
4648

4749
$ openssl version
4850

49-
If the version number is less than 1.0.1 support for TLS 1.1 or newer is not available. Contact your operating system
50-
vendor for a solution or upgrade to a newer distribution.
51+
If the version number is less than 1.0.1 support for TLS 1.1 or newer is
52+
not available. Contact your operating system vendor for a solution or upgrade
53+
to a newer distribution.
5154

5255
You can check your Ruby interpreter by executing the following command:
5356

source/reference/driver-compatibility.txt

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ Atlas Compatibility
462462

463463
`Driver version 2.6.1 <https://github.com/mongodb/mongo-ruby-driver/releases/tag/v2.6.1>`_
464464
or higher is recommended when using MongoDB Atlas, as this version has
465-
significant SSL performance improvements.
465+
significant performance improvements when TLS connections are used, and all
466+
Atlas connections use TLS.
466467

467468
When running on JRuby and connecting to Atlas Free Tier,
468469
`driver version 2.6.4 <https://github.com/mongodb/mongo-ruby-driver/releases/tag/v2.6.4>`_
@@ -487,8 +488,8 @@ the driver.
487488
- |checkmark|
488489

489490

490-
JRuby Kerberos
491-
==============
491+
JRuby and Kerberos Authentication
492+
=================================
492493

493494
If the ``mongo_kerberos`` gem is used for Kerberos authentication with JRuby, the the JVM system
494495
property "sun.security.jgss.native" to will be set to "true" in order to facilitate the use of
@@ -498,3 +499,12 @@ obtaining Kerberos credentials as well.
498499

499500
.. include:: /includes/unicode-checkmark.rst
500501
.. include:: /includes/unicode-nbsp.rst
502+
503+
504+
JRuby and TLS Connections
505+
=========================
506+
507+
Due to JRuby limitations:
508+
509+
- ECDSA server certificates are not supported.
510+
- OCSP endpoint checking is not performed.

source/tutorials/ruby-driver-authentication.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,14 +191,14 @@ value for the ``authMechanism`` URI option, as follows:
191191
Client Certificate (X.509)
192192
``````````````````````````
193193

194-
The driver presents an X.509 certificate during SSL negotiation.
194+
The driver presents an X.509 certificate during TLS negotiation.
195195
The MONGODB-X509 authentication mechanism authenticates a username
196196
derived from the distinguished subject name of this certificate.
197197

198-
This authentication method requires the use of SSL connections with
198+
This authentication method requires the use of TLS connections with
199199
certificate validation.
200200

201-
To authenticate the client, you will need a valid SSL certificate
201+
To authenticate the client, you will need a valid TLS certificate
202202
and private encryption key. These can be stored in separate files,
203203
or together in one file (in the PEM format). Even if the certificate
204204
and private key are stored in the same file, you must specify the path to
@@ -393,7 +393,7 @@ Access Protocol `LDAP <http://en.wikipedia.org/wiki/LDAP>`_ server.
393393
.. warning::
394394

395395
When using LDAP, passwords are sent to the server in plain text. For this
396-
reason, we strongly recommend enabling SSL when using LDAP as your
396+
reason, we strongly recommend enabling TLS when using LDAP as your
397397
authentication mechanism.
398398

399399
For more information about configuring LDAP authentication in

source/tutorials/ruby-driver-create-client.txt

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -496,27 +496,30 @@ Ruby Options
496496
- none
497497

498498
* - ``:ssl``
499-
- Tell the client to connect to the servers via SSL.
499+
- Tell the client to connect to the servers via TLS.
500500
- ``Boolean``
501501
- false
502502

503503
* - ``:ssl_ca_cert``
504-
- The file path containing concatenated certificate authority certificates used to validate certs
505-
passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
504+
- The file path containing concatenated certificate authority certificates
505+
used to validate certs passed from the other end of the connection.
506+
One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
506507
(in order of priority) is required for :ssl_verify.
507508
- ``String``
508509
- none
509510

510511
* - ``:ssl_ca_cert_object``
511-
- An array of OpenSSL::X509::Certificate representing the certificate authority certificates used to
512-
validate certs passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or
512+
- An array of OpenSSL::X509::Certificate representing the certificate
513+
authority certificates used to validate certs passed from the other end
514+
of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or
513515
:ssl_ca_cert_object (in order of priority) is required for :ssl_verify.
514516
- ``Array< OpenSSL::X509::Certificate >``
515517
- none
516518

517519
* - ``:ssl_ca_cert_string``
518-
- A string containing concatenated certificate authority certificates used to validate certs
519-
passed from the other end of the connection. One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
520+
- A string containing concatenated certificate authority certificates
521+
used to validate certs passed from the other end of the connection.
522+
One of :ssl_ca_cert, :ssl_ca_cert_string or :ssl_ca_cert_object
520523
(in order of priority) is required for :ssl_verify.
521524
- ``String``
522525
- none
@@ -578,8 +581,9 @@ Ruby Options
578581
- none
579582

580583
* - ``:ssl_key_string``
581-
- A string containing the PEM-encoded private key used to identify the connection against MongoDB.
582-
This parameter, if present, takes precedence over the value of option :ssl_key_object.
584+
- A string containing the PEM-encoded private key used to identify the
585+
connection against MongoDB. This parameter, if present, takes precedence
586+
over the value of option :ssl_key_object.
583587
- ``String``
584588
- none
585589

@@ -594,14 +598,16 @@ Ruby Options
594598
- true
595599

596600
* - ``:ssl_verify_certificate``
597-
- Whether to perform peer certificate validation. This setting overrides :ssl_verify with
598-
respect to whether certificate validation is performed.
601+
- Whether to perform peer certificate validation. This setting overrides
602+
the ``:ssl_verify`` setting with respect to whether certificate
603+
validation is performed.
599604
- ``Boolean``
600605
- true
601606

602607
* - ``:ssl_verify_hostname``
603608
- Whether to perform peer hostname validation. This setting overrides
604-
:ssl_verify with respect to whether hostname validation is performed.
609+
the ``:ssl_verify`` setting with respect to whether hostname validation
610+
is performed.
605611
- ``Boolean``
606612
- true
607613

@@ -811,18 +817,18 @@ URI options are explained in detail in the :manual:`Connection URI reference
811817
* - tlsAllowInvalidCertificates=Boolean
812818
- ``:ssl_verify_certificate => boolean``
813819

814-
Because ``tlsAllowInvalidCertificates`` uses ``true`` to signify that verification
815-
should be disabled and ``ssl_verify_certificate`` uses ``false`` to signify that
816-
verification should be disabled, the boolean is inverted before being used to set
817-
``ssl_verify_certificate``.
820+
Because ``tlsAllowInvalidCertificates`` uses ``true`` to signify that
821+
verification should be disabled and ``ssl_verify_certificate`` uses
822+
``false`` to signify that verification should be disabled, the boolean
823+
is inverted before being used to set ``ssl_verify_certificate``.
818824

819825
* - tlsAllowInvalidHostnames=Boolean
820826
- ``:ssl_verify_hostname => boolean``
821827

822-
Because ``tlsAllowInvalidHostnames`` uses ``true`` to signify that verification
823-
should be disabled and ``ssl_verify_hostname`` uses ``false`` to signify that
824-
verification should be disabled, the boolean is inverted before being used to set
825-
``ssl_verify_hostname``.
828+
Because ``tlsAllowInvalidHostnames`` uses ``true`` to signify that
829+
verification should be disabled and ``ssl_verify_hostname`` uses
830+
``false`` to signify that verification should be disabled, the boolean
831+
is inverted before being used to set ``ssl_verify_hostname``.
826832

827833
* - tlsCAFile=String
828834
- ``:ssl_ca_cert => String``
@@ -847,9 +853,10 @@ URI options are explained in detail in the :manual:`Connection URI reference
847853
* - tlsInsecure=Boolean
848854
- ``:ssl_verify => boolean``
849855

850-
Because tlsInsecure uses ``true`` to signify that verification should be disabled and
851-
``ssl_verify`` uses ``false`` to signify that verification should be disabled, the boolean
852-
is inverted before being used to set ``ssl_verify``.
856+
Because tlsInsecure uses ``true`` to signify that verification should
857+
be disabled and ``ssl_verify`` uses ``false`` to signify that
858+
verification should be disabled, the boolean is inverted before being
859+
used to set ``ssl_verify``.
853860

854861
* - w=Integer|String
855862
- ``{ :write_concern => { :w => Integer|String }}``
@@ -987,6 +994,20 @@ To connect to the MongoDB deployment using TLS:
987994

988995
When using JRuby, ECDSA certificates are not currently supported.
989996

997+
TLS vs SSL Option Names
998+
-----------------------
999+
1000+
All MongoDB server versions supported by the Ruby driver (2.6 and higher)
1001+
only implement TLS. 2.6 and higher servers do not use SSL.
1002+
1003+
For historical reasons, the Ruby option names pertaining to TLS configuration
1004+
use the ``ssl`` rather than the ``tls`` prefix. The next major version of
1005+
the Ruby driver (3.0) will use the ``tls`` prefix for Ruby option names.
1006+
1007+
The URI option names use the ``tls`` prefix, with one exception: there is
1008+
a ``ssl`` URI option that is deprecated and equivalent to the ``tls`` URI
1009+
option.
1010+
9901011
Enable TLS Connections
9911012
----------------------
9921013

0 commit comments

Comments
 (0)