From 82c0fd67368c5bfb4a7b4762c8204727dea1889d Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Wed, 15 Dec 2021 01:40:20 +0100 Subject: [PATCH 1/2] Propose an auxiliary resource for container metadata --- protocol.html | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/protocol.html b/protocol.html index f9cdd114..29a37082 100644 --- a/protocol.html +++ b/protocol.html @@ -585,7 +585,8 @@

Note: Self-describing Resources

+
  • Server Metadata Description Resource
  • +

    Clients can discover auxiliary resources associated with a subject resource by making an HTTP HEAD or GET request on the target URL, and checking the HTTP Link header with the rel parameter [RFC8288].

    @@ -608,6 +609,11 @@

    Note: Self-describing Resources

    describedby [LDP] + + Server Metadata Description Resource + http://www.w3.org/ns/solid/terms#statResource + + @@ -648,6 +654,34 @@

    Description Resource

    Clients can discover resources that are described by description resources by making an HTTP HEAD or GET request on the target URL, and checking the HTTP Link header with a rel value of describes (inverse of the describedby relation) [RFC6892].

    + +
    +

    Server Metadata Description Resource

    +
    +

    + An auxiliary resource of type Server Metadata Description Resource provides server-maintained metadata about contained resources. +

    +

    When a read operation targets a container, servers MUST advertize the existence of this type of resource using a HTTP Link header with a rel value of http://www.w3.org/ns/solid/terms#statResource. +

    +

    + When a read operation targets a Server Metadata Description Resource, servers MUST supply the following metadata about a representation of each contained resource of the corresponding container: +

      +
    • Servers MUST use the predicate rdf:type and a class whose URI is the expansion of the URI Template [RFC6570] http://www.w3.org/ns/iana/media-types/{+iana-media-type}#Resource, where iana-media-type corresponds to a value from the IANA Media Types [IANA-MEDIA-TYPES].
    • +
    • The date and time when the contained resource was last modified. Servers MUST express this using two properties: +
        +
      • dct:modified using a xsd:dateTime data type; and
      • +
      • stat:mtime given as a UNIX timestamp.
      • +
      +
    • +
    • Servers MUST supply the size in bytes as a non-negative integer using the stat:size predicate.
    • +
    +

    +

    Servers MUST NOT allow non-read operations and reject requests using methods other than GET, HEAD and OPTIONS using a 405 status code.

    +

    By default, the server uses the authorization rule for the corresponding container for the server metadata description resource. However, servers MAY associate an explicit authorization rule with the server metadata description resource that further restricts access to the resource. +

    +
    +
    + @@ -1056,6 +1090,8 @@

    Normative References

    [FETCH]
    Fetch Standard. Anne van Kesteren. WHATWG. Living Standard. URL: https://fetch.spec.whatwg.org/
    +
    [IANA-MEDIA-TYPES]
    +
    Media Types. IANA. URL: https://www.iana.org/assignments/media-types/
    [JSON-LD11]
    JSON-LD 1.1. Gregg Kellogg; Pierre-Antoine Champin; Dave Longley. W3C. 16 July 2020. W3C Recommendation. URL: https://www.w3.org/TR/json-ld11/
    [LDN]
    @@ -1080,6 +1116,7 @@

    Normative References

    The Web Origin Concept. A. Barth. IETF. December 2011. Proposed Standard. URL: https://datatracker.ietf.org/doc/html/rfc6454
    [RFC6455]
    The WebSocket Protocol. I. Fette; A. Melnikov. IETF. December 2011. Proposed Standard. URL: https://datatracker.ietf.org/doc/html/rfc6455
    +
    [RFC6570]
    URI Template. J. Gregorio; R. Fielding; M. Hadley; M. Nottingham; D. Orchard. IETF. March 2012. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc6570
    [RFC6892]
    The 'describes' Link Relation Type. E. Wilde. IETF. March 2013. Informational. URL: https://datatracker.ietf.org/doc/html/rfc6892
    [RFC7230]
    From 43d463d91ec8be58a818307f5d3a96e0c7ce7553 Mon Sep 17 00:00:00 2001 From: Kjetil Kjernsmo Date: Wed, 15 Dec 2021 11:37:00 +0100 Subject: [PATCH 2/2] Rename to container metadata resource as per @acoburn 's suggestion --- protocol.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol.html b/protocol.html index 29a37082..c33f5470 100644 --- a/protocol.html +++ b/protocol.html @@ -585,7 +585,7 @@

    Note: Self-describing Resources

    Clients can discover auxiliary resources associated with a subject resource by making an HTTP HEAD or GET request on the target URL, and checking the HTTP Link header with the rel parameter [RFC8288].

    @@ -610,7 +610,7 @@

    Note: Self-describing Resources

    [LDP] - Server Metadata Description Resource + Container Metadata Resource http://www.w3.org/ns/solid/terms#statResource @@ -656,15 +656,15 @@

    Description Resource

    -

    Server Metadata Description Resource

    +

    Container Metadata Resource

    - An auxiliary resource of type Server Metadata Description Resource provides server-maintained metadata about contained resources. + An auxiliary resource of type Container Metadata Resource provides server-maintained metadata about contained resources.

    When a read operation targets a container, servers MUST advertize the existence of this type of resource using a HTTP Link header with a rel value of http://www.w3.org/ns/solid/terms#statResource.

    - When a read operation targets a Server Metadata Description Resource, servers MUST supply the following metadata about a representation of each contained resource of the corresponding container: + When a read operation targets a Container Metadata Resource, servers MUST supply the following metadata about a representation of each contained resource of the corresponding container:

    • Servers MUST use the predicate rdf:type and a class whose URI is the expansion of the URI Template [RFC6570] http://www.w3.org/ns/iana/media-types/{+iana-media-type}#Resource, where iana-media-type corresponds to a value from the IANA Media Types [IANA-MEDIA-TYPES].
    • The date and time when the contained resource was last modified. Servers MUST express this using two properties: @@ -677,7 +677,7 @@

      Server Metadata Description Resource

    Servers MUST NOT allow non-read operations and reject requests using methods other than GET, HEAD and OPTIONS using a 405 status code.

    -

    By default, the server uses the authorization rule for the corresponding container for the server metadata description resource. However, servers MAY associate an explicit authorization rule with the server metadata description resource that further restricts access to the resource. +

    By default, the server uses the authorization rule for the corresponding container for the container metadata resource. However, servers MAY associate an explicit authorization rule with the container metadata resource that further restricts access to the resource.