@@ -612,17 +612,59 @@ Authentication Options
612
612
:doc:`/tutorial/configure-x509-client-authentication` for more
613
613
information on x509 authentication.
614
614
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
+
615
651
* - .. urioption:: gssapiServiceName
616
652
617
653
- Set the Kerberos service name when connecting to Kerberized
618
654
MongoDB instances. This value must match the service name set on
619
- MongoDB instances.
655
+ MongoDB instances to which you are connecting .
620
656
621
657
:urioption:`gssapiServiceName` defaults to ``mongodb`` for all
622
- clients and for MongoDB instance . If you change
658
+ clients and MongoDB instances . If you change
623
659
: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.
626
668
627
669
.. _selection-discovery-options:
628
670
0 commit comments