@@ -24,15 +24,23 @@ authentication mechanism available in the MongoDB Enterprise Edition:
24
24
The ``GSSAPI`` authentication mechanism uses your user principal to
25
25
authenticate to a Kerberos service.
26
26
27
- You can specify this authentication mechanism by setting the following
28
- parameters of the
27
+ You can specify this authentication mechanism by performing the
28
+ following actions while specifying options on your
29
29
:manual:`connection string </reference/connection-string/>`:
30
30
31
- - Set the ``authMechanism`` parameter to ``GSSAPI``
31
+ - Set the ``authMechanism`` parameter to ``GSSAPI``.
32
32
- Set the ``SERVICE_NAME`` value in the ``authMechanismProperties``
33
- parameter if using a value other than ``mongodb``
33
+ parameter if using a value other than ``mongodb``.
34
34
- Specify a ``SERVICE_REALM`` value in the ``authMechanismProperties``
35
35
parameter if a custom service realm is required.
36
+ - Specify a ``CANONICALIZE_HOST_NAME`` value in the ``authMechanismProperties``
37
+ parameter if canonicalization of the hostname is required. This property can take
38
+ the following values:
39
+
40
+ - ``none``: (Default) Does not perform hostname canonicalization
41
+ - ``forward``: Performs a forward DNS lookup to canonicalize the hostname
42
+ - ``forwardAndReverse``: Performs a forward DNS lookup and then a
43
+ reverse lookup on that value to canonicalize the hostname
36
44
37
45
.. important::
38
46
@@ -58,7 +66,8 @@ The following code sample authenticates to Kerberos for UNIX using ``GSSAPI``.
58
66
const clusterUrl = "<MongoDB cluster URL>";
59
67
const principal = encodeURIComponent("<Kerberos principal and realm>");
60
68
const serviceRealm = "<Kerberos service realm>";
61
- const authMechanismProperties = `SERVICE_REALM:${serviceRealm}`;
69
+ const canonicalizationSetting = "<canonicalization setting>";
70
+ const authMechanismProperties = `SERVICE_REALM:${serviceRealm},CANONICALIZE_HOST_NAME:${canonicalizationSetting}`;
62
71
63
72
const authMechanism = "GSSAPI";
64
73
0 commit comments