hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
122 stars 81 forks source link

Prover: support predicates for credx credential selection #962

Open Patrik-Stas opened 1 year ago

Patrik-Stas commented 1 year ago
gmulhearn commented 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)

Patrik-Stas commented 1 year ago

That's some good points. I'll leave the issue open for any other discussion to spur out here