decentralized-identity / presentation-exchange

Specification that codifies an inter-related pair of data formats for defining proof presentations (Presentation Definition) and subsequent proof submissions (Presentation Submission)
https://identity.foundation/presentation-exchange
Apache License 2.0
84 stars 36 forks source link

Choosing the right schema #148

Closed NickDarvey closed 4 years ago

NickDarvey commented 4 years ago

I'm trying to understand what's an appropriate thing to shove into: $.presentation_definition.input_descriptors[*].schema.uri

The schema of the candidate input MUST match one of the Input Descriptor schema object uri values exactly. If the scheme is a hashlink or a similar value that points to immutable content, this means the content of the schema, not just the URI from which it is downloaded, must also match. If one of the values is an exact match, proceed, if there are no exact matches, skip to the next candidate input.

Is schema referring to a JSON Schema specifically, or can it be anything? If it is a JSON Schema, does that mean a User Agent could only find matching Verifiable Credentials if they have a credentialSchema. If it's anything, how does the User Agent know what kind of schema validation to do?

For example, if wanted to request a credential looking like one in the test vectors, what should I be putting in my schema?

I might be introducing an XY problem here... so to be specific, if I wanted to request an address file in an Australian format (G-NAF) to be presented. I see there's some different views which ought to be useful. I was imagining I would declare a Verifiable Credential type that refers to the G-NAF schema but adds some meaning to the address (e.g. 'residence', 'postal'), but I'm not sure how to then define a Presentation Definition that requests it.

NickDarvey commented 4 years ago

Closing in favour of https://github.com/decentralized-identity/presentation-exchange/issues/134#issuecomment-721624167