Invoke-AzCodeSigningCIPolicySigning

Invoke CI Policy signing to Azure.CodeSigning

Syntax

Invoke-AzCodeSigningCIPolicySigning
      [-AccountName] <String>
      [-ProfileName] <String>
      -EndpointUrl <String>
      -MetadataFilePath <String>
      -Path <String>
      -Destination <String>
      -TimeStamperUrl <String>

Description

The Invoke-AzCodeSigningCIPolicySigning cmdlet signs the CI Policy bin file. Use this cmdlet to sign a CI Policy bin file. There are two sets of parameters. One set uses AccountName, ProfileName, and EndpointUrl. Another set uses MetadataFilePath. Path is the original unsigned CI Policy file path. Destination is the signing CI Policy file path, which includes file name. TimeStamperUrl is optional, but it's strongly recommended to do TimeStamping along with Signing.

Examples

Example 1: Sign a CI Policy .bin file by account and profile name

Invoke-AzCodeSigningCIPolicySigning -AccountName 'contoso' -ProfileName 'contososigning' -EndpointUrl 'https://wus.codesigning.azure.net' -Path 'c:\cisigning\contosocipolicy.bin' -Destination 'c:\cisigning\signed_contosocipolicy.bin' -TimeStamperUrl 'http://timestamp.acs.microsoft.com'

CI Policy is successfully signed. c:\cisigning\signed_contosocipolicy.bin

This command signs a CI policy by account and profile, it also timestamps the signature using the timestamp url provided.

Example 2: Sign a CI Policy .bin file by metadata file configuration

Invoke-AzCodeSigningCIPolicySigning  -MetadataFilePath 'c:\cisigning\metadata_input.json' -Path 'c:\cisigning\contosocipolicy.bin' -Destination 'c:\cisigning\signed_contosocipolicy.bin' -TimeStamperUrl 'http://timestamp.acs.microsoft.com'

CI Policy is successfully signed. c:\cisigning\signed_contosocipolicy.bin

This command signs a CI policy by the metadata configuration, it also timestamps the signature using the timestamp url provided.

Parameters

-AccountName

Specifies Azure CodeSigning AccountName used to sign CI policy.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Destination

Specifies the signed CI policy file path. The signed CI policy file extension is .bin.

Type:String
Position:5
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-EndpointUrl

Specifies Azure CodeSigning Endpoint used to sign CI policy. It's an Url, format is https://xxx.codesigning.azure.net

Type:String
Position:3
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MetadataFilePath

Specifies Azure CodeSigning Metadata file path used to sign CI policy. It's a file path, and the metadata content is below. File content example: { "Endpoint": "https://xxx.codesigning.azure.net/", "CodeSigningAccountName": "acstest", "CertificateProfileName": "acstestCert1" }

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Path

Specifies the original unsigned CI policy file path. The CI policy file extension is .bin, not xml.

Type:String
Position:4
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ProfileName

Specifies Azure CodeSigning ProfileName used to sign CI policy.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TimeStamperUrl

Specifies Azure CodeSigning TimeStamper Url used to sign CI policy. The format is Url, recommended timestamper is http://timestamp.acs.microsoft.com.

Type:String
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Azure CodeSigning AccountName

Azure CodeSigning Profile Name

Azure CodeSigning Signing EndpointUrl

Azure CodeSigning UnSigned CI Policy File Path

Azure CodeSigning Signed CI Policy File Path Destination

String

Outputs

Signed CI Policy file