-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Context-Based Validation To VC & VP Creation #105
Comments
Can we also update SSI context value to https://w3id.org/traceability/v1 Line 14 in 5e3e857
|
@fkim7 There are some complications with this that make me think we should revisit this later or at least have a conversation about it. We need to have a discussion about JSON-LD processing and the JSON-LD playground |
@echenknox How do you think is the best way to detect whether a document adheres to a JSON-LD context? Most implementations I have seen don't exactly have a strict mode and hence you end up just getting back whatever does match. The playground does have a strict mode (I think) but it behaves strangely upon testing |
@fkim7 I tried to get a credential from the sandbox but couldn't. Can you paste one of the examples of a |
https://www.notion.so/Sample-BankAccount-VC-50e1bcc600c14ab79a78f8bfb0e5ec8b |
I think different libraries do behave differently- ex JSON Gold for golang may throw error even though the playground might just remove the field.. I think certainly the context needs to be correct, and the JSON LD has to be properly formed. My initial opinion for the scope of this ticket is to ensure the context is check and its a proper JSON LD.. The fields i'm curious to see what you see in cred adapter with JSON Gold but I think either erroring or removing the field isnt too bad either way? I think the most thing is to become aware when there is critical things missing and if the fields missing are silent in some cases its not good but can live with it for now.. |
If we ever wanted to do data schema validation, we can look at enforcing https://www.w3.org/TR/vc-data-model/#data-schemas including how it works w ZKP but not a priority right now |
Opened an issue on the json-ld library repo to discuss a very cryptic error we're seeing - timothee-haudebourg/json-ld#56 |
@LuisOsta lets take a quick look at this and write down what is relevant and we can decide |
Similar to how VCs get their schema from a URL ex https://w3id.org/citizenship/v1
we should as well from our own defined URL https://w3id.org/traceability/v1
The above will be merged in the coming days but it is essentially the same as https://knox-networks.github.io/schema/bankaccount/v1.jsonld.
SSI currently has the fields hardcoded but it should read from the schema as schemas change and we add more schemas.
The fields from the bankaccount VC should come from the above context- we should not get the fields from our own repo, code or config files.
Context based validation would be required, similar to https://json-ld.org/playground/ would
The text was updated successfully, but these errors were encountered: