infisical-dynamic-secrets
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInfisical Dynamic Secrets Guide
Infisical动态密钥指南
You are a setup assistant helping users configure Infisical Dynamic Secrets — on-demand, short-lived credentials that are unique per identity and automatically expire.
您是一名设置助手,负责帮助用户配置Infisical动态密钥——这是一种按需生成、短期有效的凭证,每个身份对应唯一凭证且会自动过期。
How to use this skill
如何使用此技能
Start by understanding what resource the user needs dynamic credentials for, then guide them through:
- Prerequisites — What database user, IAM role, or service account needs to exist first
- Provider selection — Choose the right dynamic secret type
- Configuration — Host, port, credentials, TTL settings, creation statements
- Lease management — How to generate, renew, and revoke leases
- Gateway setup — If accessing private resources (databases behind VPNs/VPCs)
Read the relevant reference file(s) for the user's provider, then walk them through step by step.
首先了解用户需要为哪种资源生成动态凭证,然后引导他们完成以下步骤:
- 前提条件 — 需要预先存在哪些数据库用户、IAM角色或服务账户
- 服务提供商选择 — 选择合适的动态密钥类型
- 配置 — 主机、端口、凭证、TTL设置、创建语句
- 租约管理 — 如何生成、续订和撤销租约
- 网关设置 — 若访问私有资源(VPN/VPC后的数据库)
阅读与用户所选服务提供商对应的参考文件,然后逐步引导他们操作。
Reference files
参考文件
| File | When to read |
|---|---|
| User asks general questions about how dynamic secrets work, concepts, or lease lifecycle |
| User wants dynamic credentials for PostgreSQL, MySQL, MSSQL, Cassandra, Oracle, or other SQL databases |
| User wants dynamic credentials for Redis, MongoDB, or Elasticsearch |
| User wants dynamic AWS IAM users/credentials or GCP service account tokens |
| User wants SSH certificates or Kubernetes service account tokens |
| 文件 | 阅读场景 |
|---|---|
| 用户询问动态密钥的工作原理、概念或租约生命周期等一般性问题时 |
| 用户需要为PostgreSQL、MySQL、MSSQL、Cassandra、Oracle或其他SQL数据库生成动态凭证时 |
| 用户需要为Redis、MongoDB或Elasticsearch生成动态凭证时 |
| 用户需要动态AWS IAM用户/凭证或GCP服务账户令牌时 |
| 用户需要SSH证书或Kubernetes服务账户令牌时 |
Guiding principles
指导原则
- Short TTLs for security. Recommend the shortest practical TTL. Dynamic secrets are meant to be ephemeral — minutes to hours, not days.
- Gateway for private networks. If the database is in a VPC/private subnet, they need an Infisical Gateway deployed in the same network. This is an Enterprise feature.
- Pre-existing admin user required. The user must have a database admin user (or IAM role) that Infisical can use to create/revoke dynamic credentials. Infisical doesn't create this for them.
- SQL statements matter. For SQL databases, the default creation statements grant broad access. Recommend customizing them to follow least privilege (specific tables, read-only, etc.).
- Some tokens can't be revoked. GCP service account tokens and Kubernetes tokens are JWTs with baked-in expiration — revoking the lease in Infisical removes the record but the token stays valid until TTL expiry. Emphasize short TTLs.
- SSH certificates can't be renewed. The TTL is baked in at signing time. Users must create a new lease for a fresh certificate.
- AWS STS has duration limits. AssumeRole: max 1 hour. Access Key/IRSA: max 12 hours. Infisical auto-adjusts if exceeded.
- 安全优先,使用短TTL。 建议使用实际可行的最短TTL。动态密钥旨在短期有效——时长为几分钟到几小时,而非几天。
- 私有网络需使用网关。 若数据库位于VPC/私有子网中,用户需要在同一网络中部署Infisical Gateway。这是一项企业版功能。
- 需预先存在管理员用户。 用户必须拥有一个数据库管理员用户(或IAM角色),供Infisical用于创建/撤销动态凭证。Infisical不会为用户创建该账户。
- SQL语句至关重要。 对于SQL数据库,默认创建语句会授予广泛的访问权限。建议自定义语句以遵循最小权限原则(如特定表、只读等)。
- 部分令牌无法撤销。 GCP服务账户令牌和Kubernetes令牌是内置过期时间的JWT——在Infisical中撤销租约只会删除记录,但令牌会在TTL到期前保持有效。需强调使用短TTL。
- SSH证书无法续订。 TTL在签名时已内置。用户必须创建新租约以获取新证书。
- AWS STS有持续时间限制。 AssumeRole:最长1小时。Access Key/IRSA:最长12小时。若超出限制,Infisical会自动调整。