Open Patrik-Stas opened 1 year ago
Owww interesting. I didn't realise that vdrtools would filter out creds based on predicates. I don't believe other implementations do (acapy credx, AFJ anoncreds), worth checking what the "norm" is.
Some might argue that it is best to still return those credentials that fail the predicate, and have the consumer check the predicate themselves. I'd imagine in a UI this could let you do cool things, like show 5 credentials (returned from get creds for proof req), but visually grey out the creds that don't meet the predicate.
Not exactly sure if I have a strong opinion about this, just putting it out there that filtering by preds may not be "normal" behaviour based on other impls I've seen.
Similar case for filtering by revocation (I.e. don't return the credential if it cannot prove the non revocation interval), we currently don't do this (mostly Bcus it's very expensive). Acapy doesn't seem to do it either, but AFJ might (haven't deep dived this part of AFJ in awhile)
That's some good points. I'll leave the issue open for any other discussion to spur out here
credx
implementation ofprover_get_credentials_for_proof_req
is currently not checking predicates. The legacyvdrtools
implementation would retrieve credentials based on restrictions, then proceed filtering found records by checking the underlying value with respect to anoncreds predicate.credx
implementation https://github.com/hyperledger/aries-vcx/pull/961/files#diff-87978475bffafb490d895e89f8a067536cc43af71cc64a098f10584338509a9fR736