Azure无法访问KeyVault以发行可验证的凭据
我正在尝试使用azure的示例代码用于发行和发行和验证NodeJS中可验证的凭据。我遵循,并设法设置一个可验证的凭据预览,如示例中。但是,当我运行 run.sh
脚本时,我会在Microsoft-authenticator应用中扫描生成的QR码,我会在应用程序中获得以下异常:
info/did_sdk/:httperror:403身体:{“ requestId”:“ myrequestid”,“ date”:“ currentDate”,“ mscv”:“ mymscv”,“ mymscv”,“ error”:{“ code”:“ code”:“ forbidden” ,“消息”:“无法使用给定凭据访问KeyVault资源。”}}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
错误
403禁止
通常不需要访问请求的资源的权限(在您的情况下)。请检查您是否已设置 访问策略 。如果没有,请将其设置为以下内容:
转到Azure Portal - >转到钥匙保险库设置 - >访问政策 - >添加访问策略 - >用户 - >选择帐户 - >添加密钥权限。
修改密钥和秘密将 无效凭据。 检查此 Microsoft文章 。
如果启用了防火墙策略,也有可能获得此错误。
打开 azure键库记录 ,这将为您带来错误背后的原因(访问策略/防火墙策略)。
基于原因,您可以通过遵循以下参考:
http 403:故障排除 - Azure键库| Microsoft docs
Azidentity | Azure App Services 钥匙库防火墙访问
The error
403 forbidden
usually occurs if you don't have required permissions to access the requested resource (in your case Key Vault).Please check whether you have set access policies for the Key Vault before setting up verifiable credentials. If not, set it like below:
Go to Azure portal -> Go to key vault settings -> Access policies -> Add access policies -> User -> Select account -> Add key permissions.
You should not modify the keys and secrets once created. Modifying keys and secrets will invalidate credentials. Check this Microsoft Article.
There is also a possibility to get this error if firewall policy is enabled.
Turn on Azure Key Vault logging that will give you the reason behind the error ( Access policy/Firewall policy).
Based on the reason, you can troubleshoot by following the below reference:
HTTP 403: Troubleshooting - Azure Key Vault | Microsoft Docs
AZIdentity | Key Vault Firewall access by Azure App Services