rfc-6690

Constrained RESTful Environments (CoRE) Link Format

Z. Shelby
date2012-08 streamIETF areawit wgcore statusPROPOSED STANDARD pages22 canonicalhttps://www.rfc-editor.org/rfc/rfc6690 doi10.17487/RFC6690 errataview
This specification defines Web Linking using a link format for use by constrained web servers to describe hosted resources, their attributes, and other relationships between links. Based on the HTTP Link Header field defined in RFC 5988, the Constrained RESTful Environments (CoRE) Link Format is carried as a payload and is assigned an Internet media type. "RESTful" refers to the Representational State Transfer (REST) architecture. A well-known URI is defined as a default entry point for requesting the links hosted by a server. [STANDARDS-TRACK]

Extracted elements (27)

design-rationale §1.1

In CoRE, the link collection is carried as a resource of its own at a well-known URI (as opposed to HTTP headers delivered with a specific resource), because the main use case is discovery of which resources a server hosts in the first place, not describing a resource after accessing it.

realtime, http

design-rationale §2

The CoRE Link Format does not require special XML or binary parsing, is fairly compact, and is extensible — all important characteristics for constrained nodes (e.g., 8-bit microcontrollers with limited memory) and constrained networks (e.g., 6LoWPANs).

realtime

design-rationale §2.2

The 'hosts' relation type is assumed as the default in the absence of the relation parameter, because links in CoRE Link Format are typically used to describe resources hosted by a server. This avoids requiring the rel= parameter in the common case.

realtime

interoperability-note §2

The CoRE Link Format is encoded as UTF-8. A decoder is not expected to validate UTF-8 encoding and does not need to perform UTF-8 normalization; UTF-8 data can be compared bitwise.

realtime

interoperability-note §2

The CoRE Link Format is equivalent to the RFC 5988 link format and reuses its serialization. To convert an HTTP Link Header field to this format: remove the 'Link:' header, remove linear whitespace, convert to UTF-8, and decode percent-encodings.

realtime, http

normative-requirement §4 MUST

A server implementing this specification MUST support the '/.well-known/core' resource on the default port appropriate for the protocol for the purpose of resource discovery. The resource representation MUST be in the CoRE Link Format.

realtime, http

normative-requirement §4.1 MUST

Each relation-type target attribute value MUST be treated as a separate target attribute when matching query filters, since relation-type target attributes can contain multiple space-separated values.

realtime

normative-requirement §2.2 MUST

For the 'hosts' relation type, the target URI MUST be a relative URI of the context URI.

realtime, http

normative-requirement §3.3 MUST

Implementations MUST be prepared to accept large values for the 'sz' attribute, as there is no defined upper limit. One strategy is to convert any value larger than a reasonable size limit to a special 'Big' value.

realtime

normative-requirement §4.1 MUST

Implementations not supporting filtering MUST simply ignore the query string and return the whole resource for unicast requests. A multicast request with a query string SHOULD NOT be responded to if filtering is not supported or the filter does not match.

realtime, multicast

normative-requirement §2 MUST NOT

The link parameter 'href' is reserved for use as a query parameter for filtering and MUST NOT be defined as a link parameter.

realtime

normative-requirement §3 MUST

When the values of CoRE link attributes are compared, they MUST be compared as strings. URIs used as attribute values MAY be dereferenced, but MUST NOT be dereferenced automatically on link evaluation.

realtime

protocol-element §4.1

Query filtering on '/.well-known/core' follows the URI Template '/.well-known/core{?search*}'. The search variable is a name/value pair where value is either a Complete Value String (exact match) or a Prefix Value String ending in '*' (prefix match).

realtime, http

protocol-element §2.1

The context URI of a link is determined by: (a) the anchor parameter when specified, (b) the origin of the target URI when specified, or (c) the origin of the link format resource's base URI.

realtime, http

protocol-element §2

The CoRE Link Format is a serialization of typed links based on the HTTP Link Header field serialization defined in RFC 5988, carried as a resource representation with the media type 'application/link-format' and encoded as UTF-8. Multiple link descriptions are separated by commas.

realtime, http

protocol-element §3.2

The Interface Description 'if' attribute is an opaque string providing a name or URI indicating a specific interface definition used to interact with the target resource. Multiple Interface Descriptions MAY be included separated by spaces. The 'if' attribute MUST NOT appear more than once in a link.

realtime, registry

protocol-element §3.3 SHOULD

The maximum size estimate 'sz' attribute gives an indication of the maximum size in bytes of the resource representation returned by GET on the target URI. SHOULD be included for resources larger than one MTU. The 'sz' attribute MUST NOT appear more than once in a link.

realtime

protocol-element §3.1

The Resource Type 'rt' attribute is an opaque string used to assign an application-specific semantic type to a resource. Multiple Resource Types MAY be included separated by spaces. The 'rt' attribute MUST NOT appear more than once in a link.

realtime, registry

protocol-element §4

The well-known resource '/.well-known/core' is the default entry point for CoRE Resource Discovery. In the absence of any links, a zero-length payload is returned. The resource content is organized at the application's discretion.

realtime, http

registry §7.4

This specification establishes the Constrained RESTful Environments (CoRE) Parameters registry with two sub-registries: Resource Type (rt=) Link Target Attribute values and Interface Description (if=) Link Target Attribute values. Values starting with 'core' require IETF Review; all others require Specification Required with designated expert review.

registry, realtime

registry §7.3

This specification registers the 'application/link-format' Internet media type for the CoRE Link Format. Encoding is UTF-8 binary data; file extension is *.wlnk.

registry, realtime

registry §7.1

This specification registers the 'core' well-known URI in the IANA Well-Known URIs registry as defined by RFC 5785, with URI suffix 'core' and change controller IETF.

registry, realtime

registry §7.2

This specification registers the 'hosts' Web Linking relation type per RFC 5988. The 'hosts' relation indicates that the target URI is a resource hosted by the server indicated by the link context, and is the default relation type in CoRE Link Format.

registry, realtime, http

security-consideration §6

CoRE Link Format parsers should be aware that a link description may be cyclical (contain a link to itself, directly or indirectly through referenced link resources). Care should be taken when parsing link descriptions and accessing cyclical links.

security, realtime

security-consideration §6 SHOULD

Multicast requests for well-known link-format resources could be used to perform denial of service on a constrained network. A multicast request SHOULD only be accepted if the request is sufficiently authenticated and secured using, e.g., IPsec or an appropriate object security mechanism.

security, multicast, realtime

security-consideration §6 SHOULD

The '/.well-known/core' resource MAY be protected using DTLS when hosted on a CoAP server. Servers with authentication and authorization features SHOULD support the authentication features of underlying transport protocols and MAY return different link lists based on client identity. Not providing a link does not by itself control access to the resource.

security, realtime

wire-format §2

The ABNF grammar defines link-value as '<' URI-Reference '>' followed by zero or more semicolon-separated link-param entries. Link parameters include rel, anchor, rev, hreflang, media, title, title*, type, rt, if, sz, and link-extension fields.

realtime