Skip to content

Keep GitHub App private keys in Key Vault - #9978

Merged
JoeRobich merged 8 commits into
dotnet:mainfrom
missymessa:users/mjanecke/12467-keyvault-signing-main
Nov 20, 2026
Merged

JoeRobich merged 8 commits into
dotnet:mainfrom
missymessa:users/mjanecke/12467-keyvault-signing-main

Conversation

@missymessa

@missymessa missymessa commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Intent

Keep GitHub App private keys in Key Vault while the VS Code localization and release pipelines use workload identity federation and short-lived installation tokens. The helper reads the App ID through the configured secret name and asks Key Vault to sign the JWT digest; it never retrieves the private key and has no local PEM-signing or PAT fallback. The main release pipeline keeps its helper inline because it uses checkout: none.

The ReleaseTags signing key was provisioned in EngKeyVault following the reviewed OneLoc pattern. Arcade #17820 tracks its declaration in the Secret Manager manifest and remains open. The key was validated separately because secret-manager synchronize --verify-only skips manifest.keys.

Validation

  • CI build 1690673 passed 22/22 checks on the earlier b83f73d head. CI for the pagination fix is pending.

  • Protected OneLocInline canary 3140832 and ReleaseTags canary 3140920 passed on the earlier helper. They verified Key Vault signing and installation-token paths; mocked regression tests passed 112/112. These were not exact-head runs of the pagination fix.

  • Release pipeline test-mode run 3140987 used real-signed prerelease build 3133732. It verified the Marketplace credential, printed dry-run publish commands for all eight VSIXs, and minted the ReleaseTags installation token; publishing and tag creation were skipped. The run was partially succeeded only because of the expected non-blocking warning about running from a non-production branch.

  • Preview-only compilation passed for localization definition 1275 and release definition 1271. It does not validate runtime access.

  • Secret Manager verify-only passed for all 13 manifest secrets; signing-key presence was verified separately through read-only Key Vault metadata.

  • Local Pester: 5/5 realistic installation-response tests and 14/14 existing signing/error regressions passed against the pagination fix.

Remaining gates

  • Current-head CI and required human re-review.
  • Merge Arcade #17820, which tracks the ReleaseTags signing-key manifest declaration.
  • Post-merge: verify the first main/scheduled localization run mints the OneLoc token through Key Vault signing and opens its localization PR. The localization pipeline runs only on main and always creates a PR, so there is no non-mutating pre-merge run.

Tracking: https://dev.azure.com/dnceng/internal/_workitems/edit/12467

missymessa and others added 4 commits November 12, 2026 10:10
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
Use az rest for the configured App-ID projection and remove the temporary committed regression suite. Keep RSA signing in Key Vault.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f29c08e-f8a7-4acf-9ce1-2db3460d9cc5
@missymessa
missymessa marked this pull request as ready for review November 19, 2026 20:12
@missymessa
missymessa requested a review from a team as a code owner November 19, 2026 20:12
Copilot AI balanced review requested due to automatic review settings November 19, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The installation response is wrapped in a nested array, prematurely stopping pagination and potentially producing a token URL with multiple installation IDs instead of the requested owner’s ID.

1 open issue
What changed in this PR

Moves GitHub App JWT signing for the C# extension’s localization and release pipelines into Azure Key Vault, keeping private keys off build agents.

Changes:

  • Replaces private-key secret parameters with Key Vault signing-key names.
  • Reads the App ID through Azure CLI and requests remote RS256 signing of the JWT digest.
  • Adds paginated installation lookup and requires exactly one matching owner.
File Description
azure-pipelines/​release.yml Configures the ReleaseTags signing-key name.
azure-pipelines/​loc.yml Configures the OneLoc signing-key name.
azure-pipelines/​get-github-app-token.yml Replaces local PEM signing with Key Vault signing and updates installation lookup.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 19, 2026 23:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The installation lookup nests the REST response array, prematurely stopping pagination and potentially requesting a token with multiple installation IDs instead of the requested owner’s ID.

2 open issues

Review effort: Balanced

Treat the REST response as the installation array and count its individual entries so pagination and owner selection work correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8f29c08e-f8a7-4acf-9ce1-2db3460d9cc5
Copilot AI balanced review requested due to automatic review settings November 19, 2026 23:55
@missymessa

Copy link
Copy Markdown
Member Author

@JoeRobich, the installation lookup feedback is addressed in 16afcea; could you please re-review the pagination fix? The realistic response-shape regressions passed locally, and current-head CI is running. @copilot, please re-review as well.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Signing depends on external Key Vault keys/RBAC and the still-open Arcade #17820 change, while exact-head pipeline and post-merge localization validation remain unverified and require human operational review.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@missymessa

Copy link
Copy Markdown
Member Author

@JoeRobich can you merge too, please :)

@JoeRobich
JoeRobich merged commit 4b45e6a into dotnet:main Nov 20, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants