GoogleOidcVerifier treats string "false" as a verified email claim
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
从 src/google/adk/cli/trigger_routes.py 中的 GoogleOidcVerifier 开始,检查 email_verified claim 的验证方式。复现列出的布尔值和字符串情况,然后确认 verifier 只接受实际的 True 值,同时保留 allowlist 邮箱检查。
由索引模型根据 Issue 内容生成。
描述
Summary
GoogleOidcVerifier currently checks the email_verified claim using Python truthiness:
if (
not claims.get("email_verified")
or claims.get("email") not in self._allowed_emails
):
A non-empty string such as "false" is truthy in Python, so it passes this check when the email is allowlisted.
Reproduction
Using the same condition as the current verifier:
email_verified=False -> REJECT
email_verified="false" -> ACCEPT
email_verified=True -> ACCEPT
email_verified="" -> REJECT
The relevant implementation is in:
src/google/adk/cli/trigger_routes.py → GoogleOidcVerifier.
Expected behavior
The verifier should require an actual boolean True, for example:
claims.get("email_verified") is True
or otherwise validate the claim type explicitly before trusting it.
Context
This behavior was also publicly noted in google/adk-go commit 490f24cbc3aa7a9f9472175ba0d848530dc5b4f4, which states that ADK Python's truthiness check accepts non-empty strings including "false".
I have not identified a production Google-issued ID-token path that currently emits email_verified as the string "false", so I am reporting this as a correctness / defensive validation issue rather than claiming a demonstrated authentication bypass.
- 主要语言
- Python
- 星标
- 21.6k
- 派生
- 4k
- 平均合并
- 8 小时 5 分钟
- 30 天内合并 PR
- 6
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/adk-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
google/adk-python#7298 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
google/adk-python#7292 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
google/adk-python#7282 · 2 条评论 ·
维护者通常 1 天内回复
-
core needs review
难度 2/5 1-3 小时 新手友好度 78/100
google/adk-python#7266 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
mcp
难度 2/5 1-3 小时 新手友好度 78/100
google/adk-python#7265 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 google/adk-python 的全部 Issue
相似的 Issue
-
correction metadata
难度 2/5 1-3 小时 新手友好度 68/100
acl-org/acl-anthology#10104 · 1 条评论 ·
维护者通常 1 天内回复
-
bug status/needs-triage
难度 2/5 1-3 小时 新手友好度 86/100
prowler-cloud/prowler#12885 · 1 条评论 ·
维护者通常 1 天内回复
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed variance未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 88/100
selimfirat/pysad#107 ·
维护者通常 1 天内回复
-
bug ci-failure high priority
难度 1/5 1 小时以内 新手友好度 88/100
vllm-project/vllm-omni#8194 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复