Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 section describing use of media types #1055
Add section describing use of media types #1055
Changes from 1 commit
3c6b8b5
b1e0616
3bab618
7c81bc2
59532a5
76b1200
bda384a
fee2e8c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Yikes to this... I might defer this language to a separate PR to avoid blocking this valuable other changes.
proof
is NOT required to make aVerifiableCredential
... asserting thatproof
makes aVerifiableCredential
implies data integrity proofs as a defacto standard representation / serialization for the core data model.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.
yeah - this is one reason why i wanted this as a draft first - we do i think want to note that some cryptographic proof is there, not necessarily that it is in the credential as an embedded proof (as it often is not) but that it should be present according to the securing method in use
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.
Can we remove this paragraph on "proof" ? and move it to an issue to discuss?
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.
#1060 opened, paragraph removed to refine language
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.
@OR13 note that i linked directly to the section that calls out both embedded AND external proofs intentionally here. perhaps some additional language as in this suggestion would help
edit: to quote spec text i linked to
At least one proof mechanism, and the details necessary to evaluate that proof, MUST be expressed for a credential or presentation to be a verifiable credential or verifiable presentation; that is, to be verifiable.
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 feel like this spec text is being disputed by @iherman @TallTed @dlongley @msporny and possibly others.
(🔥 let us not register 2 media types that can be used for the "same bytes").
(🔥 let us make sure things are actually verifiable or credentials).
Based on this comment: #1044 (comment)
VerifiableCredential
might containproof
(modified sinceproof
is actually optional inVerifiableCredential
.)VerifiableCredential
is a subtype ofCredential
processing from right to left...
credential
...json
?credential
...ld+json
?credential
...verifiable+ld+json
? (does this violate the MUST NOT or SHOULD NOT from the RFC?)Compared to...
verifiable
...json
?verifiable
...ld+json
?verifiable
...credential+ld+json
? (does this violate the MUST NOT or SHOULD NOT from the RFC?)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 a strange feeling... as I am not disputing that sentence at all.
I cannot make heads or tails of the remainder of your comment. Maybe try writing full sentences, including what brought you to quote the chunks of draft and ratified RFCs?
A reminder: "Classes" and "Types" do not require Media Types to be defined and useful. A "tiger" is a subtype of "cat", which is a subtype of "mammal", etc. None of these have Media Types, but they are all useful descriptors. A "CompactDisc" is disjoint from "CassetteTape" and both are disjoint from "VinylLP", but all are subtypes of "Audio Recording Media", so all might be considered Media Types ... but this typing is not handled by RFC nor IANA.
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.
@TallTed The line of argument you have here: #1055 (comment)
Regarding
proof
, is what leads me to believe that you do not see a difference in information betweencredential
andverifiable credential
.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.
@OR13,
This is literally what the
+
syntax does in media types. You can describe the string{}
using eitherapplication/json
ORapplication/ld+json
today. There are numerous other examples with+xml
suffixes and others. This subclassing is done on purpose to enable many different use cases.@TallTed has done an excellent job in various threads explaining these rules -- but I fear there continue to be some misunderstandings.
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.
Given the comment from @TallTed #1055 (comment) , then I would suggest we amend the proposals to be the following:
PROPOSAL: The 1 media type for vc proposal, the working group will register
verifiable-credential+ld+json
and the working group will not registercredential+ld+json
.PROPOSAL: The 2 media type for vc proposal, the working group will register
verifiable+credential+ld+json
and the working group will registercredential+ld+json
.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.
@OR13 wrote:
The notion that you can't have two media types used for exactly the same set of bytes is provably wrong.
For example:
application/octet-stream
can be used for any binary data that the server can't determine a more specific media type for, such asapplication/efi
.application/xml
can be used for any of the roughly 400+ media types that use XML as their serialization mechanism.In addition, we have the whole concept of structured syntax suffixes. I didn't understand how they worked until just a few years ago, and I can see that others in these threads on media types still don't understand how they work, which is resulting in some unworkable proposals/statements being put forward. Structured Syntax Suffixes are one of those rarely talked about/understood things about media types. They say for EXACTLY THE SAME SET OF BYTES, you can serve and interpret those bytes as:
application/verifiable+credential+ld+json
application/credential+ld+json
application/ld+json
application/json
So, four media types can be used for exactly the same set of bytes. This was established at IETF/IANA long ago, and is now being further documented because people are still confused about the point above.
@OR13 wrote:
Yeah, I'm not disputing that either. You need a external/embedded proof of some kind for the thing to be a
verifiable credential
.I would be a +1 for the first proposal directly above this comment (initially proposed by @OR13 and then refined outlined by @andresuribe87), with the caveat that the name of the media type is
vc+ld+json
(where the bikeshedding thereof doesn't need to hold up the decision).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.
@msporny I'm not arguing you can't have different media types for the same bytes.... I am arguing against registered multiple media types for the same bytes with indistinguishable definitions in our spec.
+1 to
vc+ld+json
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.
The first question should be whether there's value in having the second media type, whether or not it is a supertype of the type we're primarily focused on. If there is such value (as I believe there is), then if it is a supertype (as I believe it is), I think we should register both, or only the supertype. (If it were a subtype, we might not register it, but there would be good reason to speak of it and to suggest a media type for it.)
Remember that media types are not actively restrictive nor actively prescriptive in most applications, but are primarily hints about how to process the bytes within the resource labeled with that media type. In the world of the web, they're helpful for various tools to make known to a web server what form of resource those tools prefer such that the server can provide that, if available. (See RFC2295, among others.) It's perfectly valid for my super app to process resources of every media type in exactly the same way, if users of my super app find value in what my app outputs based on those inputs.
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.
@TallTed does this 3rd proposal capture your alternate single registration proposal? :
PROPOSAL: The 1 media type for
credential
proposal, the working group will registercredential+ld+json
and the working group will not registerverifiable+credential+ld+json
.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.
Notably, we haven't actually defined the latter one yet, but this is just an informative thing that can be changed as needed.
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.
exactly - especially given the discussion on #1034 re
verifiable-credential
vsverifiable+credential
this gives us a good way to get alignedThere 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.
@msporny has requested to use
vc+ld+json
elsewhere, which I agree with, but we can leave it like this for now I think.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.
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 support this change.