Repository navigation
Enable OneLoc GitHub App authentication outside internal - #17365
Conversation
Add an explicit, default-off opt-in for projects with separately provisioned WIF service connections. Co-authored-by: Copilot <[email protected]> Copilot-Session: 80f6a0c6-7947-4200-bb78-7f0fc01d671a
There was a problem hiding this comment.
Pull request overview
This PR extends the OneLocBuild pipeline template to allow explicit, default-off opt-in to GitHub App authentication outside the dnceng/internal Azure DevOps project, while preserving the existing PAT-based fallback behavior for all non-internal pipelines by default. It also updates documentation to explain the new opt-in and the required project-scoped service connection/signing-key access.
Changes:
- Added
UseGitHubAppAuthenticationInOtherProjects(defaultfalse) and updated template conditions so non-internalprojects only use the GitHub App token path when explicitly opted in. - Preserved the PAT selection path for all existing/non-internal pipelines unless they opt in.
- Updated OneLocBuild docs to describe the new opt-in parameter and the service connection / Key Vault signing requirements.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/common/core-templates/job/onelocbuild.yml | Adds an explicit opt-in switch for GitHub App token minting outside dnceng/internal, while keeping existing defaults and PAT fallback behavior. |
| Documentation/OneLocBuildGitHubApp.md | Documents the opt-in behavior and the requirements for project-scoped WIF service connections and signing-key access. |
| Documentation/OneLocBuild.md | Updates the template parameter reference to include the new opt-in parameter and its requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <[email protected]> Copilot-Session: 80f6a0c6-7947-4200-bb78-7f0fc01d671a
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Documentation/OneLocBuildGitHubApp.md:94
- This paragraph is introducing the non-
dnceng/internalopt-in, but it doesn’t explicitly tie back to the preceding “no authentication parameter is required” example, which can read as globally true. Add a short bridge sentence making it clear the prior example assumesdnceng/internal.
For a pipeline outside `dnceng/internal`, keep using the wrapper appropriate for that pipeline
(`templates/job` or `templates-official/job`) and explicitly select its project-scoped connection.
This example uses the official wrapper:
Documentation/OneLocBuildGitHubApp.md:27
- The sentence says the App token is minted when “all” conditions are true, but the third bullet is an OR-condition. This reads contradictory and is easy to misinterpret; rephrase to keep the logic unambiguous (A && B && (C || D)).
when **all** of the following are true:
- `UseGitHubAppAuthentication` is `true` (the default), **and**
- `RepoType` is `gitHub`, **and**
- the build is running in the **`internal`** Azure DevOps project, or
Summary
dnceng/internalMotivation
MSBuild localization runs in the DevDiv Azure DevOps project. Its OneLocBuild job currently falls back to the shared GitHub PAT even though a DevDiv-scoped, least-privilege WIF connection is now provisioned. This lets MSBuild opt into the short-lived GitHub App token without changing other DevDiv pipelines.
Validation
dotnet/msbuildis selected in the App installationdevdiv-oneloc-githubappis scoped to the signing key and authorized only for MSBuild pipeline 9434