Commit d901df4
CD: migrate nupkg signing from PFX to GCP KMS via Jsign
PR #57 + #58 shipped the binding's net6.0 + arm64/proxy/UA changes,
but the next CD dispatch failed at the signing step: the PFX
certificate stored in BASE64_PFX_CONTENT expired on 2026-03-29
(error NU3018 NotTimeValid).
Migrating to the same KMS-backed signing pattern the C# SDK adopted
in PR #704 (browserstack/browserstack-csharp-sdk, merged 2026-03-31).
Same KMS key, same Sectigo cert, same tool chain — only the artifact
path differs.
Why Jsign rather than `nuget sign -CertificateFingerprint`:
- Microsoft hard-blocks CNG keys for `dotnet nuget sign` (NU3001
Scenario 6: https://learn.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu3001).
- `signtool.exe` (which does support KMS via CSP) cannot sign .nupkg.
- Jsign 7.0 is the only tool that supports both nupkg and Google
Cloud KMS natively.
Changes
- New `comodo_signing_cert.crt` at repo root — public Sectigo cert
(same bytes as browserstack-binary/scripts/ and csharp-sdk repo).
- New `scripts/sign_nupkg.sh` — exchanges SA creds for an OAuth
access token via google-auth, downloads + SHA-256-verifies Jsign,
signs each nupkg with `--storetype GOOGLECLOUD` and TSA
http://timestamp.sectigo.com.
- `.github/workflows/cd.yml`:
- Removed: `Setup nuget` (nuget/setup-nuget@v1), `Create PFX
certificate`, `Sign Nuget Package` (the PFX/nuget-sign one).
- Added: `Setup GCP credentials` (printf, not echo — `echo` on
Windows Git Bash corrupts multiline JSON), `Install google-auth`,
`Setup Java 17` (Temurin), `Sign Nuget Package` (the jsign one),
`Cleanup credentials` with `if: always()`.
- `Push package to Nuget Repository`: `nuget push` -> `dotnet nuget
push` (since the nuget.exe action was removed; dotnet nuget push
ships with the SDK already on the runner).
GitHub Secrets required before this branch ships:
- ADD: `GCP_SA_KEY` (raw JSON from Vault
/master/bigquery/service_account/local/windows_codesign/cert_file_json)
- REMOVE after one green run (separate cleanup PR):
`BASE64_PFX_CONTENT`, `CERT_PASSWORD`.
Tracks LOC-6563. References browserstack-csharp-sdk#704.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 085ce6a commit d901df4
3 files changed
Lines changed: 83 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
35 | 53 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
59 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments