|
@@ -0,0 +1,32 @@
|
|
|
|
|
+# R525 研发通知(2026-11-28 01:17~01:24 · 20 分错峰档 API 契约与鉴权专题)
|
|
|
|
|
+
|
|
|
|
|
+**致研发负责人 / 后端负责人:本轮发现 1 项新增 P1 匿名私有接口可达面,请评估并修复。**
|
|
|
|
|
+
|
|
|
|
|
+## 1. N-R525-1(P1·新增)匿名可读「我的星级看板」
|
|
|
|
|
+
|
|
|
|
|
+- **实测契约(忽略型探针,匿名无 token、无凭据)**:
|
|
|
|
|
+ `POST http://cfc.iwintrue.com/api/team-star/my-view`,请求体 `{}` → **HTTP 200 / code=200 / message=success**,`data` 为非空 VO:
|
|
|
|
|
+ `currentStarLevel=1`、`nextStarLevel=2`、`totalScore=0`、`dimensionBreakdown{...}`、`gapToNextStar=8000`、`dualThresholdProgress{...}`、`conversionPaths[3]`、`twelveMonthTrajectory=[]`、`windowStart/windowEnd/windowLabel`。
|
|
|
|
|
+- **边界声明**:返回数值为哨兵 `userId=-1` 的零值看板;**未构造跨用户参数,不宣称跨用户数据泄露/覆盖**;服务端真实契约已取,测试侧未写「非 200」断言。
|
|
|
|
|
+- **根因定位**:`cfc-backend/src/main/java/com/etotem/cfc/config/JwtInterceptor.java:392-393` 对无 token 请求执行 `setAnonymousUser(request)` 注入 `userId=-1`;`LOGIN_REQUIRED_PATHS` 未收录 `/api/team-star`;`cfc-backend/src/main/java/com/etotem/cfc/controller/TeamStarController.java:38-45` 仅判 `userId == null`,哨兵 -1 穿透判空后被当作已登录用户。
|
|
|
|
|
+- **与 N-R478-1 同因**:`/api/nutrition/profile/**` 匿名读写(P0,未闭环)源于相同默认放行机制,建议一并治理。
|
|
|
|
|
+- **请求动作**:
|
|
|
|
|
+ 1. 将 `/api/team-star/**` 与 `/api/nutrition/profile/**` 纳入 `JwtInterceptor.LOGIN_REQUIRED_PATHS`;
|
|
|
|
|
+ 2. 两个控制器补 `userId <= 0 → 401`(不依赖拦截器单点);
|
|
|
|
|
+ 3. 清理 N-R478-1 探针产生的 `userId=-1` 档案行(`id=243`);
|
|
|
|
|
+ 4. auth-guard 12 点位之外补匿名负向用例(本端点 + nutrition)。
|
|
|
|
|
+- **闭环判据**:匿名调用均 401 / 空 data、无新哨兵行产生、auth-guard 全绿且连续 2 轮零漂移。
|
|
|
|
|
+
|
|
|
|
|
+## 2. 受保护对照(确认新控制器鉴权面未整体失效)
|
|
|
|
|
+
|
|
|
|
|
+- `POST /api/admin/team-profit/{config,config/star-tiers,flow/share-records,flow/award-records,cost/get,withdrawal/list}` 匿名 `{}` → **7/7 = 401「请先登录」**;
|
|
|
|
|
+- `POST /api/admin/users`、`POST /api/admin/user-current-food/rebuild-all` → 2/2 = 401(G-403-1 保持);
|
|
|
|
|
+- 假路径 `/api/__api_contract_probe_not_exist__` → 404,证明 401 来自真实受保护路由。
|
|
|
|
|
+
|
|
|
|
|
+## 3. 承袭项(本档不重复实测)
|
|
|
|
|
+
|
|
|
|
|
+- 五套(auth-guard 12 / shop-api 4 / health-contract 13 / legal-pages 6 / 越权 ISO 43):`--retest-gate` 粗判 65 retest,但窗口 26 提交中 `JwtInterceptor`/auth 相关 src 提交 = 0、针对 blocker 鉴权修复 = 0 → **承袭·未实测**,禁记通过。
|
|
|
|
|
+- 后端重启族:`startTime` 由 R524 `22:45:54` → `01:05:25`(uptime 13min),止稳信号中断,P0 维持。
|
|
|
|
|
+- N-R427-1 4/4、N-R443-1 2/2、N-R478-1 只读 get 1/1 均逐位复现;本轮未写入、未造新哨兵行。
|
|
|
|
|
+
|
|
|
|
|
+*证据:R525 报告 `docs/tdd/orchestration/report-test-2026-11-28-R525-0117.md`;台账 `docs/tdd/test/blockers.md` R525 段;git HEAD `139b8404e`(ff-only 对齐后)。*
|