Repository navigation
Is anyone working on OIDC identity tokens for pipelines? (needed for npm trusted publishing) #7296
|
Hi, I run releases for a small open-source project (@doikayt/typescript-build-config) from a Woodpecker pipeline on ci.codeberg.org, publishing to npm. Why I'm asking now. npm is removing direct publishing with granular access tokens in January 2027 (docs). The replacement for CI is trusted publishing, which is OIDC-based. It currently supports GitHub Actions, GitLab CI/CD and CircleCI on hosted runners, and lists self-hosted runners as planned (docs). Woodpecker pipelines can't take part today because they don't receive an OIDC identity token. What I found.
Questions.
Thanks for the work on Woodpecker. |
Replies: 2 comments 1 reply
|
Small but important clarification from the npm side: even once Woodpecker can issue OIDC tokens, npm trusted publishing would not accept them today. npm does not do generic OIDC discovery. It has a fixed set of provider integrations, and the "Trusted Publisher" form on npmjs.com only offers GitHub Actions, GitLab CI/CD and CircleCI. Each one is configured with provider-specific identifiers — GitHub Actions wants org/user + repository + workflow filename, GitLab wants namespace + project + top-level CI file path, CircleCI wants org/project/pipeline IDs — and npm validates the incoming token's claims against that record. There is no field for an arbitrary issuer or discovery URL, so a per-server issuer such as That answers question 2 as well: the mapping is not "server → issuer", it is "provider → npm integration". Self-hosted runners are explicitly not supported yet (listed as planned), which covers Woodpecker's shape too. References: https://docs.npmjs.com/trusted-publishers (see "Supported CI/CD providers" and "Configuring trusted publishing"), and the underlying token exchange API: https://api-docs.npmjs.com/#tag/registry.npmjs.org/operation/exchangeOidcToken Two things worth separating:
Granular access tokens still work today, but npm is restricting tokens that bypass 2FA for account changes and direct publishing, so that is a stopgap rather than a destination. Staged publishing is not an escape hatch either: Whether a design discussion would be welcome is for the maintainers to say, but the constraint above is worth having before designing the token format: for npm, the issuer has to be a provider npm already trusts. |
|
also generic discussion about this one can find at #2285 |
Small but important clarification from the npm side: even once Woodpecker can issue OIDC tokens, npm trusted publishing would not accept them today.
npm does not do generic OIDC discovery. It has a fixed set of provider integrations, and the "Trusted Publisher" form on npmjs.com only offers GitHub Actions, GitLab CI/CD and CircleCI. Each one is configured with provider-specific identifiers — GitHub Actions wants org/user + repository + workflow filename, GitLab wants namespace + project + top-level CI file path, CircleCI wants org/project/pipeline IDs — and npm validates the incoming token's claims against that record. There is no field for an arbitrary issuer or discovery URL, so a per-s…