Skip to content

Commit

Permalink
doc(kerberos): fix typo in Kerberos connection section, and url
Browse files Browse the repository at this point in the history
* Fix type in Kerberos connection section

Partial NODE-1654

* Add missing backslash to URL
  • Loading branch information
kallimachos authored and mbroadst committed Sep 5, 2018
1 parent 3c9ef0d commit bd80fb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/reference/content/tutorials/connect/authenticating.md
Expand Up @@ -166,7 +166,7 @@ For more information, refer to the MongoDB manual

[MongoDB Enterprise](http://www.mongodb.com/products/mongodb-enterprise) supports proxy authentication through a Kerberos service. The Node.js driver supports Kerberos on UNIX via the MIT Kerberos library and on Windows via the SSPI API.

To connect using the X.509 authentication mechanism, specify ``authMechanism=GSSAPI`` as the mechanism in the [URI connection string](https://docs.mongodb.org/manual/reference/connection-string/). Specify the user principal and the service name in the connection string. Use `enodeURIComponent` to encode the user principal string.
To connect using the GSSAPI authentication mechanism, specify ``authMechanism=GSSAPI`` as the mechanism in the [URI connection string](https://docs.mongodb.org/manual/reference/connection-string/). Specify the user principal and the service name in the connection string. Use `enodeURIComponent` to encode the user principal string.

The following example connects to MongoDB using Kerberos for UNIX.

Expand All @@ -179,7 +179,7 @@ const server = "mongo-server.example.com";
const principal = "drivers@KERBEROS.EXAMPLE.COM";
const urlEncodedPrincipal = encodeURIComponent(principal);

const url = `mongodb://${urlEncodedPrincipal}@${server}?authMechanism=GSSAPI&gssapiServiceName=mongodb`;
const url = `mongodb://${urlEncodedPrincipal}@${server}/?authMechanism=GSSAPI&gssapiServiceName=mongodb`;

const client = new MongoClient(url);

Expand Down

0 comments on commit bd80fb2

Please sign in to comment.