JWT::JWK::Set raises on an unknown `kty`, failing the whole set (RFC 7517 §5)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Ruby
- Estrellas
- 3.7k
- Forks
- 381
- Merge medio
- 19 h 13 min
- PR fusionados (30 d)
- 8
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de jwt/ruby-jwt
-
JWT::EncodedToken raises TypeError for a non-object headerPosiblemente ocupada @anakinj la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jwt/ruby-jwt#780 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
JWT::EncodedToken calls key_finder before checking the token's algorithmPosiblemente ocupada @anakinj la tomó hoy. Abiertoenhancement
Dificultad 3/5 Medio día Aptitud para principiantes 42/100
jwt/ruby-jwt#781 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
JWT::EncodedToken accepts tokens with more than three segmentsPosiblemente ocupada @anakinj la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
jwt/ruby-jwt#779 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
jwt/ruby-jwt#723 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
jwt/ruby-jwt#428 · 7 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de jwt/ruby-jwt
Issues similares
-
Dificultad 2/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
zold-io/zold-ruby-sdk#85 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día