Skip to content

fix(cli): migrate to openid-client v6 - #1775

Open
bdehamer wants to merge 1 commit into
mainfrom
bdehamer-openid-client-update-failure
Open

bdehamer wants to merge 1 commit into
mainfrom
bdehamer-openid-client-update-failure

Conversation

@bdehamer

Copy link
Copy Markdown
Collaborator

Summary

Upgrade openid-client from 5.7.0 to 6.8.8 and migrate the CLI's browser authentication to the v6 API. Supersedes the dependency-only update in #1767, which fails to compile against the removed v5 APIs.

Preserve PKCE, state and nonce validation, Basic authentication for clients with a secret, and ID-token signature verification (which requires an explicit opt-in in v6). Resolve relative callback URLs against the configured redirect URL and normalize that URL so authorization and token exchange use the same redirect URI, including the default bare localhost origin.

Update the OAuth tests to mock Fetch responses, add regression coverage for invalid tokens and callback parameters, and configure Jest to transform the new ESM dependencies. Include a CLI patch changeset and document v6's HTTPS issuer requirement; local HTTP callbacks remain supported. No Node engine or module-format changes are needed.

Validation

  • Build and full serial coverage suite on Node 24.15.0: 99 suites, 917 tests and 13 snapshots pass with 100% coverage.
  • CLI suite on the minimum supported Node 22.22.2: 34 tests pass.
  • Lint and formatting checks pass.
  • Compiled CommonJS loading and live discovery against https://oauth2.sigstore.dev/auth succeed on Node 22.22.2.

A parallel full-suite rerun hit Nock interception errors in eight OCI proxy tests. Those tests pass in isolation, and the complete suite passes serially. Interactive browser login has not been exercised manually.

Upgrade openid-client to 6.8.8 and adapt discovery, PKCE, and code exchange to the v6 API. Preserve Basic client authentication and ID-token signature verification, normalize callback redirect URIs, and expand OAuth regression coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Brian DeHamer <bdehamer@github.com>
@bdehamer
bdehamer requested a review from a team as a code owner October 29, 2026 21:53
@changeset-bot

changeset-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ae376c7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sigstore/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant