-
Notifications
You must be signed in to change notification settings - Fork 116
Remove JSON section in lieu of application/vc+ld+json
.
#1088
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
Conversation
index.html
Outdated
@@ -3257,15 +3257,14 @@ <h2>Syntaxes</h2> | |||
<a href="#advanced-concepts"></a> is the canonical structural representation of | |||
a <a>verifiable credential</a> or <a>verifiable presentation</a>. All | |||
serializations are representations of that data model in a specific format. This | |||
section specifies how the data model is realized in JSON-LD and plain JSON. | |||
Although syntactic mappings are provided for only these two syntaxes, | |||
section specifies how the data model is realized in JSON-LD for the base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does the word "base" do for us here? feels a bit confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it reads the same without the word 'base'
I'd support removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'base' has been removed in 654b694
index.html
Outdated
same way they are encoded in JSON (Section <a href="#json"></a>), with the | ||
addition of the <code>@context</code> <a>property</a>. The | ||
specification. Instances of the data model are encoded in [[!JSON-LD]] | ||
and include the <code>@context</code> <a>property</a>. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to comment on compact JSON-LD here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3ef0175.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we might make some minor wording changes, but overall this is great.
</ul> | ||
|
||
<p class="note"> | ||
As the transformations listed herein have potentially incompatible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please translate for those of us who aren't as hip to the modern meme-lingo... (Really, please don't post things like this in technical discussions. They don't tend to advance the conversation, and they are often needlessly offensive.)
index.html
Outdated
same way they are encoded in JSON (Section <a href="#json"></a>), with the | ||
addition of the <code>@context</code> <a>property</a>. The | ||
specification. Instances of the data model are encoded in [[!JSON-LD]] | ||
and include the <code>@context</code> <a>property</a>. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably.
index.html
Outdated
@@ -3257,15 +3257,14 @@ <h2>Syntaxes</h2> | |||
<a href="#advanced-concepts"></a> is the canonical structural representation of | |||
a <a>verifiable credential</a> or <a>verifiable presentation</a>. All | |||
serializations are representations of that data model in a specific format. This | |||
section specifies how the data model is realized in JSON-LD and plain JSON. | |||
Although syntactic mappings are provided for only these two syntaxes, | |||
section specifies how the data model is realized in JSON-LD for the base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it reads the same without the word 'base'
I'd support removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM and +1 to @TallTed's comments.
Co-authored-by: Ted Thibodeau Jr <[email protected]> Co-authored-by: Orie Steele <[email protected]>
169de96
to
654b694
Compare
Normative, multiple reviews, changes requested and made, no objections, merging. |
See the w3c/vc-jwt spec. |
Answer is: Yes, VCDM v2 supports JWT-VC? |
W3C JWT-VC spec describes how to sign using JWS a payload that is expressed using W3C VCDM. |
In the case that @alenhorvat is asking a more specific question, that is: "Are v1.0 and v1.1 style VC-JWTs, which place the VC in a field named |
Thank you. Clear. "The data model as described in Sections 3. Core Data Model, 4. Basic Concepts, and 5. Advanced Concepts is the canonical structural representation of a verifiable credential or verifiable presentation. All serializations are representations of that data model in a specific format. This section specifies how the data model is realized in JSON-LD for application/vc+ld+json, the base media type for Verifiable Credentials. Although syntactic mappings are only provided for JSON-LD, applications and services can use any other data representation syntax (such as XML, YAML, or CBOR) that is capable of being mapped back to application/vc+ld+json. As the verification and validation requirements are defined in terms of the data model, all serialization syntaxes have to be deterministically translated to the data model for processing, validation, or comparison." q2: Is my understanding, that VCs can be treated also as JSON (when -LD is not required by the use case) correct? Or one could define a VC in an XML format, for example, and it would be a valid VC according to the VCDM v2.0? q3: If additional JWT claims are required (because of the signature), are those claims added on the top level? |
The WG is trying to be very careful with the language used around the question "What is a VC?". At the moment, the way to think of the VC-JWT specification is: "A mechanism for securing the Verifiable Credentials Core Data Model using JWTs as described in the VC-JWT specification."
This is a point of contention in the WG. The original design of VCs allowed for VCs to be treated as JSON as long as you checked/did certain things. The WG has since said that, no, there is only one media type for VCs and that is In reality, many systems process the VC Data Model as JSON and don't invoke JSON-LD processing until later in the process. For example, an incoming VC might be checked using JSON Schema (JSON processing) before a Data Integrity proof is checked (and in some cases, JCS still counts as JSON processing). It is possible to hard code a JSON-only processing of incoming VCs if the application is specific enough. That said, that is up to implementers to decide when/how to do JSON vs. JSON-LD processing.
At this point in time, there is only ONE serialization format for the VC data model and that is
I don't know where the Editors are on this particular item. Perhaps @OR13, @mprorock, and @selfissued can weigh in on this one. |
It is possible to hard code a JSON-only processing of incoming VCs if the application is specific enough. That said, that is up to implementers to decide when/how to do JSON vs. JSON-LD processing. Then VC can be JSON only and essentially an application/vc+json could be completely valid? In our case, some UC process only JSON, others use JSON-LD (signatures are always JWS/JAdES, where JSON is compared against the JSON schema and no JCS or any other additional processing). Some (most) UC don't define @context for various reasons. |
I think that the WG should bring the evidence and reasons of why this is beneficial for the ecosystem. I would also like to raise that LD is based on JSON, thus LD is the possible extension.
Requiring JSON-LD to be THE serialisation format will remove all adoption. This second quote will force JSON-LD context to exist, or the attribute will drop during the serialisation. This is not healthy for adoption of VC.
This spec should be reworded/fixed if the recommendation is to ignore it. Most implementors will not have JSON-LD definitions, and if everyone will just use bogus @JSON, it still adds zero value. So my single question is, what is the value for the ecosystem to force JSON-LD in? this can be handled in the https://www.w3.org/TR/vc-data-integrity/. |
@alenhorvat wrote:
At this point in time, the answer is "No". There is no The WG has debated this endlessly at this point: #947 This was the most contentious issue the WG has ever discussed and it took close to 9+ months to come to a resolution on just that point. The resolution was to trim the number of media types down to ONE media type, which is:
Like I mention above, you can do some variation of that, but it's not recommended by a subset of the WG. Other WG members will tell you that it's fine to not have any defined semantics, use JSON Schema to define the semantics, or do some other proprietary thing. The choice is yours, but you shouldn't expect broad interoperability with your solution if you take that path. |
The reasons are included in this mega-thread, that took 9+ months to resolve: #947
JSON-LD is now published by 45% of all websites on the Internet: https://w3techs.com/technologies/details/da-jsonld We are aligning Verifiable Credentials such that they can be easily integrated into the already deployed landscape for JSON-LD on the Web.
The WG has debated these points for many years and has decided to go in the direction stated above (for all the reasons that were discussed in that issue thread above). We tried the alternate path that you are suggesting in the DID WG (multiple media types) and it resulted in a bad outcome as well. The vast majority of implementers implemented with the
The value is that there is ONE media type. The WG came to consensus on the point that having a single base data model syntax was beneficial to the ecosystem because optionality, when it comes to global standards, tends to fragment the ecosystem. Therefore, this is one place where we could reduce optionality while meeting all of the use cases in front of the WG. |
VC semantics is great and is well defined. Assumption is that use cases agree to follow the semantics as defined in the specifications. However, if VC is not processed as LD, application/vc+json is more a appropriate format. Media type is used by the use cases since they need to signal how the content should be processed. Question is about vc+json, not vc+jwt (where semantic interop issues appear) |
@alenhorvat wrote:
The WG tried and failed to define what VCs would look like without JSON-LD for years. While it sounds simple to say, you have to achieve all of the use cases that are defined in our use cases document. "Plain JSON documents, signed with JWS, and non-global semantics" failed to provide a solution that works at scale. What you are describing is what JWTs are for, and those have largely failed to scale beyond their "security token" use cases. Take a look at the JWT claims registry at IANA and that will show you how far that "vc+json" approach went. VCs exist because JWTs failed to scale in the global market (beyond their limited use case). The closest you will be able to get to what you want (which, again, is highly problematic and has been demonstrated to not scale in global markets) is to put The specification tries to provide some guidance on this topic here: https://w3c.github.io/vc-data-model/#getting-started
There is no such thing as "vc+json" because the group failed to come to any sort of consensus on what that looks like over multiple years of effort in the space. As an aside, I suggest that you join the WG if you'd like to engage on this topic more, or at least raise an issue and take the discussion there. I will note that there is a /very long history/ of this discussion in this group via #947 and it is unlikely that the WG is going to revisit this topic given how much time it has already eaten in the WG to date. |
I agree with you and everything you wrote. I fully understand the interop and scalability issues. Proposal/question is very simple: If answer is no, this simply means we need to define a profile for it (definition of the profile would essentially be the statement above). I'm arguing that it is more beneficial to have it in the specification. To clarify: the proposal is
People will use and process VCs as JSON for various reasons. Suggestion here is to take what's been defined and the WG agreed upon and just provide guidelines or show that if UC is not defining @context for the claims and types they introduce (e.g., the UC does not require global interoperability) and they are processing it as JSON, use application/vc+json |
This is mixing semantics with mime types. The group had many long discussions about disentangling these -- mime types do not solve the semantics problem. The base media type for VCs is |
We're not trying to solve the semantics problem. We're just trying to find a way how to express what it seems we agree: VC (as defined today) can be treated and processed as JSON. mime type? any other way? We don't want to use custom way to express that in some cases VC should be processed as LD and in other cases as JSON. In our case JWS (compact or JSON serialised) is applied to both. |
Thank you @msporny for the time and devotion, much appreciated. I can see from the answers that JSON-LD as requirement is not really a requirement at all. All deterministic, bi-directional, and lossless serialisations and transformations can be done with default context of "https://www.w3.org/ns/credentials/v2". Without extending this, it will work exactly like JSON, and supports both, JSON-LD and JSON processors. Media type of |
|
Thank you @TallTed. I fully agree that having 100% semantic web, where all data and transactions are machine readable is where we want to be. But I also have to embrace the fact of legacy and allow the natural adoption of semantics. This is not an easy task and I do not want this to hinder other achievements like SSI and give the control of data to the owners of it. I wrote a small summary, for everyone else in the world reading this thread. Could it be possible to respond if summary the below is how it was intended. VCWG decided:
Specification states:
Thread agrees: confirmation needed: |
@mtaimela wrote:
JSON-LD is designed to use as much of it as is useful to you. The VC Data Model attempts to follow the same approach, with a few important nuances.
Yes, answers below: Yes, with the warning that "other media types" is probably not going to be defined very clearly in this iteration of the VCWG (as we are running out of time in our charter and will enter complete and utter feature freeze in September). We are currently dealing with too many other things, and the "transformations" language has proven to be contentious (thus it is unlikely that we'll be able to achieve consensus on EXACTLY what that means... though I can try to provide insight into where the VCWG might be heading in future iterations).
Yes (but I expect that we will not see that text appear in v2.0, possibly during v3.0 once the market has settled down a bit on the transformations stuff). I will note that CBOR-LD is an example of something that exists today that transforms to a completely different binary data stream, but is able to round-trip and thus preserve
Yes, but again, the VCWG will almost certainly not include this text in the current specification and wait for market feedback to drive the sort of language that will lead to a healthy, interoperable ecosystem.
Yes, though this isn't about the "semantic web". It's an information modelling problem that exists in any system with locally defined terms that were never meant to be used globally. Think of every proprietary JSON HTTP API out there now, the data objects that they publish largely only work at one domain. If something is issuer-defined, then you have to have an out of band communication with the issuer to understand the proper usage of their terms, which will almost certainly conflict with other issuer-defined terms. If one issuer says "name" means "the name of your website", and another issuer says "name" means your full name, then the issuers mean very different things and you can't count on interoperability between those issuers. If you look at this problem at scale, it would require you to have to either 1) contact every issuer out of band to understand how they're using their terms, or 2) centralize the market to a very small set of issuers that have an agreement on which terms they are using (which would be a market competition failure).
Yes, close, and here's where you're not going to get much more guidance from the VCWG. The following is my interpretation of what's probably going to happen in time: digital credentials that are compatible with the W3C Verifiable Credential Data Model are credentials where they can be transformed to the VCDM and where the interpretation of those transformed VCs remains the same as their original interpretation. That is, one could say that their digital credential is VCDM 2.0 compatible if: The digital credential can be unidirectionally transformed to the VCDM and can be clearly interpreted in the way it was originally intended to be interpreted (before it was transformed). Bonus points if the digital credential can be bidirectionally transformed to the VCDM and can be clearly interpreted in the way it was originally intended to be interpreted (before it was transformed AND after it is re-transformed back into the original digital credential). This would enable people to say "mdocs are compatible with the W3C VCDM" if such a unidirectional or bidirectional transformation mechanism was documented /somewhere/. That's what the VCWG was going for, and again, this is my interpretation of what could be the best outcome given the various opinions in the WG. It's quite a large and active WG, so coming to consensus on topics such as these has started to increasingly take more time than it did in the early days (for better or worse). Does that help explain the current state of play more @alenhorvat and @mtaimela? |
Thank you @msporny and others for these valuable responses. Yes, it answers my questions and resolves my concerns. It is a nice evolution from the VCDM v1.1. IMO the answers should/could be compiled into a blog post or FAQ or similar, since we see the question re-appearing over and over. Thank you! |
Thank you @msporny very much for your valuable time and efforts on the topic and for the work on the VC. This answered all the questions I had, it is great concept and looking forward for the evolution of future v3. |
@mtaimela and @alenhorvat, two new PRs have been raised to clarify the questions that both of you had. I have tried to incorporate your feedback in both of them: #1202 (Add section on JSON Processing) #1203 (Add section on Ecosystem Compatibility) Please let us know your thoughts and if both of those PRs address your concerns. |
Based on the resolution of the WG to use one base media type (
application/vc+ld+json
), this PR removes the old "JSON" section in the spec, which was always of very questionable value. The prose has been updated to specify that the base media type isapplication/vc+ld+json
, and other syntaxes can be used as long as they can map to the base media type.Preview | Diff