Skip to content
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

IANA registration "application/voucher-jws+json" #7

Open
siethower opened this issue Jul 12, 2022 · 17 comments
Open

IANA registration "application/voucher-jws+json" #7

siethower opened this issue Jul 12, 2022 · 17 comments
Assignees

Comments

@siethower
Copy link
Collaborator

Double check and do registration of "application/voucher-jws+json":
https://datatracker.ietf.org/doc/html/draft-ietf-anima-jws-voucher-04#section-6.1.1 "application/voucher-jws+json"
and do registration:
https://www.iana.org/assignments/media-types/media-types.xhtml
same as:
https://www.iana.org/assignments/media-types/application/voucher-cms+json

@siethower siethower self-assigned this Jul 12, 2022
@mcr
Copy link
Member

mcr commented Jul 12, 2022

I did one of these last week for another WG: https://github.com/ietf-wg-cellar/matroska-specification/pull/649/files

@siethower
Copy link
Collaborator Author

Hello @mcr could you please double check and take care of the registration "application/voucher-jws+json", in case of no further issues.

@siethower siethower assigned mcr and unassigned siethower Sep 9, 2022
@mcr
Copy link
Member

mcr commented Sep 19, 2022

looks good to me.

@mcr mcr closed this as completed Sep 19, 2022
@siethower siethower reopened this Sep 20, 2022
@siethower
Copy link
Collaborator Author

Question, is the IANA registration already done?

@siethower
Copy link
Collaborator Author

siethower commented Sep 30, 2022

As discussed in design team call, registration will be done after the WGLC and will be done by the chair.

@mcr mcr reopened this May 9, 2023
@mcr
Copy link
Member

mcr commented May 9, 2023

Probably this was wrong... application/voucher+jose is probably the correct answer, to be validated with media-types ML.

@EskoDijk
Copy link

EskoDijk commented May 9, 2023

"application/voucher-jws+json" is actually fine, just like "application/voucher+jws" would be fine too.
The latter requires the registration of "+jws" in the IANA structured syntax suffixes registry. The former uses +json which is already in there.
Arguably the "application/voucher+jws" name would be slightly more useful/precise.

@siethower
Copy link
Collaborator Author

siethower commented May 9, 2023

This is in aligment with the current issue "IANA registration "application/voucher-jws+json" (see headline) and consistent with
https://www.iana.org/assignments/media-types/application/voucher-cms+json

Do we need any changes?

@mcr
Copy link
Member

mcr commented May 9, 2023

@EskoDijk
Copy link

EskoDijk commented May 9, 2023

Note that application/voucher-cms+json actually made a naming mistake! Since the CMS outer container itself isn’t JSON, it shouldn’t use the +json suffix at all. So no need to be consistent with it ;-)

@EskoDijk
Copy link

Update to my previous comments: "voucher+jws" can't really work, I just learnt that "jws" isn't an existing media type so that can't be used.
JWS is encoded as either "application/jose" or "application/jose+json" I believe (RFC 7515)

So if the outer encoding of the voucher would be valid JSON (NOT base64) then it is:

  • "application/voucher-jws+json"

And if the outer encoding of the voucher is JOSE as base64 (not native JSON) then either:

  • "application/voucher-jws+jose"
  • "application/voucher+jose"

Disclaimer: this opinion may change once I learn more about this topic.

@mcr
Copy link
Member

mcr commented May 10, 2023

While +jws is not registered, it could be easily registered if the media-types agree.

@EskoDijk
Copy link

While +jws is not registered, it could be easily registered if the media-types agree.

Ah, sorry - it could be registered. While most +suffix registrations are based on a media-type of the same name, this is not a requirement. I can even register a '+foo' without 'foo' being a media-type in principle (like +der has done).

Maybe some would argue it's confusing to have +jws denote an outer media-type encoding of "application/jose+json". Because the names aren't language-wise relatable. But it can work.

That said, both the options of +jws and +json seem to have their merits and there's not a clear winner for me.

@mcr
Copy link
Member

mcr commented Oct 17, 2023

Leave it as it is, as we have not gotten feedback from mediaman WG.

@msporny
Copy link

msporny commented Apr 11, 2024

Hi, I'm the editor of the multiple suffixes draft in the media type WG at IETF.

This thread highlights the current confusion around media type suffixes (you're not alone). Some thoughts below:

Using "+json" as the suffix when the syntax of the message is clearly not JSON is just plain wrong.

Using "+jws" or "+jose" as the suffix if the syntax matches the "JWS Syntax" is problematic because it doesn't specify if "JWS Compact Serialization" or "JWS JSON Serialization" is used. If you're using the former, the pattern seems to be to use "+jwt" (JOSE experts will have to correct me if there is more nuance to this). If you're using the latter pattern, it's not clear what the suffix should be, though I know "+json+jwt" has not received unanimous support previously, and
that might signal that the JOSE community needs to register another suffix for "JWS JSON Serialization" form. You might try "+jws+json", but that would put you squarely into the "multiple suffixes" debate, which would further delay your registration.

The end goal of this work is to have one "Voucher" data model, that can be presented in both JSON and CBOR, and signed in multiple ways (e.g. CMS, COSE, JWT i.e. JOSE, ... )

Ah! This is interesting. That is the same model that the W3C Verifiable Credentials WG has adopted, which triggered the whole multiple suffixes discussion in that group. Are you saying that "application/voucher" could be thought of as a meta model (there is a set of information that you are encoding there), but the syntax isn't determined until you serialize it to JSON or CBOR, and then it's not secured until you use COSE, JWT, JOSE, etc?)

This is all useful information as it demonstrates that at least two groups came to the same sort of design through completely independent operation, and are now being hit by the "which suffix should we use?" discussion. If I had to guess, you're probably exploring something like the following:

  • application/voucher+jwt
    • Base64 encoded JSON payload of voucher data model
  • application/voucher+jose or application/voucher+jws
    • JWS JSON Serialization with base64-encoded JSON payload of voucher data model
  • application/voucher+cose
    • COSE CBOR serialization with ??deterministic?? CBOR payload of voucher data model
  • application/voucher+cms
    • I have no idea what this is right now, is this a DER-encoded thing that wraps the voucher data model?

What am I getting wrong wrt. the above?

@mcr
Copy link
Member

mcr commented Apr 11, 2024 via email

@EskoDijk
Copy link

Using "+json" as the suffix when the syntax of the message is clearly not JSON is just plain wrong.

@msporny Agreed! That was done by RFC 8366 but it's not the case for the present JWS-voucher draft. This actually has a JSON base format. (For the record: "General JWS JSON Serialization Syntax" - Section 3/3.1/Figure 1). This could still be changed to "+jws" or "+jws-json" but there wouldn't be much benefit to the core protocol operation. And going for multiple suffixes now seemed a bit risky/early; without much benefit to protocol operation.

application/voucher+cms

Historically, the other name with the +json was picked in RFC 8366 and so far we've not touched that. So this name with +cms is not something we're using/proposing now.

application/voucher+jwt

This is not currently in scope of the draft - just to avoid too many options, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants