Go to file
zerosaturation b7022d2dc1 fix(backend): auth boundary — trusted identity from ctx (batch 2)
- 新增 pkg/authctx: 从 Dubbo attachment/gRPC metadata 提取可信 user_id/star_id,
  统一覆盖 req 同名字段, 缺身份返 Unauthenticated。
- 各 provider 接入(堵身份伪造/越权):
  * moderation SubmitReport 等 6 RPC(举报人伪造)
  * asset CheckAssetLike/GetAssetQrcode/TrackShare(点赞/分享归因伪造)
  * social CheckFriendship(修 starID=0 隐私预言机)
  * activity PurchaseItem/BatchPurchaseItem(水晶扣费伪造)等 5 RPC
  * gallery/aiChat/task/notification 迁移 authctx, 删散落 extractUserInfo*
- social 正确性: GetUserLikedAssets OR 显式分组(防御); GetRandomUsersByStar 真随机(去 rand.Seed)。
- gateway: /auth/validate 移入 AuthMiddleware 保护组(/refresh 保留,依赖注入身份)。
- 删 userService 已迁移死函数; notification 缺身份错误码统一为 Unauthenticated。
- 各 provider 单测(伪造身份被覆盖 + 缺身份拒绝)。

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-23 01:12:35 +08:00
.agents/skills
.tmp feat:增加二维码验证真伪的功能 2026-07-13 11:22:56 +08:00
backend fix(backend): auth boundary — trusted identity from ctx (batch 2) 2026-07-23 01:12:35 +08:00
docker fix:notification/moderation service healthcheck 配置错误 2026-07-21 12:12:46 +08:00
docs docs: backend audit report 2026-07-21 (findings + corrections) 2026-07-23 01:11:13 +08:00
frontend fix:补齐appBUG 2026-07-22 16:29:39 +08:00
k8s
mock
scripts
.gitignore
AGENTS.md
CLAUDE.md docs:新增后端bug修改文档 2026-07-21 21:14:22 +08:00
README.md

TopFans