JWT::JWK::Set raises on an unknown `kty`, failing the whole set (RFC 7517 §5)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Read the JWT::JWK::Set construction path and its handling of unsupported key types, then add coverage for a JWKS containing both a recognized key and an unknown kty. Verify that the unknown member is ignored while the recognized key remains available for lookup and verification. The issue offers a reproduction harness, but does not name specific source or test files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
Building a JWT::JWK::Set from a JWKS that contains a key with an unrecognised kty raises JWT::JWKError: Key type AKP not supported, so the whole set fails. Per RFC 7517 section 5 an unrecognised key should be ignored, not fatal, so one post-quantum key in a published JWKS takes down verification of the classical keys with it.
Reproduction
require "jwt"
JWT::JWK::Set.new(mixed_jwks) # RSA + one {"kty" => "AKP", ...} (ML-DSA, RFC 9964)
# JWT::JWKError: Key type AKP not supported
Measured against ruby-jwt 3.2.0. The set builds fine once the AKP key is removed. Fixture and probe available on request.
Why this matters
RFC 7517 section 5: "Implementations SHOULD ignore JWKs within a JWK Set that use kty values that are not understood by them." ML-DSA (FIPS 204 / RFC 9964, kty: "AKP") is starting to appear in published key sets as post-quantum migration begins. When an issuer adds one to a JWKS that ruby-jwt consumers read, those consumers stop verifying every signature from that issuer, including classical RS256/ES256, on a spec-compliant key publication they do not control. In federated deployments that is an externally triggered outage.
Suggested fix
When constructing a JWT::JWK::Set, skip a member whose kty is unsupported (optionally surface it) rather than raising, so the recognised keys still load and remain usable for kid lookup. This implements the RFC section 5 SHOULD and leaves recognised keys unchanged.
Offer
Happy to share the reproduction harness (mixed classical + AKP JWKS plus a control) and to open a PR with the per-key skip and a test.
- Ngôn ngữ chính
- Ruby
- Star
- 3.7k
- Fork
- 381
- Merge trung bình
- 14 giờ 13 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của jwt/ruby-jwt
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
jwt/ruby-jwt#786 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Release with release-pleaseĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
jwt/ruby-jwt#723 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
jwt/ruby-jwt#428 · 7 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Introduce JWE supportĐang mởenhancement feature help wanted up for grabs
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
jwt/ruby-jwt#80 · 11 bình luận · 8 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
internal product:ai-gateway size: S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Kong/developer.konghq.com#7931 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
RFC 0035: window function examples diverge from SQL:2023 9.23 SR 5a (rank() without ORDER BY)Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
partiql/partiql-lang#105 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
rails/rails-dom-testing#136 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nesquena/steward-os#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tech debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày