Bump jwt dependency to support 3.x

Open
#58 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
ruby

Research direction

Start with getstream-ruby.gemspec and inspect the SDK's jwt encode/decode call sites, then run the existing test suite. Done means the dependency constraint supports the chosen jwt 3.x range and CI covers jwt 3.x with the tests passing.

Written by the indexing model from the issue text.

Description

Summary

The current gemspec pins jwt ~> 2.0, which forces consumers to stay on the 2.x line and prevents adopting jwt 3.x in any Ruby app that depends on this gem.

# getstream-ruby.gemspec (v6.1.1)
spec.add_dependency 'jwt', '~> 2.0'

Motivation

The jwt 3.x line introduced several hardenings that apps may want to opt into:

  • Rejection of nil/empty HMAC keys at sign and verify (related to CVE-2026-45363 / GHSA-c32j-vqhx-rx3x)
  • Enforcement of RSA keys >= 2048 bits
  • Stricter RFC 4648 base64 decoding
  • Mandatory signature verification before payload access

For consumers already running jwt 3.x in production, adding getstream-ruby currently forces a downgrade, which (a) loses those hardenings and (b) leaves the app stuck on whichever 2.x patch line ends up being the resolved version.

Question

Is bumping the constraint to allow jwt 3.x (e.g. jwt, '>= 2.0', '< 4' or jwt, '~> 3.0') on the roadmap? Quick scan of the SDK usage of jwt suggests the encode/decode call sites should be compatible across 2.x and 3.x, but the maintainers will know best.

There's prior precedent for loosening a dependency constraint in this gem (dotenv — see #25 and #27), so this would follow a similar pattern.

Happy to open a PR with the constraint bump (+ CI matrix entry for jwt 3.x) if that would help.

Thanks!

Dominant language
Ruby
Stars
1
Forks
3
Avg merge
5h 58m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GetStream/getstream-ruby

All issues in GetStream/getstream-ruby

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.