feat(vscode-plugin): publish to Marketplace via Azure OIDC instead of VSCE_PAT#792
Merged
Merged
Conversation
… VSCE_PAT - publish:vsce uses --azure-credential (vsce authenticates via @azure/identity) - release workflow loads AZURE_CLIENT_ID/AZURE_TENANT_ID from 1Password via varlock (OP_TOKEN injected from OP_CI_TOKEN), gated to vscode-extension publishes only, then azure/login (OIDC) authenticates before bumpy runs the publish - drop VSCE_PAT from the release step (OVSX_PAT stays for Open VSX) - add .env.schema + workspace devDeps (varlock, @varlock/1password-plugin)
Use the existing OP_CI_TOKEN name end-to-end (schema var + workflow env) instead of remapping the secret, matching the encryption-binary-swift schema.
17e67f9 to
225c684
Compare
Contributor
|
The changes in this PR will be included in the next version bump.
|
- add OVSX_PAT to the vscode-plugin .env.schema (sourced from VarlockCI vault) - release.yaml: loaded by the existing varlock step into the job env; drop OVSX_PAT from the bumpy publish step - vscode-release.yaml (manual fallback): switch to OIDC + varlock too — load publishing secrets from 1Password, azure/login for vsce --azure-credential, and drop the dead VSCE_PAT / secrets.OVSX_PAT references
225c684 to
b1cece7
Compare
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.


What & why
The last release failed to publish the VS Code extension because the
VSCE_PATwas invalid/expired (Azure DevOps PATs expire). This switches Marketplace publishing to Microsoft Entra workload identity federation (OIDC) — short-lived tokens, no PAT to rotate.Changes
publish:vscenow passes--azure-credential, sovsceauthenticates via@azure/identityinstead of a PAT.AZURE_CLIENT_ID/AZURE_TENANT_IDfrom 1Password via varlock (dmno-dev/varlock-action,OP_CI_TOKENinjected from the GitHub secret of the same name), only when the release actually publishes the extension (newplan.includes-vscodeoutput).azure/login@v2(OIDC) authenticates before bumpy runs the publish.VSCE_PATremoved from the publish step.OVSX_PATstays — Open VSX is a separate registry not covered by Azure OIDC..env.schemafor the extension package resolves the Azure ids from 1Password. In CI the injectedOP_TOKENis used; locally it falls back to 1Password desktop app auth (allowAppAuth=not($VARLOCK_IS_CI)). Azure ids are referenced by item id for rename stability.varlock+@varlock/1password-pluginworkspace devDeps so the schema resolves.Verification
Resolved the full schema locally (via 1Password app auth) — both Azure ids resolve correctly and
OP_TOKENis optional locally. The patch changeset cuts0.2.3, which on merge exercises the new OIDC publish path end-to-end and unsticks the Marketplace (currently stranded at 0.2.1 after 0.2.2's publish failed).Before merging — one-time setup required
varlockMarketplace publisher as Contributor (done).VarlockCIvault item withazure-identity-client-id/azure-identity-tenant-id(done).VSCE_PATsecret can be deleted; noAZURE_*GitHub secrets are needed (sourced from 1Password).Also: OVSX_PAT moved to 1Password
Open VSX still needs a token (not covered by Azure OIDC), but it no longer lives in GitHub secrets —
OVSX_PATis now in theVarlockCIvault and loaded via the same varlock step. The manual fallback workflow (vscode-release.yaml) was also switched to OIDC + varlock and no longer references the deadVSCE_PATorsecrets.OVSX_PAT.The
ovsx-patvalue already lives on thevscode-marketplace-publishingitem (verified resolving). After merge, theOVSX_PATGitHub secret can be deleted.