Skip to content

[release/9.0] Preserve Key Vault signing for OneLoc - #17747

Merged
missymessa merged 6 commits into
release/9.0from
users/mjanecke/12467-oneloc-secret-signing-9
Nov 19, 2026
Merged

missymessa merged 6 commits into
release/9.0from
users/mjanecke/12467-oneloc-secret-signing-9

Conversation

@missymessa

@missymessa missymessa commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Intent

Backport the corrected GitHub App remote-signing helper from #17801 to release/9.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. 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 3140192 passed against PR head 11df8b5d71062d3430d1b126ae8f8153c33d8a84 (three 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.
  • 126/126 mocked tests passed in that canary, including 7/7 against this PR head.
  • Public arcade-pr CI 1688790 passed.
  • The canary exercises the helper and step template directly; it does not compile release/9 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

Backport the combined final implementation of #17528 and #17541 for work item 12467. Preserve the release branch OneLoc v3 and Ceapex authentication changes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 062e4ad2-9169-47fb-8e49-a38ee214f96f
Copilot AI balanced review requested due to automatic review settings October 30, 2026 18:19

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 protected release/9.0 canary is still pending and must verify WIF authorization, exact-secret Key Vault permissions, and the live OneLocBuild@3 check-in path, which public checks cannot exercise.

No open issues 🎉

What changed in this PR

Backports the combined implementation from #17528 and #17541 to release/9.0, replacing OneLoc’s legacy Key Vault RSA signing with Secret Manager-managed GitHub App credentials while preserving existing localization behavior.

Changes:

  • Reads App credentials through WIF-authenticated Key Vault REST calls, signs the JWT locally, and passes only the short-lived installation token to OneLocBuild.
  • Updates shared template parameters and defaults while retaining project-specific service connections.
  • Documents credential requirements, parameter migration, and protected-canary validation.

Required PR validation and a protected release-branch canary remain pending.

File Description
eng/​common/​Get-GitHubAppToken.ps1 Retrieves credential secrets, validates the vault name, and signs JWTs locally.
eng/​common/​core-templates/​steps/​get-github-app-token.yml Passes secret names to the token helper.
eng/​common/​core-templates/​job/​onelocbuild.yml Uses Secret Manager projection defaults for OneLoc authentication.
Documentation/​OneLocBuildGitHubApp.md Explains WIF access, migration, validation, and troubleshooting.
Documentation/​OneLocBuild.md Updates authentication parameters and links to migration guidance.

Review effort: Balanced

@missymessa
missymessa marked this pull request as ready for review October 30, 2026 18:23
@missymessa
missymessa enabled auto-merge (squash) October 30, 2026 18:23
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:52

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 protected release/9.0 canary remains pending, leaving project-scoped WIF authorization, exact-secret RBAC, and successful live OneLocBuild@3 check-in unverified and requiring human confirmation.

No open issues 🎉

Review effort: Balanced

Comment thread eng/common/Get-GitHubAppToken.ps1 Resolved
Copilot AI balanced review requested due to automatic review settings November 12, 2026 17:43

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 protected release-branch canary remains pending, requiring human verification of live WIF authorization, exact-secret Key Vault permissions, and OneLoc check-in that mocked checks cannot validate.

No open issues 🎉

Review effort: Balanced

@missymessa
missymessa marked this pull request as draft November 12, 2026 18:08
auto-merge was automatically disabled November 12, 2026 18:08

Pull request was converted to draft

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
@missymessa missymessa changed the title [release/9.0] Use Secret Manager signing for OneLoc [release/9.0] Preserve Key Vault signing for OneLoc Nov 12, 2026
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:11

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 internal canary has not run, leaving human confirmation that configured RSA keys match active GitHub App keys and both project-scoped WIF identities have signing permission outstanding.

No open issues 🎉

Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e6793769-8620-4b12-9a94-206a0db5e467
Copilot AI balanced review requested due to automatic review settings November 12, 2026 18:29

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 WIF read/sign permissions, GitHub App key registration, and token minting for the intended installation dependent on human validation.

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 <223556219+Copilot@users.noreply.github.com>
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

Human confirmation is needed that the protected main-branch canary covers this backport, or that a release/9.0 canary validates WIF App-ID read and Sign permissions plus active GitHub signing-key and installation access.

No open issues 🎉

Review effort: Balanced

@missymessa
missymessa marked this pull request as ready for review November 19, 2026 00:21
@missymessa
missymessa enabled auto-merge (squash) November 19, 2026 00:21
@missymessa
missymessa requested a review from mmitche November 19, 2026 00:21
@missymessa
missymessa merged commit af06b65 into release/9.0 Nov 19, 2026
13 checks passed
@missymessa
missymessa deleted the users/mjanecke/12467-oneloc-secret-signing-9 branch November 19, 2026 23:48
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