ipfs / in-web-browsers

Tracking the endeavor towards getting web browsers to natively support IPFS and content-addressing
https://docs.ipfs.tech/how-to/address-ipfs-on-web/
MIT License
348 stars 29 forks source link

[IANA #1240938] application/vnd.ipld.dag-cbor registration request #201

Closed lidel closed 1 year ago

lidel commented 1 year ago

In effort to standardize content type used in https://github.com/ipfs/kubo/issues/8823 and https://github.com/ipfs/kubo/pull/9335 I am submitting a request for registering application/vnd.ipld.dag-cbor at https://www.iana.org/assignments/media-types/media-types.xhtml

lidel commented 1 year ago

Submitted initial version, awaiting feedback from IANA:

Media type name: application

Media subtype name: vnd.ipld.dag-cbor

Required parameters: N/A

Optional parameters: N/A

Encoding considerations: binary

Security considerations: The media type inherits the security considerations for <application/cbor> (see Section 10 of RFC 8949) and introduces additional limitations listed at <https://ipld.io/specs/codecs/dag-cbor/spec/>.

DAG-CBOR requires that there exist a single, canonical way of encoding any given set of data, and that encoded forms contain no superfluous data that may be ignored or lost in a round-trip decode/encode.

When used in IPFS context, all processors should rigorously verify data
integrity based on CID links (CBOR Tag 42). Invalid links must be discarded.

Interoperability considerations: DAG-CBOR is a strict subset of <application/cbor> defined by RFC 8949.

Every <application/vnd.ipld.dag-cbor> can be parsed or interpreted as a valid <application/cbor>, but the opposite may not be true. 

CBOR tag 42 (registered at https://www.iana.org/assignments/cbor-tags) can be used for indicating CID links to other DAG-CBOR documents, or arbitrary IPFS content.

Published specification: <https://ipld.io/specs/codecs/dag-cbor/spec/>
<https://github.com/ipld/cid-cbor/>

Applications which use this media: DAG-CBOR allows for creating deterministic CBOR documents that produce a stable hash, which in turns allows for use in content-addressed contexts, such as Directed Acyclic Graphs (DAGs) and Merkle tree-like structures based on DAGs.

These properties are used extensively in:
IPLD <https://ipld.io>
IPFS <https://ipfs.tech>

Fragment identifier considerations: N/A

Restrictions on usage: N/A

Provisional registration? (standards tree only): No

Additional information:

   1. Deprecated alias names for this type: N/A
   2. Magic number(s): N/A
   3. File extension(s): cbor
   4. Macintosh file type code: N/A
   5. Object Identifiers: N/A

General Comments: 

Person to contact for further information:

   1. Name: Marcin Rataj
   2. Email: lidel@protocol.ai

Intended usage: COMMON

N/A

Author/Change controller: Protocol Labs
<https://protocol.ai>
<standards@protocol.ai>
lidel commented 1 year ago

Done: https://www.iana.org/assignments/media-types/application/vnd.ipld.dag-cbor :tada: