Azure.Security.KeyVault.Secrets 对比 Microsoft.Azure.KeyVault

Azure.Security.KeyVault.Secrets vs Microsoft.Azure.KeyVault

这两个库似乎有相似的用途:安全地存储和控制对令牌、密码、API 密钥和其他秘密的访问。

我一直在使用 Microsoft.Azure.KeyVault 并取得了一些成功,不是用于配置机密,而是用于密钥。 直到最近我才发现 Azure.Security.KeyVault.Secrets.

release notes 我发现了这个:

Updated Microsoft.Azure.KeyVault with its successor Azure.Security.KeyVault.Secrets to resolve key vault references.

2个库的区别属性是什么,如何确定合适的选择。

我是否应该将发行说明解释为暗示 Microsoft.Azure.KeyVault 已过时或将被弃用?

What are the distinguishing attributes of the 2 libraries, and how to determine the appropriate choice.

Azure.Security.KeyVault.Secrets 是 Key Vault 客户端库的最新版本,建议将其用于任何新项目。有关与旧版的主要区别,请参阅此 Major changes from Microsoft.Azure.KeyVault. For usage, please refer to this doc.

其他包Microsoft.Azure.KeyVault is now a legacy one, if you have some old projects which use it, you can keep using it. For usage, please refer to this doc.

您可以参考此 article 以了解有关发布这些新客户端库(包括 Azure.Security.KeyVault.Secrets)的更多详细信息。

Should I interpret the release note to imply Microsoft.Azure.KeyVault is obsolete or will be deprecated?

很难说将来是否会弃用旧版本。至少从 Release History, it says the new one is not a direct replacement for Microsoft.Azure.KeyVault(like other azure services, for example, azure storage service published a new version package recently, but not officially pronounced the old one is deprecated). But we suggest you should use the new one in any new create project like it says in the doc,截图如下:

希望对您有所帮助。