Internet-Draft Meta-URIs July 2024
Lasso Expires 30 January 2025 [Page]
Workgroup:
Internet Engineering Task Force
Internet-Draft:
draft-soni-meta-uri-00
Published:
Intended Status:
Standards Track
Expires:
Author:
S. Lasso

Meta URIs: Generic Syntax

Abstract

This document describes a format for embedding a URI inside a URI, as part of a URI scheme's syntax definition.

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 30 January 2025.

Table of Contents

1. Introduction

Sometimes, it is useful to encode application-specific metadata as part of a URI. Traditionally, URIs provide very little support for application-specific metadata: [RFC3986] (Section 4.5) defines URI fragments, but they are specified by "the media type of [the resource]", not the application. In practice, some applications have alternatively made use of fragments for application-specific metadata, in conflict with its intended usage. This document defines a generic syntax for encoding application-specific metadata in a URI.

1.1. Requirements Language

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

2. The Meta-URI Syntax

An URI scheme describes a meta-URI if the scheme's syntax conforms to the syntax described here in Augmented BNF [RFC5234], borrrowing various terms from [RFC3986].


metaURI          = scheme ":" hier-part "?" meta-query
                   "&&" URI-reference
meta-query       = [ meta-qattr *("&" meta-qattr) ]
meta-q-res-avail = ":" / "@" / "!" / "$" /
                   "'" / "(" / ")" / "*" / "+" / "," / "="
meta-qchar       = unreserved / meta-q-res-avail / pct-encoded
meta-qattr       = 1*meta-qchar

As per Section 2.1 of [RFC8820], the meta-URI scheme MAY require support for specific embedded schemes, but SHOULD NOT restrict the allowed embedded schemes.

2.1. Fragment Handling

The fragment identifier, if any, is not part of the embedded URI, but instead applies to the whole Meta-URI, as per Section 3.5 of [RFC3986]. While the URI-reference term used above includes the fragment identifier, this approach merely enables future updates to [RFC3986] to also apply to this document automatically.

3. IANA Considerations

This document has no IANA considerations.

4. Security Considerations

It is up to the scheme authors to evaluate any security implications of using this syntax.

5. Interoperability Considerations

IPv6 literals cannot be encoded in the embedded URI, as square brackets ("[" and "]") are not allowed in the query element. A future update to [RFC3986] may change this.

6. Encoding considerations

No encoding considerations are known at this time.

7. References

7.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC3986]
Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, , <https://www.rfc-editor.org/info/rfc3986>.
[RFC8820]
Nottingham, M., "URI Design and Ownership", BCP 190, RFC 8820, DOI 10.17487/RFC8820, , <https://www.rfc-editor.org/info/rfc8820>.
[RFC5234]
Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, , <https://www.rfc-editor.org/info/rfc5234>.

7.2. Informative References

[RFC7512]
Pechanec, J. and D. Moffat, "The PKCS #11 URI Scheme", RFC 7512, DOI 10.17487/RFC7512, , <https://www.rfc-editor.org/info/rfc7512>.

Acknowledgements

Some of the ABNF rules in this document were adapted from [RFC7512].

Author's Address

Soni Lasso Terense