How to use Azure Trusted Signing in Azure Pipelines? I am getting a timeout error.

Tam Le 5 Reputation points
2024-09-04T00:57:07.4933333+00:00

I am using Trusted Signing using this command in Pipelines: Invoke-TrustedSigning -Endpoint https://eus.codesigning.azure.net -CodeSigningAccountName aaa -CertificateProfileName aaa-app -FilesFolder D:\... -FilesFolderFilter exe -FileDigest SHA256 -TimestampRfc3161 'http://timestamp.acs.microsoft.com' -TimestampDigest SHA256

There is only one exe to sign.

I am getting this error:

Submitting digest for signing...
The Trusted Signing service could not finish the request within the allotted time of 300 seconds. This may happen if you are signing a large number of files. You can try to increase the value of the 'Timeout' parameter which is 300 seconds by default.
At C:\Program Files\WindowsPowerShell\Modules\TrustedSigning\0.4.1\SignTool\SignTool.psm1:192 char:9
+         throw $timeoutError
+         ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (The Trusted Sig...nds by default.:String) [], RuntimeException
    + FullyQualifiedErrorId : The Trusted Signing service could not finish the request within the allotted time of 300 seconds. This may happen if you are signing a large number of files. You can try to increase the value of the 'Timeout' parameter which is 300 seconds by default.

I need to use Invoke-TrustedSigning for my electron-builder configuration. I can't use this Pinelines extension with electron-builder: https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.TrustedSigning

I was able to sign using a test Windows VM with the same AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET and Invoke-TrustedSigning

Azure Trusted Signing
Azure Trusted Signing
Trusted Signing is a Microsoft fully managed, end-to-end signing solution that simplifies the certificate signing process and helps partner developers more easily build and distribute applications.
73 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Tam Le 5 Reputation points
    2024-09-04T23:19:26.9866667+00:00

    My fixed my issue. I didn't supply these values correctly: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET and the issue manifested differently in Pipelines vs on a test Windows VM (with intentionally incorrect values)

    1 person found this answer helpful.
    0 comments No comments

  2. Givary-MSFT 32,311 Reputation points Microsoft Employee
    2024-09-09T04:24:42.67+00:00

    @Tam Le I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.

    Issue: I am using Trusted Signing using this command in Pipelines: Invoke-TrustedSigning -Endpoint https://eus.codesigning.azure.net -CodeSigningAccountName aaa -CertificateProfileName aaa-app -FilesFolder D:\... -FilesFolderFilter exe -FileDigest SHA256 -TimestampRfc3161 'http://timestamp.acs.microsoft.com' -TimestampDigest SHA256

    Submitting digest for signing...

    The Trusted Signing service could not finish the request within the allotted time of 300 seconds. This may happen if you are signing a large number of files. You can try to increase the value of the 'Timeout' parameter which is 300 seconds by default.

    At C:\Program Files\WindowsPowerShell\Modules\TrustedSigning\0.4.1\SignTool\SignTool.psm1:192 char:9

    •     throw $timeoutError
      
    •     ~~~~~~~~~~~~~~~~~~~
      
      • CategoryInfo : OperationStopped: (The Trusted Sig...nds by default.:String) [], RuntimeException
      • FullyQualifiedErrorId : The Trusted Signing service could not finish the request within the allotted time of 300 seconds. This may happen if you are signing a large number of files. You can try to increase the value of the 'Timeout' parameter which is 300 seconds by default.

    need to use Invoke-TrustedSigning for my electron-builder configuration. I can't use this Pinelines extension with electron-builder: https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.TrustedSigning

    I was able to sign using a test Windows VM with the same AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET and Invoke-TrustedSigning

    Resolution: Resolved by @Tam Le by following these steps

    I didn't supply these values correctly: AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET and the issue manifested differently in Pipelines vs on a test Windows VM (with intentionally incorrect values)
    If you have any other questions or are still running into more issues, please let me know. Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.