Skip to content

[release] Keep GitHub App private keys in Key Vault - #9980

Closed
missymessa wants to merge 3 commits into
dotnet:releasefrom
missymessa:users/mjanecke/12467-keyvault-signing-release
Closed

missymessa wants to merge 3 commits into
dotnet:releasefrom
missymessa:users/mjanecke/12467-keyvault-signing-release

Conversation

@missymessa

@missymessa missymessa commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Intent

Correct the GitHub App migration without moving private keys onto build agents. Keep WIF and short-lived installation tokens, read the configured App-ID secret projection for the JWT issuer, and sign only the SHA-256 digest through Azure Key Vault's RSA Sign operation.

The identifier contract is appIdSecretName / AppIdSecretName (GitHubAppIdSecretName for OneLoc), not a hardcoded App/Client ID in YAML. Only the App-ID projection is read. keyName selects the RSA signing resource; the private-key secret is never retrieved and there is no PEM/local-signing or PAT fallback.

Scope and decisions

Updates the independent VS Code helper and localization/release callers to preserve server-side signing and configured App-ID lookup. Applies the corresponding az rest correction from merged Arcade #17801. Removes the temporary committed Pester file; focused regression tests were run externally.

This servicing branch retains its standalone helper and existing checkout behavior.

The updated helper uses az rest --query value for App-ID retrieval so Azure CLI retains authentication while bypassing the Windows Key Vault secret-model deserialization failure on year-9999 expiry metadata. Only the configured App-ID projection is read; the private-key secret is never retrieved.

This update changes repository code/descriptions only; it does not change live credentials, keys, RBAC or Azure pipeline settings, and does not deploy anything.

Validation

  • 14/14 mocked tests passed against this updated helper (84/84 across the six related helper PRs). Covers az rest arguments and configured numeric/Client-ID issuers, JWT signature/lifetime, nonzero/empty/whitespace/throwing lookups, signing failures without fallback, installation paging/selection, GitHub errors and token masking. Main VS Code tests execute its actual inline YAML helper.
  • Both configured-ID success tests failed against this PR's older helper because it still acquired a separate vault bearer token instead of using az rest.
  • Tested helper content is committed at 498c5dd43.
  • Parsed 2 changed YAML file(s) and 3 PowerShell script(s)/embedded script(s); the complete PR diff passed git diff --check. Template-expression substitution is confined to validation artifacts; this is not Azure DevOps template compilation.

Upstream protected validation

Arcade #17801 is merged. Its protected canary 3140008 passed at main PR head 4c765904c0d948c1a56963f709043870aeb58887: OneLoc and Promotion App-ID lookup, Key Vault signing, installation-token minting, read-only repository access, and token revocation. All 105 mocked tests passed (seven against that head and 98 against older baseline implementations). Temporary canary pipeline authorizations were restored.

That is upstream evidence, not an exact-head live run of this PR or full publishing-workflow validation. It does not establish access/key registration for other consumer identities.

Gates before merging

Kept draft for user review.

  • User review, required reviews and branch CI.
  • Protected validation of this PR's localization and release authentication paths using their intended WIF/App configurations, without publishing. The upstream Arcade canary is not an exact-head run of this independent helper.
  • Verify dotnet-vscode-csharp-release-tags-app-key provisioning, active GitHub registration and the release identity's App-ID-read/Sign access. Current provisioning status has not been revalidated; the earlier key-list result is not proof that the key is still missing.

Secret Manager PEM rotation does not synchronize RSA signing keys. Preserve in-use keys and coordinate Key Vault/GitHub key rotation rather than assuming PEM rotation updates the signing key.

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

missymessa and others added 3 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

Copy link
Copy Markdown
Member Author

Closing this release-branch backport in favor of letting the Key Vault signing change flow through the normal branch path: main → prerelease → release. This avoids maintaining a separate implementation on release. If the branch merges do not carry the change or stable needs it sooner, we can revisit and backport.

@missymessa missymessa closed this Nov 19, 2026
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.

1 participant