Skip to content

Commit b8eeb25

Browse files
vincentkamrstam
authored andcommitted
CSHARP-2160: Implement SASLPrep: Update XML comments
1 parent 0189dd1 commit b8eeb25

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/MongoDB.Driver/MongoCredential.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ public string Username
154154
// public static methods
155155
/// <summary>
156156
/// Creates a default credential.
157+
/// In .NET Standard, authenticating via SCRAM-SHA-256 may not work with non-ASCII passwords because SaslPrep is
158+
/// not fully implemented due to the lack of a string normalization function in .NET Standard 1.5.
159+
/// Normalizing the password into Unicode Normalization Form KC beforehand MAY help.
160+
/// SCRAM-SHA-1 is the recommended alternative for now.
157161
/// </summary>
158162
/// <param name="databaseName">Name of the database.</param>
159163
/// <param name="username">The username.</param>
@@ -169,6 +173,12 @@ public static MongoCredential CreateCredential(string databaseName, string usern
169173

170174
/// <summary>
171175
/// Creates a default credential.
176+
/// Less secure when used in conjunction with SCRAM-SHA-256, due to the need to store the password in a managed
177+
/// string in order to SaslPrep it.
178+
/// In .NET Standard, authenticating via SCRAM-SHA-256 may not work with non-ASCII passwords because SaslPrep is
179+
/// not fully implemented due to the lack of a string normalization function in .NET Standard 1.5.
180+
/// Normalizing the password into Unicode Normalization Form KC beforehand MAY help.
181+
/// SCRAM-SHA-1 is the recommended alternative for now.
172182
/// </summary>
173183
/// <param name="databaseName">Name of the database.</param>
174184
/// <param name="username">The username.</param>

0 commit comments

Comments
 (0)