Linkset: Media Types and a Link Relation Type for Link SetsAxwayerik.wilde@dret.netData Archiving and Networked Servicesherbert.van.de.sompel@dans.knaw.nlhttps://orcid.org/0000-0002-0715-6126
art
httpapiWeb linkingTyped linksJSONHTTPThis specification defines two formats and associated media types for representing sets of links as standalone documents. One format is based on JSON, and the other is aligned with the format for representing links in the HTTP "Link" header field. This specification also introduces a link relation type to support the discovery of sets of links.Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by
the Internet Engineering Steering Group (IESG). Further
information on Internet Standards is available in Section 2 of
RFC 7841.
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
.
Copyright Notice
Copyright (c) 2022 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
() in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Revised BSD License text as described in
Section 4.e of the Trust Legal Provisions and are provided without
warranty as described in the Revised BSD License.
Table of Contents
. Introduction
. Terminology
. Use Cases and Motivation
. Third-Party Links
. Challenges Writing to the HTTP "Link" Header Field
. Large Number of Links
. Document Formats for Sets of Links
. HTTP Link Document Format: application/linkset
. JSON Document Format: application/linkset+json
. Set of Links
. Link Context Object
. Link Target Object
. Link Target Attributes
. JSON Extensibility
. The "profile" Parameter for Media Types to Represent Sets of Links
. The "linkset" Relation Type for Linking to a Set of Links
. Examples
. Set of Links Provided as "application/linkset"
. Set of Links Provided as "application/linkset+json"
. Discovering a Link Set via the "linkset" Link Relation Type
. Link Set Profiles
. Using a "profile" Attribute with a "linkset" Link
. Using a "profile" Parameter with a Link Set Media Type
. Using a Link with a "profile" Link Relation Type
. IANA Considerations
. Link Relation Type: linkset
. Media Type: application/linkset
. Media Type: application/linkset+json
. Security Considerations
. References
. Normative References
. Informative References
. JSON-LD Context
Acknowledgements
Authors' Addresses
IntroductionResources on the Web often use typed Web Links , either (1) embedded in resource representations -- for example, using the <link> element for HTML documents or (2) conveyed in the HTTP "Link" header field for documents of any media type. In some cases, however, providing links in this manner is impractical or impossible, and delivering a set of links as a standalone document is preferable.Therefore, this specification defines two formats for representing sets of Web Links and their attributes as standalone documents. One serializes links in the same format as the format used in the HTTP "Link" header field, and the other serializes links in JSON. It also defines associated media types to represent sets of links, and the "linkset" relation type to support the discovery of any resource that conveys a set of links as a standalone document.TerminologyThe key words "MUST", "MUST NOT",
"REQUIRED", "SHALL",
"SHALL NOT", "SHOULD",
"SHOULD NOT",
"RECOMMENDED", "NOT RECOMMENDED",
"MAY", and "OPTIONAL" in this document
are to be interpreted as described in BCP 14
when, and only
when, they appear in all capitals, as shown here.This specification uses the terms "link context" and "link target" in the same manner that
"Web Linking" uses them.In the examples provided in this document, links in the HTTP "Link" header field are shown on separate lines in order to improve readability.
Note, however, that as per
"HTTP Semantics", line breaks are deprecated in values for HTTP fields; only whitespaces and
tabs are supported as separators.Use Cases and MotivationThe following sections describe use cases in which providing links by means of a standalone document instead of in an HTTP "Link" header field or as links embedded in the resource representation is advantageous or necessary.For all scenarios, links could be provided by means of a standalone document that is formatted according to the JSON-based serialization, the serialization aligned with the HTTP "Link" field format, or both. The former serialization is motivated by the widespread use of JSON and related tools, which suggests that handling sets of links expressed as JSON documents should be attractive to developers. The latter serialization is provided for compatibility with the existing serialization used in the HTTP "Link" field and to allow the reuse of tools created to handle it.It is important to keep in mind that when providing links by means of a standalone representation, other links can still be provided using other approaches, i.e., it is possible to combine various mechanisms to convey links.Third-Party LinksIn some cases, it is useful that links pertaining to a resource are provided
by a server other than the one that hosts the resource. For example, this allows:
Providing links in which the resource is involved not just as a link context but
also as a link target, with a different resource being the link context.
Providing links pertaining to the resource that the server hosting that
resource is not aware of.
External management of links pertaining to the resource in a special-purpose link
management service.
In such cases, links pertaining to a resource can be provided by another, specific resource.
That specific resource may be managed, by the same custodian or by another custodian, as the resource to which the links pertain.
For clients intent on consuming links provided in that manner, it would be beneficial if the following conditions were met:
Links are provided in a document that uses a well-defined media type.
The resource to which the provided links pertain is able to link to the resource that provides these links using a well-known
link relation type.
These requirements are addressed in this specification through the definition of two media types and a link relation type, respectively.Challenges Writing to the HTTP "Link" Header FieldIn some cases, it is not straightforward to write links to the HTTP "Link" header field
from an application. This can, for example, be the case because not all
required link information is available to the application or because the
application does not have the capability to directly write HTTP fields.
In such cases, providing links by means of a standalone document can be a solution.
Making the resource that provides these links discoverable can be achieved by means of a
typed link.Large Number of LinksWhen conveying links in an HTTP "Link" header field, it is possible for the size of the HTTP
response fields to become unpredictable. This can be the case when links are determined
dynamically in a manner dependent on a range of contextual factors. It is possible to statically configure
a web server to correctly handle large HTTP response fields by specifying an upper bound
for their size. But when the number of links is
unpredictable, estimating a reliable upper bound is challenging."HTTP Semantics" defines error codes related to excess communication
by the user agent ("413 Content Too Large" and "414 URI Too Long"), but no specific
error codes are defined to indicate that response field content exceeds the upper bound that can
be handled by the server and thus has been truncated.
As a result, applications take countermeasures aimed at controlling
the size of the HTTP "Link" header field -- for example, by limiting the links they provide to those
with select relation types, thereby limiting the value of the HTTP "Link" header field to clients.
Providing links by means of a standalone document overcomes challenges related to the unpredictable
(to the web server implementation) nature of the size of HTTP "Link" header fields.Document Formats for Sets of LinksThis section specifies two document formats to convey a set of links. Both are based on the abstract model specified in
"Web Linking",
which defines a link as consisting of a "link context", a "link relation type", a "link target",
and optional "target attributes":
The format defined in is nearly identical to the field value
of the HTTP "Link" header field as specified in .
The format defined in is expressed in JSON.
Links provided in the HTTP "Link" header field are intended to be used in the context of an HTTP interaction, and contextual information
that is available during an interaction is used to correctly interpret them.
Links provided in link sets, however, can be reused outside of an HTTP interaction, when no such contextual information is available.
As a result, implementers of link sets should strive to make them self-contained by adhering to the following recommendations.For links provided in the HTTP "Link" header field that have no anchor or that use relative references,
the URI of the resource that delivers the links provides the contextual information that is needed for their
correct interpretation. In order to support use cases where link set documents are reused outside the context
of an HTTP interaction, it is RECOMMENDED to make them self-contained by adhering to the following guidelines:
For every link provided in the set of links, explicitly provide the link context
using the "anchor" attribute.
For the link context ("anchor" attribute) and link target ("href" attribute), use URI references that are not relative references (as defined in ).
If these recommendations are not followed, the interpretation of links in link set documents will depend on which URI is used as the context.For a "title" attribute provided on a link in the HTTP "Link" header field, the language in which the title is expressed is provided by
the "Content-Language" header field of the HTTP interaction with the resource that delivers the links.
This does not apply to "title" attributes provided for links in link set documents because that would constrain
all links in a link set to having a single title language and would not support determining title languages when
a link set is used outside of an HTTP interaction. In order to support use cases where link set documents are
reused outside the context of an HTTP interaction, it is RECOMMENDED to make them self-contained by using the
"title*" attribute instead of the "title" attribute because "title*" allows expressing the title language as part of its value by means of a language tag.
Note that, in this regard, language tags are matched case insensitively (see ).
If this recommendation is not followed, accurately determining the language of titles provided on links in link set documents will not be possible.Note also that deprecates the "rev" construct that was provided by as a means to express links with a directionality that is the inverse of direct links that use the "rel" construct. In both serializations for link sets defined here, inverse links may be represented as direct links using the "rel" construct and by switching the roles of the resources involved in the link.HTTP Link Document Format: application/linksetThis document format is nearly identical to the field value of the
HTTP "Link" header field as defined in
, more specifically by
its ABNF production rule for "Link" and its subsequent rules. It differs from the format for field values of the
HTTP "Link" header field only in that not only spaces and horizontal tabs are allowed as separators but also newline
characters as a means to improve readability for humans.
The use of non-ASCII characters in the field value of the HTTP "Link" header field is not allowed
and as such is also not allowed in "application/linkset" link sets.The assigned media type for this format is "application/linkset".When converting an "application/linkset" document to a field value for the
HTTP "Link" header field, newline characters MUST be removed or MUST be replaced by whitespace (SP) in order to comply with
.Implementers of "application/linkset" link sets should strive to make them self-contained
by following the recommendations provided in regarding their use outside the context of an HTTP interaction.It should be noted that the "application/linkset" format specified here is different from the "application/link-format"
format specified in in that the former fully matches the
field value of the HTTP "Link" header field as defined in , whereas
the latter introduces constraints on that definition to meet requirements for Constrained RESTful Environments (CoRE).JSON Document Format: application/linkset+jsonThis document format uses JSON as the syntax to represent
a set of links. The set of links follows the abstract model defined by .The assigned media type for this format is "application/linkset+json".In the interests of interoperability, "application/linkset+json" link sets MUST be encoded using UTF-8 as per
.Implementers of "application/linkset+json" link sets should strive to make them self-contained
by following the recommendations provided in regarding their use outside the context of an HTTP interaction.The "application/linkset+json" serialization allows for OPTIONAL support of a JSON-LD serialization.
This can be achieved by adding an appropriate context to the "application/linkset+json" serialization using the approach described in
.
Communities of practice can decide which context best meets their application needs.
shows an example of a possible context that, when added to a JSON serialization,
allows it to be interpreted as Resource Description Framework (RDF) data .Set of LinksIn the JSON representation of a set of links:
A set of links is represented in JSON as an object that MUST contain "linkset" as its sole member.
The value of the "linkset" member is an array in which a distinct JSON object --
the "link context object" (see ) --
is used to represent links that have the same link context.
Even if there is only one link context object, it MUST be wrapped in an array.
Link Context ObjectIn the JSON representation, one or more links that have the same link context
are represented by a JSON object -- the link context object. A link context object
adheres to the following rules:
Each link context object MAY contain an "anchor" member with a value that represents
the link context. If present, this value MUST be a URI reference
and SHOULD NOT be a relative reference as defined in .
For each distinct relation type that the link context has with link targets,
a link context object MUST contain an additional member.
The value of this member is an array in which a distinct JSON object
-- the "link target object" (see ) --
MUST be used for each link target for which the relationship with
the link context (value of the encompassing "anchor" member) applies. The name
of this member expresses the relation type of the link as follows:
For registered relation types (),
the name of this member is the registered name of the relation type.
For extension relation types (),
the name of this member is the URI that uniquely represents the relation type.
Even if there is only one link target object, it MUST be wrapped in an array.
Link Target ObjectIn the JSON representation, a link target is represented by a JSON object -- the link target object.
A link target object adheres to the following rules:
Each link target object MUST contain an "href" member with a value that represents
the link target. This value MUST be a URI reference and SHOULD NOT be a relative reference
as defined in . Cases where the "href" member is present but no value is provided
for it (i.e., the resource providing the set of links is the target of the link
in the link target object) MUST be handled by providing an "href" member with an empty string as its value ("href": "").
In many cases, a link target is further qualified by target attributes.
Various types of attributes exist, and they are conveyed as additional members of the link target object
as detailed in .
The following example of a JSON-serialized set of links represents one
link with its core components: link context, link relation
type, and link target.The following example of a JSON-serialized set of links represents two links
that share a link context and relation type but have different link targets.The following example shows a set of links that represents two links, each with
a different link context, link target, and relation type.
One relation type is registered, and the other is an extension relation type.Link Target AttributesA link may be further qualified by target attributes as defined by .
Three types of attributes exist:
Serialization-defined attributes as described in .
Extension attributes defined and used by communities as allowed by
.
Internationalized versions of the "title" attribute as defined by and of extension attributes
allowed by .
The handling of these different types of attributes is described in the sections below.Target Attributes Defined by Web Linking defines the following target attributes that may be used to annotate links:
"hreflang", "media", "title", "title*", and "type";
these target attributes follow different occurrence and value patterns.
In the JSON representation, these attributes MUST be conveyed as additional
members of the link target object as follows:
"hreflang":
The "hreflang" target attribute,
defined as optional and repeatable by ,
MUST be represented by an "hreflang" member, its value MUST be an array (even if there is only one value to be represented),
and each value in that array MUST be a string -- representing one value
of the "hreflang" target attribute for a link -- that follows the same
model as the syntax discussed in .
"media":
The "media" target attribute,
defined as optional and not repeatable by , MUST be
represented by a "media" member
in the link target object, and its value MUST be a string that follows the
same model as the syntax discussed in .
"title":
The "title" target attribute,
defined as optional and not repeatable by ,
MUST be represented by a "title"
member in the link target object, and its value MUST be a JSON string.
"title*":
The "title*" target attribute,
defined as optional and not repeatable by ,
is motivated by character encoding
and language issues and follows the model defined in .
The details of the JSON
representation that applies to "title*" are described in
.
"type":
The "type" target attribute,
defined as optional and not repeatable by ,
MUST be represented by a "type" member
in the link target object, and its value MUST be a string that follows the
same model as the syntax discussed in .
The following example illustrates how the "hreflang" (repeatable) target attribute and the "type" (not repeatable) target attribute are represented in a link target object.Internationalized Target AttributesIn addition to the target attributes described in ,
also supports
attributes that follow the content model of .
In , these target
attributes are recognizable by the use of a trailing asterisk in the attribute name,
such as "title*".
The content model of uses a string-based microsyntax
that represents the character encoding, an optional language tag,
and the escaped attribute value encoded according to the specified character encoding.The JSON serialization for these target attributes MUST be
as follows:
An internationalized target attribute is represented as a member of the link context object with
the same name (including the "*") as the attribute.
The character encoding information
as prescribed by is not preserved; instead, the
content of the internationalized attribute is represented as a JSON string.
The value of the internationalized target attribute is an
array that contains one or more JSON objects. The name of one member
of such JSON objects is "value",
and its value is the actual content (in its unescaped version) of the internationalized target attribute, i.e., the
value of the attribute from which
the encoding and language information are removed.
The name of another, optional member of such JSON objects is "language", and
its value is the language tag
for the language in which the attribute content is conveyed.
The following example illustrates how the "title*" target attribute as
defined by is represented in a link target object.The above example assumes that the German title contains an umlaut character (in the original syntax, it would be encoded as title*=UTF-8'de'n%c3%a4chstes%20Kapitel),
which gets encoded in its unescaped form in the JSON representation.
Implementations MUST properly decode/encode internationalized target attributes that follow the model of when transcoding between the "application/linkset" format and the "application/linkset+json" format.Extension Target AttributesExtension target attributes (e.g., as listed in ) are attributes that are not defined by but are nevertheless
used to qualify links.
They can be defined by communities in any way deemed necessary, and it is up to them
to make sure their usage is understood by target applications.
However, lacking standardization, there is no interoperable
understanding of these extension attributes. One important consequence is that
their cardinality is unknown to generic applications. Therefore, in the JSON serialization,
all extension target attributes are treated as repeatable.The JSON serialization for these target attributes MUST be
as follows:
An extension target attribute is represented as a member of the link target object with the same name as the attribute, including the "*" if applicable.
The value of an extension attribute MUST be represented by an array, even if there is only one value to be represented.
If the extension target attribute does not have a name with a trailing asterisk,
then each value in that array MUST be a JSON string that represents one value
of the attribute.
If the extension attribute has a name with a trailing asterisk
(it follows the content model of ),
then each value in that array MUST be a JSON object. The value of each such JSON object
MUST be structured as described in .
The following example shows a link target object with three extension target attributes. The value for each extension target attribute is an array. The first two are regular extension target attributes, with the first one ("foo") having only one value and the second one ("bar") having two.
The last extension target attribute ("baz*") follows the naming rule of and therefore is encoded according to the serialization described in .JSON ExtensibilityThe Web Linking model provides for the use of extension target attributes as discussed in
.
The use of other forms of extensions is NOT RECOMMENDED.
Limiting the JSON format in this way allows unambiguous round trips between links provided in the HTTP "Link" header field,
sets of links serialized according to the "application/linkset" format, and sets of links serialized
according to the "application/linkset+json" format.
Cases may exist in which the use of extensions other than those discussed in may be useful --
for example, when a link set publisher needs to include descriptive or technical metadata for internal consumption.
If such extensions are used, they MUST NOT change the semantics of the JSON members defined in this specification.
Agents that consume JSON linkset documents can safely ignore such extensions.The "profile" Parameter for Media Types to Represent Sets of LinksAs a means to convey specific constraints or conventions (as per ) that apply to a link set document,
the "profile" parameter MAY be used in conjunction with the media types "application/linkset" and
"application/linkset+json" as detailed in
Sections and , respectively.
For example, the parameter could be used to indicate that a link set uses a specific, limited set of link relation
types.The value of the "profile" parameter MUST be a non-empty list of space-separated URIs,
each of which identifies specific constraints or conventions that apply to the link set document. When providing multiple
profile URIs, care should be taken that the corresponding profiles are not conflicting.
Profile URIs MAY be registered in the IANA's "Profile URIs" registry in the manner specified by .The presence of a "profile" parameter in conjunction with the "application/linkset" and
"application/linkset+json" media types does not change the semantics of
a link set. As such, clients with and without knowledge of profile URIs can use the same representation. shows an example of using the "profile" parameter in conjunction with the
"application/linkset+json" media type.The "linkset" Relation Type for Linking to a Set of LinksThe target of a link with the "linkset" relation type provides a set of links,
including links in which the resource that is the link context participates.A link with the "linkset" relation type MAY be provided in the header field and/or
the body of a resource's representation. It may also be discovered by other means, such as through
client-side information.A resource MAY provide more than one link with a "linkset" relation type.
Multiple such links can refer to the same set of links expressed using different
media types, or to different sets of links, potentially provided by different third-party services.The set of links provided by the resource that is the target of a "linkset" link may contain links in which the
resource that is the context of the "linkset" link does not participate. User agents MUST process each link
in the link set independently, including processing of the link context and link target, and MAY ignore links from
the link set in which the context of the "linkset" link does not participate.A user agent that follows a "linkset" link and obtains links for which anchors and targets are expressed as
relative references (as per ) MUST determine what the context is for these links; it SHOULD ignore links for which it is unable to
unambiguously make that determination.As a means to convey specific constraints or conventions (as per ) that apply to a link set document,
the "profile" attribute MAY be used in conjunction with the "linkset" link relation type.
For example, the attribute could be used to indicate that a link set uses a specific, limited set of link relation
types. The value of the "profile" attribute MUST be a non-empty
list of space-separated URIs, each of which identifies specific constraints or conventions that apply
to the link set document. Profile URIs MAY be registered in the IANA's "Profile URIs" registry in the manner specified by .
shows an example of using the "profile" attribute on a link
with the "linkset" relation type, making both the link set and the profile(s) to which it complies discoverable.ExamplesSections and
show examples whereby a set of links is provided as "application/linkset" and "application/linkset+json" documents, respectively.
illustrates the use of the "linkset" link relation type to support the discovery of sets of links, and
shows how to convey profile information pertaining to a link set.Set of Links Provided as "application/linkset" shows a client issuing an
HTTP GET request against resource <https://example.org/links/resource1>. shows the response to the GET request of
. The response contains a "Content-Type" header field
specifying that the media type of the response is "application/linkset". A set of links, revealing authorship and versioning related
to resource <https://example.org/resource1>, is provided in the response body. The HTTP "Link" header field indicates the availability
of an alternate representation of the set of links using media type "application/linkset+json".Set of Links Provided as "application/linkset+json" shows the client issuing an HTTP GET
request against <https://example.org/links/resource1>.
In the request, the client uses an "Accept" header field to indicate that it prefers a response in the
"application/linkset+json" format. shows the response to the HTTP GET request of .
The set of links is serialized according to the media type "application/linkset+json".Discovering a Link Set via the "linkset" Link Relation Type shows a client issuing an
HTTP HEAD request against resource
<https://example.org/resource1>. shows the response to the HEAD request of
. The response contains an HTTP "Link" header field with
a link that has the "linkset" relation type. It indicates that a set of links is provided
by resource <https://example.org/links/resource1>, which
provides a representation with media type "application/linkset+json".Link Set ProfilesThe examples in this section illustrate the use of the "profile" attribute for a link with the "linkset" link relation type and the "profile" attribute for a link set media type. The examples are inspired by the implementation of link sets by GS1 (the standards body behind many of the world's barcodes).Using a "profile" Attribute with a "linkset" Link shows a client issuing an
HTTP HEAD request against trade item 09506000134352 at . shows the server's response to the request of
, including a "linkset" link with a "profile" attribute
that has the profile URI as its value.
Dereferencing that URI yields a profile document that lists all the link relation types that
a client can expect when requesting the link set made discoverable by the "linkset" link. The link relation types are
presented in abbreviated form, e.g., <gs1:activityIdeas>, whereas the actual link relation type URIs are
available as hyperlinks on the abbreviations, e.g., .
For posterity, that profile document was saved in the Internet Archive at
on 27 September 2021.Using a "profile" Parameter with a Link Set Media Type shows a client issuing an
HTTP HEAD request against the link set that was discovered through the HTTP interactions shown in . shows the server's response to the request of . Note the "profile" parameter for the "application/linkset+json" media type, which has as its value the same profile URI as was used in .Using a Link with a "profile" Link Relation TypeNote that the response shown in from the link set resource is equivalent to the response shown in , which leverages the "profile" link relation type defined in .A link with a "profile" link relation type as shown in can also be conveyed in the link set document itself. This is illustrated by . Following the recommendation that all links in a link set document should have an explicit anchor, such a link has the URI of the link set itself as the anchor and the profile URI as the target. Multiple profile URIs are handled by using multiple "href" members.IANA ConsiderationsLink Relation Type: linksetThe link relation type below has been registered by IANA in the "Link Relation Types" registry
as per :
Relation Name:
linkset
Description:
The link target of a link with the "linkset" relation type
provides a set of links, including links in which the link context of the link participates.
Reference:
RFC 9264
Media Type: application/linksetThe Internet media type "application/linkset" for a linkset encoded as described in
has been registered by IANA in the "Media Types" registry as per .
Type name:
application
Subtype name:
linkset
Required parameters:
N/A
Optional parameters:
profile
Encoding considerations:
Linksets are encoded according to the
definitions provided in . The encoding discussed in
is based on the general encoding rules specified by
HTTP and allows specific parameters to be extended
by the indication of character encoding and language as
defined by .
Security considerations:
The security considerations of RFC 9264 apply.
Interoperability considerations:
N/A
Published specification:
RFC 9264
Applications that use this media type:
This media type is not specific to any application, as it can be used by any application that wants to interchange Web Links.
Additional information:
Magic number(s):
N/A
File extension(s):
This media type does not propose a specific extension.
Macintosh file type code(s):
TEXT
Person & email address to contact for further information:
Erik Wilde <erik.wilde@dret.net>
Intended usage:
COMMON
Restrictions on usage:
none
Author:
Erik Wilde <erik.wilde@dret.net>
Change controller:
IETF
Media Type: application/linkset+jsonThe Internet media type "application/linkset+json" for a linkset encoded as described in
has been registered by IANA in the "Media Types" registry as per .
Type name:
application
Subtype name:
linkset+json
Required parameters:
N/A
Optional parameters:
profile
Encoding considerations:
The encoding considerations of apply.
Security considerations:
The security considerations of RFC 9264 apply.
Interoperability considerations:
The interoperability considerations of apply.
Published specification:
RFC 9264
Applications that use this media type:
This media type is not specific to any application, as it can be used by any application that wants to interchange Web Links.
Additional information:
Magic number(s):
N/A
File extension(s):
JSON documents often use ".json" as the file extension, and this media type does not propose a specific extension other than this generic one.
Macintosh file type code(s):
TEXT
Person & email address to contact for further information:
Erik Wilde <erik.wilde@dret.net>
Intended usage:
COMMON
Restrictions on usage:
none
Author:
Erik Wilde <erik.wilde@dret.net>
Change controller:
IETF
Security ConsiderationsThe security considerations of apply, as well as those of Web Linking as long as the latter are not specifically discussing the risks of exposing information in HTTP header fields.In general, links may cause information leakage when they expose information (such as URIs) that can be sensitive or private. Links may expose "hidden URIs" that are not supposed to be openly shared and that may not be sufficiently protected. Ideally, none of the URIs exposed in links should be supposed to be "hidden"; instead, if these URIs are supposed to be limited to certain users, then technical measures should be put in place so that accidentally exposing them does not cause any harm.For the specific mechanisms defined in this specification, two security considerations should be taken into account:
The Web Linking model always has an "implicit context", which is the resource of the HTTP interaction. This original context can be lost or can change when self-contained link representations are moved. Changing the context can change the interpretation of links when they have no explicit anchor or when they use relative URIs. Applications may choose to ignore links that have no explicit anchor or that use relative URIs when these are exchanged in standalone resources.
The model introduced in this specification supports "third-party links", where one party can provide links that have another party's resource as an anchor. Depending on the link semantics and the application context, it is important to verify that there is sufficient trust in that third party to allow it to provide these links. Applications may choose to treat third-party links differently than cases where a resource and the links for that resource are provided by the same party.
ReferencesNormative ReferencesKey words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Uniform Resource Identifier (URI): Generic SyntaxA Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]Augmented BNF for Syntax Specifications: ABNFInternet technical specifications often need to define a formal syntax. Over the years, a modified version of Backus-Naur Form (BNF), called Augmented BNF (ABNF), has been popular among many Internet specifications. The current specification documents ABNF. It balances compactness and simplicity with reasonable representational power. The differences between standard BNF and ABNF involve naming rules, repetition, alternatives, order-independence, and value ranges. This specification also supplies additional rule definitions and encoding for a core lexical analyzer of the type common to several Internet specifications. [STANDARDS-TRACK]Tags for Identifying LanguagesThis document describes the structure, content, construction, and semantics of language tags for use in cases where it is desirable to indicate the language used in an information object. It also describes how to register values for use in language tags and the creation of user-defined extensions for private interchange. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Media Type Specifications and Registration ProceduresThis document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols. This memo documents an Internet Best Current Practice.Ambiguity of Uppercase vs Lowercase in RFC 2119 Key WordsRFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.Indicating Character Encoding and Language for HTTP Header Field ParametersBy default, header field values in Hypertext Transfer Protocol (HTTP) messages cannot easily carry characters outside the US-ASCII coded character set. RFC 2231 defines an encoding mechanism for use in parameters inside Multipurpose Internet Mail Extensions (MIME) header field values. This document specifies an encoding suitable for use in HTTP header fields that is compatible with a simplified profile of the encoding defined in RFC 2231.This document obsoletes RFC 5987.The JavaScript Object Notation (JSON) Data Interchange FormatJavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.Web LinkingThis specification defines a model for the relationships between resources on the Web ("links") and the type of those relationships ("link relation types").It also defines the serialisation of such links in HTTP headers with the Link header field.HTTP SemanticsThe Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. This document describes the overall architecture of HTTP, establishes common terminology, and defines aspects of the protocol that are shared by all versions. In this definition are core protocol elements, extensibility mechanisms, and the "http" and "https" Uniform Resource Identifier (URI) schemes. This document updates RFC 3864 and obsoletes RFCs 2818, 7231, 7232, 7233, 7235, 7538, 7615, 7694, and portions of 7230.JSON-LD 1.1: A JSON-based Serialization for Linked DataW3C Recommendation REC-json-ld-20140116Informative ReferencesDCMI Metadata TermsDublin Core Metadata InitiativeWeb LinkingThis document specifies relation types for Web links, and defines a registry for them. It also defines the use of such links in HTTP headers with the Link header field. [STANDARDS-TRACK]Constrained RESTful Environments (CoRE) Link FormatThis 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]The 'profile' Link Relation TypeThis specification defines the 'profile' link relation type that allows resource representations to indicate that they are following one or more profiles. A profile is defined not to alter the semantics of the resource representation itself, but to allow clients to learn about additional semantics (constraints, conventions, extensions) that are associated with the resource representation, in addition to those defined by the media type and possibly other mechanisms.The Profile URI RegistryThis document defines a registry for profile URIs to be used in specifications standardizing profiles.RDF 1.1 Concepts and Abstract SyntaxW3C Consortium Recommendation REC-rdf11-conceptsJSON-LD ContextA set of links rendered according to the
JSON serialization defined in can be interpreted
as RDF triples by adding a JSON-LD context that maps
the JSON keys to corresponding Linked Data terms. And, as per
,
when delivering a link set that is rendered according to the "application/linkset+json" media type to a user agent,
a server can convey the availability of such a JSON-LD context by using a link with the relation type
"" in the HTTP "Link" header field. shows the response to an HTTP GET against the URI of a link set resource and
illustrates this approach to support the discovery of a JSON-LD context. This example is inspired by the GS1 implementation and
shows a link set that uses relation types from the GS1 vocabulary at
that are expressed as HTTP URIs.In order to obtain the JSON-LD context conveyed by the server, the user agent issues an HTTP GET against the
link target of the link with the "" relation type. The response to this GET is
shown in . This particular JSON-LD context maps "application/linkset+json" representations of link sets
to Dublin Core terms . Note that the "linkset" entry in the JSON-LD context is
introduced to support links with the "linkset" relation type in link sets.Applying the JSON-LD context of to the link set of
allows transforming the "application/linkset+json" link set to an RDF link set. shows
the latter represented by means of the "text/turtle" RDF serialization.AcknowledgementsThanks for comments and suggestions provided by , , , , , , , and .Authors' AddressesAxwayerik.wilde@dret.netData Archiving and Networked Servicesherbert.van.de.sompel@dans.knaw.nlhttps://orcid.org/0000-0002-0715-6126