Support compressed (deflate) payload
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reading the linked RFC 7516 section 4.1.3 and tracing how ruby-jwt decodes and verifies payloads. The issue proposes inflating DEFLATE data between Base64 decoding and JSON parsing while retaining the raw encoded parts for signature verification; creation/signing is explicitly out of scope for the reporter. Done would require agreed behavior and tests for compressed-payload verification, but the issue has had no comment for years.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
See: RFC 7516 4.1.3
I am working with:
in Ruby.
I'm working in a constrained Ruby environment (Rhomobile platform) and ruby-jwt is well-suited for the environment since it has few dependencies. (I've used ruby-jwt before to implement openid-connect in that environment.)
Smart Health Cards are jws with I think only a small twist: the payload is compressed with DEFLATE. The signature is over the Base64 header and payload. But the payload is opaque to ruby-jwt, and it will fail trying verify claims because the payload is unintelligible to ruby-jwt.
FWIW, headers look something like:
{"zip":"DEF","alg":"ES256","kid":"7JvktUpf1_9NPwdM-70FJT3YdyTiSe2IvmVxxgDSRb0"}
Above is as implemented by California Department of Public Health for their digital Covid immunization records. (Yes the kid is real, it's no secret it's the kid of the current/only public key.)
May not take a lot to support. To read/verify, for example, would require inflating the payload after decoding the Base64, but before parsing the JSON, while still using the raw Base64 header and payload for computing the signature for signature verification. Have not examined creation/signing, as it's not something I need to do.
I've worked around for now by just using ad-hoc code and OpenSSL without ruby-jwt objects, though I do use JWT::SecurityUtils lightly. But I would love to use ruby-jwt.
Since I didn't get far with ruby-jwt I'm unclear how well supported EC is. There could be variations in the format, including possibly certificate chain.
I don't know if there are other use cases where payloads are compressed like this?
Is there an interest in supporting compressed payloads?
Willing to implement and/or help. I'd rather see this incorporated into ruby-jwt rather than making my own variant, and would be good to discuss.
Edit: I updated with RFC7516 4.1.3 reference. I left my original commentary, because Smart Health Cards are now emerging the real world, and I think may become one of the first popular use cases for compressed payload? The compression is done because these are encoded into QR Code images as one embodiment, and it makes quite a dense QR even with the compression.
- 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 3/5 1-2 días Aptitud para principiantes 68/100
jwt/ruby-jwt#743 · 1 comentario ·
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
Todos los issues de jwt/ruby-jwt
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
openfoodfoundation/openfoodnetwork#14970 ·
Los mantenedores suelen responder en 1 día
-
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
-
Alert banner for sign-in updateAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pulibrary/pdc_describe#2502 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100