Skip to content

Commit 521ee7d

Browse files
authored
Merge pull request #408 from microsoft/release/update/231107060522
Resync to Shipping code base.
2 parents 447f9dc + 0b7d1f1 commit 521ee7d

File tree

7 files changed

+257
-244
lines changed

7 files changed

+257
-244
lines changed

src/Build.Shared.props

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
<Project>
2-
<PropertyGroup>
3-
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
4-
</PropertyGroup>
5-
62
<!-- msbuild properties shared for dotnetCore and .NET classic projects: -->
73
<PropertyGroup>
84
<!-- Assembly attributes are set by cake build. We need to disable autogeneration by msbuild -->
9-
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
10-
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
11-
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
12-
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
13-
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
14-
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
15-
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
16-
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
17-
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
5+
<DisableAssemblyAttributesSetViaCakeSetVersion>true</DisableAssemblyAttributesSetViaCakeSetVersion>
186
</PropertyGroup>
197

208
<PropertyGroup>
@@ -52,11 +40,6 @@
5240
<OutputPath>$(OutDir)</OutputPath>
5341
</PropertyGroup>
5442

55-
<PropertyGroup Condition="'$(SignAssembly)' == 'true'">
56-
<AssemblyOriginatorKeyFile>$(RepoRoot)\build\crmkey\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
57-
<DelaySign>true</DelaySign>
58-
</PropertyGroup>
59-
6043
<PropertyGroup>
6144
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6245
<FileAlignment>512</FileAlignment>

src/GeneralTools/DataverseClient/Client/Auth/AuthProcessor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System;
77
using System.Collections.Generic;
88
using System.Diagnostics;
9+
using System.Globalization;
910
using System.Linq;
1011
using System.Net.Http;
1112
using System.Security;
@@ -299,7 +300,9 @@ internal async static Task<AuthenticationResult> ObtainAccessTokenAsync(
299300
}
300301
else
301302
{
303+
#pragma warning disable CS0618 // Type or member is obsolete
302304
_authenticationResult = await publicAppClient.AcquireTokenByUsernamePassword(scopes, clientCredentials.UserName.UserName, ServiceClient.MakeSecureString(clientCredentials.UserName.Password)).ExecuteAsync().ConfigureAwait(false);
305+
#pragma warning restore CS0618 // Type or member is obsolete
303306
}
304307
}
305308
else

src/GeneralTools/DataverseClient/Client/Microsoft.PowerPlatform.Dataverse.Client.csproj

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@
4040
<PackageReference Include="System.Security.Cryptography.ProtectedData" Version="4.7.0" />
4141
<PackageReference Include="System.Security.Permissions" Version="5.0.0" />
4242
<PackageReference Include="System.ServiceModel.Http" Version="4.10.2" />
43-
<PackageReference Include="System.Text.Json" Version="6.0.7" />
44-
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="2.18.9" />
43+
<PackageReference Include="System.Text.Json" Version="$(PackageVersion_SystemTextJson)" />
44+
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.56.0" />
4545
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(PackageVersion_Microsoft_Extensions)" />
4646
<PackageReference Include="System.Drawing.Common" Version="5.0.3" /> <!-- explict add to deal with CVE-2021-24112 -->
47-
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" /> <!-- explict add to deal with CVE-2022-34716 -->
48-
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.3" /> <!-- explict add to deal with CVE-2023-29331 -->
4947
</ItemGroup>
5048

5149
<ItemGroup Condition="'$(TargetFramework)' == 'net462' or '$(TargetFramework)' == 'net472' or '$(TargetFramework)' == 'net48'">

src/GeneralTools/DataverseClient/UnitTests/CdsClient_Core_Tests/ServiceClientTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ public void ConnectUsingServiceIdentity_ClientSecret_ConStr()
853853
Assert.Null(ex);
854854
}
855855
// Check user before we validate connection
856-
client._connectionSvc.AuthenticationTypeInUse.Should().BeEquivalentTo(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.ClientSecret);
856+
client._connectionSvc.AuthenticationTypeInUse.Should().Be(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.ClientSecret);
857857
client._connectionSvc.AuthContext.Scopes.Should().BeEquivalentTo(new string[] { $"{Conn_Url}/.default" });
858858
client._connectionSvc.AuthContext.Account.Should().BeNull();
859859
client._connectionSvc.AuthContext.AccessToken.Should().NotBeNull();
@@ -956,7 +956,7 @@ public void ConnectUsingUserIdentity_UIDPW_ConStr()
956956
Assert.True(client.IsReady, "Failed to Create Connection via Connection string");
957957

958958
// Check user before we validate connection
959-
client._connectionSvc.AuthenticationTypeInUse.Should().BeEquivalentTo(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
959+
client._connectionSvc.AuthenticationTypeInUse.Should().Be(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
960960
client._connectionSvc.AuthContext.Scopes.Should().BeEquivalentTo(new string[] { $"{Conn_Url}//user_impersonation" });
961961
client._connectionSvc.AuthContext.Account.Should().NotBeNull();
962962
client._connectionSvc.AuthContext.IdToken.Should().NotBeEmpty();
@@ -999,7 +999,7 @@ public void ConnectUsingUserIdentity_UIDPW_CtorV1_Discovery()
999999
Assert.True(client.IsReady, "Failed to Create Connection via Constructor - Discovery");
10001000

10011001
// Check user before we validate connection
1002-
client._connectionSvc.AuthenticationTypeInUse.Should().BeEquivalentTo(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
1002+
client._connectionSvc.AuthenticationTypeInUse.Should().Be(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
10031003
client._connectionSvc.AuthContext.Account.Should().NotBeNull();
10041004
client._connectionSvc.AuthContext.IdToken.Should().NotBeEmpty();
10051005
client._connectionSvc.AuthContext.Account.Username.Should().BeEquivalentTo(Conn_UserName);
@@ -1029,7 +1029,7 @@ public void ConnectUsingUserIdentity_UIDPW_CtorV2()
10291029
Assert.True(client.IsReady, "Failed to Create Connection via Constructor - Direct Connect");
10301030

10311031
// Check user before we validate connection
1032-
client._connectionSvc.AuthenticationTypeInUse.Should().BeEquivalentTo(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
1032+
client._connectionSvc.AuthenticationTypeInUse.Should().Be(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
10331033
client._connectionSvc.AuthContext.Scopes.Should().BeEquivalentTo(new string[] { $"{Conn_Url}//user_impersonation" });
10341034
client._connectionSvc.AuthContext.Account.Should().NotBeNull();
10351035
client._connectionSvc.AuthContext.IdToken.Should().NotBeEmpty();
@@ -1083,7 +1083,7 @@ public void ConnectUsingUserIdentity_UIDPW_ConSetup()
10831083
ValidateConnection(client);
10841084

10851085
// Check user before we validate connection
1086-
client._connectionSvc.AuthenticationTypeInUse.Should().BeEquivalentTo(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
1086+
client._connectionSvc.AuthenticationTypeInUse.Should().Be(Microsoft.PowerPlatform.Dataverse.Client.AuthenticationType.OAuth);
10871087
client._connectionSvc.AuthContext.Scopes.Should().BeEquivalentTo(new string[] { $"{Conn_Url}/user_impersonation" });
10881088
client._connectionSvc.AuthContext.Account.Should().NotBeNull();
10891089
client._connectionSvc.AuthContext.IdToken.Should().NotBeEmpty();

0 commit comments

Comments
 (0)