Skip to content

Commit 18b9ff0

Browse files
committed
DOCS-9897: authMechanismProperties for URI connection string
1 parent b16a55b commit 18b9ff0

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
@@ -612,17 +612,59 @@ Authentication Options
612612
:doc:`/tutorial/configure-x509-client-authentication` for more
613613
information on x509 authentication.
614614

615+
* - .. urioption:: authMechanismProperties
616+
617+
- Specify properties for the specified :urioption:`authMechanism`
618+
as a comma-separated list of colon-separated key-value pairs.
619+
For example:
620+
621+
.. code-block:: shell
622+
:copyable: false
623+
624+
authMechanismProperties=SERVICE_NAME:mongodb,CANONICALIZE_HOST_NAME:true
625+
626+
The :option:`authmechanismProperties` option is only supported
627+
when :urioption:`authMechanism` is
628+
:ref:`GSSAPI <security-auth-kerberos>`. Possible values are:
629+
630+
``SERVICE_NAME:<string>``
631+
Set the Kerberos service name when connecting to Kerberized
632+
MongoDB instances. This value must match the service name set
633+
on MongoDB instances to which you are connecting.
634+
635+
``SERVICE_NAME`` defaults to ``mongodb`` for all clients and
636+
MongoDB instances. If you change the
637+
:parameter:`saslServiceName` setting on a MongoDB instance, you
638+
must set ``SERVICE_NAME`` to match that setting.
639+
640+
``CANONICALIZE_HOST_NAME:true|false``
641+
Canonicalize the hostname of the client host machine when
642+
connecting to the Kerberos server. This may be required when
643+
hosts report different hostnames than what is in the Kerberos
644+
database. Defaults to ``false``.
645+
646+
``SERVICE_REALM:<string>``
647+
Set the Kerberos realm for the MongoDB service. This may be
648+
necessary to support cross-realm authentication where the user
649+
exists in one realm and the service in another.
650+
615651
* - .. urioption:: gssapiServiceName
616652

617653
- Set the Kerberos service name when connecting to Kerberized
618654
MongoDB instances. This value must match the service name set on
619-
MongoDB instances.
655+
MongoDB instances to which you are connecting.
620656

621657
:urioption:`gssapiServiceName` defaults to ``mongodb`` for all
622-
clients and for MongoDB instance. If you change
658+
clients and MongoDB instances. If you change
623659
:parameter:`saslServiceName` setting on a MongoDB instance, you
624-
will need to set :urioption:`gssapiServiceName` to the same
625-
value.
660+
must set :urioption:`gssapiServiceName` to match that setting.
661+
662+
:urioption:`gssapiServiceName` is a deprecated aliases for
663+
:urioption:`authMechanismProperties=SERVICE_NAME:mongodb
664+
<authMechanismProperties>`. For more information on which
665+
options your driver supports and their relative priority to each
666+
other, reference the documentation for your preferred driver
667+
version.
626668

627669
.. _selection-discovery-options:
628670

0 commit comments

Comments
 (0)