Azure 密钥保管库 key/secret 版本控制

Azure key vault key/secret versioning

我打算将密钥保存在密钥保管库中,但我不清楚密钥和机密的版本控制,我对 Azure 密钥保管库上 key/secret 的版本控制有一些疑问。

  1. 如何创建现有密钥的新版本?
  2. 是否可以解密使用相同密钥的不同版本加密的数据?
  3. 是否可以为特定版本的密钥设置到期日期?
  1. 当您创建同名密钥时,Key Vault 会自动创建一个新版本,如 Create Key API:
  2. 中所述

If the named key already exists, Azure Key Vault creates a new version of the key.

  1. 是的。创建密钥时,Key Vault returns 包含版本的完整密钥 ID(请参阅创建密钥响应中的 kid 字段)。您可以在 Decrypt API.

  2. 中指定包括版本在内的完整密钥 ID
  3. 是的。创建密钥和 Update Key API 都允许您指定到期日期(请参阅 exp 属性)。

以上内容也适用于机密。