Skip to content

feat!: jwx v4 cutover and v0.6.0 (Go 1.27, ML-DSA) - #22

Merged
yaronf merged 9 commits into
mainfrom
jwx-v4-cutover
Sep 1, 2026
Merged

feat!: jwx v4 cutover and v0.6.0 (Go 1.27, ML-DSA)#22
yaronf merged 9 commits into
mainfrom
jwx-v4-cutover

Conversation

@yaronf

@yaronf yaronf commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Cut over foreign JWS to github.com/lestrrat-go/jwx/v4 (≥ v4.4.0) only; remove jwx v2/v3 and NewJWSSignerV3 / NewJWSVerifierV3.
  • Raise Go floor to 1.27+; add ML-DSA via crypto/mldsa and NewJWSSigner / NewJWSVerifier.
  • Add jwskey.go constructor validation (key type/role, ECDSA curve bind, HMAC min length); reject NoSignature.
  • Hardening: malformed ECDSA keys, empty header values, nil client/signer/verifier config.
  • Docs: README upgrade guide, internal-docs/RELEASE-v0.6.0.md for the GitHub release, CI golangci-lint v2.13.1.

Made with Cursor

yaronf and others added 9 commits September 1, 2026 19:43
Drop dual jwx v2/v3 support for a single NewJWSSigner/NewJWSVerifier
path on lestrrat-go/jwx/v4, raise the Go floor to 1.27, and add an
ML-DSA-65 foreign-JWS round-trip. Prepares httpsign v0.6.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject key/alg mismatches at NewJWS* construction, document SetAllowedAlgs vs foreign JWS, and move lint to v2.13.1 so CI can target go.mod 1.27.0. Track upstream jwx ECDSA/ML-DSA AlgorithmsForKey gaps for later.

Co-authored-by: Cursor <cursoragent@cursor.com>
Upgrade httpsfv to v1.1.1 and testify to v1.12.1. Drop andreyvit/diff in favor of sergi/go-diff plus a local CharacterDiff-style test helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove the hardening follow-up notes now that reports were filed privately/upstream.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the deprecated jws.AlgorithmsForKey check with explicit stdlib type checks in jwskey.go, including RFC 7518 ECDSA curve and HMAC key-length binding plus ML-DSA parameter-set matching at NewJWS* construction.

Co-authored-by: Cursor <cursoragent@cursor.com>
Enforce asymmetric key role at NewJWSSigner/NewJWSVerifier construction so mismatches fail early instead of at Sign/Verify time.

Co-authored-by: Cursor <cursoragent@cursor.com>
Reject nil ECDSA curves at JWS key validation and in raw sign/verify paths, and return errors instead of panicking when a header map entry has no values.

Co-authored-by: Cursor <cursoragent@cursor.com>
Default nil ClientConfig in NewClient and return errors from sign/verify paths instead of panicking when Signer or Verifier config is unset.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document jwx v4 migration, ML-DSA foreign JWS usage, and SignAlg/SetAllowedAlgs for v0.6.0 callers.

Co-authored-by: Cursor <cursoragent@cursor.com>
@yaronf
yaronf merged commit e27eb95 into main Sep 1, 2026
6 checks passed
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