Home›Industry & Policy›npmのtrusted publishingでdist-tag権限を任意設定に
Opt-in dist-tag permissions for npm trusted publishing

npmのtrusted publishingでdist-tag権限を任意設定にOpt-in dist-tag permissions for npm trusted publishing

元記事を読むRead original articlegithub.blog(新しいタブで開きます)(opens in a new tab)
AI2 点サマリ2 key points
  • npmのtrusted publishingに、dist-tag操作を許可する任意設定「Allow npm dist-tag」が加わった。
  • 既定では無効で、OIDC短期認証情報だけでlatestやbetaを更新でき、長期トークンへの依存を減らせる。
  • npm trusted publishing now offers an optional Allow npm dist-tag setting for tag management.
  • Disabled by default, it lets OIDC workflows update latest, next, or beta without retaining a long-lived token.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (github.blog) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (github.blog).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

npmのtrusted publishingに、dist-tag操作を許可する任意設定「Allow npm dist-tag」が加わった。OIDCの短期認証情報を使い、長期アクセストークンを保持せずにリリース後やロールバック後のタグを管理できる点が重要だ。

dist-tag操作

新しい権限を有効にすると、バージョンをlatestへ昇格させたり、nextやbetaの参照先を更新したりできる。これらの操作には、長期アクセストークンではなく、trusted publishingで用いる短期のOIDC認証情報を利用する。

従来のtrusted publishingが対象としていたのは、公開とステージングまでだった。dist-tag操作は対象外だったため、公開処理をトークン不要のOIDCベースへ移行したメンテナーも、タグ管理のためだけに細かな権限を持つアクセストークンを残す必要があった。

既定は無効

「Allow npm dist-tag」はオプトイン方式で、新規と既存のどちらのtrusted publishing設定でも既定では無効となる。このため、設定に新しい操作能力が自動的に追加されることはない。dist-tagを管理したい場合に限り、設定ごとに明示的に許可する形だ。

公開権限と独立

dist-tag権限は、直接公開するための権限とは独立している。したがって、公開を直接行わずステージングだけに使う設定であっても、必要に応じてdist-tag管理を許可できる。公開やステージングの構成を変えず、タグ操作だけをOIDCの短期認証情報へ移せるようになった。

Trusted publishing configurations

npm trusted publishing configurations can now receive permission to manage dist-tags. This matters because maintainers can perform operations such as promoting a version to latest or updating next and beta pointers with short-lived OIDC credentials rather than retaining a long-lived access token for those tasks.

Short-lived OIDC credentials

Before this change, trusted publishing covered publishing and staging but did not cover dist-tag operations. Maintainers who had otherwise moved fully to token-free, OIDC-based workflows therefore still needed to keep a granular access token specifically for managing tags after a release or rollback.

With dist-tag management available through trusted publishing, those workflows can now update latest, next, or beta using their short-lived OIDC credentials. The change removes the stated need to retain a long-lived token solely for those post-release or rollback tag operations.

Allow npm dist-tag

The capability is controlled through an optional setting named Allow npm dist-tag. It is disabled by default for both newly created and existing trusted publishing configurations.

As a result, no configuration automatically receives permission to manage dist-tags. The setting must be explicitly enabled for each trusted publishing configuration that should have that capability. Configurations left unchanged continue without the new dist-tag permission.

Publishing and staging

Permission to manage dist-tags is independent of permission for direct publishing. A trusted publishing configuration does not need direct publishing capability in order to receive dist-tag management permission.

That separation means a staging-only configuration can also be granted the Allow npm dist-tag permission. Maintainers can therefore choose which trusted publishing configurations may update dist-tags without automatically expanding their direct publishing capabilities.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPokonpmのパッケージを出す仕事では、普段のリリースやロールバックがどう変わるの?For people releasing npm packages, what changes in the usual release or rollback workflow?
  2. TECHガイドTECH Guide設定を有効にすれば、短期のOIDC認証情報でlatestやnext、betaを更新できるよ。長期トークンへの依存を減らせるんだ。With the setting enabled, workflows can update latest, next, or beta using short-lived OIDC credentials, reducing reliance on a long-lived token.
  3. ポコPoko前はOIDCだけではできなかったの? タグの更新用に別のものが必要だった?Couldn’t OIDC handle that before? Did maintainers need something separate just to update tags?
  4. TECHガイドTECH Guide以前のtrusted publishingは公開とステージングまでで、dist-tag操作は対象外だったよ。そのためタグ管理には個別のアクセストークンが必要だったんだ。Previously, trusted publishing covered publishing and staging, but not dist-tag operations. Maintainers still needed a granular access token for tag management.
  5. ポコPokoいちばんの収穫は、設定すればタグ更新のためだけに長期トークンを残さなくてよくなることだね。So the big takeaway is that enabling it can remove the need to keep a long-lived token solely for tag updates.
  6. TECHガイドTECH Guideそうだね。既定では無効だから、必要な構成だけで許可する点に注目したいね。ステージング専用の構成にも付けられるよ。Right. It’s off by default, so watch which configurations explicitly receive permission. Even a staging-only configuration can be granted dist-tag management.
記事情報・収集記録Article details & collection record
出典Source
GitHub Changelog公式Official
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
変更履歴Changelog
原文言語Source language
EN
重要度の位置づけImportance in this lane
MediumMedium priority(Industry & Policy 456件中、同等以上 398件)(398 of 456 Industry & Policy entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.0 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
短命 (ニュース)Short-lived (news)

📰Industry & Policy の他の記事More from Industry & Policyもっと見る →View more →

ページ上部へScroll to top