This commit is contained in:
2026-06-16 14:34:09 +08:00
parent 1236865f4b
commit 4c56c7cb04
126 changed files with 14802 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
---
title: API Key 管理
sidebarTitle: API Key
description: 创建、轮换与权限最佳实践
---
# API Key 管理
## 创建
控制台 → **设置 → API Key** → **创建**。建议命名包含环境与用途,例如 `prod-report-agent`。
## 存储
- 使用环境变量:`HAIYUSHUKE_API_KEY`
- 密钥管理系统KMS / Vault中保存勿提交至 Git
## 轮换流程
1. 创建新 Key
2. 在应用配置中灰度切换
3. 确认流量稳定后禁用旧 Key
## 泄露应急
若 Key 已泄露:立即 **禁用** 该 Key → 新建 → 排查仓库与 CI 日志是否残留。