-
Hello npm community! 👋 We're excited to announce that we're bringing OpenID Connect (OIDC) authentication to the npm registry! This new feature will enable more secure, token-less authentication for publishing packages in your CI/CD workflows. What's Coming?OIDC support will allow you to publish npm packages from your CI/CD workflows without managing npm tokens. Your CI/CD provider's identity tokens will authenticate directly with the npm registry, providing:
Initial Platform SupportAt launch, we'll support package publishing from:
We plan to expand support to additional platforms based on community feedback and demand. Timeline
Get Involved!We want to hear from you! This thread is your space to:
Interested in the Private Preview?If you'd like to be considered for the private preview in June, please comment below with:
Stay UpdatedWe'll use this thread to share updates, documentation links, and gather feedback throughout the rollout. Make sure to watch this discussion to stay informed! Looking forward to your feedback and building this together with the community! 🎉 The npm Team at GitHub |
Beta Was this translation helpful? Give feedback.
Replies: 17 comments 21 replies
-
Super excited for OIDC support on npm! We at Arcjet would love to be part of the private preview in June.
We publish the arcjet-js SDK to npm but don't currently use CI publishing due to security concerns around long-lived tokens. We also want to add build provenance which is easiest using CI publishing.
GitHub Actions.
I think we're up to 33 packages now. We generally publish once or twice per month. |
Beta Was this translation helpful? Give feedback.
-
we'd love to be involved in the preview so we can make sure semantic-release is ready for the public release.
|
Beta Was this translation helpful? Give feedback.
-
out of curiosity, is supporting OIDC for other registries, like Artifactory, part of the plan? |
Beta Was this translation helpful? Give feedback.
-
🙋 Yay! Express interest in joining the private preview
|
Beta Was this translation helpful? Give feedback.
-
I would be interested as well in the preview if you need additional tokens
|
Beta Was this translation helpful? Give feedback.
-
Please add Azure DevOps to the shortlist of supported CI/CD platforms. 🙏 |
Beta Was this translation helpful? Give feedback.
-
Will this include using OIDC for fetching/resolving packages from the registry via OIDC? Or just publishing? If just publishing, do you plan to support OIDC for |
Beta Was this translation helpful? Give feedback.
-
How do you identify which npm package is allowed to be published by what repo (fork are not allowed to, right?) How do you prevent malicious command injection in a workflow crafting a directory with malware and running |
Beta Was this translation helpful? Give feedback.
-
This is great! Will there be a way to restrict packages so that they can only be published through OIDC? That way, even if a maintainer's npm token is compromised, an attacker won't be able to publish unauthorized package versions without write access to the repo |
Beta Was this translation helpful? Give feedback.
-
Trusted publishing with OIDC is now generally available! Huge thanks to all those who participated in the private preview and provided feedback, that helped us a lot verifying usage and working on small fixes and improvements before the public release! |
Beta Was this translation helpful? Give feedback.
-
Nice one! Would love to get OIDC support for Many packages maintain multiple tags for a release. To support this, I now still need to use an API token and they can't be scoped to |
Beta Was this translation helpful? Give feedback.
-
Use Casee: I publish a mix of open-source and private npm packages, and managing long-lived tokens in CI/CD can be risky and tedious. OIDC’s short lived, tokenless approach would be a huge security and convenience boost for my workflows. |
Beta Was this translation helpful? Give feedback.
-
To make this really great I think there are some extra developments needed: From the npm side:
From the GitHub / publishing side:
For both:
|
Beta Was this translation helpful? Give feedback.
-
Just crossposting my chat with FE from NPM support who also took note of my roadblocks internally (thank you!). I maintain Fontsource that publishes over the
Another nice to have thing which could also harden non-OIDC environments is the ability to programmatically generate short-lived publish tokens that can then be discarded at the end of a CI run. This at least protects us from CI exfiltration attacks if we properly setup token rotation 🙏 |
Beta Was this translation helpful? Give feedback.
-
As a maintainer of popular project ( For me (I use 2FA to publish with hardware key like YubiKey) adding Trusted Publisher via CI increase risks. Any malware from For instance, can we add a rule to GitHub to allow creating tag only if they were signed by some GPG key (which I will store on hardware key)? (Sorry, if it is a wrong place) |
Beta Was this translation helpful? Give feedback.
-
I am working to make use of OIDC for emberjs. I echo some of the requests above (enabling for an entire scope, especially). I also very much would like to be able to have multiple workflows files authorized to publish. We currently publish on tags but also have an automated weekly alpha. Having to merge these workflows makes them both less easy to maintain. |
Beta Was this translation helpful? Give feedback.
-
Does anyone else have 404 error when trying to publish with OIDC Trusted Publishing? I'm pretty sure that I configured my Trusted Publisher for GitHub properly, I don't think there's any typo in my package name either and NPM publish works fine... it's kind of frustrating because I can't find what the problem is and the 404 error isn't helpful at all. Side note, I use OTP but even if I disable it, that doesn't seem to make a difference. Do we need to change anything in NPM or GitHub settings to get started?
EDIT All resolved thanks for Shegox for helping below, the OIDC form is super confusing, they should seriously improve their documentations. Most of the time that a user gets a 404, it's because of that confusing Trusted Publisher NPM form |
Beta Was this translation helpful? Give feedback.
Trusted publishing with OIDC is now generally available!
Huge thanks to all those who participated in the private preview and provided feedback, that helped us a lot verifying usage and working on small fixes and improvements before the public release!