scheduling: profile refusals on appointment detail, busy-import and operational routes log nothing
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 85/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- backend, observability
调研方向
从 crates/registry-scheduling/src/auth.rs 开始;查看第 154 行的 log_authentication_refusal!,并在第 132、182、189、214 行添加匹配的调用。镜像现有的 reads-scope 测试,以断言每条路由使用一个缺少 profile 的有效 token 产生一条无值的 info log。完成意味着所有四条路由都记录该诊断并且测试通过。
由索引模型根据 Issue 内容生成。
描述
Found in review of #2357.
Observed
When a verified caller lacks the required profile, require_scope (crates/registry-scheduling/src/auth.rs:144) emits the rate-limited, value-free diagnostic log_authentication_refusal! (line 154) before returning AuthenticationError::Profile. The reads and explain routes go through it.
Three routes return the same Profile refusal without any log line:
- Appointment detail:
authenticate_appointment_detailreturnsErr(AuthenticationError::Profile)atauth.rs:132. - Busy-source preview and apply:
authenticate_busy_sourcemaps both identity and profile failures with.map_err(|_| AuthenticationError::Profile)atauth.rs:182andauth.rs:189. - Operational read:
authenticate_operational_readmapsauthorize_operational_readfailures the same way atauth.rs:214.
The HTTP response is correct on all three (ProfileNotAuthorized, http.rs:905); nothing leaks. This is an observability gap only: an operator misconfiguring appointmentReadProfiles or busyImportProfiles sees no log line explaining the refusals.
Expected
Emit the same log_authentication_refusal! diagnostic (stage Scope, a fixed message, a remedy naming the profile configuration keys, no scope, profile or claim values) at each of the four sites above. Test: call each route with a valid token lacking the profile and assert a single value-free info record, mirroring the existing reads-scope coverage.
- 主要语言
- Rust
- 星标
- 2
- 派生
- 0
- 平均合并
- 7 小时 52 分钟
- 30 天内合并 PR
- 264
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
registrystack/registry-stack 的其他 Issue
-
area:breg criticality:p3 documentation good first issue triage:needs-implementation
难度 1/5 1 小时以内 新手友好度 85/100
registrystack/registry-stack#2415 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
registrystack/registry-stack#2381 ·
维护者通常 1 天内回复
-
area:docs documentation
难度 2/5 1-3 小时 新手友好度 76/100
registrystack/registry-stack#2253 ·
维护者通常 1 天内回复
-
area:coordinator bug
难度 2/5 1-3 小时 新手友好度 82/100
registrystack/registry-stack#2252 ·
维护者通常 1 天内回复
-
area:release bug
难度 2/5 1-3 小时 新手友好度 74/100
registrystack/registry-stack#2248 ·
维护者通常 1 天内回复
查看 registrystack/registry-stack 的全部 Issue
相似的 Issue
-
`mise doctor` Shows Not Installed Lazy Tools as Problems可能已有人在做 @jdx 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
nn::linear: weight initialization depends on `bias` because the bias is created before the weight可能已有人在做 @monfortema 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
LaurentMazare/tch-rs#1067 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
astral-sh/astral-codec#234 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100