server: console user and role deletes leave the cached creation time
维护者通常 4 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 72/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
从 crates/server/src/console/pages/user_pages.rs 中的 delete_user(失效处理位于第 359-379 行附近)和 crates/server/src/console/pages/role_pages.rs 中的 delete_role(第 316-337 行)开始。将它们与 management/iam_user.rs:212 和 management/iam_role.rs:174 中的管理处理程序进行比较,后者分别调用 invalidate_user_created_at 和 invalidate_role_created_at。控制台处理程序应进行相同的调用。当在 TTL 内以相同名称重新创建的主体获得新的 aws:userid 时即完成,控制台删除路径的测试可以检查这一点。
由索引模型根据 Issue 内容生成。
描述
The console's Delete user and Delete role handlers drop the deleted principal's cached credentials, policies, boundary and tags, but not its cached creation time. The management API handlers drop that too. A user or role that is deleted and then created again with the same name can therefore be evaluated with the old principal's creation time for up to auth.cache.ttl_seconds (60 s by default).
Mechanism
The creation time is an input to the principal's aws:userid (crates/auth/src/policy/principal_id.rs) and is read through the user_created_at and role_created_at caches (crates/server/src/authorization.rs:104, :206).
On main (2287d176):
management/iam_user.rs:212callsinvalidate_user_created_at, andmanagement/iam_role.rs:174callsinvalidate_role_created_at, after the delete.console/pages/user_pages.rsdelete_user(invalidations at lines 359-379) andconsole/pages/role_pages.rsdelete_role(lines 316-337) call every other invalidation but not these two.
So after a console delete, a same-name principal created within the TTL gets the deleted principal's aws:userid, and a policy condition on aws:userid written for the old principal matches the new one until the entry expires.
Reproduction
- Create user
uwith an access key, and make one request with it so the creation time is cached. - Delete
uin the console, createuagain through the management API, and give it an access key. - Within 60 s, make a request that is decided by an
aws:useridcondition. It is evaluated with the old user's id. After the TTL, or with the delete done through the management API, it uses the new id.
Expected
The console delete handlers drop the creation-time entry, as the management handlers do.
Found while writing #786.
- 主要语言
- Rust
- 星标
- 517
- 派生
- 60
- 平均合并
- 5 天 4 小时
- 30 天内合并 PR
- 76
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ExtendDB/extenddb 的其他 Issue
-
ci:stability sqlite
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 4 天内回复
-
backend:cassandra ci:stability
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 4 天内回复
查看 ExtendDB/extenddb 的全部 Issue
相似的 Issue
-
bug low-priority
难度 2/5 1-3 小时 新手友好度 76/100
dividebysandwich/rust-dos#629 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
eliasstravik/herdr-projects#758 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
-
enhancement needs:sonnet ready-for-agent
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复