Redact OAuth secrets from the web-api debug request log

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃

调研方向

Issue 指出了 web-api 调试请求日志以及会泄露机密的 OAuth 参数键,但没有列出文件或测试。先找到请求参数在哪里被脱敏,并阅读相关测试。像处理 token 和 authorization 一样脱敏 client_secret、assertion 和 code_verifier,然后验证这些值在调试日志中会被隐藏。

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

描述

pkg:web-api
Summary

The web-api debug request log redacts only argument keys that match token or authorization, so some OAuth secrets show up in plain text when logLevel is debug:

  • client_secret on oauth.v2.access, oauth.v2.exchange, oauth.v2.user.access and the other OAuth methods
  • assertion on oauth.v2.user.access, which carries a bearer JWT for the urn:ietf:params:oauth:grant-type:jwt-bearer grant
  • code_verifier on oauth.v2.user.access, the PKCE verifier

Masking those keys the same way as tokens would keep them out of debug logs. This came up in review of #2872.

主要语言
TypeScript
星标
3.4k
派生
693
平均合并
1 天 10 小时
30 天内合并 PR
75

环境准备

从这里开始

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

slackapi/node-slack-sdk 的其他 Issue

查看 slackapi/node-slack-sdk 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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