-
Notifications
You must be signed in to change notification settings - Fork 115
Propose verifiable-credential+ld+json
media type
#1034
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
<td> | ||
Resources that use the "<code>application/verifiable-credential+ld+json</code>" | ||
Media Type are required to conform to all of the requirements | ||
for the "<code>application/credential+ld+json</code>" Media Type and are |
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.
Points back at application/credential+ld+json
... related to the debate that is not resolved on #1014
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.
This makes me think (again) that
IF we're going to have media types for both verifiable and unverifiable credentials
application/verifiable-credential+ld+json
(hyphen, i.e., parallel type to application/credential+ld+json
)
should instead be
application/verifiable+credential+ld+json
(plus, i.e., subtype of application/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.
I'm approving as something like a +0.5, while noting that we don't really need this media type. It's a nice to have and makes the spec "complete" from an academic purity standpoint. I expect developers will get media types wrong, and in that case, we should have backup processing rules to make sure that the thing they tag as a "verifiable credential" actually does contain a proof of some kind. Never trust the media type by itself.
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.
Minor nits, mostly. As I mentioned above, I'm a +0.5 on this PR (but found errors upon further review as a part of PR processing).
The big outstanding question is whether or not this media type is necessary given that a proof
can ride along w/ any JSON-based media type. I can see the argument for why it would be good to have a media type that is more specific, as long as implementers don't blindly trust that media type anywhere. IOW, implementers should be suspect of anything claiming to be a application/verifiable-SOMETHING and MUST run verification algorithms to determine if the media type is valid or not for the associated data.
Additionally, we should use the official IANA registration template in these sections (or at least include all of the information that goes into the template). That can be done in a future PR if the concern is turned into an issue.
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.
It is not my place, as a W3C staff contact, to formally object, but, with my staff contact's hat put down, I think this direction is wrong. As I expressed in #1044, and as it was argued by, say, @dlongley on the F2F, having verifiable-credential+ld+json
(as opposed to verifiable+credential+ld+json
) seems highly unnatural to me.
Co-authored-by: Manu Sporny <[email protected]>
Co-authored-by: Manu Sporny <[email protected]>
@msporny I took your change suggestions, are there there any other changes your are requesting at this time? |
<td> | ||
Resources that use the "<code>application/verifiable-credential+ld+json</code>" | ||
Media Type are required to conform to all of the requirements | ||
for the "<code>application/credential+ld+json</code>" Media Type and are |
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.
This makes me think (again) that
IF we're going to have media types for both verifiable and unverifiable credentials
application/verifiable-credential+ld+json
(hyphen, i.e., parallel type to application/credential+ld+json
)
should instead be
application/verifiable+credential+ld+json
(plus, i.e., subtype of application/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.
@msporny I took your change suggestions, are there there any other changes your are requesting at this time?
No other change suggestions. I will note that there are others objecting and I find their arguments worth considering.
Speaking as the Editor of the IETF multiple suffixes spec, @iherman and @TallTed are both technically correct... +
should be used instead of -
... then again, there is nothing to say that you must do it that way.
I'll also note that @dlongley's concerns about this media type not being necessary are also correct... it has yet to be defended why we must have this media type. What use case or security characteristic does it achieve (other than being a more accurate way to refer to a VC with a proof, where you shouldn't only trust the media type in that situation)?
My approval is regarding the concept of having a more specific media type and not the actual media type string -- that still needs to be debated and we should raise an issue to have that discussion.
@msporny should we ask IETF regarding does this no imply that |
The multiple-plus-signs RFC has not yet been approved, and so far as I am aware, we are the first and only group actively pushing to register such media types. So, no, nobody can point to "any examples (that have been successfully registered with IANA)". That said, I am quite comfortable with my position on how media types work with the single-plus-sign, and the RFC-in-process was carefully written to work the same way with multiple-plus-signs, so I am equally comfortable with my position on how media types (will) work with multiple-plus-signs.
NO. Absolutely not. Nothing in anything that has been written says that If you meant to ask whether Much of which once again supports my request that all discussion of media types use the FULL value, including the |
@TallTed So assuming we registered:
Would it be possible for the same exact bytes (with a Seems the answer would be yes if @dlongley 's argument is accepted here #1014 Is this consistent with how you think the registration should work? |
I am not @TallTed😀 but I believe the answer is yes. And this is o.k.: a verifiable credential is a credential, so if a receiving end can only handle a credential (i.e., it cannot check the proof) by doing something useful with it (e.g., displaying it to a user) then this would be perfectly fine.
|
@OR13 wrote:
The request would be routed to the MEDIAMAN WG and then, almost certainly, to me since I'm the Editor of the multiple suffixes WG draft. :P Yes, we should ask... but only once we decide what we would prefer to do.
The existence of the IANA structured syntax suffix registry, established by RFC6838, Section 4.2.8: Structured Syntax Name Suffixes, establishes the examples for the approach that both @iherman and @TallTed are proposing: https://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml If we take the structured suffix route, the media type should be
Note that neither That said, the thing that gives me pause is IOW, it feels like Just sharing some thoughts. Speaking as the Editor of the IETF MEDIAMAN WG Multiple Suffixes specification, both @iherman and @TallTed are technically correct, I believe:
|
I would suggest NOT registering
Sometimes, we realize in the weeks following a F2F that some resolutions made there were made in error, sometimes because we're trying so hard to make decisions within the limited time of that F2F. The resolutions about the "base media type" for Verifiable Credentials may be such erroneous resolutions, which I'm coming to think based on my consideration of this pull request. Media Types are meant to provide strong hints to handling applications and users of what can be done with a given document, and how... but they cannot and should not be treated as sanitizers or protectors! |
The issue was discussed in a meeting on 2023-02-28
View the transcript1. Add normative requirements regarding media type and proof (pr vc-data-model#1014)See github pull request vc-data-model#1014. See github pull request vc-data-model#1034. See github issue vc-data-model#1044. Brent Zundel: There is a long conversation in the PR, goal of this meeting is to hash out what different sides of debate are, and can then try to come to proposals, recommendations on how to move forward.. Manu Sporny: There are a couple of threads for this discussion. One of the threads is "hey, we should have a media type for unsecured credentials and we should have one for secured ones. Those are the two classes we should have.". Michael Prorock: I think that's a reasonably good summary, in my mind, it's a more fundamental question. What is a credential? What makes it a verifiable credential?. Dave Longley: I think it's good to avoid confusion where we can, we have to be careful about avoiding confusion when we're talking about secured vs. unsecured or trusted vs. untrusted data... the recipient of the data needs to have an expectation about what they're receiving. They can't just accept whatever the sender sends, that opens the door to potential vulnerabilities.. David Waite: Some of this may be defining the behaviour when you have multiple proofs by default, I can remove one of the proofs and it's still verifiable, just with less mechanisms.. Michael Prorock: The PR here is explicit around one line related to Manu Sporny: So I want to agree with what David Waite was saying.. Dave Longley: media types are not necessarily the right tool to make sure that something is an input to an API. The media type is a way to identify the type of content and how it would be parsed and used, regardless of what API you're using it in. It's a more encompassing thing, not for just one particular use case, one particular API, it's not the right tool for accomplishing that..
Dave Longley: That said, APIs have their own shape, can provide their own restrictions, you can do that, that's not a problem and that might be the right way to define that, you can do that via API schemas to accomplish that goal.. Kristina Yasuda: Manu's comment confused me. I do not understand the concept of top level, secondary level proofs, one of the things we did in data model v2 is we separated data model in how we sign/secure it. The notion that something that conceptually is not supposed to be signed can have this proof is very confusing to me.. Michael Prorock: Big +1 to what Kristina said, building on that, we have a good model if we accept this PR, core data model defines what a credential is, and how different specifications might process that... what's expected, in VC-JWT there is a clean way of specifying media types, what to expect when, JWS, or something COSE related, since we have a nice data integrity spec, perhaps we should put media types w/ proofs in a credential, people know how to deal with that information.. Manu Sporny: To address Kristina's concern. We have a concept here -- and JWTs deal with it differently. With Data Integrity proofs, you can have documents that nest other documents and each can nest proofs at every layer..
Manu Sporny: Saying Dave Longley: big +1 to what manu said... if we moved proof into data integrity, it would further undercut case for restricting Kristina Yasuda: To clarify -- not questioning legitimacy of use case where there are nested data integrity proofs -- what I'm not understanding is credential that is conceptually not supposed to be signed, including a proof property? That's what clearly separates credential from verifiable credential. Let's not completely remove proof from data model, remove it from section 4 to section 6..
Kristina Yasuda: Imagine a JSON structure that includes proof property... and that is signed by JWS... if that enters JWS processor, that doesn't understand proof claim, it'll ignore it. In which case, signature is entirely being ignored, which I'm concerned about. Is there a way to resolve that? Happy to hear solutions.. Michael Prorock: No one is saying these are not valid use cases, we want a clear and valid media type. David Waite: In the spec we talk about embedded proofs and external proofs, way to state the same thing... embedded proof is a way to extract proof and recanonicalize to create an external proof over the document. It comes down to giving recommendations --- if one proof is chaining, pointing into another, you cannot express outer proof w/o inner one, but you can strip off outer proof, so when people embed a data integrity protected VC inside a JWT, they need to understand that they're requiring twice as much security processing logic... that may affect full stack decisions, or they could just discard the JWT and send credential and data integrity around and they need to decide if it's appropriate or not. If we do have it, we should have a SHOULD NOT with guidance.. Dave Longley: There are going to be many applications that can accept a credential whether or not it has a proof attached to it, important that base media type supports that... if there are other applications that want to have a media type that specifically says "this property is not allowed in this media type" - I think we can do that, but I recommend against it, I don't think it's a good idea. I don't think we should call that out on the base media type. Maybe have base media type to be superclass of other things, someone could create a media type for their other applications, can't have specific property..
Dave Longley: "What if this verifier receives something where a signature has been stripped?" -- verifiers need to know what to expect from a holder. They will know what proofs they need to look for, they need to know which issuers to trust, how many signatures to expect, etc... we should remember that we're defining a base data model here, there are things that people don't necessarily process in a credential... base media type that's a super class allows that to happen, I don't think there's a problem there..
Kristina Yasuda: yes, but what they accept is up to them. Manu Sporny: I think we need to look at the PR. The PR is specifically talking about the
Manu Sporny: So I think the thing you mentioned is a different conversation and that I agree with you more over there, than on this PR. This PR says, we're going to single out this one property and makes it illegal..
Manu Sporny: I think we're trying to use media types to signal things that we shouldn't rely on, it gives power to the attacker..
Michael Prorock: I don't think anyone is disagreeing on the multiple layers on security checks, not trusting inputs, I would hope all of us in this group are familiar with those concepts..
Michael Prorock: What I'm concerned about is saying that something should not have a proof in any way shape or form, perhaps from a consensus standpoint we end up in SHOULD NOT. If we want to think about a variety of things, no one here wants a proliferation of media types for every options, No one is asking for a proliferation of business rules defined in the spec. If it is implicitly confusing that receives a proof in it, or embedded in a VC-JWT, what proof type comes first. If we don't have a clear way of saying: "Don't do this, you're going to confuse the user"... it's highly concerning to me. If we leave it up to verifier, certain issuers are going to assume one type of security model might be required w/o clean mechanism to know that they're doing that. Let's try to get explicitly clear about what a credential is before it becomes a VC and then be very clear about that as well.. Tobias Looker: I'm still catching up on this issue, so might have perspective that's invalid -- my interpretation of text in PR doesn't insinuate that it makes embedded proofs illegal, media type doesn't establish any semantics around inclusion of property of what it means. If I sent application/json, and data is customer record, that is at a different layer semantically. Embedded proof might have something secured, media type isn't going to communicate presence or processing logic to do anything w/ that..
Ted Thibodeau Jr.: Media types don't do these things... media types don't say "in this structure of file you can only have X field name". Media types give you the structure of the file so you can deal w/ it's contents. If you feed a .zip archive to Excel, it's going to choke because it doesn't know how to deal w/ that content..
Ted Thibodeau Jr.: Vice versa, unzip cannot do anything for you with the contents of an excel file... it's not the structure of the document it works on, the structure is the thing that matters here. Subtypes in the mediatype universe are limited not in what fields they can have and the contents of what they could be... bigger type might allow larger number of rearrangements, smaller more focused might allow less..
Ted Thibodeau Jr.: Media types don't care about proofs, or business logic, or anything like that. Trying to make them do that job, we're going to break all sorts of security models. It don't work that way..
Ted Thibodeau Jr.: I've said in a number of times, a number of places, people don't seem to understand how media types work, if you don't understand how this stuff works, and we try to spec with it, we're going to break something.. Tobias Looker: Further the point that I'm making, don't think media type should rule out in an extensible data model technology whether or not the member of an element should /shouldn't make something illegal. I don't think media type should reach into the data representation technology and says "this should never exist". I think that messes w/ data extensibility model in JSON..
Tobias Looker: The media type doesn't convey that, media type doesn't tell you anything about what the media type tells you that... it could just be a string w/ some other meaning attached to it. That's all I take the language to mean in this PR. It doesn't communicate anything about the presence of an embedded proof or not.. Manu Sporny: +1 to tplooker, Tallted.. David Waite: One of the ongoing concerns, we're trying to define an extensible data model to use it in ways that we haven't imagined... even extension points we have, like
Michael Prorock: Is there an approach that might work? If media type is used, embedded proof must be ignored by processor by verifier? This is a reasonably complex thing we're trying to say.. Kristina Yasuda: I think we double clicked on statements meant by tobias and tallted -- JWT registered
Brent Zundel: Jump on PR and try to refine some language..
Brent Zundel: See everyone on the call tomorrow.. |
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.
Suggesting the following course of action, first recorded here:
This could be how we get this PR into the spec:
- Rename
application/credential+ld+json
media type registration toapplication/vc+ld+json
(with bits of this PR thrown in there). - Register
application/vp+ld+json
as the media type for verifiable presentations. @brentzundel's argument is compelling, anything that contains a VC in it is a VP (whether or not the VP is secured or not, the mere existence of the VC in the VP makes it verifiable). - Use @mprorock's PR Add section describing use of media types #1055 to define exactly what the expectations are around secured credentials and secured presentations, because at the end of the day, that's what's going to drive system behavior (not these unsecured things).
- DO NOT register
application/credential+ld+json
andapplication/presentation+ld+json
because they add little value. - Speak to the difference between credentials/presentations and verifiable credentials/verifiable presentations in the spec in a non-normative fashion.
- Think about defining a
Credential
andPresentation
RDF class after we work through 1-5 above.
Seems like we should figure out what that media type means before we decide that we are going to define it. |
The issue was discussed in a meeting on 2023-03-07
View the transcript1.3. Propose
|
Co-authored-by: Manu Sporny <[email protected]>
Co-authored-by: Manu Sporny <[email protected]>
Co-authored-by: Manu Sporny <[email protected]>
@msporny I accepted your suggestions, can you please re-review. |
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.
LGTM
<tr> | ||
<td>Encoding considerations: </td> | ||
<td> | ||
Resources that use the "<code>application/verifiable-credential+ld+json</code>" |
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.
Resources that use the "<code>application/verifiable-credential+ld+json</code>" | |
Resources that use the "<code>application/vc+ld+json</code>" |
<td> | ||
Resources that use the "<code>application/verifiable-credential+ld+json</code>" | ||
Media Type are required to conform to all of the requirements | ||
for the "<code>application/credential+ld+json</code>" Media Type and are |
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.
for the "<code>application/credential+ld+json</code>" Media Type and are | |
for the "<code>application/ld+json</code>" Media Type and are |
Media Type are required to conform to all of the requirements | ||
for the "<code>application/credential+ld+json</code>" Media Type and are | ||
therefore subject to the same encoding considerations specified | ||
in Section 11 of [[!RFC7159]]. |
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.
in Section 11 of [[!RFC7159]]. | |
in Section 11 of [[!RFC7159]] and [[JSON-LD]]. |
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:
@msporny I accepted your suggestions, can you please re-review.
I'm requesting changes, but not because I'm against the direction of this PR.
As @OR13 has mentioned several times now, the serialization rules between an application/vc+ld+json
and a application/credential+ld+json
media type are exactly the same. We shouldn't have two media types for the same serialization.
The changes requested to this PR are to remove application/credential+ld+json
from the specification and replace it with application/vc+ld+json
(this PR) as the base media type.
The other alternative is to put an issue marker stating that the group might remove application/credential+ld+json
from the specification and replace it with application/vc+ld+json
(this PR) as the base media type.
Either of the paths above would be acceptable to me.
I believe I mostly (maybe entirely) concur with @msporny's comment. I think it would help if we could enumerate the differences between our proposed subtype ( This info should help us in our deliberations, as well as our application to IANA, and may even make our documentation clearer. |
+1 |
I think the most important change (but it really only takes one of this sort) is that we require compact form for |
The issue was discussed in a meeting on 2023-03-14 List of resolutions:
View the transcript1. Media types
|
Closing this PR, we will attempt to define a media type for I will wait to open the new PR until #1062 is merged. |
Preview | Diff