本指南说明如何使用 Cobo CLI 生成和管理 API Key 密钥对和 App Key 密钥对。所有密钥都用于与 Cobo WaaS 2.0 进行认证。Documentation Index
Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
Use this file to discover all available pages before exploring further.
生成密钥
使用keys generate 命令生成新的 API Key 密钥对(API Key 和 API Secret)或 App Key 密钥对( App Key 和 App Secret)。
用法
选项
--key-type <key_type>:指定要生成的密钥类型(API或APP)。默认为API。--alg <algorithm>:指定密钥生成算法。默认为ed25519。--force:强制替换现有密钥。
示例
生成新的 API Key 密钥对:密钥存储
生成的密钥安全地存储在您的配置文件中(默认:~/.cobo/config.toml)。
最佳实践
- 定期轮换您的 API Key 密钥对或 App Key 密钥对,以保持安全。
- 为开发和生产环境使用不同的密钥。
- 限制每个密钥的权限,仅授予其所需的最低权限。
- 监控密钥的使用情况,并注销可能已被泄露的密钥。
