Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Setting Up Windows Credentials

To sign Windows executables with Azure Trusted Signing, you need six credentials. All are set as environment variables (or in .env).

1. Azure AD tenant

Register an Azure AD application for Trusted Signing.

CredentialEnv varWhere to find it
Tenant IDAZURE_TENANT_IDAzure Portal > Azure Active Directory > Overview > Tenant ID
Client IDAZURE_CLIENT_IDAzure Portal > App registrations > your app > Application (client) ID
Client SecretAZURE_CLIENT_SECRETAzure Portal > App registrations > your app > Certificates & secrets > New client secret

2. Trusted Signing account

Create a Trusted Signing account and certificate profile in the Azure Portal.

CredentialEnv varWhere to find it
EndpointAZURE_SIGNING_ENDPOINTAzure Portal > Trusted Signing > your account > Overview > Endpoint
Account nameAZURE_SIGNING_ACCOUNT_NAMEThe name you chose when creating the Trusted Signing account
Certificate profileAZURE_SIGNING_CERT_PROFILEAzure Portal > Trusted Signing > Certificate profiles > profile name

3. Tools

On the CI runner (Windows):

  • signtool.exe — part of the Windows SDK. Usually available on windows-latest GitHub runners.
  • Azure.CodeSigning.Dlib.dll — install with cargo codesign windows --install-tools or manually via nuget install Microsoft.Trusted.Signing.Client.

Verify

After setting all six variables, run:

cargo codesign status