Support base64 padding in json web tokens
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
issue でリンクされている正規表現の行にある lib/verify-stream.js から始め、issue #49 と upstream jsonwebtoken issue で参照されている前提を確認します。padding を含む AWS Cognito トークンの検証動作を比較し、ユニバーサルサポートと flag のどちらを採用するかによるセキュリティおよび互換性への影響を評価します。サポートする動作とその検証カバレッジが決定され、文書化されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This library appears to have taken a hard-line stance that = characters should not be allowed in the JWT encoding, per issue #49 and upstream at auth0/node-jsonwebtoken#607 - and it seems this is in keeping with the JWT spec.
However, I'm working with a feature in AWS whereby you can have a load balancer authenticate users using Cognito and then pass JWTs in special headers to your service. I am trying to verify those JWTs. The tokens include = characters (this is even documented here - "The JWT format includes a header, payload, and signature that are base64 URL encoded and includes padding characters at the end"). Although I realize these tokens are invalid, I'm not in a position to change their format.
One would think a workaround would be to just strip these padding characters from the token, but if the token payload includes padding characters then removing these invalidates the signature.
Fundamentally, I think that in order to verify these tokens while still using the jsonwebtoken library, then this library would need to be changed. I think specifically this line in verify-stream.js.
Would the maintainers of this library consider supporting padding characters in this regex? I'm not sure whether there would be negative security implications of universally supporting padding characters. If there are, perhaps this could be enabled behind a flag.
Thanks!
- 主要言語
- JavaScript
- スター
- 721
- フォーク
- 140
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
auth0/node-jws のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Remove unnecessary safe-buffer dependency (use Node.js built-in Buffer API)再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 50/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
vercel-labs/agent-skills#348 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
NanmiCoder/dsh-agent-teams#289 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
c1overzz/dsh-bili-scroll#124 ·
メンテナーはふだん 1 日以内に返信