From a282ddce1e49180d84c8d14ffbb5426923254b25 Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 12 Aug 2024 16:20:43 -0400 Subject: [PATCH 1/2] DOCSP-42378: Update username/password placeholders --- .../fundamentals/connections/network-compression.txt | 2 +- source/includes/fundamentals/code-snippets/auth.rs | 12 ++++++------ source/quick-start/create-a-connection-string.txt | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/source/fundamentals/connections/network-compression.txt b/source/fundamentals/connections/network-compression.txt index 53cd7beb..39329b72 100644 --- a/source/fundamentals/connections/network-compression.txt +++ b/source/fundamentals/connections/network-compression.txt @@ -125,7 +125,7 @@ Zstandard as the compressors for a connection: .. code-block:: rust :emphasize-lines: 1 - let uri = "mongodb+srv://:@/?compressors=snappy,zlib,zstd"; + let uri = "mongodb+srv://:@/?compressors=snappy,zlib,zstd"; let client = Client::with_uri_str(uri).await?; To learn more about setting client options, see the diff --git a/source/includes/fundamentals/code-snippets/auth.rs b/source/includes/fundamentals/code-snippets/auth.rs index 647d4aab..3f5ab631 100644 --- a/source/includes/fundamentals/code-snippets/auth.rs +++ b/source/includes/fundamentals/code-snippets/auth.rs @@ -7,8 +7,8 @@ async fn main() -> mongodb::error::Result<()> { let mut client_options = ClientOptions::parse_async(uri).await?; let default_cred = Credential::builder() - .username("".to_string()) - .password("".to_string()) + .username("".to_string()) + .password("".to_string()) .source("".to_string()) .build(); @@ -21,8 +21,8 @@ async fn main() -> mongodb::error::Result<()> { let mut client_options = ClientOptions::parse_async(uri).await?; let scram_sha_256_cred = Credential::builder() - .username("".to_string()) - .password("".to_string()) + .username("".to_string()) + .password("".to_string()) .mechanism(AuthMechanism::ScramSha256) .source("".to_string()) .build(); @@ -36,8 +36,8 @@ async fn main() -> mongodb::error::Result<()> { let mut client_options = ClientOptions::parse_async(uri).await?; let scram_sha_1_cred = Credential::builder() - .username("".to_string()) - .password("".to_string()) + .username("".to_string()) + .password("".to_string()) .mechanism(AuthMechanism::ScramSha1) .source("".to_string()) .build(); diff --git a/source/quick-start/create-a-connection-string.txt b/source/quick-start/create-a-connection-string.txt index 4c251268..274e902c 100644 --- a/source/quick-start/create-a-connection-string.txt +++ b/source/quick-start/create-a-connection-string.txt @@ -52,7 +52,7 @@ To connect to an instance or deployment not hosted on Atlas, see .. step:: Update the Placeholders Paste this connection string into a a file in your preferred text editor - and replace the ```` and ```` placeholders with + and replace the ```` and ```` placeholders with your database user's username and password. Save this file to a safe location for use in the next step. From 432212ec97f2bb2124746d8ebe7311fe8a357cba Mon Sep 17 00:00:00 2001 From: norareidy Date: Mon, 12 Aug 2024 16:33:48 -0400 Subject: [PATCH 2/2] edits --- source/fundamentals/authentication.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source/fundamentals/authentication.txt b/source/fundamentals/authentication.txt index 9bcbce9e..7c55397e 100644 --- a/source/fundamentals/authentication.txt +++ b/source/fundamentals/authentication.txt @@ -64,10 +64,10 @@ password to authenticate to a server. MongoDB supports the following SCRAM-based authentication mechanisms: - :ref:`SCRAM-SHA-256 `: an authentication mechanism that - uses your username and password, encrypted with the ``SHA-256`` + uses your database username and password, encrypted with the ``SHA-256`` algorithm - :ref:`SCRAM-SHA-1 `: an authentication mechanism that - uses your username and password, encrypted with the ``SHA-1`` + uses your database username and password, encrypted with the ``SHA-1`` algorithm .. important:: Default Authentication Mechanism @@ -84,8 +84,8 @@ MongoDB supports the following SCRAM-based authentication mechanisms: ``mechanism`` field when you instantiate your ``Credential`` struct. This example uses the following placeholders: - - ``username``: Your username - - ``password``: Your password + - ``db_username``: Your database username + - ``db_password``: Your database password - ``db``: The authentication database associated with the user .. literalinclude:: /includes/fundamentals/code-snippets/auth.rs @@ -104,8 +104,8 @@ To specify the ``SCRAM-SHA-256`` authentication mechanism, set the ``AuthMechanism::ScramSha256``. This example specifies the authentication mechanism by using the following placeholders: -- ``username``: Your username -- ``password``: Your password +- ``db_username``: Your database username +- ``db_password``: Your database password - ``db``: The authentication database associated with the user .. literalinclude:: /includes/fundamentals/code-snippets/auth.rs @@ -124,8 +124,8 @@ To specify the ``SCRAM-SHA-1`` authentication mechanism, set the ``AuthMechanism::ScramSha1``. This example specifies the authentication mechanism by using the following placeholders: -- ``username``: Your username -- ``password``: Your password +- ``db_username``: Your database username +- ``db_password``: Your database password - ``db``: The authentication database associated with the user .. literalinclude:: /includes/fundamentals/code-snippets/auth.rs