Migrate dn-bot-devdiv-drop-rw-code-rw PAT to WIF service connection#15792
Open
missymessa wants to merge 1 commit into
Open
Migrate dn-bot-devdiv-drop-rw-code-rw PAT to WIF service connection#15792missymessa wants to merge 1 commit into
missymessa wants to merge 1 commit into
Conversation
Replace the dn-bot-devdiv-drop-rw-code-rw PAT with a WIF-based service connection (dnceng-devdiv-drop-rw-code-rw-wif) for DevDiv drop access. - Add AzureCLI@2 task to acquire an Entra token via the WIF SC - Set _DevDivDropAccessToken at runtime via the WIF token - Remove static PAT variable reference from DotNet-VSTS-Infra-Access
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates DevDiv drop publishing in the official Azure Pipelines build from a static PAT (dn-bot-devdiv-drop-rw-code-rw) to a WIF-based service connection, acquiring an Entra ID access token at runtime before the VSTS drop upload task.
Changes:
- Replaced the
_DevDivDropAccessTokenvariable’s static PAT value with an empty placeholder to be populated at runtime. - Added an
AzureCLI@2step in the Publish job to acquire an Azure DevOps access token via thednceng-devdiv-drop-rw-code-rw-wifservice connection. - Continued passing
_DevDivDropAccessTokeninto1ES.MicroBuildVstsDrop@1for drop upload, now sourced from the WIF-acquired token.
Comment on lines
95
to
+100
| - group: DotNet-Symbol-Server-Pats | ||
| # Group gives access to $dn-bot-devdiv-drop-rw-code-rw and dn-bot-dnceng-build-rw-code-rw | ||
| - group: DotNet-VSTS-Infra-Access | ||
| # DevDiv drop access token is acquired via WIF service connection (dnceng-devdiv-drop-rw-code-rw-wif) | ||
| - name: _DevDivDropAccessToken | ||
| value: $(dn-bot-devdiv-drop-rw-code-rw) | ||
| value: '' |
| scriptType: pscore | ||
| scriptLocation: inlineScript | ||
| inlineScript: | | ||
| $token = az account get-access-token --resource 499b84ac-1321-427f-aa17-267ca6975798 --query accessToken -o tsv |
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
Replaces the \dn-bot-devdiv-drop-rw-code-rw\ PAT with a WIF-based service connection (\dnceng-devdiv-drop-rw-code-rw-wif) for DevDiv drop access.
Changes
Context
This is part of the PAT-to-Entra migration tracked by AB#10146. The WIF service connection \dnceng-devdiv-drop-rw-code-rw-wif\ (backed by app registration \dnceng-devdiv-drop-rw-code-rw-wif, App ID: \7106a410-fbcb-4750-a202-879077f925ec) was previously created and verified. The same pattern was successfully deployed in dotnet/fsharp#19598.
Validation