[DevOps] 密钥管理 #19

Closed
opened 2026-05-05 01:01:35 +08:00 by admin · 0 comments
Owner

背景

API Key、数据库密码等敏感信息以明文存储在 .env 文件中,存在泄露风险。

需求

  1. 敏感配置迁移到环境变量 + Docker secrets
  2. 或使用 Vault/Consul 集中管理
  3. 至少:.env 加入 .gitignore,提供 .env.example 模板
  4. 数据库密码、OpenAI Key、JWT Secret 强制从环境变量读取

涉及文件

  • backend/app/core/config.py — 读取方式调整
  • .gitignore — 增加 .env

优先级

中 — 安全合规

## 背景 API Key、数据库密码等敏感信息以明文存储在 .env 文件中,存在泄露风险。 ## 需求 1. 敏感配置迁移到环境变量 + Docker secrets 2. 或使用 Vault/Consul 集中管理 3. 至少:.env 加入 .gitignore,提供 .env.example 模板 4. 数据库密码、OpenAI Key、JWT Secret 强制从环境变量读取 ## 涉及文件 - backend/app/core/config.py — 读取方式调整 - .gitignore — 增加 .env ## 优先级 中 — 安全合规
admin self-assigned this 2026-05-05 01:01:35 +08:00
admin closed this issue 2026-05-10 14:39:10 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#19