Support base64 padding in json web tokens
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
从 issue 中链接的正则表达式所在行开始查看 lib/verify-stream.js,然后审查 issue #49 和 upstream jsonwebtoken issue 中提到的假设。比较带 padding 的 AWS Cognito token 的验证行为,并评估提供通用支持而不是使用 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
- 星标
- 720
- 派生
- 136
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
auth0/node-jws 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 25/100
-
Remove unnecessary safe-buffer dependency (use Node.js built-in Buffer API)可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 50/100
-
难度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
docs hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 85/100
pacocartones/free-llm-api-hub#347 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
cytoscape/cytoscape.js#3536 ·
维护者通常 15 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
cuttle-cards/cuttle#1440 ·
维护者通常 1 天内回复
-
URL-encoded parser builds nested objects nothing reads可能已有人在做 @Senthil455 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 82/100
Janani-bn/CivicFix#168 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
code-yeongyu/oh-my-openagent#10172 ·
维护者通常 1 天内回复