Build system integration


This section describes how SignPath can be integrated into automated builds using continuous integration software. You can use the PowerShell module provided by SignPath, or directly call the Web API to submit signing requests.

All necessary IDs can be found on the signing policy details page, including a sample call for the PowerShell module.


Before accessing the API, you have to create a CI User in the User section of the SignPath application. Make sure to keep the access token in a secure location.


SignPath can be integrated in your automated build process by using our API. For convenience, we provide a PowerShell module that can be used from within your build/deploy chain. The module can be installed from the PowerShell Gallery.

A signing request can be created by calling one of the following following commands via PowerShell:

Install-Module -Name SignPath
# submits a signing request and returns a SigningRequestId 
# without waiting for the signing request to be done
    -CIUserToken <CI_USER_TOKEN>
    -OrganizationId <YOUR_ORGANIZATION_ID>
    -CertificateConfigurationId <CERTIFICATE_CONFIGURATION_ID>
    -InputArtifactPath <PATH_TO_INPUT_ARTIFACT>
# downloads a signed artifact
    -CIUserToken <CI_USER_TOKEN>
    -OrganizationId <YOUR_ORGANIZATION_ID>
    -SigningRequestId <SIGNING_REQUEST_ID>
    -OutputArtifactPath <PATH_TO_OUTPUT_ARTIFACT>
# submits a signing request and blocks until it is done
    -CIUserToken <CI_USER_TOKEN>
    -OrganizationId <YOUR_ORGANIZATION_ID>
    -CertificateConfigurationId <CERTIFICATE_CONFIGURATION_ID>
    -InputArtifactPath <PATH_TO_INPUT_ARTIFACT>
    -OutputArtifactPath <PATH_TO_OUTPUT_ARTIFACT>


In case the PowerShell module is not sufficient, you can communicate directly with our API by calling our public HTTP REST endpoints.


The automatically created CI User token can be used to interact with the API by setting the respective HTTP Header:

Authorization: Bearer <CI_USER_TOKEN>

Submitting a Signing Request

You can create a Signing Request by calling the API, providing the following arguments:

    - the signing policy for which you want to create the Signing Request.
    - the Id of your organization

The server expects the HTTP POST request to be of the type multipart/form-data (denoted by the -F switch in curl).

    -H "Authorization: Bearer <CI_USER_TOKEN>" 
    -F "SigningPolicyId=<SIGNING_POLICY_ID> 
    -F Artifact=@<PATH_TO_ARTIFACT> 
    -F "Description=called by curl"<ORGANIZATION_ID>/SigningRequests

If the creation is successful, the API returns status code 201. Additionally, a HTTP Response Header Location is returned with the URL of the created entity.

Checking the Status of a Signing Request

The current status of a SigningRequest can be retrieved by calling the API and providing the following arguments:

    - the URL is returned in the Location header of the HTTP response when a SigningRequest is created (e.g. to
    -H "Authorization: Bearer <CI_USER_TOKEN>" 

The HTTP GET request will then return the status of the Signing Request in JSON format:

    "description":"called by curl",
    "projectName":"SignPath Test Project",

Downloading the signed artifact

Once the Signing Request has been successfully completed, the status response contains a signedArtifactLink field with a link to the signed artifact file. It can easily be retrieved by issuing the following command:

    - the path where the signed artifact should be stored
    - link retrieved from status request
    -H "Authorization: Bearer <CI_USER_TOKEN>" 

Last modified: 19. Dezember 2018