hyperledger / anoncreds-spec

The specification for AnonCreds verifiable credential exchange.
https://hyperledger.github.io/anoncreds-spec/
Apache License 2.0
45 stars 24 forks source link

Should WQL be a part of AnonCreds? Where is it used? --- <tl;dr> No it should not #118

Closed swcurran closed 1 year ago

swcurran commented 1 year ago

I'm going through the presentation section of the specification and reading about the presentation request format. I've always found that part of AnonCreds frustratingly undocumented. There is not a good resource to point those new to writing a proof requests about what can put into a request. The "best" resource that devs I know have used is reading through the tests that are in the Indy SDK. However, after seeing the examples in the current spec about WQL, those results don't touch what is possible.

Question: Should we formalize that AnonCreds uses WQL and include in an Appendix a reference to the language? Alternatively: Is it invalid to use WQL in the "restrictions" of an AnonCreds Presentation Request?

As I see it, WQL would be used in three places:

Related question: In the future, the DIF Presentation Exchange specification could be use for the AnonCreds Presentation Request. Would an implementation path for DIF PE be a conversion to an AnonCreds Presentation Request (as we know it today) or to replace the use of WQL (above) with full DIF PE support?

swcurran commented 1 year ago

BTW -- the "WQL Specification" referenced in the current spec is woefully inadequate. I'll look for a better resource. If anyone knows of one, please let me know.

swcurran commented 1 year ago

My $0.02CDN is that because the 1.0 specification is defined as what we have today, we should embrace it -- assuming we can adequately document it. Worst case is that we use the limited syntax we know works -- lists (ANDed and ORed) of the 6 primitives -- schema_issuer_did, schema_id, cred_def_issuer_did, cred_def_id, claim_name, claim_name_value. Those are the six, right? See the documentation is terrible :-).

swcurran commented 1 year ago

Question for the developers...is full WQL support allowed in a Presentation Request restriction? Or is a more limited structure converted to WQL and that is used when searching for credentials? That would make the question moot.

@TimoGlastra @andrewwhitehead

swcurran commented 1 year ago

New answer. I tested putting WQL into a presentation request and it is not supported. It could be helpful to mention it in the "credential searching" section as a tactic, but it is not directly used in presentation requests. I do have to find out what items are supported in the presentation request, but WQL itself is not. Removing it from the Presentation Request section of the spec.