You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/content/reference/connecting/authenticating.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,18 @@ title = "Authenticating"
9
9
10
10
# Authenticating
11
11
12
-
The Java driver supports all MongoDB [authentication mechanisms](http://docs.mongodb.org/manual/core/authentication/), including those
12
+
The Java driver supports all MongoDB [authentication mechanisms](http://docs.mongodb.org/manual/core/authentication/), including those
13
13
only available in the MongoDB [Enterprise Edition](http://docs.mongodb.org/manual/administration/install-enterprise/).
14
14
15
-
An authentication credential is represented as an instance of the
16
-
[MongoCredential](http://api.mongodb.org/java/current/com/mongodb/MongoCredential.html) class, which includes static factory methods for
15
+
An authentication credential is represented as an instance of the
16
+
[MongoCredential](http://api.mongodb.org/java/current/com/mongodb/MongoCredential.html) class, which includes static factory methods for
17
17
each of the supported authentication mechanisms. A list of these instances must be passed to the driver via one of several
18
18
[MongoClient](http://api.mongodb.org/java/current/com/mongodb/MongoCredential.html) constructors that take a
19
-
parameter of type `List<MongoCredential>`.
19
+
parameter of type `List<MongoCredential>`.
20
20
21
-
> Given the flexibility of role-based access control in MongoDB, it is usually sufficient to authenticate with a single user, but, for
22
-
completeness, the driver accepts a list of credentials.
21
+
{{% note %}}
22
+
Given the flexibility of role-based access control in MongoDB, it is usually sufficient to authenticate with a single user, but, for completeness, the driver accepts a list of credentials.
23
+
{{% /note %}}
23
24
24
25
## Default authentication mechanism
25
26
@@ -129,8 +130,9 @@ or with a connection string:
129
130
MongoClientURI uri =newMongoClientURI("mongodb://username%40REALM.com@host1/?authMechanism=GSSAPI");
130
131
```
131
132
132
-
> The method refers to the `GSSAPI` authentication mechanism instead of `Kerberos` because technically the driver is authenticating
133
-
via the [GSSAPI](https://tools.ietf.org/html/rfc4752) SASL mechanism.
133
+
{{% note %}}
134
+
The method refers to the `GSSAPI` authentication mechanism instead of `Kerberos` because technically the driver is authenticating via the [GSSAPI](https://tools.ietf.org/html/rfc4752) SASL mechanism.
135
+
{{% /note %}}
134
136
135
137
To successfully authenticate via Kerberos, the application typically must specify several system properties so that the underlying GSSAPI
136
138
Java libraries can acquire a Kerberos ticket:
@@ -158,5 +160,6 @@ or with a connection string:
158
160
MongoClientURI uri =newMongoClientURI("mongodb://user1@host1/?authSource=$external&authMechanism=PLAIN");
159
161
```
160
162
161
-
> The method refers to the `plain` authentication mechanism instead of `LDAP` because technically the driver is authenticating
162
-
via the [PLAIN](https://www.ietf.org/rfc/rfc4616.txt) SASL mechanism.
163
+
{{% note %}}
164
+
The method refers to the `plain` authentication mechanism instead of `LDAP` because technically the driver is authenticating via the [PLAIN](https://www.ietf.org/rfc/rfc4616.txt) SASL mechanism.
Copy file name to clipboardExpand all lines: docs/reference/content/reference/connecting/index.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,9 @@ mongodb://host:27017/mydb
43
43
44
44
Above, the database by the name of "mydb" is where the credentials are stored for the application.
45
45
46
-
> Note that some drivers utilize the database component to indicate which database to work with by default. The Java driver, while it
47
-
parses the database component, does not use the database component for anything other than authentication.
46
+
{{% note %}}
47
+
Some drivers utilize the database component to indicate which database to work with by default. The Java driver, while it parses the database component, does not use the database component for anything other than authentication.
0 commit comments