Skip to content

Migrate Windows code signing to Azure Trusted Signing#2910

Merged
kmosher merged 1 commit intomasterfrom
kmosher/trusted-signing
Apr 10, 2026
Merged

Migrate Windows code signing to Azure Trusted Signing#2910
kmosher merged 1 commit intomasterfrom
kmosher/trusted-signing

Conversation

@kmosher
Copy link
Copy Markdown
Contributor

@kmosher kmosher commented Apr 9, 2026

Summary

Migrates Windows binary signing from Azure Key Vault (jsign --storetype AZUREKEYVAULT) to Azure Trusted Signing. The previous AKV code-signing cert expired, breaking the release pipeline. Trusted Signing issues short-lived Microsoft-managed certs so there's nothing to rotate.

  • Makefile / scripts/crossbuild.mk: bump jsign 6.0 → 7.4, switch --storetype to TRUSTEDSIGNING, use the https://codesigning.azure.net token audience, derive the keystore host from AZURE_SIGNING_ACCOUNT_ENDPOINT, pass account/profile via --alias, update the SKIP_SIGNING guard and error message.
  • .github/workflows/{build,release,prerelease,build_provider}.yml: replace the AZURE_SIGNING_KEY_VAULT_URI env passthrough with the three new AZURE_SIGNING_ACCOUNT_* outputs and update the SKIP_SIGNING expression.

Companion to pulumi/ci-mgmt#2126, pulumi/pulumi-command#1200, and pulumi/pulumi-provider-boilerplate#1236. The ESC environment already exposes the new variables and the signing SP has the Artifact Signing Certificate Profile Signer role on the pulumi-code-signing/pulumi-code-signing profile. Verified end-to-end against pulumi-command, pulumi-random, and pulumi-provider-boilerplate.

Test plan

  • CI release build produces a Windows binary with a valid Trusted Signing certificate chain

The Azure Key Vault code-signing cert previously used by jsign expired,
breaking the Windows binary signing step. Switch to Azure Trusted Signing
(Microsoft-managed short-lived certs) so we stop having to rotate certs.

- Bump jsign 6.0 -> 7.4.
- Swap --storetype AZUREKEYVAULT for TRUSTEDSIGNING.
- Use https://codesigning.azure.net token audience.
- Derive the keystore host from AZURE_SIGNING_ACCOUNT_ENDPOINT and
  pass account/profile via --alias.
- Replace AZURE_SIGNING_KEY_VAULT_URI with AZURE_SIGNING_ACCOUNT_ENDPOINT,
  AZURE_SIGNING_ACCOUNT_NAME, and AZURE_SIGNING_CERT_PROFILE_NAME in the
  Makefile guard and in the release/prerelease/build workflow env passthrough.

The ESC environment already exposes the new variables and the signing
service principal has the "Artifact Signing Certificate Profile Signer"
role on pulumi-code-signing/pulumi-code-signing. Companion to
pulumi/ci-mgmt#2126.
@kmosher kmosher added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@kmosher kmosher requested a review from pose April 9, 2026 23:45
@kmosher kmosher marked this pull request as ready for review April 9, 2026 23:45
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: Migrate Windows code signing to Azure Trusted Signing

The migration from AZUREKEYVAULT to TRUSTEDSIGNING looks correct. I verified all four files that previously referenced AZURE_SIGNING_KEY_VAULT_URI on the base branch and all are updated in this PR.

What I checked

Makefile logic:

  • Token audience correctly changed to (codesigning.azure.net/redacted)
  • Endpoint host stripping (${ENDPOINT_HOST#https://} etc.) is robust — handles https://, (redacted) and trailing slash correctly before passing to --keystore`
  • --alias "${AZURE_SIGNING_ACCOUNT_NAME}/${AZURE_SIGNING_CERT_PROFILE_NAME}" matches the jsign 7.x TRUSTEDSIGNING format
  • SKIP_SIGNING guard in the Makefile (the || pattern) still correctly catches partial configurations and fails CI fast

GitHub Actions workflows (build/prerelease/release):

  • Three new env vars replace the single old one consistently across all three workflows
  • SKIP_SIGNING expression: && across all six vars (all empty → skip) is correct semantics — if any signing var is present but others are absent, SKIP_SIGNING=false and the Makefile guard catches the misconfiguration and exits 1 in CI

Scope check:

  • build_provider.yml referenced in the PR description doesn't exist in this repo; all four files that contained the old var have been updated
  • scripts/crossbuild.mk also doesn't exist here (those changes live in the companion repos)

Minor observations (non-blocking)

  • The downloaded jsign JAR (wget) has no hash verification — same as the previous jsign 6.0 target, so not a regression introduced here
  • az account get-access-token doesn't pass --output none (unlike az login), but the output is piped to jq so it has no impact on correctness

Reviewed by Internal Trusted PR Reviewer

To install this agentic workflow, run

gh aw add pulumi-labs/gh-aw-internal/.github/workflows/gh-aw-pr-review.md@99a309bf18258dbae98c8176ea10657e0b08deca

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.99%. Comparing base (856b614) to head (7e1612e).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2910   +/-   ##
=======================================
  Coverage   53.99%   53.99%           
=======================================
  Files          52       52           
  Lines        6439     6439           
=======================================
  Hits         3477     3477           
  Misses       2674     2674           
  Partials      288      288           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kmosher kmosher merged commit cff1aa2 into master Apr 10, 2026
26 checks passed
@kmosher kmosher deleted the kmosher/trusted-signing branch April 10, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact/no-changelog-required This issue doesn't require a CHANGELOG update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants