Azure无法访问KeyVault以发行可验证的凭据

发布于 2025-02-05 17:22:00 字数 712 浏览 2 评论 0 原文

我正在尝试使用azure的示例代码用于发行和发行和验证NodeJS中可验证的凭据。我遵循,并设法设置一个可验证的凭据预览,如示例中。但是,当我运行 run.sh 脚本时,我会在Microsoft-authenticator应用中扫描生成的QR码,我会在应用程序中获得以下异常:

info/did_sdk/:httperror:403身体:{“ requestId”:“ myrequestid”,“ date”:“ currentDate”,“ mscv”:“ mymscv”,“ mymscv”,“ error”:{“ code”:“ code”:“ forbidden” ,“消息”:“无法使用给定凭据访问KeyVault资源。”}}}

I'm trying to use Azure's sample code for issuing and verifying Verifiable Credentials in Nodejs. I've followed the tutorial, and manage to setup a Verifiable Credential preview, as in the example. But when I run the run.sh script and I scan the generated qr code in my microsoft-authenticator app I get the following exception in my app:

INFO/DID_SDK/: HttpError: 403 body: {"requestId":"myRequestId", "date":"currentDate", "mscv":"myMscv", "error":{"code":"Forbidden", "message":"Unable to access Keyvault resource with given credentials."}}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

め可乐爱微笑 2025-02-12 17:22:02

错误 403禁止 通常不需要访问请求的资源的权限(在您的情况下)。

请检查您是否已设置 访问策略 。如果没有,请将其设置为以下内容:

转到Azure Portal - >转到钥匙保险库设置 - >访问政策 - >添加访问策略 - >用户 - >选择帐户 - >添加密钥权限。

​修改密钥和秘密将 无效凭据。 检查此 Microsoft文章

请确保在管理员帐户 Azure AD AD AD可验证的凭据服务请求Service Service API principal api principal api principal 中确保在密钥库中设置访问策略 /strong>您创建的。

如果启用了防火墙策略,也有可能获得此错误。

打开 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.

![image

You should not modify the keys and secrets once created. Modifying keys and secrets will invalidate credentials. Check this Microsoft Article.

Make sure to set access policies in your key vault for both the administrator account of the Azure AD Verifiable Credentials service and for the Request Service API principal that you created.

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文