名称: 密钥管理编排器 描述: 跨密钥管理系统编排加密密钥生命周期管理,包括生成、轮换和销毁 允许使用的工具:
- Bash
- Read
- Write
- Glob
- Grep
- WebFetch
密钥管理编排器技能
目的
跨密钥管理系统编排加密密钥生命周期管理,包括密钥生成、分发、轮换、销毁和合规监控。
能力
密钥生成
- 使用适当的熵生成加密密钥
- 使用适当的算法和大小创建密钥
- 在硬件安全模块(HSM)边界内生成密钥
- 为非对称操作创建密钥对
- 使用批准的密钥派生函数(KDF)生成派生密钥
- 记录密钥生成元数据
密钥轮换管理
- 定义和执行轮换策略
- 安排自动密钥轮换
- 执行零停机轮换
- 协调多系统轮换
- 维护密钥版本历史
- 处理轮换回滚
密钥使用跟踪
- 监控密钥使用模式
- 跟踪加密/解密操作
- 识别未使用或孤立的密钥
- 检测异常使用模式
- 根据策略衡量密钥使用情况
- 生成使用审计报告
密钥销毁
- 执行安全密钥销毁
- 验证销毁完整性
- 记录销毁证书
- 处理备份中的密钥材料
- 管理加密粉碎操作
- 维护销毁审计跟踪
HSM集成
- 与硬件安全模块接口
- 管理HSM密钥层次结构
- 处理HSM备份和恢复
- 监控HSM运行状况和容量
- 协调多HSM部署
- 验证FIPS合规性
密钥操作审计
- 记录所有密钥生命周期事件
- 生成合规审计报告
- 跟踪密钥保管人变更
- 记录密钥仪式
- 监控策略违规
- 支持取证调查
管理的密钥类型
| 密钥类型 | 使用场景 | 轮换周期 |
|---|---|---|
| 主密钥 | 密钥加密密钥 | 每年 |
| 数据密钥 | 数据加密 | 每月 |
| 签名密钥 | 代码/文档签名 | 每年 |
| TLS密钥 | 传输安全 | 每年 |
| API密钥 | 服务认证 | 90天 |
| 会话密钥 | 临时加密 | 每次会话 |
密钥生命周期阶段
- 生成: 使用适当熵安全创建密钥
- 分发: 安全传输密钥到授权系统
- 激活: 启用密钥进行加密操作
- 使用: 活跃的加密操作
- 轮换: 计划密钥替换
- 停用: 密钥禁用但保留
- 销毁: 安全永久删除
集成
- HashiCorp Vault: 秘密和密钥管理
- AWS KMS: 云密钥管理服务
- Azure Key Vault: 微软密钥管理
- GCP Cloud KMS: 谷歌密钥管理
- Thales Luna HSM: 硬件安全模块
- AWS CloudHSM: 基于云的HSM
目标流程
- 密码学和密钥管理流程
- 秘密管理
- 证书生命周期管理
- 数据加密密钥管理
输入模式
{
"type": "object",
"properties": {
"operation": {
"type": "string",
"enum": ["generate", "rotate", "destroy", "audit", "policy-check", "inventory"],
"description": "密钥管理操作"
},
"keyType": {
"type": "string",
"enum": ["master", "data", "signing", "tls", "api", "session"],
"description": "加密密钥类型"
},
"algorithm": {
"type": "string",
"enum": ["AES-256", "RSA-2048", "RSA-4096", "ECDSA-P256", "ECDSA-P384", "Ed25519"],
"description": "加密算法"
},
"keyManagementSystem": {
"type": "string",
"enum": ["vault", "aws-kms", "azure-keyvault", "gcp-kms", "hsm"],
"description": "目标密钥管理系统"
},
"keyId": {
"type": "string",
"description": "现有密钥操作的密钥标识符"
},
"rotationPolicy": {
"type": "object",
"properties": {
"maxAge": { "type": "string" },
"autoRotate": { "type": "boolean" },
"notifyBefore": { "type": "string" }
}
},
"destructionVerification": {
"type": "boolean",
"description": "要求销毁验证"
},
"complianceFrameworks": {
"type": "array",
"items": {
"type": "string",
"enum": ["NIST", "FIPS-140-3", "PCI-DSS", "HIPAA", "SOC2"]
}
}
},
"required": ["operation"]
}
输出模式
{
"type": "object",
"properties": {
"operationId": {
"type": "string"
},
"operation": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"keyInfo": {
"type": "object",
"properties": {
"keyId": { "type": "string" },
"keyType": { "type": "string" },
"algorithm": { "type": "string" },
"keySize": { "type": "integer" },
"createdAt": { "type": "string" },
"expiresAt": { "type": "string" },
"version": { "type": "integer" },
"status": { "type": "string", "enum": ["active", "inactive", "pending-destruction", "destroyed"] }
}
},
"rotationStatus": {
"type": "object",
"properties": {
"previousVersion": { "type": "integer" },
"newVersion": { "type": "integer" },
"rotatedAt": { "type": "string" },
"affectedSystems": { "type": "array" },
"rollbackAvailable": { "type": "boolean" }
}
},
"destructionCertificate": {
"type": "object",
"properties": {
"keyId": { "type": "string" },
"destroyedAt": { "type": "string" },
"method": { "type": "string" },
"verificationHash": { "type": "string" },
"witness": { "type": "string" }
}
},
"auditReport": {
"type": "object",
"properties": {
"period": { "type": "object" },
"keysInventoried": { "type": "integer" },
"rotationsCompleted": { "type": "integer" },
"policyViolations": { "type": "integer" },
"unusedKeys": { "type": "array" },
"expiringKeys": { "type": "array" }
}
},
"complianceStatus": {
"type": "object",
"properties": {
"framework": { "type": "string" },
"compliant": { "type": "boolean" },
"findings": { "type": "array" }
}
},
"recommendations": {
"type": "array",
"items": { "type": "string" }
}
}
}
使用示例
技能: {
名称: '密钥管理编排器',
上下文: {
操作: 'rotate',
密钥类型: 'data',
密钥管理系统: 'vault',
密钥ID: 'prod-encryption-key',
轮换策略: {
最大使用期限: '90d',
自动轮换: true,
提前通知: '7d'
}
}
}