Network Working Group P. Thierry Internet-Draft Comonad Dev Intended status: Experimental 30 November 2026 Expires: 3 June 2027 Capability URIs and IRIs draft-thierry-cap-uris-00 Abstract This specification describes several URI schemes to safely embed capabilities within URIs. 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 3 June 2027. Copyright Notice Copyright (c) 2026 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 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 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 Thierry Expires 3 June 2027 [Page 1] Internet-Draft Capability URIs and IRIs November 2026 1.1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Architectural benefits . . . . . . . . . . . . . . . . . 3 1.3. Conventions and Terminology . . . . . . . . . . . . . . . 4 1.4. Syntax Notation . . . . . . . . . . . . . . . . . . . . . 4 1.5. Prior work . . . . . . . . . . . . . . . . . . . . . . . 5 2. The capability schemes . . . . . . . . . . . . . . . . . . . 5 2.1. Principle of operation . . . . . . . . . . . . . . . . . 5 2.2. Relative URI references . . . . . . . . . . . . . . . . . 7 2.3. Definitions . . . . . . . . . . . . . . . . . . . . . . . 7 2.4. Parameters . . . . . . . . . . . . . . . . . . . . . . . 9 2.4.1. Bearer token . . . . . . . . . . . . . . . . . . . . 10 2.4.2. Token format . . . . . . . . . . . . . . . . . . . . 10 2.4.3. Y-property certificate . . . . . . . . . . . . . . . 11 3. Web-caps . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4. Security Considerations . . . . . . . . . . . . . . . . . . . 14 4.1. Capability-URIs are credentials . . . . . . . . . . . . . 14 4.1.1. Redacted URI scheme . . . . . . . . . . . . . . . . . 15 4.2. Using bearer tokens without TLS . . . . . . . . . . . . . 17 4.3. Capabilities must be unforgeable . . . . . . . . . . . . 17 4.3.1. The limits on confinement . . . . . . . . . . . . . . 18 4.4. POLA . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.5. Revocation . . . . . . . . . . . . . . . . . . . . . . . 19 4.5.1. Caretaker . . . . . . . . . . . . . . . . . . . . . . 20 4.5.2. Membrane . . . . . . . . . . . . . . . . . . . . . . 20 4.5.3. Certificate revocation . . . . . . . . . . . . . . . 21 4.6. Attenuation . . . . . . . . . . . . . . . . . . . . . . . 21 4.6.1. Attenuation by default . . . . . . . . . . . . . . . 21 4.6.2. Attenuation by intermediary . . . . . . . . . . . . . 22 4.6.3. Offline attenation . . . . . . . . . . . . . . . . . 23 4.7. Responsibility tracking . . . . . . . . . . . . . . . . . 24 4.7.1. Responsability tracking protocols . . . . . . . . . . 25 4.8. Y-Property . . . . . . . . . . . . . . . . . . . . . . . 26 4.9. Out-of-band communication . . . . . . . . . . . . . . . . 26 4.10. Protection against CSRF . . . . . . . . . . . . . . . . . 27 4.11. Protection against XSS . . . . . . . . . . . . . . . . . 27 5. Performance considerations . . . . . . . . . . . . . . . . . 28 5.1. Latency cost . . . . . . . . . . . . . . . . . . . . . . 28 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 6.1. cap-http . . . . . . . . . . . . . . . . . . . . . . . . 29 6.2. cap-https . . . . . . . . . . . . . . . . . . . . . . . . 29 6.3. cap-ws . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.4. cap-wss . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.5. redacted . . . . . . . . . . . . . . . . . . . . . . . . 29 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 30 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.1. Normative References . . . . . . . . . . . . . . . . . . 30 8.2. Informative references . . . . . . . . . . . . . . . . . 32 Appendix A. Bootstrapping a web service with POLA . . . . . . . 35 Thierry Expires 3 June 2027 [Page 2] Internet-Draft Capability URIs and IRIs November 2026 Appendix B. Weather service caretaker . . . . . . . . . . . . . 36 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 37 1. Introduction 1.1. Rationale The research on access control has shown that between the two major paradigms of access control, access control lists (ACLs) are less expressive and usually open the possibility of confused deputy attacks, which include some the most problematic attack surfaces of the Web, like XSS and CSRF (see ACLs Don't). The ambient authority inherent to ACLs is also often critical in enabling privilege escalation, making one security flaw vastly more damaging. The other paradigm, capability-based security, combines designation and authority, making it possible to prevent confused deputy attacks and create new patterns of access control, including composable security policies and safe delegation mechanisms. (see Capability Myths Demolished) HTTP URIs could be used as capabilities, but as HTTP URIs are not treated as sensitive data by most systems, except for their authorization part (but the classical format login:password has been deprecated since, see [RFC3986], section 3.2.1), it opens up the possibility that capabilities would get leaked in various problematic places, including being stored in server logs and shown in browser address bars. This specification describes URI schemes that make it possible to safely encode capabilities as URIs and IRIs (see [RFC3987]) by combining an existing URI or IRI and some authorization data into a URI or IRI, called capability-URI (for readability, we don't distinguish capability-URIs and capability-IRIs, as they don't have different security properties). 1.2. Architectural benefits These URIs and IRIs also deliver on the promises of several architectural decisions at the core of the World Wide Web. [webarch] notes that | It is a strength of Web Architecture that links can be made and | shared; a user who has found an interesting part of the Web can | share this experience just by republishing a URI. Thierry Expires 3 June 2027 [Page 3] Internet-Draft Capability URIs and IRIs November 2026 When authority is separated from designation, sharing a link is often not enough. And several platforms only let their users share content among themselves. When the only tool of access control is user identity, it is logical that you can only share with another user. But fined grained capabilities make it possible again to share "an interesting part of the Web". Capability-URIs are also a better fit than identity-based authorization in REST APIs (see Architectural Styles and the Design of Network-based Software Architectures, especially chapter 5). The hypermedia nature of REST means that a payload may contain state transitions going to a variety of different servers and in the context of identity-based authorization, it is unclear what credentials should be used where and it creates the risk of using some credentials with the wrong server, possibly leaking credentials to an untrusted system. But if a REST server uses capability-URIs in the state transitions, the client knows with certainy which credentials to use for each request, and each capability-URI can hold the bare minimum of authority needed to trigger just that transition (see Attenuation (Section 4.6)). Capability-URIS also give the server more control over the trade-off between safety and latency: when the client should be able to trigger a state transition often and/or over some period of time, the server can embed a long-lived authorization in that state transition with only the authority for that transition. It makes the capability easier to reuse by a malicious agent, but with a very limited attack surface. On the other hand, whenever some state transitions require that the client be very strictly verified to be the right one, capabilities could have a very short TTL and the client would need to renew them by requesting again the resource where they appeared. 1.3. Conventions and Terminology 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 [BCP14]. 1.4. Syntax Notation This specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234]. Thierry Expires 3 June 2027 [Page 4] Internet-Draft Capability URIs and IRIs November 2026 1.5. Prior work The first use of URIs as capabilities was in the Waterken project, with web-keys, which placed an unguessable token in the fragment of an https URI, and YURLs, with the httpy URI scheme, which introduced the Y-property (Section 4.8). Introducing a new URI scheme proved to be difficult with Web browsers at the time, so the Waterken project ended up using https URIs with the fingerprint for the Y-property embedded in the host. Recently, several proposals were made about embedding capabilities as URIs with a new URI scheme (see acknoledgements (Section 7)). While this specification describes new URI schemes, the principle of web-keys remain a useful alternative in use cases where using the new schemes is not possible, and it can interoperate with capability- URIs. [web-key] describes the original web-keys and Section 3 their evolution with capability-URIs. 2. The capability schemes 2.1. Principle of operation When a capability-URI-aware HTTP agent (like a browser or library) is asked to make an HTTP request to a resource identified by a capability-URI (with parameters like the method or the request body), it extracts from that capability-URI the authorization data and the request target, prepares the HTTP request with the user-given parameters but augments the connection establishment and the request headers based on the authorization data of the capability-URI. In the following example, it puts the bearer token in the Authorization header with the Bearer authorization scheme [RFC6750]: http.post("cap-https://bt=AViRTF9ppWiAtdnpVtVHDQ@example.com/foo", body="bar", headers={"Content-Type": "text/plain"}) would produce the following HTTP/1.1 [RFC9112] request: POST /foo HTTP/1.1 Host: example.com Content-Type: text/plain Authorization: Bearer AViRTF9ppWiAtdnpVtVHDQ bar or the following HTTP/2 [RFC9113] or HTTP/3 [RFC9114] request: Thierry Expires 3 June 2027 [Page 5] Internet-Draft Capability URIs and IRIs November 2026 HEADERS + END_HEADERS :method = POST :scheme = cap-https :authority = example.com :path = /foo content-type = text/plain authorization = Bearer AViRTF9ppWiAtdnpVtVHDQ DATA + END_STREAM bar While there a few cases where similar capability-URIs share authorization data (see Section 4.6.1), the most common behavior will be that reusing the same authorization data with a different host, path or query will result in an error. Each URI scheme corresponds to an existing HTTP URI scheme, extended with rich authorization data. In a target capability-URI, except for the userinfo component which maps to the capability-URI's authorization component, every component has the same syntax and semantics than the corresponding URI scheme (and maps to the same request components, headers and pseudo-headers). +============+===============+======================================+ | Capability | Corresponding | | | URI scheme | URI scheme | | +============+===============+======================================+ | cap-http | http | (see Using bearer tokens | | | [RFC9110] | without TLS about the | | | | security considerations) | +------------+---------------+--------------------------------------+ | cap-https | https | | | | [RFC9110] | | +------------+---------------+--------------------------------------+ | cap-ws | ws [RFC6455] | (see Using bearer tokens | | | | without TLS about the | | | | security considerations) | +------------+---------------+--------------------------------------+ | cap-wss | wss [RFC6455] | | +------------+---------------+--------------------------------------+ Table 1 Thierry Expires 3 June 2027 [Page 6] Internet-Draft Capability URIs and IRIs November 2026 As far as the capability-URI-aware agent is concerned, the URI of the designated resource MUST NOT be the URI with the corresponding scheme, but the capability-URI (the retrieval URI is one source for a base URI). 2.2. Relative URI references The normal algorithm from [RFC3986] (section 5.2) applies to relative references, which means that except for network-path references with a userinfo component, relative references reuse the same authorization data used to retrieve the resource representation where they appear. For that reason, the capability schemes include a dedicated syntax to use a relative path with a different token: cap- https:bt=NVW9YpUuEkZ367AyA-3MZw@./bar. Note that when such a relative capability-URI is parsed by a generic URI parser, the whole content after the scheme will match the path-rootless rule of [RFC3986] (and the token won't be parsed by the authority rule). To make a relative reference with an absolute path, a network-path reference can be used: //D-nX3h-tDq_VtaYQKYYlDw@/baz. If there could be ambiguity whether the base URI is a capability-URI, it is valid for capability-URIs to have an empty host, which creates a URI that is equivalent to a network-path reference, but with the scheme specified: cap-https://bt=D-nX3h-tDq_VtaYQKYYlDw@/baz. These relative capability-URI, like relative URI references, refer to a target capability-URI. 2.3. Definitions The four URI schemes are specified by the rules * cap-http-uri * cap-https-uri * cap-ws-uri * cap-wss-uri The corresponding IRIs are specified by the rules * cap-http-iri * cap-https-iri Thierry Expires 3 June 2027 [Page 7] Internet-Draft Capability URIs and IRIs November 2026 * cap-ws-iri * cap-wss-iri cap-http-uri = "cap-http" ":" cap-path [ "?" query ] [ "#" fragment ] cap-https-uri = "cap-https" ":" cap-path [ "?" query ] [ "#" fragment ] cap-ws-uri = "cap-ws" ":" cap-path [ "?" query ] cap-wss-uri = "cap-wss" ":" cap-path [ "?" query ] cap-path = absolute-cap-path / relative-cap-path absolute-cap-path = "//" authorization "@" host [ ":" port ] path-abempty relative-cap-path = authorization "@" path-rel path-rel = segment-rel "/" path-rootless authorization = [ param *( ";" param ) ] param = 1*param-char param-char = unreserved / pct-encoded / param-delims param-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / "=" / ":" bearer-token-param = "bt=" token token = 1*param-char token-format-param = [ "*" ] "tf=" token-format token-format = 1*param-char y-cert-param = "yc=" y-cert-alg ":" y-cert-hash y-cert-alg = 1*unreserved y-cert-hash = base32 segment-rel = "." / ".." base32 = "A" / "B" / "C" / "D" / "E" / "F" / "G" / "H" / "I" / "J" / "K" base32 =/ "L" / "M" / "N" / "O" / "P" / "Q" / "R" / "S" / "T" / "U" / "V" base32 =/ "W" / "X" / "Y" / "Z" / "2" / "3" / "4" / "5" / "6" / "7" cap-http-iri = "cap-http" ":" cap-ipath [ "?" iquery ] [ "#" ifragment ] cap-https-iri = "cap-https" ":" cap-ipath [ "?" iquery ] [ "#" ifragment ] cap-ws-iri = "cap-ws" ":" cap-ipath [ "?" iquery ] cap-wss-iri = "cap-wss" ":" cap-ipath [ "?" iquery ] cap-ipath = absolute-cap-ipath / relative-cap-ipath absolute-cap-ipath = "//" iauthorization "@" ihost [ ":" port ] ipath-abempty relative-cap-ipath = iauthorization "@" ipath-rel ipath-rel = isegment-rel "/" ipath-rootless iauthorization = [ iparam *( ";" iparam ) ] iparam = 1*param-ichar param-ichar = iunreserved / pct-encoded / param-delims bearer-token-iparam = "bt=" itoken itoken = 1*param-ichar Note that the rule param-delims corresponds to the rule sub-delims (see [RFC3986], section 2.2), minus the ";" alternative, plus the ":" alternative. The definitions of the following rules are adopted from the generic syntax of URIs and IRIs: Thierry Expires 3 June 2027 [Page 8] Internet-Draft Capability URIs and IRIs November 2026 host = port = path-abempty = path-rootless = unreserved = pct-encoded = query = fragment = ihost = iport = ipath-abempty = ipath-rootless = iunreserved = iquery = ifragment = If the capability-URI has an absolute-cap-path where the host component is empty or an absolute-cap-ipath where the ihost component is empty, the URI is relative and is valid only if there is a known base URI (see [RFC3986], section 5.1). Resolving this relative capability-URI consists in creating a target capability-URI where every component is taken from the relative capability-URI, except the host, taken from the base URI. If the capability-URI has a relative-cap-path or relative-cap-ipath, resolving it consists in creating a target capability-URI where every component is taken from the URI produced by resolving the relative reference present in the path-rel or path-irel component, except the authorization or iauthorization component, taken from the authorization or iauthorization component of the relative capability- URI. 2.4. Parameters The authorization or iauthorization component of the capability-URI is made of a sequence of parameters. This specification defines three such parameters, but a future version can define more parameters, to support different authorization mechanisms, or deprecate exisiting ones. An application that doesn't implement some parameter MUST NOT make a request for a capability-URI containing that parameter, except if that parameter's handling is optional. If a parameter's handling is optional, it MUST begin with the character *. If a parameter's handling is not optional, it MUST NOT begin with the character *. Thierry Expires 3 June 2027 [Page 9] Internet-Draft Capability URIs and IRIs November 2026 2.4.1. Bearer token When the bearer-token-param (in a URI) or bearer-token-iparam (in an IRI) component is present, the request MUST contain an Authorization header containing the token or itoken component as a bearer token used with the Bearer authorization scheme ([RFC6750]). When the bearer-token-param or bearer-token-iparam component is absent, the request MUST NOT contain such an Authorization header with an empty bearer token or one created from another source than the capability-URI's parameters. Another parameter MAY add an Authorization header, including one using the Bearer authorization scheme. Examples: * cap-https://*bt=7w66swRJlKme6P3mXY3qww*@foo.io * cap-https://*bt=disallow-hacksaw-repaint-unguarded*@bar.app/ welcome * cap-wss://*bt=mugol-majup-mupul-tizaj*@baz.net/updates * cap-https://*bt=衛停烈央察燒迅境若印洲刻*@quux.com/login When a capability-IRI contains a bearer token with characters outside US-ASCII, they SHOULD be encoded as UTF-8 for the HTTP header, as the valid characters for itoken encoded in UTF-8 are also valid for the field-vchar rule of HTTP. Whereas tokens encoding a Swiss number (see Section 4.3) can be relatively short (e.g. a 256 bits number only needs 44 characters in base64), tokens containing a chain of certificates (see Section 4.6.3) can easily grow to a few hundred characters or even a few thousand ones. While there is no limit for URIs or HTTP headers in their respective RFCs, several HTTP components like browsers, servers and caches, for performance and security reasons, limit the size of URIs, requests and headers they will accept to handle. As several of them have a limit of 8kb (including Nginx and Tomcat), it is RECOMMENDED to keep tokens under that size. 2.4.2. Token format When the token-format-param component is present, it gives the format used for the bearer token. This specification defines one value for token-format but a future version can define more values or deprecate exisiting ones: Thierry Expires 3 June 2027 [Page 10] Internet-Draft Capability URIs and IRIs November 2026 +==============+========================+ | token-format | Token format | +==============+========================+ | bisc | Biscut (see [biscuit]) | +--------------+------------------------+ Table 2 Example: * cap- https://bt=EokBCh8KBmFjdGlvbhgDIggKBggCEgIQeyIJCgcIgAgSAhgAEiQIABIgncUlEtlWvSDNfM3zZF1i7uA0FipKD48IAKga_ AlY3E0aQHJGTX- BrG0UwWHFFT231A0JEBtMWVBgKS5pUdMsISTjRH9DKY9PcFhQ2TqczdhGar8D6NCiZIoDeQvrZtkHJgwiIgog4qv2B3AC4VhoLybiDGxobq- POPtW_JxhRlRLjDJY7DM=;**tf=bisc*@foo.io * cap- https://bt=EokBCh8KBmFjdGlvbhgDIggKBggCEgIQeyIJCgcIgAgSAhgAEiQIABIg32JaSzOOkDZeLRbnfN5qRQ0fPmT7fFaVzQ96zVffuzYaQOyfgWJUTAuJtuIgI8Y8ToW7mGPsQztQQ_ WWHIzJMH1B6yCtncRiaBtAn9yYRuZ62JFiDYp8RyRmM3PPdETlwAIiIgog25_ 3GfCiu_5kjg-dEq05B7WY5IcoNFAo8P8s1XHlAIU=;*tf=bisc*@foo.io This parameter's handling can be optional (if it starts with the * character). An application SHOULD make this parameter's handling mandatory if actions like revocation (Section 4.5) and attenuation (Section 4.6) of the capability-URI are not possible without it. 2.4.3. Y-property certificate This parameter enables the Y-property. When the y-cert-param component is present, the client MUST check during TLS handshake that in one X.509 certificate in the certificate chain of the server, the DER encoding of the SubjectPublicKeyInfo field (see [RFC3279]), hashed with the algorithm y-cert-alg and encoded in base32 (see [RFC4648], section 6) corresponds to y-cert- hash, or abort the TLS handshake with a bad_certificate alert (see [RFC9846], section 6.2). As the size of the hash is known, the base32 encoding MUST NOT contain padding. This parameter MUST NOT be present in a cap-http or cap-ws URI, where it wouldn't make sense. This specification defines one value for y-cert-alg but a future version can define more values or deprecate exisiting ones: Thierry Expires 3 June 2027 [Page 11] Internet-Draft Capability URIs and IRIs November 2026 +============+=========================+ | y-cert-alg | Hashing algorithm | +============+=========================+ | sha256 | SHA-256 (see [RFC6234]) | +------------+-------------------------+ Table 3 This parameter MAY be used without any other, to get the benefits of the Y-property even in a URI that doesn't combine designation and authority. Examples: * cap- https://*yc=sha256:OHYQO7NTO76XXDLIHAG2M35GQI4KGA5SSEN4W5YLHMVEEZUTZ6CA*@foo.io/ public/doc * cap- https://*yc=sha256:HBRWGMZTG4ZDIN3DHE3TQYLEMQYTOODCGZRWGZDGMIYDAMJZMYFA*;bt=NvjXBbwz6YlkI- nYIlhH5w@bar.app/welcome base32 is used because it is more resilient to transcription, leaving few possible ambiguities between the characters of the alphabet. To account for the possibility of erroneous transcription, the following characters not present in base32's alphabet SHOULD be substituted: +====================+==============+ | invalid characteur | substitution | +====================+==============+ | 0 | O | +--------------------+--------------+ | 1 | I | +--------------------+--------------+ | 8 | B | +--------------------+--------------+ Table 4 3. Web-caps While it can sometimes be straightforward to update frontend and backend code to be able to handle new URI schemes, their adoption by browsers is likely to take time. Also, backward compatibility with legacy browsers can be paramount. Thierry Expires 3 June 2027 [Page 12] Internet-Draft Capability URIs and IRIs November 2026 This specification describes a way to embed a capability in a legacy https URI, for its use in resource representations handled by a web browser, called web-caps. Web-caps are a direct evolution of web- keys (see [web-key]). A web-cap is a https URI or IRI where the fragment is a cap-https capability-URI. This capability-URI MUST NOT contain a host or ihost component, it MUST be a relative capability-URI with a cap-https scheme. The https URI without its fragment is called the trampoline URI, and it is the base URI for the capability-URI. When the browser makes a request for the trampoline URI, the representation in the server's response MUST be a document with client-side code that will extract the capability-URI, resolve it, and replace the document in the browser with the result of requesting the capability-URI. A document that implementents these steps is called a trampoline document. When the server doesn't respond with a trampoline document, it MUST respond with an HTTP error or with a document showing an error message. Once loaded, a trampoline document MUST attempt to modify the browser's address bar to remove the fragment as soon as possible, to limit the possibility of an attacker to observe the capability-URI on the user's screen or with malicious client-side code (through the Location interface of the browser). A trampoline document is a critical piece of the Trusted Computing Base (TCB) for the system using it. As such, a trampoline document SHOULD be as minimal as possible and SHOULD be audited with the most thorough methods available. A trampoline document MUST NOT load any external resources. Any request it makes apart from the request for the capability-URI may compromize the safety of that capability, even in indirect ways, so any stylesheet, image, or executable code MUST be embedded as data in the document, either as regular content (like a