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

Update AzureAuth to .NET 8 version #412

Merged
merged 14 commits into from
Nov 7, 2024
Merged
101 changes: 101 additions & 0 deletions .config/guardian/SDL/.gdnsuppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"hydrated": false,
"properties": {
"helpUri": "https://eng.ms/docs/microsoft-security/security/azure-security/cloudai-security-fundamentals-engineering/security-integration/guardian-wiki/microsoft-guardian/general/suppressions",
"hydrationStatus": "This file does not contain identifying data. It is safe to check into your repo. To hydrate this file with identifying data, run `guardian hydrate --help` and follow the guidance."
},
"version": "1.0.0",
"suppressionSets": {
"default": {
"name": "default",
"createdDate": "2024-11-05 22:44:27Z",
"lastUpdatedDate": "2024-11-05 22:44:27Z"
}
},
"results": {
"fe2acc487ef033024b04850e3353f13bd2440a4667d0a40e87e8f731e9e515e8": {
"signature": "fe2acc487ef033024b04850e3353f13bd2440a4667d0a40e87e8f731e9e515e8",
"alternativeSignatures": [
"324d61936e58b8df281670af4015fa27e4ca538f4953cb526fadd200f9d39a2c"
],
"target": "azureauth-0.8.6-osx-x64-signed/AzureAuth/AdoPat.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:27Z",
"justification": "Not applicable to win-x64, only applicable to osx-x64"
},
"496121e11663e27908700184fa29796a0bf716e2a84d2f1ab70a6cd06730d62d": {
"signature": "496121e11663e27908700184fa29796a0bf716e2a84d2f1ab70a6cd06730d62d",
"alternativeSignatures": [
"71a5d359a6601a6a7521ed45e5332517fe76d21eb8c9e0da490a1cb08c51e081"
],
"target": "azureauth-0.8.6-osx-x64-signed/AzureAuth/azureauth.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:27Z",
"justification": "Not applicable to win-x64, only applicable to osx-x64"
},
"06af3c593c39a7530472338385efa6359d040941ae019dc6f24984ba7cfbcf0a": {
"signature": "06af3c593c39a7530472338385efa6359d040941ae019dc6f24984ba7cfbcf0a",
"alternativeSignatures": [
"7bebe0a963209c4608e803bcc52d8d946e8032ce71b05471469b19a416acfca1"
],
"target": "azureauth-0.8.6-osx-x64-signed/AzureAuth/MSALWrapper.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:27Z",
"justification": "Not applicable to win-x64, only applicable to osx-x64"
},
"9b908590fc46385c33bd4e2b2a14d08b99c0266f747b49d84096282f3c235c7a": {
"signature": "9b908590fc46385c33bd4e2b2a14d08b99c0266f747b49d84096282f3c235c7a",
"alternativeSignatures": [
"b1dafeea2babfc82fd9dd4d8fd95b509f46d74bcb2b9152ab7e1bba72d97f9e1"
],
"target": "azureauth-0.8.6-osx-arm64-signed/AzureAuth/AdoPat.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:37Z",
"justification": "Not applicable to win-x64, only applicable to osx-arm64"
},
"17ed0e261bc1b517b1d242818087a3264c163346e3ba5587186b2be602b159c1": {
"signature": "17ed0e261bc1b517b1d242818087a3264c163346e3ba5587186b2be602b159c1",
"alternativeSignatures": [
"d96cd805605923e5466365501ae55697422f1aa1a60a9e04292b56bace26fa8e"
],
"target": "azureauth-0.8.6-osx-arm64-signed/AzureAuth/azureauth.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:37Z",
"justification": "Not applicable to win-x64, only applicable to osx-arm64"
},
"43a1ba6dd9d8f5a638e8596d7aaea53aca9812916c95467ca2828c15435c96bc": {
"signature": "43a1ba6dd9d8f5a638e8596d7aaea53aca9812916c95467ca2828c15435c96bc",
"alternativeSignatures": [
"84717f74e20904b858d4d7ff8029ea2e98b56d862f66feced2367d4090d07632"
],
"target": "azureauth-0.8.6-osx-arm64-signed/AzureAuth/MSALWrapper.dll",
"memberOf": [
"default"
],
"tool": "binskim",
"ruleId": "BA2021",
"createdDate": "2024-11-05 22:44:37Z",
"justification": "Not applicable to win-x64, only applicable to osx-arm64"
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/azure-devops-pipelines-cg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extends:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '6.x'
version: '8.x'
Haard30 marked this conversation as resolved.
Show resolved Hide resolved
- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Setup .NET 6
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x

- name: Get Azure DevOps Access Token
id: getToken
Expand Down
23 changes: 14 additions & 9 deletions .github/workflows/release-azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ parameters:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows
runtime: win10-x64
runtime: win-x64
archiveExt: zip
- pool:
name: Azure Pipelines
Expand Down Expand Up @@ -101,9 +101,9 @@ extends:
steps:
- checkout: self
- task: UseDotNet@2
displayName: Use .NET Core sdk 6.x
displayName: Use .NET Core sdk 8.x
inputs:
version: 6.x
version: 8.x
- task: NuGetToolInstaller@0
displayName: Use NuGet 6.x
inputs:
Expand All @@ -119,6 +119,8 @@ extends:
# 1ES PT requires explicit build task for Roslyn analysis. Auto-injected Roslyn task will use build logs from this build.
- task: DotNetCoreCLI@2
displayName: Build projects
env:
ADO_TOKEN: $(System.AccessToken)
mijpeterson marked this conversation as resolved.
Show resolved Hide resolved
inputs:
command: 'build'
projects: '**/*.csproj'
Expand Down Expand Up @@ -151,6 +153,9 @@ extends:
image: windows-latest
os: windows
templateContext:
sdl:
suppression:
suppressionFile: $(Build.SourcesDirectory)\.config\guardian\SDL\.gdnsuppress
inputs:
- input: pipelineArtifact
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}
Expand All @@ -161,8 +166,8 @@ extends:
targetPath: $(artifactsPath)-${{ config.runtime }}-signed
steps:
- task: EsrpCodeSigning@5
displayName: Sign artifacts win10-x64
condition: eq('${{ config.runtime }}', 'win10-x64')
displayName: Sign artifacts win-x64
condition: eq('${{ config.runtime }}', 'win-x64')
inputs:
ConnectedServiceName: $(ESRP_KV_SERVICE_CONNECTION)
AppRegistrationClientId: $(SIGNING_AAD_ID)
Expand Down Expand Up @@ -290,12 +295,12 @@ extends:
script: |
mkdir azureauth-${{ parameters.version }}-packaged
- task: ArchiveFiles@2
displayName: Create win10-x64 archive
displayName: Create win-x64 archive
inputs:
rootFolderOrFile: $(artifactsPath)-win10-x64-signed/AzureAuth
rootFolderOrFile: $(artifactsPath)-win-x64-signed/AzureAuth
includeRootFolder: false
archiveType: zip
archiveFile: $(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win10-x64.zip
archiveFile: $(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win-x64.zip
- task: Bash@3
displayName: Prepare osx-x64 executables
inputs:
Expand Down Expand Up @@ -371,6 +376,6 @@ extends:
releaseNotesSource: 'inline'
releaseNotesInline: "Release ${{ parameters.version }}. See [`CHANGELOG.md`](https://github.com/AzureAD/microsoft-authentication-cli/blob/${{ parameters.version }}/CHANGELOG.md) for updates."
assets: |
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win10-x64.zip
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-win-x64.zip
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-x64.tar.gz
$(artifactsPath)-packaged/azureauth-${{ parameters.version }}-osx-arm64.tar.gz
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Temporarily paused the publishing of Linux binaries.
- Upgrade MSAL from `4.59.1` to `4.61.3`.
- Upgrade Lasso from `2024.8.24.1` to `2024.10.14.1`.
- Upgrade Lasso from `2024.8.24.1` to `2024.10.23.1`.
- Upgrade from .NET 6 to .NET 8.
- Disable trimmed version when publishing AzureAuth.

## [0.8.6] - 2024-04-25
### Changed
Expand Down
2 changes: 1 addition & 1 deletion bin/win/publish.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if exist %~dp0\dist (
rmdir /S /Q %~dp0\dist
)

CALL %~dp0\dotnet.cmd publish %~dp0\..\..\src\AzureAuth\AzureAuth.csproj --self-contained true -r win10-x64 -c release -o %~dp0\..\..\dist %*
CALL %~dp0\dotnet.cmd publish %~dp0\..\..\src\AzureAuth\AzureAuth.csproj --self-contained true -r win-x64 -c release -o %~dp0\..\..\dist %*
reillysiemens marked this conversation as resolved.
Show resolved Hide resolved
15 changes: 4 additions & 11 deletions src/AdoPat.Test/AdoPat.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>

<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>

<!-- Stylecop warnings as errors flag for build to fail -->
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
Expand All @@ -24,10 +19,8 @@
<PackageReference Include="coverlet.collector" Version="3.1.2" />
<PackageReference Include="Moq" Version="4.18.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\TestHelper\TestHelper.csproj" />
<ProjectReference Include="..\AdoPat\AdoPat.csproj" />
</ItemGroup>

</Project>
</Project>
14 changes: 5 additions & 9 deletions src/AdoPat/AdoPat.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>Microsoft.Authentication.AdoPat</PackageId>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<RootNamespace>Microsoft.Authentication.AdoPat</RootNamespace>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.4" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.61.3" />
<PackageReference Include="Microsoft.VisualStudio.Services.Client" Version="19.239.0-preview" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />

<!-- Transitive dependencies of Microsoft.VisualStudio.Services.Client temporarily pinned for security reasons. -->
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.2" />
</ItemGroup>

</Project>
</Project>
14 changes: 4 additions & 10 deletions src/AzureAuth.Test/AzureAuth.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<PackageId>Microsoft.Authentication.AzureAuth.Test</PackageId>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
<Compile Include="..\stylecop\GlobalSuppressions.Test.cs" Link="GlobalSuppressions.Test.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.3" />
Expand All @@ -26,10 +22,8 @@
<PackageReference Include="System.IO.Abstractions.TestingHelpers" Version="7.0.7" />
<PackageReference Include="Moq" Version="4.17.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AzureAuth\AzureAuth.csproj" />
<ProjectReference Include="..\TestHelper\TestHelper.csproj" />
</ItemGroup>

</Project>
</Project>
19 changes: 5 additions & 14 deletions src/AzureAuth/AzureAuth.csproj
Original file line number Diff line number Diff line change
@@ -1,50 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<DefineConstants>PlatformWindows</DefineConstants>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>

<!-- Release configuration -->
<!-- Release configuration -->
<PropertyGroup Condition="'$(Configuration)'=='release'">
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>
<PublishTrimmed>true</PublishTrimmed>
<PublishTrimmed>false</PublishTrimmed>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<!-- Output an executable -->
<PackageId>microsoft.authentication.azureauth</PackageId>
<OutputType>Exe</OutputType>
<AssemblyName>azureauth</AssemblyName>
<RootNamespace>Microsoft.Authentication.AzureAuth</RootNamespace>

<NuspecFile>AzureAuth.nuspec</NuspecFile>
<NuspecProperties>$(NuspecProperties);Configuration=$(Configuration);Version=$(Version)$(VersionSuffix)</NuspecProperties>

<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<!-- Stylecop required items -->
<AdditionalFiles Include="..\stylecop\stylecop.json" Link="stylecop.json" />
<Compile Include="..\stylecop\GlobalSuppressions.cs" Link="GlobalSuppressions.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Office.Lasso" Version="2024.10.14.1" />
<PackageReference Include="Microsoft.Office.Lasso" Version="2024.10.23.1" />
<PackageReference Include="Tomlyn" Version="0.11.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\MSALWrapper\MSALWrapper.csproj" />
<ProjectReference Include="..\AdoPat\AdoPat.csproj" />
</ItemGroup>

<!-- Assemblies we need to manually mark as roots so they are not trimmed. -->
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<!-- Needed for Web mode on Windows -->
<TrimmerRootAssembly Include="System.Private.CoreLib" />
</ItemGroup>
</Project>
</Project>
Loading
Loading