add temporary OIDC diagnostics to npm publish - #30
Closed
iamalwaysuncomfortable wants to merge 1 commit into
Closed
Conversation
The first OIDC publish (v0.2.2) failed with ENEEDAUTH, which npm emits for any trusted-publishing failure without diagnostics (npm/cli#9088). Two temporary aids to pinpoint the cause: - A step that fails loudly if the OIDC environment is absent (the runner never logs the id-token permission, actions/runner#3268) and prints the decoded claims npm will present to the registry — never the token itself. - http loglevel on the publish step to surface the token-exchange calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The first trusted-publishing attempt (v0.2.2) failed with
ENEEDAUTH. npm masks all trusted-publishing failures behind genericENEEDAUTH/E404errors with no diagnostics (npm/cli#9088), and the Actions runner never logs whetherid-token: writewas actually granted (actions/runner#3268), so the failure cannot be diagnosed from existing logs.Two temporary diagnostics:
ACTIONS_ID_TOKEN_REQUEST_URLis absent (meaning the id-token permission was not granted), otherwise prints the decoded OIDC claims npm will present to the registry (repository,workflow_ref,environment, ...) for comparison against the trusted publisher config. Only decoded claims are printed, never the token.NPM_CONFIG_LOGLEVEL: httpon the publish step to surface the token-exchange HTTP calls.Both marked temporary; remove once the first OIDC publish succeeds.
Test Plan
Publish to npmwith tagv0.2.2after merge; nothing was published in the failed run, so the retry attempts all six packages with diagnostics active.Related PRs