Azure-Samples / active-directory-verifiable-credentials

A code sample demonstrating how to use Azure Active Directory's preview functionality to issue and consume verifiable credentials.
108 stars 64 forks source link

The task couldn't be completed error for custom issuer #20

Closed ansaryansu closed 3 years ago

ansaryansu commented 3 years ago

The default issuer present in the sample has been working fine. But when I tried to create a custom issuer and try to get a verified credential, I'm getting the following error.

image

I would like to know Is there any significance for the value provided for kvSigningKeyId in didconfig.json. I just used the same key in the demo since I'm not sure from where I get that. For kvRemoteSigningKeyId, I gave the proper value from the key vault.

The logs are attached:

Calling app required broker protocol version: 1.0 Broker app protocol version: 1.0 Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:027 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3613","correlation_id":"UNSET"}] Connection OK Common protocol version: 1.0 Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:037 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3779","correlation_id":"UNSET"}] Received successful result from Broker Content Provider. Android 27 Thread.run()@764 [pool-13-thread-1] 02-09 09:51:29:040 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3613","correlation_id":"UNSET"}] Broker content provider invoked for uriType: 10 Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:041 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3613","correlation_id":"UNSET"}] MicrosoftBrokerServiceOperation starts getBrokerAccounts for package name: com.azure.authenticator Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:046 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3779","correlation_id":"UNSET"}] Able to establish the connect, the broker protocol version in common is [1.0] Android 27 Thread.run()@764 [pool-13-thread-1] 02-09 09:51:29:060 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3613","correlation_id":"UNSET"}] No account matching broker account type exists. Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:062 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3613","correlation_id":"UNSET"}] Get accounts, raw payload size :2 compressed size 22 Android 27 Thread.run()@764 [pool-1-thread-1] 02-09 09:51:29:063 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3779","correlation_id":"UNSET"}] Request to BrokerContentProvider for uri path /brokerApi/getBrokerAccounts Android 27 Thread.run()@764 [pool-13-thread-1] 02-09 09:51:29:066 UTC INFO/Broker: [2021-02-09 09:51:29 - {"thread_id":"3779","correlation_id":"UNSET"}] Received successful result from Broker Content Provider. Android 27 Thread.run()@764 [pool-13-thread-1] 02-09 08:59:47:697 UTC ERROR/DID_SDK/: Error loading Request [main] 02-09 08:59:47:699 UTC ERROR/DID_SDK/: [main] 02-09 09:01:50:605 UTC DEBUG/DID_SDK/: CardFlowViewModel state bundle saved: [] [main] 02-09 09:12:58:715 UTC ERROR/DID_SDK/: Error loading Request [main] 02-09 09:12:58:716 UTC ERROR/DID_SDK/: [main] 02-09 09:51:33:638 UTC ERROR/DID_SDK/: Error loading Request [main] 02-09 09:51:33:640 UTC ERROR/DID_SDK/: [main] 02-09 08:58:21:767 UTC DEBUG/Brooklyn: Brooklyn module disabled [main] 02-09 08:58:21:787 UTC DEBUG/Brooklyn: Enterprise deny list refresh periodic worker scheduled. [main] 02-09 08:58:22:408 UTC DEBUG/Brooklyn: EnterpriseDenyListRefreshWorker worker started. [DefaultDispatcher-worker-1] 02-09 08:58:22:475 UTC DEBUG/Brooklyn: Number of denyListsToRefresh to refresh : 0 [DefaultDispatcher-worker-1] 02-09 08:58:22:476 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 08:58:22:479 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 08:58:22:479 UTC DEBUG/Brooklyn: Brooklyn saved state is 2 and current state is ALLOW [DefaultDispatcher-worker-1] 02-09 08:58:22:480 UTC DEBUG/Brooklyn: Brooklyn module enabled [DefaultDispatcher-worker-1] 02-09 08:58:22:481 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 08:58:22:588 UTC DEBUG/Brooklyn: EnterpriseDenyListRefreshWorker worker completed. Time taken : 0.178 seconds. [DefaultDispatcher-worker-1] 02-09 08:58:22:887 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 08:58:22:889 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 08:58:22:889 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 08:58:23:441 UTC DEBUG/Brooklyn: Brooklyn module enabled [main] 02-09 08:58:23:458 UTC DEBUG/Brooklyn: Enterprise deny list refresh periodic worker scheduled. [main] 02-09 08:58:24:023 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:58:24:025 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:58:24:025 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:58:24:275 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-2] 02-09 08:58:24:277 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-2] 02-09 08:58:24:279 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-2] 02-09 08:58:32:299 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:58:32:301 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:58:32:301 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:58:32:520 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-2] 02-09 08:58:32:522 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-2] 02-09 08:58:32:523 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-2] 02-09 08:58:32:761 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 08:58:32:762 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 08:58:32:763 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 08:58:37:625 UTC DEBUG/Brooklyn: Navigating from Credentials page to Sign in page [main] 02-09 08:58:37:669 UTC DEBUG/Brooklyn: Import Failed. Sign in to import passwords Dialog displayed. [main] 02-09 08:58:38:849 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:58:38:853 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:58:38:855 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:58:38:910 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 08:58:38:913 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 08:58:38:915 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 08:58:48:495 UTC DEBUG/Brooklyn: Navigating from Credentials page to Sign in page [main] 02-09 08:58:48:522 UTC DEBUG/Brooklyn: Import Failed. Sign in to import passwords Dialog displayed. [main] 02-09 08:58:49:527 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:58:49:530 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:58:49:531 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:58:49:588 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-3] 02-09 08:58:49:589 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-3] 02-09 08:58:49:590 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-3] 02-09 08:58:59:851 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:58:59:854 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:58:59:855 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:58:59:899 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 08:58:59:901 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 08:58:59:902 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 08:59:04:742 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 08:59:04:746 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 08:59:04:747 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 08:59:04:814 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-9] 02-09 08:59:04:816 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-9] 02-09 08:59:04:817 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-9] 02-09 09:10:30:383 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 09:10:30:389 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 09:10:30:390 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 09:10:30:447 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-5] 02-09 09:10:30:448 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-5] 02-09 09:10:30:449 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-5] 02-09 09:14:21:447 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-5] 02-09 09:14:21:452 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-5] 02-09 09:14:21:455 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-5] 02-09 09:14:21:524 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 09:14:21:527 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 09:14:21:528 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 09:19:32:066 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-6] 02-09 09:19:32:069 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-6] 02-09 09:19:32:070 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-6] 02-09 09:19:32:122 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-3] 02-09 09:19:32:125 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-3] 02-09 09:19:32:126 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-3] 02-09 09:19:33:746 UTC DEBUG/Brooklyn: Navigating from Credentials page to Sign in page [main] 02-09 09:19:33:801 UTC DEBUG/Brooklyn: Import Failed. Sign in to import passwords Dialog displayed. [main] 02-09 09:19:34:436 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-3] 02-09 09:19:34:439 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-3] 02-09 09:19:34:441 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-3] 02-09 09:19:34:488 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 09:19:34:491 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 09:19:34:492 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 09:20:14:443 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-1] 02-09 09:20:14:448 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-1] 02-09 09:20:14:451 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-1] 02-09 09:20:14:495 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-2] 02-09 09:20:14:498 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-2] 02-09 09:20:14:499 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-2] 02-09 09:50:56:962 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-6] 02-09 09:50:56:965 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-6] 02-09 09:50:56:966 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-6] 02-09 09:50:57:049 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-4] 02-09 09:50:57:058 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-4] 02-09 09:50:57:060 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-4] 02-09 09:51:28:774 UTC DEBUG/Brooklyn: Configure and Display Brooklyn Enterprise controls called [DefaultDispatcher-worker-8] 02-09 09:51:28:791 UTC DEBUG/Brooklyn: allow listed account present [DefaultDispatcher-worker-8] 02-09 09:51:28:791 UTC DEBUG/Brooklyn: Brooklyn current state saved to ALLOW [DefaultDispatcher-worker-8]

App details: App version: 6.2102.0762 App version code: 202107620 ADAL version: 3.1.0 Broker version: 3.4.1

            Device details:
            Android version: 8.1.0
            Android build: asus/WW_X00TD/ASUS_X00T_2:8.1.0/OPM1/15.2016.1810.337-20181106:user/release-keys
            Device name: ASUS_X00T_2
            Device ID: OPM1
            Device manufacturer: asus
            Device model: ASUS_X00TD
            Device display: OPM1.WW_Phone-15.2016.1810.337-20181106
            Device brand: asus
            Device hardware: qcom
            Locale: en_IN

ACCOUNTS None

mahoekst commented 3 years ago

Hey, those 2 keys need to be matched. ! points to the keyname in Azure (private key) and the other is the keyname in the DID document. If they are different the match isn't correct and signing won't work. Once we open up for public preview you can create your own issuer and the docs will tell you how to get the values for those keynames so signing the messages will work correctly. For now, just use the didconfig as is since that points to our demo environments keys,