Skip to content

auth: support OIDC trusted publishing#1291

Merged
benibenj merged 1 commit into
mainfrom
benibenj/agents/oidc-support-for-secretless-publishing
Jul 23, 2026
Merged

auth: support OIDC trusted publishing#1291
benibenj merged 1 commit into
mainfrom
benibenj/agents/oidc-support-for-secretless-publishing

Conversation

@benibenj

Copy link
Copy Markdown
Contributor

What changed

  • add an explicit vsce publish --oidc authentication mode
  • request a GitHub Actions OIDC token for the marketplace.visualstudio.com audience
  • exchange the OIDC token at POST /_apis/gallery/token
  • pass the returned short-lived credential through the existing PAT-backed publish path
  • keep token-provider acquisition extensible for future OIDC providers
  • reject conflicting authentication methods and never silently fall back to a PAT
  • document the GitHub Actions workflow setup and add focused tests

Why

Trusted publishing removes long-lived PAT secrets from CI pipelines. GitHub Actions is the first supported provider, while the provider abstraction allows additional OIDC runtimes to be added without changing the Marketplace exchange or publish paths.

Validation

  • npm run build
  • npm test -- --grep "OIDC trusted publishing" (6 passing)
  • CLI authentication conflict check
  • existing affected packaging tests rerun independently

Add a provider-neutral OIDC credential flow with GitHub Actions as the first provider. Exchange workflow identity tokens for short-lived Marketplace credentials and route them through the existing publish path without PAT fallback.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@benibenj
benibenj enabled auto-merge (squash) July 23, 2026 20:17
@benibenj
benibenj merged commit c998e2a into main Jul 23, 2026
6 checks passed
@benibenj
benibenj deleted the benibenj/agents/oidc-support-for-secretless-publishing branch July 23, 2026 20:42
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