简体   繁体   English

可验证凭证 - 演示请求给出内部服务器错误

[英]Verifiable Credential - Presentation request gives an Internal Server Error

Microsoft Entra, a new Home of Microsoft Verifiable Credential is really new and nice feature. Microsoft Entra,一个新的 Microsoft 可验证凭证主页,是一个非常新的好功能。 While I am playing around the items, I found an issue which I am not sure is an issue from my code rather Its more from the platform.当我在玩这些项目时,我发现了一个我不确定是我的代码问题而不是平台问题的问题。

To give you little detail:给你一点细节:

  • Company A: I have one Microsoft Verifiable Account to create the credentials for Company A employee. A 公司:我有一个 Microsoft 可验证帐户来为 A 公司员工创建凭据。

  • Company B: I have one Microsoft Verifiable Account to verify (who likes to give a discount to those employees who are from Company A). B 公司:我有一个 Microsoft Verifiable Account 需要验证(谁喜欢给 A 公司的员工打折)。

Step 1: using Company A, I have created the Verifiable Credential and It is stored in my Microsoft Authenticator App successfully.第 1 步:使用公司 A,我已经创建了可验证凭据,并将其成功存储在我的 Microsoft Authenticator 应用程序中。

Step 2: Coming to the next part of the story, Company B generates the presentation request where It likes to verify Company A employees' identity.第 2 步:进入故事的下一部分,公司 B 生成演示请求,它想验证公司 A 员工的身份。 I am able to create that presentation request and QR code for that as well.我也能够为此创建演示请求和二维码。

Issue comes: Now, when I scan that presentation QR code using the authenticator app, It finds my stored cre.netial is matching with this request.问题来了:现在,当我使用身份验证器应用程序扫描该演示文稿二维码时,它发现我存储的 cre.netial 与此请求匹配。 so, It gives me an option to share that credential against this presentation reuqest which is good and correct.所以,它让我可以选择根据这个正确且正确的演示文稿分享该证书。 But the moment I press "Share" it wait for a second and gives me an error message.但是当我按下“分享”时,它会等待一秒钟并给我一条错误消息。

The error message is user friendly: Oops, failed to connect.错误消息是用户友好的:糟糕,连接失败。 It seems there is a problem with one of our services connecting to your device.似乎我们的一项服务连接到您的设备时出现问题。 Check your.network connection and try again.检查您的网络连接并重试。

But in technical detail, It says:但在技术细节上,它说:

Error Code: internalServerError
Error Details: A generic error has occurred on the server.; Not Found; Not Found
TimeStamp: Dec1, 2022 10:02:48 AM EST
Request ID: 438395be97f20bbcc31511351121bbaa
Correlation ID: 3sg46/0ARha0zS/XHYKGfA.6.4

It also gives an option to see the track which is way long and can not be copy in mobile clipboard.它还提供了一个选项来查看太长且无法在移动剪贴板中复制的曲目。 But I took a part of that and that is below:但我参与了其中的一部分,如下所示:

2022-11-30 17:49:33,560 INFO/Broker: [com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter:authenticationResultFromBundle][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Broker Result returned from Bundle, constructing authentication result ThreadPoolExecutor$Worker.run()@641 [pool-14-thread-1]
2022-11-30 17:49:33,562 INFO/App: MSAL acquire token silently success: com.microsoft.identity.client.AuthenticationResult@5709e74 MsalTokenRefreshManager$getTokenSilentlyAsync$4$1$onTaskCompleted$acquireTokenSilentParameters$1.onSuccess()@567 [main]
2022-11-30 17:49:33,563 INFO/Broker: [com.microsoft.identity.common.java.result.LocalAuthenticationResult][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Id Token type: IdToken ThreadPoolExecutor$Worker.run()@641 [pool-14-thread-1]
2022-11-30 17:49:33,563 INFO/Broker: [com.microsoft.identity.common.java.result.LocalAuthenticationResult][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Constructing LocalAuthentication result, AccessTokenRecord null: false, AccountRecord null: false, RefreshTokenRecord null or empty: false, IdTokenRecord null: false ThreadPoolExecutor$Worker.run()@641 [pool-14-thread-1]
2022-11-30 17:49:33,564 INFO/App: Token result: Success AadRemoteNgcAuthCheckUseCase$checkForAuth$2.invokeSuspend()@88 [DefaultDispatcher-worker-5]
2022-11-30 17:49:33,564 INFO/Broker: [CommandDispatcher:submitSilent][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Completed silent request as owner for correlation id : **b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b, with the status : COMPLETED is cacheable : true ThreadPoolExecutor$Worker.run()@641 [pool-14-thread-1]
2022-11-30 17:49:33,564 INFO/App: ListSessionsUseCase request with client request ID: 09871643-7561-4d9a-8e43-567c4d0480cb RemoteAuthenticationManager.listSessions()@201 [DefaultDispatcher-worker-5]

Just to troubleshoot :只是为了排除故障

  1. I have tried to restart my phone.我试图重新启动我的手机。
  2. Connected with wi-fi and data card.连上wifi和数据卡。
  3. I tried to check the previous Company A issuer Credential flow is still working and giving me the credential and all are working.我试图检查以前的公司 A 发行人凭据流程仍在工作并给我提供凭据并且一切正常。

So, it is not an issue from my device and neither is the issue with authenticator connectivity issue from my side.因此,这不是我设备的问题,也不是我这边的身份验证器连接问题。

I think your implementation is based on the following Azure sample .我认为您的实施基于以下 Azure 样本

If so, please comment out the line on VerifierController.cs file under PresentationCallback() method which has a statement like //payload = presentationResponse["issuers"].ToString() .如果是这样,请在PresentationCallback()方法下的VerifierController.cs文件中注释掉该行,该行具有类似//payload = presentationResponse["issuers"].ToString()的语句。 The data in the incoming request payload doesn't have "issuers" .传入请求负载中的数据没有"issuers" Instead of commenting out, you can also use the following:除了注释掉,您还可以使用以下内容:

payload = presentationResponse["verifiedCredentialsData"][0]["issuer"];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM