-
Notifications
You must be signed in to change notification settings - Fork 13
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
Request media type for 1.1 vc-jwt claim set #40
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -525,5 +525,52 @@ <h2>Privacy Considerations</h2> | |
<section> | ||
<h2>Security Considerations</h2> | ||
</section> | ||
|
||
<section class="appendix informative"> | ||
<h2>IANA Considerations</h2> | ||
<section id="media-type"> | ||
<h2>The <code>application/credential-1.1+json</code> Media Type</h2> | ||
OR13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<p> | ||
This specification registers the <code>application/credential-1.1+json</code> MIME Media Type specifically for | ||
identifying a <a href="https://www.rfc-editor.org/rfc/rfc7519#section-4">JWT Claims Set</a> conforming to the Verifiable Credentials 1.1 format. | ||
OR13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</p> | ||
<table> | ||
<tr> | ||
<td>Type name: </td> | ||
<td>application</td> | ||
</tr> | ||
<tr> | ||
<td>Subtype name: </td> | ||
<td>credential-1.1+json</td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needed to be updated too, if an editor wants to quickly fix it. |
||
</tr> | ||
<tr> | ||
<td>Required parameters: </td> | ||
<td>None</td> | ||
</tr> | ||
<tr> | ||
<td>Encoding considerations: </td> | ||
<td> | ||
Resources that use the "<code>application/credential-1.1+json</code>" | ||
Media Type are required to conform to all of the requirements | ||
for the "<code>application/json</code>" Media Type and are | ||
therefore subject to the same encoding considerations specified | ||
in Section 11 of [[!RFC7159]]. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Security considerations: </td> | ||
<td>As defined in this specification.</td> | ||
</tr> | ||
<tr> | ||
<td>Contact: </td> | ||
<td> | ||
W3C Verifiable Claims Working Group <a href="mailto:[email protected]">[email protected]</a> | ||
OR13 marked this conversation as resolved.
Show resolved
Hide resolved
OR13 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</td> | ||
</tr> | ||
</table> | ||
</section> | ||
|
||
|
||
</section> | ||
</body> | ||
</html> |
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.
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.
If this PR is about JWT claim sets, the media type identifier should contain that information in there somewhere.
Otherwise, people might misunderstand this media type to be THE media type for v1.1 VCs.
IOW, this media type could be seen as squatting on the main spec's media type.
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.
its a payload type, not a "jose" type... jose currently refers to the entire token....
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.
Hmm, I'm confused by this. This media type is to identify a specific JWT claims set that has the
vc
claim in it, right? For example:Is that right? If so, it seems like we should have
jwt
in the media type somewhere. Perhapsapplication/credential-1.1+jwt
? This would be similar toapplication/at+jwt
-- where the JWT must have access token claims.This is to be used in the
typ
claim, right? Thecty
claim is "NOT RECOMMENDED" per RFC 7519 except for nested signing / encryption (a JWT within a JWT) cases, which I don't think we're talking about 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.
JWS can sign anything - does not have to be a JWT.
application/credential-1.1+json
would allow signing using JWS a conformant structure which is not necessarily a JWT?wrt nested JWT, it is a confusing term... it is defined as
so JWS(JWT claims) and JWE(JWT claims) are technically nested JWTs (though it is usually used for JWE(JWS(JWT claims)) ) is also a nested JWT so it is kind of in scope...
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.
But this PR says that when
application/credential-1.1+json
is used then it means the payload is a JWT Claims set ... right?If not, when one sees
application/credential-1.1+json
in thecty
field, what is the expected payload? What does the JSON look like if it isn't a JWT Claims set? It seems we need to enumerate the possibilities in this PR / change the text if it can be something other than that.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.
Yes, but I think that's because using
cty
when the payload is a claim set is recommended against. This is what I've been saying. If the payload is a claim set, you don't usecty
-- at least this is what people who follow the RFC have been doing. Usingcty
in that case would be redundancy, IMO. The payload is assumed to be a claim set unless otherwise specified viacty
, like when the content type isjwk+json
or a nested JWT.I don't understand how it's redundant (clearly this is a different redundancy from what I said above). Perhaps there's an assumption about where the media type "may appear" -- but media types don't work that way. So, the media type name should properly reflect what it identifies regardless of where it appears.
Furthermore, using
cty
is a signal that the payload is not a claim set, but, rather, is whatever the media type says it is. This, to me, is an even stronger indication that we need to be clear -- we're usingcty
where it is advised against by the RFC, we haven't been able to find cases where other people do it (thus far, unless they are using non-claim sets), and the thing we're identifying is not a credential... but there actually is a thing that is a credential that it could be erroneously confused with.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 suggestion was to use SOMETHING to denote that the object isn't a VC as defined by the v1.1 data model, but a claim set that wraps a VC. So, we don't have to use
+jose
literally, but we do have to differentiate this thing vs. the v1.1 data model because the data structures are observably different.One of the data structures is a claims set that wraps a VC, the other is a VC. Those are two different things.
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.
@dlongley wrote:
The definition in the PR explicitly says that it is a media type "identifying a JWT Claims Set conforming to the Verifiable Credentials 1.1 JWT format". So there's no doubt that it's a JWT Claims Set.
As for the JWT spec saying "In the normal case in which nested signing or encryption operations are not employed, the use of this Header Parameter is NOT RECOMMENDED." about
cty
, as the author of that sentence and an author of the JWT BCP, I can definitively say that explicit typing of objects is now favored by the IETF - which wasn't something we thought of a decade ago as we were developing the JWT spec. Yes, a JWT payload is always a JWT Claims Set, but there are numerous different kinds of JWT Claims Sets - one of which is the one identified by the proposed Media Type. Usingcty
enables us to use explicit typing to tell the difference between them.@msporny wrote:
The something that indicates that the object isn't a VC is that it's called a
credential
in the Media Type name. If we were to define Media Types for Verified Credentials, they would havevc
(orverifiable-credential
) in the name - not justcredential
- which indicates a yet-to-be-secured credential. The credential becomes verifiable once it's secured.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.
@selfissued,
Many people will not read the full description, instead only looking at the media type name.
I don't understand your "redundant" argument since it seems that any name at all would be redundant if we're relying on people always reading the description. But, if you are really ok with the name being anything that isn't "redundant", because you think the description is clear, then let's change the name to address my concern and yours. As I said, I don't know what wouldn't be "redundant" to you, so if you could suggest something new to address both of our concerns, please do.
I'm happy for us to use another name that doesn't include "claim set" in it, so long as it won't be confused with a credential or some other thing this group defines / has defined. I don't think it's ideal for the name to not reflect what it is, but I'm more concerned about basic confusion. My preferences are for avoiding confusion first and then second for good naming hygiene (clearly name things after what they are / refer to).
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.
@dlongley wrote:
I'm not sympathetic to arguments based on the premise that people won't read the specification. If one follows that to its logical conclusion, we shouldn't bother writing anything down at all.
As already discussed, using the name
credential
aligns with the way we describe the data structures this working group has invented - and is distinct from "Verifiable Credential". I think we're good to go as-is.