hyperledger / anoncreds-rs

anoncreds-rs
https://wiki.hyperledger.org/display/anoncreds
Apache License 2.0
73 stars 51 forks source link

Security best practices for verifying AnonCreds W3C VPs #322

Open TimoGlastra opened 5 months ago

TimoGlastra commented 5 months ago

It might be good to set up some best practices for verifying AnonCreds W3C VPs, especially in relation to usage with for example PEX.

Here's some security things I've ran into that maybe allow for some unepxected behaviour:

I think some concrete things we can do to make bypassing validation harder is:

I think especially the verificationMethod on the proof is what we currently used to fetch the credential definitions before passing it to the verify method, however it could be that the actual credential is using different credential definitions. (a smart constructed request could exploit this)

There's probably more things to consider but these are few I encountered when tinkering with AnonCreds RS

TimoGlastra commented 5 months ago

I think we should address these in the AnonCreds RS lib. We could also address these in Credo / ACA-Py but it'd mean duplication of work, and also that other frameworks need to be very careful in adopting AnonCreds W3C

swcurran commented 5 months ago

@andrewwhitehead is working on this now. Let’s hold off on 0.2.0 for this. Reasonable?