Skip to content

Commit 2064458

Browse files
authored
DOCSP-42382: Update connection string placeholders (#56)
* DOCSP-42382: Update connection string placeholders * edits
1 parent 8b34d6e commit 2064458

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

source/connect/client.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ A standard connection string includes the following components:
5454
- Required. A prefix that identifies this as a string in the
5555
standard connection format.
5656

57-
* - ``username:password``
57+
* - ``db_username:db_password``
5858

5959
- Optional. Authentication credentials. If you include these, the client
6060
authenticates the user against the database specified in ``authSource``.
@@ -69,7 +69,7 @@ A standard connection string includes the following components:
6969
* - ``/defaultauthdb``
7070

7171
- Optional. The authentication database to use if the
72-
connection string includes ``username:password@``
72+
connection string includes ``db_username:db_password@``
7373
authentication credentials but not the ``authSource`` option. If you don't include
7474
this component, the client authenticates the user against the ``admin`` database.
7575

source/includes/authentication.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// start-scram-sha-256
2-
auto uri = mongocxx::uri("mongodb://<username>:<password>@<hostname>:<port>/?"
2+
auto uri = mongocxx::uri("mongodb://<db_username>:<db_password>@<hostname>:<port>/?"
33
"authSource=admin&authMechanism=SCRAM-SHA-256");
44
auto client = mongocxx::client(uri);
55
// end-scram-sha-256
66

77
// start-scram-sha-1
8-
auto uri = mongocxx::uri("mongodb://<username>:<password>@<hostname>:<port>/?"
8+
auto uri = mongocxx::uri("mongodb://<db_username>:<db_password>@<hostname>:<port>/?"
99
"authSource=admin&authMechanism=SCRAM-SHA-1");
1010
auto client = mongocxx::client(uri);
1111
// end-scram-sha-1
@@ -35,14 +35,14 @@ auto client = mongocxx::client(uri);
3535
// end-aws-environment
3636

3737
// start-kerberos
38-
auto uri = mongocxx::uri("mongodb://mongodbuser%40EXAMPLE.COM@<hostname>:<port>/?"
38+
auto uri = mongocxx::uri("mongodb://<Kerberos principal>@<hostname>:<port>/?"
3939
"authMechanism=GSSAPI"
4040
"&authMechanismProperties=SERVICE_NAME:<authentication service name>");
4141
auto client = mongocxx::client(uri);
4242
// end-kerberos
4343

4444
// start-plain
45-
auto uri = mongocxx::uri("mongodb://<username>:<password>@<hostname>:<port>/?"
45+
auto uri = mongocxx::uri("mongodb://<db_username>:<db_password>@<hostname>:<port>/?"
4646
"authMechanism=PLAIN&tls=true");
4747
auto client = mongocxx::client(uri);
4848
// end-plain

source/security/authentication.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ running MongoDB v4.0 or later.
3434

3535
To authenticate with this mechanism, set the following connection options:
3636

37-
- ``username``: The username to authenticate.
38-
- ``password``: The password to authenticate.
37+
- ``db_username``: The database username to authenticate.
38+
- ``db_password``: The database password to authenticate.
3939
- ``authSource``: The MongoDB database to authenticate against. By default,
4040
{+driver-short+} authenticates against the database in the connection
4141
URI, if you include one. If you don't, it authenticates against the ``admin`` database.
@@ -61,8 +61,8 @@ running MongoDB v3.6.
6161

6262
To authenticate with this mechanism, set the following connection options:
6363

64-
- ``username``: The username to authenticate.
65-
- ``password``: The password to authenticate.
64+
- ``db_username``: The username to authenticate.
65+
- ``db_password``: The password to authenticate.
6666
- ``authSource``: The MongoDB database to authenticate against. By default,
6767
{+driver-short+} authenticates against the ``admin`` database.
6868
- ``authMechanism``: Set to ``"SCRAM-SHA-1"``.

source/security/enterprise-authentication.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Complete the following steps to authenticate with GSSAPI:
7272

7373
Next, set the following connection options:
7474

75-
- ``username``: The Kerbos principal to authenticate.
75+
- ``Kerberos principal``: The Kerberos principal to authenticate.
7676
- ``authMechanism``: Set to ``"GSSAPI"``.
7777
- ``authMechanismProperties``: Optional. By default, MongoDB uses ``mongodb`` as
7878
the authentication service name. To specify a different service name, set

0 commit comments

Comments
 (0)