> So I just don't know what to do, but I think we what have done is wrong.

What we have now is "application/voucher-cose+cbor", which is not wrong I 
think. There's currently no rule saying your media type needs to be named in a 
particular way, there are options to name it.
In this same discussion thread (or parallel thread with same subject) we have 
discussed that "application/voucher+cose" would also be a good name, if we 
register the "+cose" suffix with IANA.

Now the one thing that could be wrong is "application/voucher-cms+json" that is 
registered by RFC 8366. But that work concluded in 2018, so I guess we don't 
want to 'fix' this anymore; a name's just a name.
Reason it may be wrong: the '+json' suffix implies that the most outer layer of 
encoding be JSON. And that's obviously not the case - it is CMS. For example, a 
parser not knowing the full 
"application/voucher-cms+json" media type may see the "+json" so it may fall 
back to JSON decoding of the data, which fails completely because the data is 
binary ASN.1 DER, not JSON.
So it should have been "application/voucher-cms" or 
"application/voucher-json+cms" or so.


>  I don't think that voucher+ysig is meaningful (or accurate) for
> us, because we also COSE sign it, which not every YANG-SID use will do.

True, if we would use "voucher+ysid" then the meaning of "+ysid" needs to be 
formally defined as "CBOR based on a YANG model that uses SIDs for key 
compression, wrapped inside a COSE object".
So "voucher+ysidcose" would be more accurate.
Or "voucher+ysid+cose" in case we apply the rules of the new 
draft-ietf-mediaman-suffixes.

We could organize a 3-day workshop on this topic, I think!  Pity that April 1st 
has just passed :(

Esko

-----Original Message-----
From: Michael Richardson <[email protected]> 
Sent: Tuesday, April 4, 2023 17:06
To: Esko Dijk <[email protected]>; [email protected]; [email protected]; 
[email protected]
Subject: Re: [Anima] [COSE] [Rats] cose+cbor vs cwt in MIME types


Esko Dijk <[email protected]> wrote:
    > As you said also the following would be possible today:

    >     application/voucher+ysid

    > if we register 'ysid' as being CBOR-YANG-SID that's included in a COSE
    > wrapper. I find this less useful than the first options of '+cbor' or
    > '+cose' , it seems too specific.

I'm agnositc because:
1) over COAP it's a single CONTENT-FORMAT, so the size does not matter.
2) over HTTPS, it's a rich network environment, so bytes do not count.

We've been told at this point that we should use as specific a format as
possible.  I don't think that voucher+ysig is meaningful (or accurate) for
us, because we also COSE sign it, which not every YANG-SID use will do.

So I just don't know what to do, but I think we what have done is wrong.

--
Michael Richardson <[email protected]>   . o O ( IPv6 IøT consulting )
           Sandelman Software Works Inc, Ottawa and Worldwide




_______________________________________________
Anima mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/anima

Reply via email to