Windows MSI signing¶
The Windows desktop installer is Authenticode-signed with Azure Trusted Signing on the
windows-latest leg of build-desktop-app-installers.yml. Background:
Windows MSI signing with Azure Trusted Signing.
Pipeline¶
:desktop-app:packageMsibuilds the.msi.Sign Windows MSIrunsscripts/ci/sign-windows-msi.shon it:- downloads the pinned jsign jar and checks its SHA-256;
- requests an Entra ID token for scope
https://codesigning.azure.net/.defaultwith the client-credentials grant; - runs
jsign --storetype TRUSTEDSIGNING --keystore <region>.codesigning.azure.net --alias <account>/<profile>with an RFC 3161 timestamp fromhttp://timestamp.acs.microsoft.com; - writes
signed=trueorsigned=falseto the step output. Verify Windows MSI signatureruns only whensigned=true. It fails unlessGet-AuthenticodeSignaturereportsValidand a timestamp.Stage installercopies the signed file toAutoMobile-<version>-windows.msi.
The client secret reaches curl on stdin (client_secret@-). The token is masked and reaches jsign as
--storepass env:TRUSTED_SIGNING_TOKEN, so neither appears on a command line.
Secrets¶
prepare-release.yml forwards these repository secrets. All six are optional in the reusable
workflow:
| Secret | Value |
|---|---|
AZURE_TENANT_ID |
Entra ID tenant of the service principal |
AZURE_CLIENT_ID |
Service principal application (client) ID |
AZURE_CLIENT_SECRET |
Service principal client secret |
TRUSTED_SIGNING_ENDPOINT |
Account endpoint, https://<region>.codesigning.azure.net |
TRUSTED_SIGNING_ACCOUNT |
Trusted Signing account name |
TRUSTED_SIGNING_PROFILE |
Certificate profile name |
| Secrets set | Result |
|---|---|
| None | Warning annotation; the MSI ships unsigned. |
| Some | The step exits 2 and names the missing secrets. |
| All | The MSI is signed, then verified. |
Setup¶
- In Azure, create a Trusted Signing account and complete identity validation (individual or organization).
- Create a Public Trust certificate profile on the account.
- Create an app registration (service principal) with a client secret. On the account, give
it the
Trusted Signing Certificate Profile Signerrole. - Add the six secrets above to the repository.
- Run
prepare-release.yml. Check that the Windows leg logsSigned ... with Azure Trusted Signing profileand thatVerify Windows MSI signaturepasses. Install the MSI on Windows and check that the UAC prompt shows the validated publisher.
Renewal¶
Trusted Signing issues short-lived certificates per signature, and the RFC 3161 timestamp keeps
signed MSIs valid after a certificate expires, so there is no certificate to renew. Rotate
AZURE_CLIENT_SECRET before the app registration secret expires. Identity validation is
renewed in the Azure portal when Azure asks for it.
Limits¶
Only the outer .msi is signed. The jpackage launcher .exe and bundled runtime inside it are
not. SmartScreen reputation builds from install telemetry after release.