service.xpcool.com/manifest/config/config.prod.yaml
夏犀麟 06484774ad feat(auth): 登录密码 RSA+AES 混合加密传输与加密字段支持
- 新增 internal/library/crypto:RSA-OAEP(SHA-256)+AES-256-GCM 混合解密,
  私钥按 配置PEM > data/crypto/rsa_private.pem > 自动生成 三级来源,公钥 SPKI 输出
- 公开接口 POST /system/auth/public-key;LoginReq 支持 encryptedKey/encryptedData
- AdminCreate/AdminResetPwd 密码字段支持加密传输(allowPlain 仅开发联调)
- 配置 encrypt.privateKey/allowPlain;data/ 加入 gitignore 防止私钥入库
2026-08-27 23:43:41 +08:00

10 lines
728 B
Go
Raw 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 私钥禁止明文登录
encrypt: { privateKey: "${ENCRYPT_PRIVATE_KEY}", allowPlain: false }
# 安全日志上报令牌宿主机采集脚本携带环境变量 INTERNAL_TOKEN 注入
internalToken: "${INTERNAL_TOKEN}"