Repository navigation
Fix production channel validation authentication - #17435
Merged
akoeplinger merged 1 commit intoAug 30, 2026
Merged
Conversation
Use the federated Azure DevOps credential fallback for build metadata lookups and the pipeline job token for branch classification. Co-authored-by: Copilot <[email protected]> Copilot-Session: 6443e32b-f4fc-4315-a3fc-9b9a58d74e17
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Production Channel Validation’s Azure DevOps authentication so build-metadata lookups are authenticated even when no explicit AzdoApiToken is provided, aligning with the repo’s broader PAT-to-Entra/WIF fallback approach and the 1ES pipeline token pattern for branch classification.
Changes:
- Switch Azure DevOps build metadata calls to use
DefaultIdentityTokenCredential(Entra/WIF/MI) whenAzdoApiTokenis not provided, while preserving explicit token support viaGeneralUtils.CreateAzdoAuthHeader. - Use
SYSTEM_ACCESSTOKENas the fallback token for the Branch Classification API. - Wire
ManagedIdentityClientIdinto the DI-createdAzureDevOpsService.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifest.cs | Passes ManagedIdentityClientId into the Azure DevOps build-info service registration so it can use MI/WIF fallback when no PAT is supplied. |
| src/Microsoft.DotNet.Build.Tasks.Feed/src/ProductionChannelValidator.cs | Implements per-request Azure DevOps auth (PAT/JWT via CreateAzdoAuthHeader, else Entra via DefaultIdentityTokenCredential) and adds SYSTEM_ACCESSTOKEN fallback for branch classification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
akoeplinger
enabled auto-merge (squash)
August 28, 2026 17:30
akoeplinger
deleted the
akoeplinger/fix-production-channel-validation-auth
branch
August 30, 2026 19:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
DefaultIdentityTokenCredentialfor Azure DevOps build metadata when no explicitAzdoApiTokenis suppliedSYSTEM_ACCESSTOKENas the fallback credential for the branch classification API, matching 1ES Pipeline TemplatesContext
#16892 removed the broad
dn-bot-all-orgs-build-rw-code-rwPAT from Build Promotion and relied on the established federated Entra fallback. Production channel validation used separate HTTP services that did not adopt that fallback, so the Azure DevOps build lookup was unauthenticated and attempted to deserialize the returned sign-in HTML as JSON.The Azure DevOps lookup now follows the same federated credential pattern as artifact publishing. Branch classification continues to use the Azure Pipelines job token, matching the implementation in 1ES Pipeline Templates.
Validation
dotnet test src/Microsoft.DotNet.Build.Tasks.Feed.Tests/Microsoft.DotNet.Build.Tasks.Feed.Tests.csproj --no-restore --filter 'FullyQualifiedName~ProductionChannelValidatorTests|FullyQualifiedName~PublishArtifactsInManifestTests|FullyQualifiedName~AzdoAuthHeaderTests' --verbosity minimal