HTTP R. Polli
Internet-Draft Team Digitale, Italian Government
Intended status: Standards Track October 23, 2019
Expires: April 25, 2020

Well-Known URIs for Service Description
draft-polli-service-description-well-known-uri-latest

Abstract

Link Relation Types for Web Services have been introduced in RFC 8631 to provide documentation, descriptions, metadata, or status information for these resources. This specification registers the corrisponding labels into the well-known URI IANA Registry.

Note to Readers

RFC EDITOR: please remove this section before publication

Discussion of this draft takes place on the HTTP working group mailing list (ietf-http-wg@w3.org), which is archived at https://lists.w3.org/Archives/Public/ietf-http-wg/.

The source code and issues list for this draft can be found at https://github.com/ioggstream/draft-polli-service-description-well-known-uri.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on April 25, 2020.

Copyright Notice

Copyright (c) 2019 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 (https://trustee.ietf.org/license-info) 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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

[RFC8631] introduced the ability to provide documentation, descriptions, metadata, or status information for Web Services via Link Relations.

Making service metadata directly available under the “.well-known/” path (see Section 1.1 of [RFC5785]) enables retrieving those informations without the need to process Link relations or send the following headers in every response.

Link: <https://api.example.net/.well-known/service-desc>; rel="service-desc"
Link: <https://api.example.net/.well-known/status>; rel="status"; type="application/problem+json"

For example a client could evaluate authentication or authorization policies defined in “service-desc” before trying to access the service.

Another example is getting the service “status” without looking for informations into Link relation response headers.

This specification adds the corrisponding entries in the well-known URI IANA Registry.

1.1. Notational Conventions

The 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 ([RFC2119] and [RFC8174]) when, and only when, they appear in all capitals, as shown here.

The terms “documentation” and “description” are to be interpreted as described in Section 3 of [RFC8631].

2. Well-Known URI for Web Services

This specifications registers the following Well-Known URIs associated to the Link Relations defined in [RFC8631].

Servers MAY use content negotiation (see Section 3.4 of [RFC7231]) to provide different types of documentation or description.

Clients SHOULD NOT make any assumptions about the provided type of documentation or description.

3. Examples

3.1. Communicate API specification via well-known URI

Request:

  GET /.well-know/service-desc
  Accept: application/vnd.oai.openapi;version=3.0.1

Response:

  HTTP/1.1 200 Ok
  Content-Type: application/vnd.oai.openapi;version=3.0.1

  ...openapi specification...

3.2. Communicate API documentation via well-known URI

Request:

  GET /.well-know/service-doc
  Accept: text/html, application/pdf

Response:

  HTTP/1.1 200 Ok
  Content-Type: text/html

  ...html documentation...

3.3. Communicate API status via well-known URI

Request:

  GET /.well-know/status

Response:

  HTTP/1.1 503 Ok
  Content-Type: application/problem+json
  Retry-After: 3600
  
  {
    "status": 503,
    "title": "Service Unavailable",
    "detail": "Service is under maintenance. Check the Retry-After header."
  }
  

4. Security Considerations

4.1. Information exposure

TODO

5. IANA Considerations

This specification defines a “well-known” URI using the registration procedure and template from Section 5.1 of [RFC8615].

5.1. service-doc Well-Known URI Registration

IANA has added the following to the “Well-Known URIs” [RFC8615] registry:

URI suffix: service-doc

Change controller: IETF.

Specification document(s): Section 6.1 of [RFC8631], this document

Related information: None.

5.2. service-desc Well-Known URI Registration

IANA has added the following to the “Well-Known URIs” [RFC8615] registry:

URI suffix: service-desc

Change controller: IETF.

Specification document(s): Section 6.2 of [RFC8631], this document

Related information: None.

5.3. service-meta Well-Known URI Registration

IANA has added the following to the “Well-Known URIs” [RFC8615] registry:

URI suffix: service-meta

Change controller: IETF.

Specification document(s): Section 6.3 [RFC8631], this document

Related information: None.

5.4. status Well-Known URI Registration

IANA has added the following to the “Well-Known URIs” [RFC8615] registry:

URI suffix: status

Change controller: IETF.

Specification document(s): Section 6.4 [RFC8631], this document

Related information: None.

6. References

6.1. Normative References

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.

6.2. Informative References

[OpenAPI] "OpenAPI Specifications", n.d..
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known Uniform Resource Identifiers (URIs)", RFC 5785, DOI 10.17487/RFC5785, April 2010.
[RFC7231] Fielding, R. and J. Reschke, "Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content", RFC 7231, DOI 10.17487/RFC7231, June 2014.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017.
[RFC8615] Nottingham, M., "Well-Known Uniform Resource Identifiers (URIs)", RFC 8615, DOI 10.17487/RFC8615, May 2019.
[RFC8631] Wilde, E., "Link Relation Types for Web Services", RFC 8631, DOI 10.17487/RFC8631, July 2019.

Appendix A. Acknowledgements

This work is based on Erik Wilde’s work on service description contained in [RFC8631].

Change Log

RFC EDITOR PLEASE DELETE THIS SECTION.

FAQ

RFC EDITOR PLEASE DELETE THIS SECTION.

Author's Address

Roberto Polli Team Digitale, Italian Government EMail: robipolli@gmail.com