Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

JSON Schema - include latest spec updates around CredSchema/digestSRI #455

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

decentralgabe
Copy link
Member

  • Add enforcement of credential schema for json schema credentials and associated tests

@codecov-commenter
Copy link

Codecov Report

Merging #455 (0b9d50b) into main (c5f453c) will increase coverage by 0.07%.
The diff coverage is 75.00%.

❗ Current head 0b9d50b differs from pull request most recent head 56929a7. Consider uploading reports for the commit 56929a7 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #455      +/-   ##
==========================================
+ Coverage   57.35%   57.42%   +0.07%     
==========================================
  Files          67       67              
  Lines        7479     7499      +20     
==========================================
+ Hits         4289     4306      +17     
- Misses       2454     2455       +1     
- Partials      736      738       +2     
Files Changed Coverage Δ
credential/model.go 39.13% <ø> (ø)
credential/schema/model.go 65.57% <ø> (ø)
credential/schema/vcjsonschema.go 60.75% <75.00%> (+5.58%) ⬆️

Copy link
Contributor

@andresuribe87 andresuribe87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will also need to validate that a VC that's setting the credentialSchema.digestSRI property, has a value which matches against the locally calculated digestSRI. This typically involves dereferencing credentialSchema.id, and then following the spec of SubResource Integrity.

I would prefer that we do that in this PR, so that the same mechanism is used for every VC (instead of special casing VCs who's type property is JsonSchemaCredential). That said, I'd understand leaving that for another PR. Up to you.

@decentralgabe
Copy link
Member Author

I'd rather take that in a separate PR, but opened an issue #456

@decentralgabe decentralgabe merged commit e745002 into main Aug 29, 2023
@decentralgabe decentralgabe deleted the update-latest-jsonschema branch August 29, 2023 16:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants