diff --git a/.changeset/real-otters-sparkle.md b/.changeset/real-otters-sparkle.md new file mode 100644 index 00000000000..7771fa42b93 --- /dev/null +++ b/.changeset/real-otters-sparkle.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +fix: add `CodeSigningAccountName` as required prop in Azure Signing Options diff --git a/packages/app-builder-lib/scheme.json b/packages/app-builder-lib/scheme.json index 4663f0e21f5..ea3069a11e0 100644 --- a/packages/app-builder-lib/scheme.json +++ b/packages/app-builder-lib/scheme.json @@ -5977,6 +5977,10 @@ "description": "The Certificate Profile name. Translates to field: CertificateProfileName", "type": "string" }, + "codeSigningAccountName": { + "description": "The Code Signing Signing Account name. Translates to field: CodeSigningAccountName", + "type": "string" + }, "endpoint": { "description": "The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the\nregion your Trusted Signing Account and Certificate Profile you are specifying were created\nin during the setup of these resources.\n\nTranslates to field: Endpoint\n\nRequires one of environment variable configurations for authenticating to Microsoft Entra ID per [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition)", "type": "string" @@ -5984,6 +5988,7 @@ }, "required": [ "certificateProfileName", + "codeSigningAccountName", "endpoint" ], "type": "object" diff --git a/packages/app-builder-lib/src/codeSign/windowsSignAzureManager.ts b/packages/app-builder-lib/src/codeSign/windowsSignAzureManager.ts index 321c72286c7..2c9deaebac2 100644 --- a/packages/app-builder-lib/src/codeSign/windowsSignAzureManager.ts +++ b/packages/app-builder-lib/src/codeSign/windowsSignAzureManager.ts @@ -79,12 +79,13 @@ export class WindowsSignAzureManager { const vm = await this.packager.vm.value const ps = await getPSCmd(vm) - const { endpoint, certificateProfileName, ...extraSigningArgs }: WindowsAzureSigningConfiguration = options.options.azureSignOptions! + const { endpoint, certificateProfileName, codeSigningAccountName, ...extraSigningArgs }: WindowsAzureSigningConfiguration = options.options.azureSignOptions! const params = { FileDigest: "SHA256", ...extraSigningArgs, // allows overriding FileDigest if provided in config Endpoint: endpoint, CertificateProfileName: certificateProfileName, + CodeSigningAccountName: codeSigningAccountName, Files: options.path, } const paramsString = Object.entries(params) diff --git a/packages/app-builder-lib/src/options/winOptions.ts b/packages/app-builder-lib/src/options/winOptions.ts index 8dc049c3545..15db48c5a9c 100644 --- a/packages/app-builder-lib/src/options/winOptions.ts +++ b/packages/app-builder-lib/src/options/winOptions.ts @@ -203,6 +203,10 @@ export interface WindowsAzureSigningConfiguration { * The Certificate Profile name. Translates to field: CertificateProfileName */ readonly certificateProfileName: string + /** + * The Code Signing Signing Account name. Translates to field: CodeSigningAccountName + */ + readonly codeSigningAccountName: string /** * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning` */ diff --git a/test/src/windows/winCodeSignTest.ts b/test/src/windows/winCodeSignTest.ts index 97711a77b2e..c7a76d22324 100644 --- a/test/src/windows/winCodeSignTest.ts +++ b/test/src/windows/winCodeSignTest.ts @@ -123,6 +123,7 @@ test.ifAll.ifNotCiMac( azureSignOptions: { endpoint: "https://weu.codesigning.azure.net/", certificateProfileName: "profilenamehere", + codeSigningAccountName: "codesigningnamehere" }, }, },