Skip to content

Commit b73ab66

Browse files
committed
DOCS-9897: authMechanismProperties for URI connection string
1 parent d48846c commit b73ab66

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

source/reference/connection-string.txt

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,17 +501,59 @@ Authentication Options
501501
:doc:`/tutorial/configure-x509-client-authentication` for more
502502
information on x509 authentication.
503503

504+
* - .. urioption:: authMechanismProperties
505+
506+
- Specify properties for the specified :urioption:`authMechanism`
507+
as a comma-separated list of colon-separated key-value pairs.
508+
For example:
509+
510+
.. code-block:: shell
511+
:copyable: false
512+
513+
authMechanismProperties=SERVICE_NAME:mongodb,CANONICALIZE_HOST_NAME:true
514+
515+
The :option:`authmechanismProperties` option is only supported
516+
when :urioption:`authMechanism` is
517+
:ref:`GSSAPI <security-auth-kerberos>`. Possible values are:
518+
519+
``SERVICE_NAME:<string>``
520+
Set the Kerberos service name when connecting to Kerberized
521+
MongoDB instances. This value must match the service name set
522+
on MongoDB instances to which you are connecting.
523+
524+
``SERVICE_NAME`` defaults to ``mongodb`` for all clients and
525+
MongoDB instances. If you change the
526+
:parameter:`saslServiceName` setting on a MongoDB instance, you
527+
must set ``SERVICE_NAME`` to match that setting.
528+
529+
``CANONICALIZE_HOST_NAME:true|false``
530+
Canonicalize the hostname of the client host machine when
531+
connecting to the Kerberos server. This may be required when
532+
hosts report different hostnames than what is in the Kerberos
533+
database. Defaults to ``false``.
534+
535+
``SERVICE_REALM:<string>``
536+
Set the Kerberos realm for the MongoDB service. This may be
537+
necessary to support cross-realm authentication where the user
538+
exists in one realm and the service in another.
539+
504540
* - .. urioption:: gssapiServiceName
505541

506542
- Set the Kerberos service name when connecting to Kerberized
507543
MongoDB instances. This value must match the service name set on
508-
MongoDB instances.
544+
MongoDB instances to which you are connecting.
509545

510546
:urioption:`gssapiServiceName` defaults to ``mongodb`` for all
511-
clients and for MongoDB instance. If you change
547+
clients and MongoDB instances. If you change
512548
:parameter:`saslServiceName` setting on a MongoDB instance, you
513-
will need to set :urioption:`gssapiServiceName` to the same
514-
value.
549+
must set :urioption:`gssapiServiceName` to match that setting.
550+
551+
:urioption:`gssapiServiceName` is a deprecated aliases for
552+
:urioption:`authMechanismProperties=SERVICE_NAME:mongodb
553+
<authMechanismProperties>`. For more information on which
554+
options your driver supports and their relative priority to each
555+
other, reference the documentation for your preferred driver
556+
version.
515557

516558
.. _selection-discovery-options:
517559

0 commit comments

Comments
 (0)