Azure KeyVault 托管存储帐户

Azure KeyVault Managed Storage Account

我正在尝试在 Azure 中实施 KeyVault 托管存储帐户,以使用 KeyVault 轮换存储密钥。我确实遵循了同时使用 "ServicePrincipalID" 和 "UserPrincipalID" 的文档,但在我的例子中,我正在配置我的资源并使用我的服务主体实施所有涉及的步骤(因为我们使用带有服务主体的 VSTS 进行部署)并使用 "ServicePrincipalID" 作为 ObjectID 代替 "UserPrincipalID"(因为在配置和 post-配置过程中没有用户干预)。我确实授予了我的服务主体 "Owner" 角色和 keyvault 访问存储所需的所有权限。但是,当我执行 "Add-AzureKeyVaultManagedStorageAccount" 时,出现以下错误 "KeyVault is unable to perform the action on behalf of the caller"。所以我不确定我仍然缺少什么访问权限,即使在让我的委托人成为所有者之后也是如此。请在下面找到我的屏幕截图以获取更多详细信息。很高兴听到任何跨越这一障碍的建议。

Error KeyVault details

谢谢 柴坦亚·阿拉迪。

i get the below error which says "KeyVault is unable to perform the action on behalf of the caller". So i am not sure what access i am still missing, even after making my principal as Owner.

很遗憾,我们现在不能用服务原则来做到这一点。 AAD 不支持为服务原则调用方令牌获取 OBO(OnBehalfOf) 令牌。

我们需要使用 用户凭据而不是服务主体凭据。就存储帐户密钥而言,有些操作目前只能代表用户而不是服务主体