完善七牛回调验签与重试策略文档

This commit is contained in:
hello-dd-code
2026-02-28 16:46:03 +08:00
parent d64267accc
commit 3499139060
2 changed files with 58 additions and 0 deletions
@@ -0,0 +1,27 @@
# 七牛直传与回调验签验证记录(2026-02-28)
对应 issue`#13 [P1][T10] 七牛云直传配置与回调验签`
## 验证项
1. 上传凭证配置
- `QINIU_CALLBACK_URL/QINIU_CALLBACK_BODY/QINIU_CALLBACK_BODY_TYPE` 已接入配置读取。
- token 生成时 callback 策略可注入 putPolicy。
2. 回调验签
- 七牛回调签名校验方法:`VerifyCallbackSignature`
- 验证通过:合法签名请求返回 200。
- 验证失败:非法签名请求返回 401。
3. 失败重试策略
- 回调处理约定:
- `401/400`:非重试型错误(验签失败、参数错误)
- `503`:可重试型错误(业务临时故障)
## 测试命令
```bash
go test ./internal/common/qiniu/service -v
go test ./internal/common/qiniu/handler -v
go test ./...
```