-
Notifications
You must be signed in to change notification settings - Fork 109
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
Define one or more media types for VCs #421
Comments
I support the standardisation of (one or more) MIME types for VCs. One can argue that this is needed as it relates to all documents that conform to the VC data model and is independent of the transfer protocol, so it is not a protocol issue (which is out of scope of the current WG). |
+1 |
There's a bit more to it than saying "this is our MIME type!" https://www.iana.org/assignments/media-types/media-types.xhtml |
@brentzundel volunteered |
If we can come to agreement about what we'd like the MIME type to be, I will start the registration process. |
I vote for |
Unfortunately, if you guys want MIME Types, we won't be able to do just one, we will have to do four to six (due to the position certain organizations are taking in the group):
We could cut out half of these if folks could just agree between application/vc+json and application/vc+ld+json (the latter being preferred)... and this is why I haven't raised this issue yet. We can always do this later if double-clicking on a file on a desktop ends up being a thing when it comes to Verifiable Credentials / Verifiable Presentations. With respect to protocols that pass this data around, the protocol is most likely going to expect a particular thing and won't need a MIME Type beyond application/json or application/ld+json. |
Also, please don't start the registration process until the WG decides we want a MIME Type. The typical process is you put in a section wrt. IANA Registration in the W3C spec and the registration is kicked off when we go to PR/REC: https://www.w3.org/TR/json-ld11/#iana-considerations You also need to type up quite a bit... need to understand and define MIME Type parameters. For example, here's the registration for JSON-LD: https://www.iana.org/assignments/media-types/application/ld+json |
application/json would be preferred. |
Can I ask - why preferred? |
Decision at Barcelona F2F: This is a CR-blocker (open topic) |
I think this blog entry offers fantastic guidance on this question: https://ruben.verborgh.org/articles/fine-grained-content-negotiation/ |
To clarify, the reason we would like a MIME type are the following use cases:
|
Decision at F2F in Barcelona: |
as we discussed in Barcelona the After more thought, my pull request attempts to show IPLD as being serializable to JSON and thus compatible with JSON-LD as you can layer JSON-LD on top of IPLD, however, under the hood it is CBOR. So, I really should make the case that CBOR should be a valid syntax for VCs to better make my point. (I will be updating my PR to reflect this) Therefore, If For this reason, I can work with In the future we can have different clearly defined solutions based on the syntaxes. For instance, We agreed that for example:
and for JWT you would have |
more thoughts on the IPLD MIME types: in essence, JSON-LD is completely compatible on top of IPLD, but IPLD is not completely backwards compatible with JSON-LD. What is missing for backwards compatibility is to register |
also, I can image we will support a Then
When transforming between the different MIME types to a common format (i.e. so the above transformed from
or an array of ipld object:
or |
We discussed this on the maintenance call. Because this is a registration item it would need to be handled in V2. |
The issue was discussed in a meeting on 2021-08-11
View the transcript4.4. need MIME type guidance (issue vc-data-model#421)See github issue #421. Wayne Chang: this issue asks for mime types to be better described in the data model Manu Sporny: this is V2 because it is a formal registration that would require a full group |
Now that we are moving representations out of the core data model, it makes less sense to have a MIME type for a core data model. Suggest we leave this to each representation deliverable |
We're moving the way VCs are secured out of the core data model, not the representations (I expect the latter to be a point of debate in the group). At the very least, we have two media types now: "application/vc+ld+json" and "application/vc+json" with the possibility for more, such as "application/vc+json+jwt" defined in the VC-JWT specification. Fundamentally, we'll still need MIME type guidance in the specification, which is being driven by this work: https://datatracker.ietf.org/doc/draft-ietf-mediaman-suffixes/01/ |
what is the use case when only VC(VP) is returned in HTTP Response, so that these content-types will be used? Why current content types express how VC is serialized as opposed to how VC is signed? Won't we need something like "application/vc+ld+json+ldp" and "application/vc+ld+json+jwt" too? (not sure ldp is a suitable abbreviation anymore) |
The VC API is one that delivers bare VPs, media types for files on disk (VCs/VPs) is another use case.
At present, there are no content types for VCs (we didn't define them in v1.0 because of the structured mediatypes problem, which we are now resolving in IETF).
We won't need a separate media type for Data Integrity protected VCs, it'll just be "application/vc+ld+json", or "application/vc+json" would work there as well (though it's arguable if it /should/ work). Since JWTs are an opaque data format and have no typing mechanism, we'll probably need "application/vc+json+jwt" (again, maybe... it's debatable). Hope that helps. |
This work is affected by the IETF Media Types with Multiple Suffixes specification: https://datatracker.ietf.org/doc/draft-ietf-mediaman-suffixes/ |
The issue was discussed in a meeting on 2022-08-10
View the transcript4.10. Define v2 context (issue vc-data-model#421)See github issue vc-data-model#421. Kristina Yasuda: Recent comments seem to make it clear we want to keep the issue open.. Manu Sporny: We kicked off an IETF work item to address this issue. This was kicked off by DID WG. There is active work here..
Kristina Yasuda: Let's keep this issue scoped to the IETF discussion, then let's create another issue to discuss what MIME types we need?. Manu Sporny: Maybe this issue is "define a MIME type for VC syntaxes", and the "media type conversation" is a separate issue. We could do this either way.
Manu Sporny: And we link to the work happening in IETF. Ivan Herman: When you have a W3C spec, then you can include the necessary MIME type document in the specification itself. It doesn't need a separate work submitted to the usual channels.. Kristina Yasuda: Removing the relevant tag. Ted Thibodeau Jr.: I'm concerned about the agreement. W3C will create a lot of media types and not list them on the definitive IANA page. That's where you're supposed to list them.. Ivan Herman: You misunderstood, it will be listed there.. Kristina Yasuda: Brent should we go through issues labeled "discuss"?. Brent Zundel: Agree. |
PR open #1000 |
PR Open (in another repo, not a core data model type): w3c/vc-jose-cose#40 |
With the merging of PR #1000, we believe this issue has been addressed. |
The issue was discussed in a meeting on 2023-01-17
View the transcript3. Define one or more media types for VCs (pr vc-data-model#421)See github issue vc-data-model#421. Brent Zundel: Issue #421 by Daniel Hardman may be relevant. Orie Steele: There are additional things to be done.
Orie Steele: I believe the WG should close #421 until such time as there is a new media type being requested for registration in the core data model.
Manu Sporny: +1 to what Orie said.
Brent Zundel: Considering that the scribe's text will appear as a comment on the issue, I will wait for that and then close it.. Manu Sporny: There is a PR on VC-.
Manu Sporny: We have evidence that people ignore media types. Gabe Cohen: What implications does a media type have on the representation of the credential?. Manu Sporny: We could really screw up by adding too many media types. |
Hello, what happened with IPLD? Did they submit a draft to W3C and IETF? |
AFAIK, there are no active IPFS / IPLD drafts in either IETF or W3C WGs... I think that sec dispatch was asked regarding: The draft has not been adopted by a working group and is set to expire @msporny any update on this? |
We'll refresh the draft... it's been stable for years... just need to hit the IETF buttons.
Yes, there is clear implementer interest (and implementations) for multibase and multikey as evidenced by this letter of support to the W3C VCWG: https://lists.w3.org/Archives/Public/public-vc-wg/2023Jan/0027.html That doesn't count the long list of multiformats implementers, who we've yet to prod and get them to show their support... some have said that signing up to an IETF dispatch mailing list just to show support for something they've implemented and maintain is "weird". Seems to be a cultural mismatch between the way IETF does things and the way IPFS does things. :) In any case, we've seen work adopted at IETF that has far less support than that demonstrated above, it'll happen in due course. Until that happens, we'll be utilizing some portions of Multibase and Multiformats in the W3C Data Integrity spec and the corresponding cryptosuites. IPLD is another story... there was an attempt during the VC 1.0 work, but the implementers just didn't show up to support the work. Hope that helps. |
I know that the current spec is only about a data model. However, it does discuss how credentials can be "realized" in the JSON and JSON-LD syntaxes, and it suggests others like CBOR.
I would like a sentence or two in the spec that says something like, "The MIME type of verifiable credentials is
application/verifiable-credential+json
." Obviously, the + part would have to be adjusted for each syntax. And we would need a separate but related MIME type for presentations.I don't think a mime type of "application/ld+json" is appropriate for the JSON-LD rendering; while it would be true that the doc is JSON-LD, that would be the minor point; the major point would be its status as a credential. Credentials have so much specialized semantic meaning over and above the raw structural possibilities of JSON or even JSON-LD that describing them only in terms of their low-level serialization is a serious loss of meaning. We want people to be able to double-click the files and have the correct handler load.
The text was updated successfully, but these errors were encountered: