oauth-wg / oauth-sd-jwt-vc

draft-terbu-sd-jwt-vc
Creative Commons Zero v1.0 Universal
20 stars 12 forks source link

Add schema type metadata #231

Closed awoie closed 4 months ago

awoie commented 6 months ago

This PR includes the following:

See preview here: https://drafts.oauth.net/oauth-sd-jwt-vc/awoie/fix-229-schema/draft-ietf-oauth-sd-jwt-vc.html

Fixes https://github.com/oauth-wg/oauth-sd-jwt-vc/issues/229

awoie commented 6 months ago

@danielfett @bc-pi Do you think it makes sense to describe the base document for schema type metadata validation? For example, a verifier receiving an SD-JWT VC with Disclosures won't be able to validate the JSON schema against it before transforming the entire SD-JWT VC with Disclosures to expanded JSON document first.

awoie commented 6 months ago

@danielfett @bc-pi Should we restrict schema to specific JSON schema versions?

bc-pi commented 6 months ago

@danielfett @bc-pi Should we restrict schema to specific JSON schema versions?

I'm honestly not familiar with the intricacies of JSON schema. Is/are there a stable standard version(s) that can be referenced from a prospective RFC? The current content of the PR seems to have some normative statements but no reference. I'd think that's kind of a prerequisite to discussing version restrictions/requirements.

A few minutes of looking around and I found this https://json-schema.org/specification-links which at least suggests it's a bit messy.

Any idea if/how other actual standards documents utilize JSON schema?

bc-pi commented 6 months ago

@danielfett @bc-pi Do you think it makes sense to describe the base document for schema type metadata validation? For example, a verifier receiving an SD-JWT VC with Disclosures won't be able to validate the JSON schema against it before transforming the entire SD-JWT VC with Disclosures to expanded JSON document first.

Well, statements like "MUST validate the Verifiable Credential against the provided JSON Schema document." probably need some more clarity about what part of the VC and at what stage of transformation/processing.

danielfett commented 5 months ago

A few minutes of looking around and I found this https://json-schema.org/specification-links which at least suggests it's a bit messy.

Any idea if/how other actual standards documents utilize JSON schema?

I suggest that we proceed with merging this PR nonetheless and have a separate discussion on JSON Schema versions in an issue.

awoie commented 5 months ago

Update: We don't need IANA registration for schema, schema_uri and schema_uri#integrity since type metadata is not a JWT.

awoie commented 4 months ago

@bc-pi @danielfett Can you please check the examples I added.

awoie commented 4 months ago

@bc-pi @danielfett Can you please check the examples I added.

I believe we will need to distinguish between presentation and issuance schemas -> see #237

bc-pi commented 4 months ago

\@bc-pi \@danielfett Can you please check the examples I added.

I don't really speak JSON schema but it looks ok

awoie commented 4 months ago

left a couple of editorial remarks, but generally this looks good to me, thank you!

Thanks a lot. I updated the PR. Will merge later on the editor's call.

awoie commented 4 months ago

Merging this since all comments were addressed.