-
Notifications
You must be signed in to change notification settings - Fork 21
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
Best Practices for Inline Contexts #73
Comments
Reasons not to inline contexts:
In short, inlining contexts removes one of the biggest benefits of JSON-LD... which is that you can treat it as pure JSON for early parts of the processing pipeline until you know that you're pretty sure that you're not working with an attack or malformed input... and THEN you can switch to JSON-LD processing. |
I don't understand how this is the case, I assume you mean using JSON-Schema to check for a URI like
If you plan on doing JSON-LD processing yes.... if you don't you would be ignoring the I guess you are really saying that trust in JSON members comes from specific values of I don't trust its shape, if it uses inline or not, I use JSON Schema to check its shape. I don't trust its valid JSON-LD inline, or not, I use a semantic checker to test it. if its shape and semantics are valid, I trust that it meets my requirements, but I still don't trust it, so if possible I check signatures / hashes... if those match, I still don't trust it, but I believe its not been altered from whatever form I expected it in. In the context of VCs, I don't see inlining contexts as in any way harmful if a verifier is always performing defense in depth:
It does increase size, but after a verifier has checked it, they can actually replace the inlined value with the reference, and the signature would still be valid, right?.... This is not to say that contexts / focused vocab is not useful, just wondering about how its used with or without inlining... it seems like treating specific canonicalized values of |
I am starting to feel like although they increase the size, they are a best practice over remote / by reference contexts....
A couple notes:
sec
.citizenship
ortraceability
... IMO, thats still not as good as only defining the terms you are actually using in the vc.Are there any additional benefits we should document?
Are there any serious reasons not to inline IF size is not a concern?.... CBOR-LD is the only thing I can think of and it does not really exist yet...
cc @dlongley @tplooker @msporny
The text was updated successfully, but these errors were encountered: