bcgov / bc-wallet-mobile

BC Wallet to hold Verifiable Credentials
Apache License 2.0
62 stars 49 forks source link

Proof Request "required" field #2261

Open al-rosenthal opened 1 week ago

al-rosenthal commented 1 week ago

Right now, BC wallet mobile app expects schema id or cred def id to be present in proof requests.

Does it make sense for a proof request to be made without either of those ids? Is this something we need to handle?

swcurran commented 1 week ago

In the AnonCreds spec, there are 8 “restrictions” that are supported, all of which are optional. The details of each are described in the spec here — restrictions. So yes, it makes sense that other restrictions could be used. Whether you want to support them in BC Wallet might be an open question. Certainly the software in BC Wallet can support all forms of restrictions. Restrictions are used when searching the credentials in the wallet for the set that satisfy the presentation request.

Further, since all are optional — there is the case that none are present — that restrictions in the presentation request is an empty array. That is taken to mean that the data is intended to be “self-attested” — provided by the holder directly (e.g. typed into a box) and not “verifiable” at all. While there are some good use cases for that, I wouldn’t think that BC Wallet is likely to support that.