Support compressed (deflate) payload
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 3.7k
- Forks
- 381
- Ø Merge
- 15 Std. 15 Min.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus jwt/ruby-jwt
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
jwt/ruby-jwt#786 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
jwt/ruby-jwt#743 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
jwt/ruby-jwt#723 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Introduce JWE supportOffenenhancement feature help wanted up for grabs
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
jwt/ruby-jwt#80 · 11 Kommentare · 8 Reaktionen ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
swombat/souls-house#795 ·
Maintainer antworten meist innerhalb von 1 Tag
-
allow favicon to be served from CDN/CORS (i.e. treat it the same as the avatar)Evtl. vergeben @enkaskal hat das heute übernommen. Offenenhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
cotes2020/jekyll-theme-chirpy#2811 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Add a dark modeOffenaccessibility enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
samiromer2/Ruby-Consent-Portal#35 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100