Skip to content

Marketplace publish via Entra ID + GitHub OIDC (no stored PAT)#9

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/marketplace-oidc-publish
May 15, 2026
Merged

Marketplace publish via Entra ID + GitHub OIDC (no stored PAT)#9
hyperpolymath merged 1 commit into
mainfrom
claude/marketplace-oidc-publish

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Follow-up to #8. Replaces the long-lived VSCE_PAT secret with Microsoft Entra ID workload identity federation for VS Code Marketplace publishing — no publishing credential is stored in the repo.

How it works

GitHub mints a short-lived OIDC token per workflow run (id-token: write), exchanges it for an Entra access token via az login --service-principal --federated-token, then runs vsce publish --azure-credential (which picks up the az CLI session through DefaultAzureCredential). Uses the preinstalled Azure CLI on ubuntu-latest, so no third-party action needs SHA-pinning.

Changes

  • .github/workflows/marketplace-publish.yml — adds id-token: write; OIDC token-exchange flow; gated on AZURE_CLIENT_ID / AZURE_TENANT_ID repository variables (identifiers, not secrets). Open VSX still uses OVSX_PAT because Open VSX has no Entra/OIDC equivalent. Missing config skips rather than fails, consistent with the existing design.
  • docs/PUBLISHING.adoc — documents the one-time Entra setup (app registration → federated credential trusting repo:hyperpolymath/vscode-a2ml → grant the SP publisher rights). PAT demoted to a documented local-only fallback.
  • ROADMAP.adoc — updated.

Security tradeoff

OIDC removes the PAT leak/theft/rotation risk entirely. Cost: a one-time Entra app-registration + federated-credential setup (documented). Open VSX necessarily retains a token (hardened, short-expiry) since it offers no federation.

Remaining human step

The one-time Entra setup (app registration, federated credential, publisher-rights grant) requires tenant admin and cannot be automated — fully documented in docs/PUBLISHING.adoc. After that, publishing is just git push origin v0.1.0.

https://claude.ai/code/session_0111iLmV7VFMTFGigST1M1cb


Generated by Claude Code

Replaces the long-lived VSCE_PAT secret with Microsoft Entra ID workload
identity federation: GitHub mints a short-lived OIDC token per run and
exchanges it for an Entra access token via `az login --federated-token`,
then `vsce publish --azure-credential`. No publishing credential is ever
stored in the repo.

- marketplace-publish.yml: id-token: write; OIDC token-exchange flow using
  the preinstalled Azure CLI (no third-party action to SHA-pin); gated on
  AZURE_CLIENT_ID / AZURE_TENANT_ID repo variables; Open VSX still uses
  OVSX_PAT since it has no Entra equivalent
- docs/PUBLISHING.adoc: document the one-time Entra app-registration /
  federated-credential setup; PAT demoted to a local-only fallback
- ROADMAP.adoc: updated to reflect OIDC

https://claude.ai/code/session_0111iLmV7VFMTFGigST1M1cb
@hyperpolymath hyperpolymath marked this pull request as ready for review May 15, 2026 17:57
@hyperpolymath hyperpolymath merged commit 1f62625 into main May 15, 2026
17 of 19 checks passed
@hyperpolymath hyperpolymath deleted the claude/marketplace-oidc-publish branch May 15, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants