@@ -141,12 +141,35 @@ MongoDB, see the :manual:`SASL/LDAP tutorial in the MongoDB Manual
141141 ssl_cert: '/path/to/client.pem',
142142 ssl_ca_cert: '/path/to/ca.pem' )
143143
144+ .. _kerberos:
145+
144146Kerberos (GSSAPI) mechanism
145147```````````````````````````
146148*Requires MongoDB Enterprise Edition v2.4 or greater.*
147149
148150MongoDB Enterprise Edition v2.4+ supports Kerberos authentication.
149151
152+ To use Kerberos authentication from Ruby,
153+ `mongo_kerberos <https://rubygems.org/gems/mongo_kerberos>`_ must be
154+ installed. Add to your ``Gemfile``:
155+
156+ .. code-block:: plain
157+
158+ gem 'mongo'
159+ gem 'mongo_kerberos'
160+
161+ ... and in your application:
162+
163+ .. code-block:: ruby
164+
165+ require 'mongo'
166+ require 'mongo_kerberos'
167+
168+ To use Kerberos in the Ruby driver with **MRI**, create a
169+ ticket-granting ticket using ``kinit``. See
170+ `this documentation <http://linux.die.net/man/1/kinit>`_ for more
171+ information.
172+
150173To use Kerberos in the Ruby driver with **JRuby**, do the following:
151174
1521751. Specify several system properties so that the underlying GSSAPI Java
@@ -158,12 +181,6 @@ To use Kerberos in the Ruby driver with **JRuby**, do the following:
1581812. Either provide a password OR set the 'java.security.auth.login.config'
159182 system property to a config file that references a keytab file.
160183
161- To use Kerberos in the Ruby driver
162- with **Matz's Ruby Interpreter (MRI)**, create a
163- ticket-granting ticket using ``kinit``. See
164- `this documentation <http://linux.die.net/man/1/kinit>`_ for more
165- information.
166-
167184For more information about deploying MongoDB with Kerberos
168185authentication, see the :manual:`manual
169186</tutorial/control-access-to-mongodb-with-kerberos-authentication/>`.
0 commit comments