Error 500 upon sharing Presentation request on wallet.walt-test.cloud #13
-
I get an error 500 when trying to authentify through the IDPKit when sharing a Presentation request. Here is the request: curl 'https://wallet.walt-test.cloud/api/wallet/siopv2/fulfillPresentation?sessionId=54cd9fe2-25a1-4cce-ba1c-86376e449f02' \
-H 'authority: wallet.walt-test.cloud' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9,fr-FR;q=0.8,fr;q=0.7' \
-H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzZWJwYWxsdWVsQGdtYWlsLmNvbSJ9.01X_LbGmxz2_OxSoO-y_rP3vNjJYg3TIsNVIELNnusQ' \
-H 'content-type: application/json' \
-H 'cookie: i18n_redirected=fr' \
-H 'origin: https://wallet.walt-test.cloud' \
-H 'referer: https://wallet.walt-test.cloud/CredentialRequest/?sessionId=54cd9fe2-25a1-4cce-ba1c-86376e449f02' \
-H 'sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "macOS"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36' \
--data-raw '[{"claimId":"0","credentialId":"urn:uuid:16985a4e-5f2f-44c3-8867-c4531e7d1f08"}]' \
--compressed And the request payload: [{claimId: "0", credentialId: "urn:uuid:16985a4e-5f2f-44c3-8867-c4531e7d1f08"}] To reproduce the issue, you can access my current test project on this branch, then launch all the services with I'm using this account I have just registered and provided with a VC of type VerifiableID: The same issue also happen when I'm connecting my Metamask wallet and sending an empty Presentation request. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
I managed to make it work with the IDPKit directly used as a provider in my Next App. TLDR: I needed to generate a DID first with the 'DNS' ecosystem before requesting a VerifiableID. I had to do the following:
The user is logged in effectively and created on the DB through Hasura (Next Auth do it automatically for a new account) Here is the output of Next Auth: [next-auth][debug][OAUTH_CALLBACK_RESPONSE] {
profile: {
id: 'did:key:z6MkedCY7K1z1jkRdZCh3t2LvHxqrNoVhAR6KZPZqGgCFsGB',
email: undefined
},
account: {
provider: 'identity-provider',
type: 'oauth',
providerAccountId: 'did:key:z6MkedCY7K1z1jkRdZCh3t2LvHxqrNoVhAR6KZPZqGgCFsGB',
access_token: 'eyJraWQiOiJjMDQ3ZjRlNDJjZjU0YjY2YWQxNTRkOGNlNTFlMDNlZiIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI4NmUyNWM2Ny1iYjU1LTQyYWYtOGJmNC1mNjljODVmNTAyMjMiLCJhdWQiOiJYaHJ2ZmVnS1RTaHFlYkxBTEVTTDVoaERqWTljMDRfVjVmbG5JQkRBYTFZIn0.cHjA7hEuaxEfTjA4SyKOvn7a0SHHMCVBoBaHhEktm88_UXcFTO4GoUIhSAB9JXm1CytG52jIzwhzms8dHVaavGKW4NACLxh1Gqm5EL5nGUJQu2MG5COjMpKG5x4srt3EPchcoa3f1Voq83_z6869WYDjbV5EPl6KRfKRLkA8sUn_gLrHKwCr98fU8wCXdfx7Ad6-D-TtcV_Sx35QRFYCB0iDzbCBeIflHEO4btg6LJ1am5j6mAtSH2aYeu7idY2ZB3iAgrGWJ4sRRgJ4ittazsUc1ZPNIANGfXCFtriEPVzwB7CQzJYF6LOObce4VXSFa7mpGTxDibwVDI7NSx3SUg',
refresh_token: 'KzXwrDgCOWix1Mf00wDXge0MSKQFDefAyHytPTFtNek',
scope: 'openid',
id_token: 'eyJraWQiOiJjMDQ3ZjRlNDJjZjU0YjY2YWQxNTRkOGNlNTFlMDNlZiIsInR5cCI6IkpXVCIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiJkaWQ6a2V5Ono2TWtlZENZN0sxejFqa1JkWkNoM3QyTHZIeHFyTm9WaEFSNktaUFpxR2dDRnNHQiIsImF1ZCI6IlhocnZmZWdLVFNocWViTEFMRVNMNWhoRGpZOWMwNF9WNWZsbklCREFhMVkiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjkwODAvYXBpL29pZGMiLCJpYXQiOjE2NjQ5MDMyODl9.fsmo4DyVo29AxnoJGJwdF_tyN201gXIXqc6tKx26pBwJ2JS36m9EyMJruUyvx6432dPfc0B4f-ARGP-DHwg3kGblRtTwYqn-H17auGM70rYJkwK-R34l7OPt1KNLK9rKnjf_sXMbRCBMrhKwOp80d4pB4aJf6LBXNY6emi4v0APstb7um_esu8ODZG41Hq1d_g8SNzz3u_woOcH3OM-FOJZc_LsCNtxBfbIVLAFToIecSt0Irz8lhdAh4RR1qZb3LvsK_9VBA7tSLUn1SLUhOJM2Lfx8TrSzqa2oPi3CNbV2UAnrYNh0uNURVPHFR8eYy5Kdm0s_2XJXAvczsYFjcg',
token_type: 'Bearer',
expires_at: 1664903589
},
OAuthProfile: { sub: 'did:key:z6MkedCY7K1z1jkRdZCh3t2LvHxqrNoVhAR6KZPZqGgCFsGB' }
} The working account credentials are I've tested with the Also with the same account, after sharing the VerifiableID, I get this page with Keycloak: |
Beta Was this translation helpful? Give feedback.
-
Hi @sebpalluel |
Beta Was this translation helpful? Give feedback.
-
Hi @sebpalluel
I got the keycloak login working using the following configuration:
Note: that some endpoints on the idpkit are accessed from within the docker-compose environment, which is why it needs to be accessed via the internal hostname http://idpkit. Whereas other endoints are called via the browser from outside docker-compose. Those need to be set to localhost. |
Beta Was this translation helpful? Give feedback.
Hi @sebpalluel
I investigated your setup and found what the problem is:
Please make sure to pull the latest idpkit docker image, as there were recent changes in the OIDC protocol and the walt-test.cloud wallet follows the new implementation of the protocol.
To get the keycload integration working in your setup:
You have configured KeyCloak to use our deployed instance on idp.walt-test.cloud, however, the client_id and client_secret are configured on your instance of idpkit inside the docker-compose setup.
Therefore the client authentication won't work, as the idpkit on idp.walt-test.cloud doesn't accept your client_id and secret.
Furthermore, the KeyCloak bug regarding the clientAuthM…