Closed Radiokot closed 4 months ago
@DOBEN @eb-concordium The verifier can't parse requests containing reveal of new attributes.
The request which works (200 OK), containing reveal of an old attribute firstName
:
{"presentationContext":"7fb546cd185db58421070aac59d0c91922c49d173fb944695c920fb15f69f947","proof":{"created":"2024-07-23T11:22:01.562Z","proofValue":[],"type":"ConcordiumWeakLinkingProofV1"},"type":"VerifiablePresentation","verifiableCredential":[{"credentialSubject":{"id":"did:ccd:testnet:cred:8280babfd0a412ea2aeb2f707193e804a6104d150c5e095343c8b225ba496ad6c208a9e6bf54990a966f7d0b54cfed2e","proof":{"created":"2024-07-23T11:22:01.561Z","proofValue":[{"attribute":"John","proof":"df0ddf8d269fa2c97305ad28bafa163b0e26b3cb3d8e64fff91f5a3c97f43dd556bc8c8019845b5e670ddc9c833f38773dbbd30258aa3a6b3a7f2dbd5abaaf37","type":"RevealAttribute"}],"type":"ConcordiumZKProofV3"},"statement":[{"attributeTag":"firstName","type":"RevealAttribute"}]},"issuer":"did:ccd:testnet:idp:0","type":["VerifiableCredential","ConcordiumVerifiableCredential"]}]}
The request which doesn't work (400 Invalid request. Failed to parse presentation: Failed to deserialize the JSON body into the target type), containing reveal of a new attribute legalCountry
:
{"presentationContext":"ace81888cbfd22cc2fd7cdfa3d705fb828ac214288b53dcdbaee62ae564b5624","proof":{"created":"2024-07-23T11:16:35.048293017Z","proofValue":[],"type":"ConcordiumWeakLinkingProofV1"},"type":"VerifiablePresentation","verifiableCredential":[{"credentialSubject":{"id":"did:ccd:testnet:cred:b1d4cbe287a3e69f2301bb68da2f87f84ef3c39eea6f759d28ab4862fd2b0d5d2e9487795fb67e5a7057fb7c40441ea2","proof":{"created":"2024-07-23T11:16:35.047863517Z","proofValue":[{"attribute":"UA","proof":"0ef229771134ba9400f4de80e3d734fb3ef911039c59853b698363e43df859a1354cc05eb4346a885d81f768d17edcc53ac27c78a6f30c28e3b8272a8740573a","type":"RevealAttribute"}],"type":"ConcordiumZKProofV3"},"statement":[{"attributeTag":"legalCountry","type":"RevealAttribute"}]},"issuer":"did:ccd:testnet:idp:4","type":["VerifiableCredential","ConcordiumVerifiableCredential"]}]}
Just changing attributeTag
in the request which works to legalCountry
leads to the same parsing error.
cURL command to test requests locally:
curl -XPOST "http://localhost:8080/v0/verify" -H "Content-Type: application/json" --data 'JSON_GOES_HERE' -v
The ZK proof couldn't be parsed because the four companyID
attributes were added in this commit but the submodule link in this PR didn’t include these changes yet.
https://github.com/Concordium/concordium-base/commit/c6c8c451cea5d5a31a1db54ae67edbd530abf877
"legalName",
"legalCountry",
"businessNumber",
"registrationAuth",
Updated to: https://github.com/Concordium/concordium-rust-sdk/pull/200
Thank you, Doris, for making it work, I approve the changes from my side 🤝
Purpose
Update Rust SDK dependency. This will make the new ID attributes (company) available for the ZK verifiers and the proof explorer.
Changes
web3id-verfier
binary might be to run it with all default options (e.g.cargo run --bin web3id-verifier
), the behavior to open the help menu when no flags/options are present in the command has been removed.example
folder had theirCargo.lock
file rebuilt to resolve dependency issues.Checklist