Support compressed (deflate) payload
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Ruby
- スター
- 3.7k
- フォーク
- 381
- 平均マージ
- 19時間 13分
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
jwt/ruby-jwt のほかの issue
-
JWT::EncodedToken raises TypeError for a non-object header対応中かも @anakinj が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
jwt/ruby-jwt#780 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
JWT::EncodedToken calls key_finder before checking the token's algorithm対応中かも @anakinj が 1 日前に担当しました。 オープンenhancement
難易度 3/5 半日 初心者へのやさしさ 42/100
jwt/ruby-jwt#781 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
JWT::EncodedToken accepts tokens with more than three segments対応中かも @anakinj が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
jwt/ruby-jwt#779 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
TheOdinProject/curriculum#31512 ·
メンテナーはふだん 1 日以内に返信
-
area/web interface
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ruby-grape/grape-swagger#1014 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
rubys/roundhouse#1757 ·
-
難易度 2/5 半日 初心者へのやさしさ 72/100
shakacode/react-on-rails-demo-flagship#102 ·
メンテナーはふだん 1 日以内に返信