Skip to content

[release/10.0] Restore server-side GitHub App signing - #17802

Merged
missymessa merged 3 commits into
dotnet:release/10.0from
missymessa:users/mjanecke/12467-keyvault-signing-10
Nov 20, 2026
Merged

missymessa merged 3 commits into
dotnet:release/10.0from
missymessa:users/mjanecke/12467-keyvault-signing-10

Conversation

@missymessa

@missymessa missymessa commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Intent

Backport the corrected GitHub App remote-signing helper from #17801 to release/10.0. 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). keyName selects the RSA signing key; the private-key secret is never retrieved and there is no PEM/local-signing or PAT fallback.

Scope and decisions

Updates the helper, token step, OneLoc job defaults and OneLoc documentation. Get-GitHubAppToken.ps1 and steps/get-github-app-token.yml are byte-identical to merged main; release/10 has no Promotion validation caller. Generated downstream copies must receive this through normal Arcade dependency flow.

App-ID retrieval uses az rest --query value to avoid Azure CLI's Windows deserialization failure on year-9999 secret expiry metadata. This PR does not change live credentials, keys, RBAC, pipeline definitions or deployments.

Validation

  • Protected CI canary 3140086 passed against PR head 75ebb9cba7ea54cfbe180e6e1ad4b9034c238147 (3 exact Git blobs verified). OneLoc used WIF, read its App-ID projection, signed via Key Vault, verified read-only access to dotnet/vscode-csharp, and revoked the installation token. Temporary canary authorizations were restored afterward.
  • 112/112 mocked tests passed in that canary, including 7/7 against this PR head.
  • Public arcade-pr CI 1688791 passed.
  • The canary exercises the helper and step template directly; it does not compile release/10 onelocbuild.yml or run a full OneLoc publishing workflow.

Gates before merging

Obtain the required review and keep required CI and policy checks green.

Downstream prerequisites

  • Custom Apps need their own App-ID projection, registered RSA key, and least-privilege read/Sign access verified before switching.
  • Secret Manager PEM rotation does not synchronize RSA signing keys; coordinate Key Vault/GitHub key rotation.

Tracking: https://dev.azure.com/dnceng/internal/_workitems/edit/12467
Main change: #17801

Co-authored-by: Copilot <[email protected]>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:09

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

The required protected canary has not run, leaving live Azure CLI/Key Vault signing, Sign permissions for both project-specific WIF identities, and the RSA key’s match to an active GitHub App private key awaiting human validation.

No open issues 🎉

What changed in this PR

Restores server-side GitHub App signing for release/10.0’s shared authentication helper and OneLoc integration. Agents submit JWT digests to Azure Key Vault without retrieving private keys, while retaining short-lived installation tokens and no PAT fallback.

Changes:

  • Replaces local PEM signing with Key Vault signing and rejects empty installation tokens.
  • Restores the KeyName/AppClientId contract across the helper and OneLoc templates.
  • Adds nine mocked Pester regression cases and updates migration, permissions, rotation, and validation guidance.

Protected internal canary validation remains pending, as noted in the PR description.

File Description
eng/​validation/​Get-GitHubAppToken.Tests.ps1 Adds regression coverage for digest-only signing, JWT validity, pagination, failures, and masking.
eng/​common/​Get-GitHubAppToken.ps1 Restores remote signing and validates returned installation tokens.
eng/​common/​core-templates/​steps/​get-github-app-token.yml Passes the restored key-name and App-client-ID parameters.
eng/​common/​core-templates/​job/​onelocbuild.yml Restores OneLoc signing-key defaults and parameter forwarding.
Documentation/​OneLocBuildGitHubApp.md Documents remote signing, migration, access requirements, rotation, and protected validation.
Documentation/​OneLocBuild.md Updates the OneLoc parameter reference and authentication guidance.

Review effort: Balanced

Co-authored-by: Copilot <[email protected]>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:28

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

Protected canaries have not run, leaving human validation of both supported OneLoc WIF identities’ App-ID read and RSA signing permissions, active GitHub key registration, and installation access outstanding.

No open issues 🎉

Review effort: Balanced

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 <[email protected]>
Copilot-Session: 8f29c08e-f8a7-4acf-9ce1-2db3460d9cc5
Copilot AI balanced review requested due to automatic review settings November 18, 2026 21:40

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

A maintainer must verify the release backport’s protected validation gate because its required canary has not run and the upstream result does not establish this revision’s WIF permissions or GitHub installation access.

No open issues 🎉

Review effort: Balanced

@missymessa
missymessa marked this pull request as ready for review November 18, 2026 23:09
@missymessa
missymessa requested a review from mmitche November 18, 2026 23:09
@missymessa
missymessa enabled auto-merge (squash) November 19, 2026 00:06
@missymessa
missymessa merged commit 37288ec into dotnet:release/10.0 Nov 20, 2026
12 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