disable reuse_access_token — bypasses RequirementCheck and blocks DPoP

未关闭 适合新手
#367 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
70/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ruby

调研方向

打开 config/initializers/doorkeeper.rb 并找到 reuse_access_token 设置。阅读授权流程的上下文,并检查该设置如何影响令牌复用和认证器的执行。删除或注释掉该设置,然后确认每次授权都会生成新的令牌并运行完整的认证器;部署后监控令牌表的增长情况。

由索引模型根据 Issue 内容生成。

描述

bug

problem

doorkeeper is configured with reuse_access_token. if a user has already authorized an app and visits /oauth/authorize again, doorkeeper returns the existing token without re-running resource_owner_authenticator — which means the RequirementCheck.passes? gate we just added never fires.

a user who authorized an app before an AppRequirement was added sails through on re-authorization because doorkeeper hands back the old token.

also fundamentally incompatible with DPoP (RFC 9449), which binds tokens to key pairs — two different clients should get different tokens even for the same user+scope.

fix

remove or comment out reuse_access_token in config/initializers/doorkeeper.rb. every authorization mints a fresh token.

behavioral change: existing apps will stop getting reused tokens. more rows in the tokens table, every authorize flow runs the full authenticator. needs monitoring on deploy.

主要语言
Ruby
星标
85
派生
72
平均合并
3 天 12 小时
30 天内合并 PR
22

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

hackclub/auth 的其他 Issue

查看 hackclub/auth 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。