Edit

Invoke-AzArtifactSigningCIPolicySigning

Invoke CI Policy signing to Azure.ArtifactSigning

Syntax

ByAccountProfileNameParameterSet (Default)

Invoke-AzArtifactSigningCIPolicySigning
    [-AccountName] <String>
    [-ProfileName] <String>
    [-EndpointUrl] <String>
    [-Path] <String>
    -Destination <String>
    [-TimeStamperUrl <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

ByMetadataFileParameterSet

Invoke-AzArtifactSigningCIPolicySigning
    [-MetadataFilePath] <String>
    [-Path] <String>
    -Destination <String>
    [-TimeStamperUrl <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Invoke-AzArtifactSigningCIPolicySigning 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-AzArtifactSigningCIPolicySigning -AccountName 'contoso' -ProfileName 'contososigning' -EndpointUrl 'https://wus.artifactsigning.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-AzArtifactSigningCIPolicySigning  -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 ArtifactSigning AccountName used to sign CI policy.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAccountProfileNameParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Destination

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-EndpointUrl

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAccountProfileNameParameterSet
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-MetadataFilePath

Specifies Azure ArtifactSigning 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.artifactsigning.azure.net/", "ArtifactSigningAccountName": "acstest", "CertificateProfileName": "acstestCert1" }

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByMetadataFileParameterSet
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Path

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ProfileName

Specifies Azure ArtifactSigning ProfileName used to sign CI policy.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByAccountProfileNameParameterSet
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TimeStamperUrl

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Azure ArtifactSigning AccountName

Azure ArtifactSigning Profile Name

Azure ArtifactSigning Signing EndpointUrl

Azure ArtifactSigning UnSigned CI Policy File Path

Azure ArtifactSigning Signed CI Policy File Path Destination

String

Outputs

Signed CI Policy file