Skip to content

Use System.AccessToken for internal feed auth on release/9.0 - #67859

Merged
wtgodbe merged 2 commits into
release/9.0from
missymessa/9.0-internal-feed-accesstoken
Jul 16, 2026
Merged

Use System.AccessToken for internal feed auth on release/9.0#67859
wtgodbe merged 2 commits into
release/9.0from
missymessa/9.0-internal-feed-accesstoken

Conversation

@missymessa

Copy link
Copy Markdown
Member

Restores internal feed authentication on internal/release/9.0 after the dn-bot-dnceng-artifact-feeds-rw PAT was removed from arcade's vault manifest and expired (1ES PAT Disable Policy), causing fleet-wide 401s on darc-int-* / dotnet-*-internal feeds.

PR #67853 removed the legacyCredential PAT entirely, relying solely on the NuGetAuthenticate@1 credential provider. That is insufficient: the Arcade toolset bootstrap restore (build.cmd -> tools.ps1 -> restore.proj) reads credentials directly from NuGet.config and does not consume the credential provider. Build 3024337 (commit 7ea898f, which contains #67853) still failed at toolset restore with all internal feeds unreachable.

This PR passes the build identity's OAuth token via legacyCredential: $(System.AccessToken), which SetupNugetSources.ps1 writes into NuGet.config as a live, permissioned credential. The internal Build Service (dnceng) identity has collaborator/contributor on the affected feeds. This matches the release/8.0 approach (#67854) and the mechanism that worked prior to PAT expiry (a cleartext credential in config).

Tracks AB#11679.

Removing the credential entirely (relying only on NuGetAuthenticate) is insufficient because the Arcade toolset bootstrap restore reads credentials directly from NuGet.config. Pass the build identity OAuth token via legacyCredential so SetupNugetSources writes it to NuGet.config. Matches release/8.0 (#67854).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 331a413c-8b88-448e-8913-6ca49130a046
Copilot AI review requested due to automatic review settings July 16, 2026 21:33
@missymessa
missymessa requested review from a team and wtgodbe as code owners July 16, 2026 21:33
Comment thread .azure/pipelines/jobs/default-build.yml

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.

Pull request overview

This PR updates the release/9.0 Azure Pipelines build job to restore authentication to internal Azure DevOps artifact feeds by providing the build’s OAuth token to the internal-sources bootstrap step, ensuring toolset restore can read credentials directly from NuGet.config.

Changes:

  • Pass $(System.AccessToken) as legacyCredential into the enable-internal-sources step so SetupNugetSources.ps1 can write live credentials into NuGet.config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .azure/pipelines/jobs/default-build.yml Outdated
Avoids forcing the enable-internal-sources template down the legacy PAT path for non-internal (e.g. DevDiv) projects, preserving the federated service-connection auth flow there. Addresses Copilot review feedback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 331a413c-8b88-448e-8913-6ca49130a046
@wtgodbe
wtgodbe merged commit 74cec08 into release/9.0 Jul 16, 2026
21 of 25 checks passed
@wtgodbe wtgodbe added the tell-mode Indicates a PR which is being merged during tell-mode label Jul 16, 2026
@wtgodbe
wtgodbe deleted the missymessa/9.0-internal-feed-accesstoken branch July 16, 2026 23:50
This was referenced Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tell-mode Indicates a PR which is being merged during tell-mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants