New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion - Consider renaming schema -> type #213
Comments
I suggest to also consider to use a simple type element instead of an array. I'm not sure what the use case of the array is. If a verifier is ready to accept alternative credentials, it can use multiple ' input_descriptors' along with 'submission_requirements'. |
@tlodderstedt An array is needed because the type of a VC is an array. It is not hierarchical, so you cannot simply present the most refined subtype. If you present a single value then several different VCs might match (and if you present the VerifiableCredential type then all VCs will match). Having an array provides the maximum flexibility for the verifier to chose which VCs are required |
To make things more concrete here is a proposed syntax change Below is a relevant extract from an input descriptor object as it stands within the spec today
I proposed we both rename schema to type but also change the JSON value type of this element to an array (or string as per @tlodderstedt suggestion). This would result in the following:
Where the logic of this array within the context of an input descriptor object would be OR (e.g I want your bank account credential of type v1 OR v2) OR instead type as a string would result in the following
Why? Currently the syntax declares an array of objects which allows data model extension on a per array element basis with the fields Determining whether type should be a string OR an array of strings is an interesting question. The only use-case I can see for allowing it to be an array is if we believe patterns will emerge where the same credential is referred to by multiple distinct types (e.g versioning might be a valid case here as shown above, however it may also be an anti-pattern for types to be versioned). A counter argument to this point is that allowing type to be an array may create a developer anti-pattern and hence cause un-wieldy requests that abuse this syntax. |
@David-Chadwick it sounds like your use-case would have the type value in the input descriptor be an array where the logic of the array is AND? For example the following:
Is interpreted as asking for a credential of type X AND Y? If this is correct can you give some use-cases for this syntax? |
We currently do not have enough experience of VC types to know if each VC will have just two types (the generic VerifiableCredential type and its specific type), or whether people will try to subtype, supertype or have multiple inheritance types. I know that in some current implementations, because there is a lack of official VC issuers (e.g. for driving licences, employment, utility bills etc) then the implementors are issuing one megaVC that contains all the properties the subject needs for the use case. What the type is I dont know. But they might say its a set of DrivingLicense, CouncilBill and Employment etc.). Depending on the choice they have made for the VC type, they might need the input descriptor to match their set, because they are selecting multiple sets of subject properties from the megaVC. |
I think there are no objections to renaming the property name itself to |
(separating out another issues discussed here) whether it should be a string is an interesting question, but given that input_descriptors can grow bigger in size, I also think
should be interpreted as requesting a credential of type X OR Y. X AND Y seems to be a not-yet established use-case right now and if it becomes more used in the future, |
https://w3c.github.io/vc-data-model/#types
Setting aside the JSON-LD aspect of credential types, the examples in PE are clearly targeted at JSON Schema... This is probably a mistake, I would rely on this property from the W3C Standard for JSON Schema instead: https://w3c.github.io/vc-data-model/#data-schemas
I strongly suggest not conflating JSON-LD types and JSON Schema TLDR: |
I keep forgetting this spec isn't about W3C VC Data Model... |
Filtering on the JSON schema rather than the credential type is semantically wrong in my opinion. For example, the address schema element occurs in many different types of VCs. But the RP will most likely want to specify the type of credential that they want to be presented that contains an address, rather than any type of credential that contains an address schema element in it. Different types of credentials have more trust associated with them e.g. a driving license with an address compared to a club membership card with an address. |
The spec does not care about what you move around.... channeling @csuwildcat does better to use the constraint language on |
PROPOSAL from OIDC/PE call:
Please provide feedback, and we can do a PR to add these modifications. |
ACTION ITEM: Daniel will do PR based on the agreed upon simplified array value, with bikeshed-forcing-prop name, for funzies. |
Handing off to @JaceHensley, who is doing this within his PR for the move to adopting the same normalized functionality of Fields to evaluate the type/schema. |
Currently the term
schema
in the input descriptors data model creates the in-correct association that it is attempting to convey not only a logical grouping of claims/credentials being requested but also instead the shape of the data those claims or credentials are expressed within (i.e how they concretely manifest within say a JSON structure). In order to clear up this confusion I would suggest renaming this field totype
which better conveys what this request element is attempting to communicate.The text was updated successfully, but these errors were encountered: