Skip to content

Backport Entra credential fallback for dn-bot-all-orgs-build-rw-code-rw (WI 10724)#16833

Closed
missymessa wants to merge 2 commits into
dotnet:release/10.0from
missymessa:backport/release-10.0/entra-fallback-10724
Closed

Backport Entra credential fallback for dn-bot-all-orgs-build-rw-code-rw (WI 10724)#16833
missymessa wants to merge 2 commits into
dotnet:release/10.0from
missymessa:backport/release-10.0/entra-fallback-10724

Conversation

@missymessa
Copy link
Copy Markdown
Member

Summary

Backports the Entra-based authentication fallback from main (PR #16806) to release/10.0.

The V3 publishing pipeline was failing because dn-bot-all-orgs-build-rw-code-rw expired on 2026-05-14. This change adds the Entra credential fallback so the publish task uses AzurePipelinesCredential from the maestro-build-promotion service connection.

Changes

  • Add Entra fallback to CreateAzdoClient in PublishArtifactsInManifestBase
  • Add addSpnToEnvironment: true to Publish task
  • Remove /p:AzdoApiToken from publish.yml
  • Remove PAT from publish-logs.yml redaction list
  • Delete PAT entry from product-builds-engkeyvault.yaml

Work Item: https://dev.azure.com/dnceng/internal/_workitems/edit/10724

…rw (WI 10724)

Backports the Entra-based authentication fallback from main (PR dotnet#16806)
to release/10.0, allowing the V3 publishing pipeline to authenticate
without the expired dn-bot-all-orgs-build-rw-code-rw PAT.

Changes:
- Add Entra fallback to CreateAzdoClient in PublishArtifactsInManifestBase
- Add addSpnToEnvironment: true to Publish task
- Remove /p:AzdoApiToken from publish.yml
- Remove PAT from publish-logs.yml redaction list
- Delete PAT entry from product-builds-engkeyvault.yaml

AB#10724
Copilot AI review requested due to automatic review settings May 18, 2026 21:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports Entra-based Azure DevOps authentication for V3 publishing so streaming publishing can fall back from the expired dn-bot-all-orgs-build-rw-code-rw PAT to service-connection credentials.

Changes:

  • Adds bearer-token fallback in CreateAzdoClient and relaxes missing PAT validation when Entra credentials are available.
  • Updates V3 publishing YAML to expose service connection credentials and stop passing the expired PAT.
  • Removes the retired PAT from log redaction and Key Vault configuration.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/Microsoft.DotNet.Build.Tasks.Feed/src/PublishArtifactsInManifestBase.cs Adds Entra credential fallback and validation changes for streaming AzDO access.
eng/publishing/v3/publish.yml Enables SPN environment injection and removes the AzDO PAT MSBuild parameter.
eng/common/core-templates/steps/publish-logs.yml Removes the retired PAT from sensitive log redaction inputs.
.vault-config/product-builds-engkeyvault.yaml Deletes the expired PAT secret definition.

Comment on lines +1980 to +1982
if (UseStreamingPublishing && string.IsNullOrEmpty(AzdoApiToken) && !HasEntraCredentialsAvailable())
{
Log.LogError($"The property {nameof(AzdoApiToken)} is required when using streaming publishing, but doesn't have a value set.");
Log.LogError($"The property {nameof(AzdoApiToken)} is required when using streaming publishing (unless Entra credentials are available via AzureCLI@2 or Managed Identity), but doesn't have a value set.");
@mmitche
Copy link
Copy Markdown
Member

mmitche commented May 20, 2026

@missymessa This PR is not necessary, as this code is not ever active in downlevel branches.

@missymessa
Copy link
Copy Markdown
Member Author

@mmitche sweet! dumping this PR then!

@missymessa missymessa closed this May 20, 2026
@missymessa missymessa deleted the backport/release-10.0/entra-fallback-10724 branch May 20, 2026 17:17
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