Validation Issue for Proof Requests
Image bcgovimages/aries-cloudagent:py36-1.16-1_0.7.4-rc0. The verifier can send, and the holder may receive a presentation_request with a proof request like this.
{
"requested_attributes": [
{
"name": "name",
"restrictions": [{"cred_def_id": "B2eSSEsaCqwhhgacwBrstn:3:CL:323404:default"}]
}
],
"requested_predicates": [],
"non_revoked": {}
}
and that is successful, the holder has a present_proof request in state received when GET'ing from /present-proof/records/ . However when that proof_request gets loaded from the wallet, validation occurs that throws an error, as both version and name are expected, however were not validated on receipt.
by loading i mean hitting the /present-proof/records/{pres_exch_id}/credentials or the http://localhost:8031/present-proof/records/{pres_exch_id}/send-presentation
after hitting either of these endpoint, acapy immediately recognizes the proof_request is not in a valid shape, and throws a problem_report and sets the presentation_request to abandoned.
this proof request
{
"name":"example name",
"version":"1.0.0",
"requested_attributes": [
{
"name": "name",
"restrictions": [{"cred_def_id": "B2eSSEsaCqwhhgacwBrstn:3:CL:323404:default"}]
}
],
"requested_predicates": [],
"non_revoked": {}
}
is valid and those endpoints that 'load' the proof request behave as expected.
Expected behaviour:
Agent of the verifier throws an error if the proof_request is malformed (missing required attributes like version and name)