[release/10.0] Use WIF-based Entra auth for OneLocBuild ceapex feed access#17084
Open
missymessa wants to merge 1 commit into
Open
[release/10.0] Use WIF-based Entra auth for OneLocBuild ceapex feed access#17084missymessa wants to merge 1 commit into
missymessa wants to merge 1 commit into
Conversation
Cherry-pick of onelocbuild-wif-migration (main) to release/10.0. Replace PAT-based authentication with Entra token acquired via AzureCLI@2 and the dnceng-onelocbuild-ceapex service connection. Related: AzDO#10151
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OneLocBuild pipeline template to support WIF-based Entra authentication for ceapex Azure DevOps feed access (replacing the prior PAT-based approach) by acquiring an access token via AzureCLI@2 and passing it into OneLocBuild.
Changes:
- Add
CeapexServiceConnectionparameter to control WIF-based Entra authentication vs PAT fallback. - Add an
AzureCLI@2step to acquire an Entra token for Azure DevOps and store it as a secret variable. - Update the localization task invocation from
OneLocBuild@2toOneLocBuild@3and conditionally supply the credential.
Comment on lines
+90
to
+91
| $token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv | ||
| if (-not $token) { Write-Error "Failed to acquire AzDO token"; exit 1 } |
Comment on lines
+11
to
+14
| # Service connection for WIF-based Entra authentication to ceapex feeds (replaces CeapexPat). | ||
| # When set, uses AzureCLI@2 to obtain an Entra token instead of a PAT. | ||
| # Set to '' to fall back to PAT-based auth via CeapexPat parameter. | ||
| CeapexServiceConnection: 'dnceng-onelocbuild-ceapex' |
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.
Cherry-pick of #17083 to release/10.0.
Replaces PAT-based authentication for OneLocBuild's ceapex feed access with WIF-based Entra token via AzureCLI@2 and the dnceng-onelocbuild-ceapex service connection.
Related: AzDO#10151