From 47e0999778b9f5a13ca9efe60c4ae0ee67b5196a Mon Sep 17 00:00:00 2001 From: Isaiah Williams Date: Mon, 2 Mar 2020 08:37:17 -0600 Subject: [PATCH] Updating the MSAL extension (#283) --- CHANGELOG.md | 7 ++ azure-pipelines.yml | 92 +++++++++---------- src/PowerShell/PartnerCenter.psd1 | 10 +- src/PowerShell/PartnerCenter.psm1 | 2 +- src/PowerShell/PowerShell.csproj | 4 +- .../Utilities/PersistentTokenCache.cs | 3 +- 6 files changed, 60 insertions(+), 58 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 986ee54..f4fd024 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,13 @@ # Change Log +## 3.0.8 - March 2019 + +* Authentication + * Addressed issue [#266](https://github.com/microsoft/Partner-Center-PowerShell/issues/266) that was impacting the presistent token cache on Linux when libsecret was not installed +* Devices + * Addressed issue [#281](https://github.com/microsoft/Partner-Center-PowerShell/issues/281) that was causing the incorrect output for the creation date of a device batch + ## 3.0.7 - February 2020 * Devices diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2607ac1..2edac40 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,52 +86,52 @@ steps: installationPath: $(Agent.ToolsDirectory)/dotnet condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) -- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 - displayName: 'ESRP code signing' - inputs: - ConnectedServiceName: 'esrp-partner-center-powershell' - FolderPath: 'artifacts\$(buildConfiguration)' - Pattern: 'Microsoft.Store.PartnerCenter.dll,Microsoft.Store.PartnerCenter.PowerShell.dll,Microsoft.Azure.Management.*.dll,Microsoft.Graph.*.dll,*.ps1xml,*.psd1, *.psm1' - signConfigType: inlineSignParams - inlineOperation: | - [ - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolSign", - "parameters": [ - { - "parameterName": "OpusName", - "parameterValue": "Microsoft" - }, - { - "parameterName": "OpusInfo", - "parameterValue": "http://www.microsoft.com" - }, - { - "parameterName": "FileDigest", - "parameterValue": "/fd \"SHA256\"" - }, - { - "parameterName": "PageHash", - "parameterValue": "/NPH" - }, - { - "parameterName": "TimeStamp", - "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" - } - ], - "toolName": "sign", - "toolVersion": "1.0" - }, - { - "keyCode": "CP-230012", - "operationSetCode": "SigntoolVerify", - "parameters": [ ], - "toolName": "sign", - "toolVersion": "1.0" - } - ] - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) +#- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 +# displayName: 'ESRP code signing' +# inputs: +# ConnectedServiceName: 'esrp-partner-center-powershell' +# FolderPath: 'artifacts\$(buildConfiguration)' +# Pattern: 'Microsoft.Store.PartnerCenter.dll,Microsoft.Store.PartnerCenter.PowerShell.dll,Microsoft.Azure.Management.*.dll,Microsoft.Graph.*.dll,*.ps1xml,*.psd1, *.psm1' +# signConfigType: inlineSignParams +# inlineOperation: | +# [ +# { +# "keyCode": "CP-230012", +# "operationSetCode": "SigntoolSign", +# "parameters": [ +# { +# "parameterName": "OpusName", +# "parameterValue": "Microsoft" +# }, +# { +# "parameterName": "OpusInfo", +# "parameterValue": "http://www.microsoft.com" +# }, +# { +# "parameterName": "FileDigest", +# "parameterValue": "/fd \"SHA256\"" +# }, +# { +# "parameterName": "PageHash", +# "parameterValue": "/NPH" +# }, +# { +# "parameterName": "TimeStamp", +# "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" +# } +# ], +# "toolName": "sign", +# "toolVersion": "1.0" +# }, +# { +# "keyCode": "CP-230012", +# "operationSetCode": "SigntoolVerify", +# "parameters": [ ], +# "toolName": "sign", +# "toolVersion": "1.0" +# } +# ] +# condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['Build.SourceBranch'], 'refs/heads/master')) - task: DeleteFiles@1 displayName: Delete the code sign summary file diff --git a/src/PowerShell/PartnerCenter.psd1 b/src/PowerShell/PartnerCenter.psd1 index 018e5c0..f327ffd 100644 --- a/src/PowerShell/PartnerCenter.psd1 +++ b/src/PowerShell/PartnerCenter.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 02/13/2010 +# Generated on: 03/06/2020 # @{ @@ -11,7 +11,7 @@ RootModule = 'PartnerCenter.psm1' # Version number of this module. - ModuleVersion = '3.0.7' + ModuleVersion = '3.0.8' # Supported PSEditions CompatiblePSEditions = 'Core', 'Desktop' @@ -61,13 +61,7 @@ '.\Microsoft.Graph.Core.dll', '.\Microsoft.Extensions.Caching.Abstractions.dll', '.\Microsoft.Extensions.Caching.Memory.dll', - '.\Microsoft.Extensions.Configuration.Abstractions.dll', - '.\Microsoft.Extensions.Configuration.Binder.dll', - '.\Microsoft.Extensions.Configuration.dll', - '.\Microsoft.Extensions.Configuration.EnvironmentVariables.dll', '.\Microsoft.Extensions.DependencyInjection.Abstractions.dll', - '.\Microsoft.Extensions.Logging.Abstractions.dll', - '.\Microsoft.Extensions.Logging.dll', '.\Microsoft.Extensions.Options.dll', '.\Microsoft.Extensions.Primitives.dll', '.\Microsoft.Identity.Client.dll', diff --git a/src/PowerShell/PartnerCenter.psm1 b/src/PowerShell/PartnerCenter.psm1 index 7b8cc64..5460ef9 100644 --- a/src/PowerShell/PartnerCenter.psm1 +++ b/src/PowerShell/PartnerCenter.psm1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 01/22/2020 +# Generated on: 03/06/2020 # $PSDefaultParameterValues.Clear() diff --git a/src/PowerShell/PowerShell.csproj b/src/PowerShell/PowerShell.csproj index a8c97c4..c5f6529 100644 --- a/src/PowerShell/PowerShell.csproj +++ b/src/PowerShell/PowerShell.csproj @@ -18,7 +18,7 @@ false $(RepoArtifacts)$(Configuration)\ $(OutputPath) - 3.0.7 + 3.0.8 latest MIT @@ -32,7 +32,7 @@ - + diff --git a/src/PowerShell/Utilities/PersistentTokenCache.cs b/src/PowerShell/Utilities/PersistentTokenCache.cs index a359524..b6bfa05 100644 --- a/src/PowerShell/Utilities/PersistentTokenCache.cs +++ b/src/PowerShell/Utilities/PersistentTokenCache.cs @@ -5,6 +5,7 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Utilities { using System; using System.Collections.Generic; + using System.Diagnostics; using System.IO; using Identity.Client; using Identity.Client.Extensions.Msal; @@ -154,7 +155,7 @@ namespace Microsoft.Store.PartnerCenter.PowerShell.Utilities attribute1: new KeyValuePair("MsalClientID", "Microsoft.Developer.IdentityService"), attribute2: new KeyValuePair("MsalClientVersion", "1.0.0.0")); - return new MsalCacheStorage(builder.Build()); + return MsalCacheStorage.Create(builder.Build(), new TraceSource("Partner Center PowerShell")); } } } \ No newline at end of file