service.xpcool.com/manifest/config/config.prod.yaml
夏犀麟 ebc507ee6c feat(auth): 生产全量请求/响应加密中间件
- crypto.Service 增 fullBody 开关 + DecryptRequest/EncryptResponse(会话密钥双向加密)
- 新增 middleware/APICrypto:请求整体解密 + 响应加密(public-key 豁免),未加密请求拒绝
- ResolveLogin/resolvePassword 增 fullBody 分支;admin 组中间件链调整
- injectEnv 支持 ENCRYPT_FULL_BODY/ENCRYPT_ALLOW_PLAIN(直接跑二进制需 env 注入)
2026-08-28 00:17:47 +08:00

11 lines
845 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server: { address: ":10100", openapiPath: "/api.json", swaggerPath: "/swagger" }
logger: { level: "warning", stdout: true }
database: { default: { link: "${DB_DSN}" }, recruitment: { link: "${RECRUITMENT_DB_DSN}" } }
jwt: { secret: "${JWT_SECRET}", accessExpire: "2h", refreshExpire: "720h" }
bark: { baseUrl: "${BARK_BASE_URL}", deviceKey: "${BARK_DEVICE_KEY}", pushTime: "${BARK_PUSH_TIME}" }
# 登录密码混合加密RSA + AES-GCM生产必须通过 ENCRYPT_PRIVATE_KEY 注入 PEM 私钥禁止明文登录
# fullBody=true所有 admin 接口请求/响应整体加密传输public-key 明文豁免
encrypt: { privateKey: "${ENCRYPT_PRIVATE_KEY}", allowPlain: false, fullBody: true }
# 安全日志上报令牌宿主机采集脚本携带环境变量 INTERNAL_TOKEN 注入
internalToken: "${INTERNAL_TOKEN}"