Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

scheduling: profile refusals on appointment detail, busy-import and operational routes log nothing

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

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

调研方向

从 crates/registry-scheduling/src/auth.rs 开始;查看第 154 行的 log_authentication_refusal!,并在第 132、182、189、214 行添加匹配的调用。镜像现有的 reads-scope 测试,以断言每条路由使用一个缺少 profile 的有效 token 产生一条无值的 info log。完成意味着所有四条路由都记录该诊断并且测试通过。

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

描述

area:scheduling criticality:p3 enhancement triage:needs-implementation

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_detail returns Err(AuthenticationError::Profile) at auth.rs:132.
  • Busy-source preview and apply: authenticate_busy_source maps both identity and profile failures with .map_err(|_| AuthenticationError::Profile) at auth.rs:182 and auth.rs:189.
  • Operational read: authenticate_operational_read maps authorize_operational_read failures the same way at auth.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

环境准备

从这里开始

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

registrystack/registry-stack 的其他 Issue

查看 registrystack/registry-stack 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

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