Skip to content

Commit

Permalink
fix: add CodeSigningAccountName as required prop in Azure Signing O…
Browse files Browse the repository at this point in the history
…ptions (#8533)

Ref: #8276 (comment)
  • Loading branch information
mmaietta authored Sep 24, 2024
1 parent eaf274d commit cc8c70f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/real-otters-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix: add `CodeSigningAccountName` as required prop in Azure Signing Options
5 changes: 5 additions & 0 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -5977,13 +5977,18 @@
"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"
}
},
"required": [
"certificateProfileName",
"codeSigningAccountName",
"endpoint"
],
"type": "object"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions packages/app-builder-lib/src/options/winOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`
*/
Expand Down
1 change: 1 addition & 0 deletions test/src/windows/winCodeSignTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ test.ifAll.ifNotCiMac(
azureSignOptions: {
endpoint: "https://weu.codesigning.azure.net/",
certificateProfileName: "profilenamehere",
codeSigningAccountName: "codesigningnamehere"
},
},
},
Expand Down

0 comments on commit cc8c70f

Please sign in to comment.