Repository navigation
Backlog
Labels
triage-neededNeeds assignment to the proper sub-team
Description
Summary
Update Visual Studio Marketplace publishing in build/templates/publish.yml for the Python Debugger extension (ms-python.debugpy) to use native OIDC / Workload Identity Federation rather than acquiring an AAD token (MarketplaceAADToken) and passing it as a token via --pat (npx @vscode/vsce@latest publish --pat $aadToken ...).
Motivation
- Currently,
build/templates/publish.ymlusesAzureCLI@2(azureSubscription: ${{ parameters.azureSubscription }}) to fetch a token for resource499b84ac-1321-427f-aa17-267ca6975798, stores it inMarketplaceAADToken, and passes--pat $aadTokentonpx @vscode/vsce@latest publishacross each platform inbuildPlatformsalong with--manifestPathand--signaturePath. - Azure DevOps is retiring global PATs on January 27, 2027 (after which all existing global PATs will stop working), making native OIDC Trusted Publishing (
vsce publish --oidcfor GitHub Actions) or Entra Workload Identity Federation without--pattoken-passing the cleanest, most secure authentication path for Marketplace releases and pre-releases.
Implementation Details
-
Marketplace & Identity Configuration (Manual Prerequisite):
- Open the
ms-pythonpublisher settings on the Visual Studio Marketplace Publisher Management Portal. - If publishing via GitHub Actions: add a Trusted Publishing policy scoped to
microsoft/vscode-python-debugger, the release/pre-release workflow file in.github/workflows/, and any target environment. - If publishing via Azure Pipelines (
build/templates/publish.yml): ensure the service connection uses Microsoft Entra Workload Identity Federation and that the service principal/identity is granted publisher permissions directly onms-pythonwithout relying on--pattoken exchange.
- Open the
-
Pipeline / Workflow Updates:
- Update
build/templates/publish.yml(or the corresponding GitHub Actions release workflow) to authenticate via OIDC / Workload Identity Federation instead of passing--pat $aadTokenin thePowerShell@2publishing loop. - Preserve platform iteration (
buildPlatforms), signed.vsixdiscovery,--manifestPath,--signaturePath,--no-verify, and--pre-releasehandling when${{ parameters.preRelease }}isTrue. - Remove the intermediate
MarketplaceAADTokensecret variable /az account get-access-token--patworkaround once verified.
- Update
Acceptance Criteria
- Trusted Publishing policy (for GitHub Actions) or Entra Workload Identity Federation access (for Azure Pipelines) is configured for the
ms-pythonpublisher and scoped tomicrosoft/vscode-python-debugger. -
build/templates/publish.yml(and/or calling workflows) publishes platform-specific signed.vsixpackages (--manifestPathand--signaturePath) without passing an AAD token via--pat. - Both pre-release (
preRelease: true) and stable (preRelease: false) publishes succeed for all configuredbuildPlatformswithout requiring global PATs.
Metadata
Metadata
Assignees
Labels
triage-neededNeeds assignment to the proper sub-team
Activity