Azure Key Vault Keys SDK for Rust
使用 Rust 管理 Azure Key Vault 密钥
需要从 Rust 应用程序中安全管理 Azure Key Vault 中的加密密钥。本技能提供全面指导,帮助您使用 Azure Key Vault 密钥 SDK 创建、管理密钥并执行加密操作。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“Azure Key Vault Keys SDK for Rust”。 如何从 Rust 身份验证到 Azure Key Vault?
预期结果:
使用 azure_identity crate 中的 DeveloperToolsCredential 进行开发,或使用 ManagedIdentityCredential 进行生产。使用您的 vault URL 和凭据创建 KeyClient。凭据会自动处理令牌获取。
正在使用“Azure Key Vault Keys SDK for Rust”。 何时应该使用 HSM 密钥 vs 常规密钥?
预期结果:
在合规要求、敏感数据加密或密钥必须永远留在硬件安全模块时使用 HSM 密钥(RSA-HSM、EC-HSM)。常规密钥适用于 Azure 托管 HSM 提供足够安全性的通用加密操作。
安全审计
安全This is a prompt-only skill containing only documentation (SKILL.md) with no executable code. Static analysis scanned 0 files and detected 0 security issues. The skill provides safe guidance for using the Azure Key Vault Keys SDK in Rust for cryptographic key management.
质量评分
你能构建什么
云应用程序的安全密钥管理
在 Azure Key Vault 中安全存储和管理加密密钥,而不是在应用程序代码中
HSM 保护的密钥操作
为合规性和高安全性要求使用硬件安全模块保护的密钥
不暴露密钥的加密操作
执行签名和加密操作,而无需向应用程序暴露私钥
试试这些提示
如何使用 Rust SDK 在 Azure Key Vault 中创建新的 RSA 密钥?
展示如何使用 Azure Key Vault Rust SDK 创建用于数字签名的椭圆曲线密钥。
如何使用 Rust 在 Azure Key Vault 中备份和恢复密钥?
在生产 Rust 应用程序中使用 Azure Key Vault 密钥的最佳实践是什么?
最佳实践
- 在生产环境中使用 ManagedIdentityCredential,而不是硬编码凭据
- 在 Key Vault 上启用软删除以恢复意外删除的密钥
- 通过定期创建新密钥版本来使用密钥轮换
避免
- 将密钥材料存储在代码或环境变量中而不是 Key Vault
- 在生产环境中使用开发者凭据
- 在生产 Key Vault 上禁用软删除