Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade MSAL library version #765

Merged
merged 2 commits into from Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -211,10 +211,7 @@ public static void ActiveDirectoryPasswordWithNoAuthType()
// connection fails with expected error message.
string[] AuthKey = { "Authentication" };
string connStrWithNoAuthType = DataTestUtility.RemoveKeysInConnStr(DataTestUtility.AADPasswordConnectionString, AuthKey);
SqlException e = Assert.Throws<SqlException>(() => ConnectAndDisconnect(connStrWithNoAuthType));

string expectedMessage = "Cannot open server \"microsoft.com\" requested by the login. The login failed.";
Assert.Contains(expectedMessage, e.Message);
Assert.Throws<SqlException>(() => ConnectAndDisconnect(connStrWithNoAuthType));
}

[ConditionalFact(nameof(IsAADConnStringsSetup))]
Expand Down Expand Up @@ -248,10 +245,7 @@ public static void EmptyPasswordInConnStrAADPassword()
// connection fails with expected error message.
string[] pwdKey = { "Password", "PWD" };
string connStr = DataTestUtility.RemoveKeysInConnStr(DataTestUtility.AADPasswordConnectionString, pwdKey) + "Password=;";
AggregateException e = Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));

string expectedMessage = "ID3242: The security token could not be authenticated or authorized.";
Assert.Contains(expectedMessage, e.InnerException.InnerException.InnerException.Message);
Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));
}

[PlatformSpecific(TestPlatforms.Windows)]
Expand All @@ -261,11 +255,7 @@ public static void EmptyCredInConnStrAADPassword()
// connection fails with expected error message.
string[] removeKeys = { "User ID", "Password", "UID", "PWD" };
string connStr = DataTestUtility.RemoveKeysInConnStr(DataTestUtility.AADPasswordConnectionString, removeKeys) + "User ID=; Password=;";
AggregateException e = Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));

string expectedMessage = "Failed to get user name";

Assert.Contains(expectedMessage, e.InnerException.InnerException.InnerException.Message);
Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));
}

[PlatformSpecific(TestPlatforms.AnyUnix)]
Expand All @@ -275,11 +265,7 @@ public static void EmptyCredInConnStrAADPasswordAnyUnix()
// connection fails with expected error message.
string[] removeKeys = { "User ID", "Password", "UID", "PWD" };
string connStr = DataTestUtility.RemoveKeysInConnStr(DataTestUtility.AADPasswordConnectionString, removeKeys) + "User ID=; Password=;";
AggregateException e = Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));

string expectedMessage = "cannot determine the username";

Assert.Contains(expectedMessage, e.InnerException.InnerException.InnerException.Message);
Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));
}

[ConditionalFact(nameof(IsAADConnStringsSetup))]
Expand All @@ -288,10 +274,7 @@ public static void AADPasswordWithInvalidUser()
// connection fails with expected error message.
string[] removeKeys = { "User ID", "UID" };
string connStr = DataTestUtility.RemoveKeysInConnStr(DataTestUtility.AADPasswordConnectionString, removeKeys) + "User ID=testdotnet@microsoft.com";
AggregateException e = Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));

string expectedMessage = "ID3242: The security token could not be authenticated or authorized.";
Assert.Contains(expectedMessage, e.InnerException.InnerException.InnerException.Message);
Assert.Throws<AggregateException>(() => ConnectAndDisconnect(connStr));
}

[ConditionalFact(nameof(IsAADConnStringsSetup))]
Expand Down
2 changes: 1 addition & 1 deletion tools/props/Versions.props
Expand Up @@ -18,7 +18,7 @@
</PropertyGroup>
<!-- NetFx and NetCore project dependencies -->
<PropertyGroup>
<MicrosoftIdentityClientVersion>4.14.0</MicrosoftIdentityClientVersion>
<MicrosoftIdentityClientVersion>4.21.1</MicrosoftIdentityClientVersion>
<MicrosoftIdentityModelProtocolsOpenIdConnectVersion>5.6.0</MicrosoftIdentityModelProtocolsOpenIdConnectVersion>
<MicrosoftIdentityModelJsonWebTokensVersion>5.6.0</MicrosoftIdentityModelJsonWebTokensVersion>
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
Expand Down
10 changes: 5 additions & 5 deletions tools/specs/Microsoft.Data.SqlClient.nuspec
Expand Up @@ -28,7 +28,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependencies>
<group targetFramework="net46">
<dependency id="Microsoft.Data.SqlClient.SNI" version="2.1.1" />
<dependency id="Microsoft.Identity.Client" version="4.14.0" />
<dependency id="Microsoft.Identity.Client" version="4.21.1" />
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.6.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="5.6.0" />
</group>
Expand All @@ -40,7 +40,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="System.Diagnostics.DiagnosticSource" version="4.7.0" exclude="Compile" />
<dependency id="System.Configuration.ConfigurationManager" version="4.7.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Compile" />
<dependency id="Microsoft.Identity.Client" version="4.14.0" exclude="Compile"/>
<dependency id="Microsoft.Identity.Client" version="4.21.1" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.6.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="5.6.0" />
</group>
Expand All @@ -52,7 +52,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="System.Diagnostics.DiagnosticSource" version="4.7.0" exclude="Compile" />
<dependency id="System.Configuration.ConfigurationManager" version="4.7.0" exclude="Compile" />
<dependency id="System.Runtime.Caching" version="4.7.0" exclude="Compile" />
<dependency id="Microsoft.Identity.Client" version="4.14.0" exclude="Compile"/>
<dependency id="Microsoft.Identity.Client" version="4.21.1" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.6.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="5.6.0" />
</group>
Expand All @@ -63,7 +63,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="System.Memory" version="4.5.4" exclude="Compile" />
<dependency id="System.Security.Principal.Windows" version="4.7.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="4.7.0" exclude="Compile" />
<dependency id="Microsoft.Identity.Client" version="4.14.0" exclude="Compile"/>
<dependency id="Microsoft.Identity.Client" version="4.21.1" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.6.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="5.6.0" />
</group>
Expand All @@ -74,7 +74,7 @@ When using NuGet 3.x this package requires at least version 3.4.</description>
<dependency id="System.Memory" version="4.5.4" exclude="Compile" />
<dependency id="System.Security.Principal.Windows" version="4.7.0" exclude="Compile" />
<dependency id="System.Text.Encoding.CodePages" version="4.7.0" exclude="Compile" />
<dependency id="Microsoft.Identity.Client" version="4.14.0" exclude="Compile"/>
<dependency id="Microsoft.Identity.Client" version="4.21.1" exclude="Compile"/>
<dependency id="Microsoft.IdentityModel.Protocols.OpenIdConnect" version="5.6.0" />
<dependency id="Microsoft.IdentityModel.JsonWebTokens" version="5.6.0" />
</group>
Expand Down