| Internet-Draft | Bearer URIs | August 2026 |
| Thierry | Expires 4 February 2027 | [Page] |
This specification describes several URI schemes to embed bearer tokens as authorization within URIs.¶
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 4 February 2027.¶
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.¶
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 (cf. 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 permission, making it possible to prevent confused deputy attacks and create new patterns of access control, including composable security policies and safe delegation mechanisms. (cf. Capability Myths Demolished)¶
HTTP/S URIs could be used as capabilities, but as HTTP/S 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, cf. [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 by combining an existing URI and a bearer token into a URI, called bearer-URI.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [BCP14].¶
This specification uses the Augmented Backus-Naur Form (ABNF) notation of [RFC5234].¶
When a bearer-URI-aware HTTP agent (like a browser or library) is asked to make an HTTP
request to a resource identified by a bearer-http URI (with parameters like the
method or the request body), it extracts from that bearer-URI the bearer token and the
HTTP URI, and prepare the HTTP request with the given parameters but put the bearer token
in the Authorization header with the Bearer authorization scheme: ([RFC6750]):¶
http.post("bearer-http://AViRTF9ppWiAtdnpVtVHDQ@example.com/foo", body="bar",
headers={"Content-Type": "text/plain"})
¶
would produce the following HTTP request:¶
POST /foo HTTP/1.1 Host: example.com Content-Type: text/plain Authorization: Bearer AViRTF9ppWiAtdnpVtVHDQ bar¶
The URI embedded in an absolute bearer-URI is the same URI with only two transformations:¶
| Bearer URI scheme | Embedded URI scheme | |
|---|---|---|
bearer-http
|
http [RFC9110]
|
(see Using bearer tokens without TLS about the security considerations) |
bearer-https
|
https [RFC9110]
|
|
bearer-ws
|
ws [RFC6455]
|
(see Using bearer tokens without TLS about the security considerations) |
bearer-wss
|
wss [RFC6455]
|
As far as the bearer-URI-aware agent is concerned, the URI of the designated resource MUST NOT be the embedded HTTP URI, but the bearer-URI (the retrieval URI is one source for a base URI).¶
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 bearer token used to retrieve the resource representation where they appear.¶
For that reason, the bearer schemes include a dedicated syntax to use a relative path with
a different token: bearer-https:NVW9YpUuEkZ367AyA-3MZw@./bar. Note that when such
a relative bearer-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 bearer-URI, it is valid for bearer-URIs to have an empty host, which creates a URI
that is equivalent to a network-path reference, but with the scheme specified:
bearer-https://D-nX3h-tDq_VtaYQKYYlDw@/baz.¶
The four URI schemes are specified by the rules¶
bearer-http-uri = "bearer-http" ":" bearer-path [ "?" query ] [ "#" fragment ] bearer-https-uri = "bearer-https" ":" bearer-path [ "?" query ] [ "#" fragment ] bearer-ws-uri = "bearer-ws" ":" bearer-path [ "?" query ] bearer-wss-uri = "bearer-wss" ":" bearer-path [ "?" query ] bearer-path = absolute-bearer-path / relative-bearer-path absolute-bearer-path = "//" token "@" host [ ":" port ] path-abempty token = *( unreserved / pct-encoded / sub-delims ) relative-bearer-path = token "@" segment-rel "/" path-rootless segment-rel = "." / ".."¶
The definitions of the following rules are adopted from the generic syntax of URI:¶
host = <host, see [RFC3986], Section 3.2.2> port = <port, see [RFC3986], Section 3.2.3> path-abempty = <path-abempty, see [RFC3986], Section 3.3> path-rootless = <path-rootless, see [RFC3986], Section 3.3> unreserved = <unreserved, see [RFC3986], Section 2.3> pct-encoded = <pct-encoded, see [RFC3986], Section 2.1> sub-delims = <sub-delims, see [RFC3986], Section 2.2> query = <query, see [RFC3986], Section 3.4> fragment = <fragment, see [RFC3986], Section 3.5>¶
If the token component of the bearer-URI is empty, it means that the
Authorization header MUST be absent from the request.¶
If the host component of the bearer-URI is empty, the URI is relative and is
valid only if there is a known base URI (cf. [RFC3986], section
5.1). Resolving the relative bearer-URI consists in creating a target bearer-URI where
every component is taken from the relative bearer-URI except the host, taken from the base
URI.¶
[RFC6750] mandates the use of TLS [RFC9846] because transmitting bearer tokens on an unprotected channel is deemed too risky in the use case of OAuth. But fine grained capabilities have a wider use case than OAuth and may be used between services where security is guaranteed at a different layer, like IPsec [RFC6071] or when services are communicating on a dedicated virtual network (which is typical in some cloud deployments). For this reason, this specification describes the use of bearer tokens both with and without TLS.¶
Of course, bearer-http URIs SHOULD never be used over an unprotected
channel. Doing so would make it possible for an observer anywhere on the path between the
client and the server to store and reuse any capability that isn't otherwise limited in
its use.¶
This specification defines several new URI schemes. Here are the informations for their registration to IANA according to [BCP35].¶
bearer-http¶
bearer-https¶
bearer-ws¶
bearer-wss¶
The idea of a bearer-URI was independently discovered by several people before this specification was imagined and written, and its final form draws a lot of elements from the work of Neil Madden (Towards a standard for bearer token URLs), Ariadne Conill (Demystifying Bearer Capability URIs) and Christine Lemmber-Webber.¶
The bearcap URI scheme was broader in that it was supposed to embed any URI where a
bearer token might be used to create a capability URI. Using dedicated URI schemes to embed
HTTP URIs has several desirable properties:¶
When embedding a URI with query parameters, it avoids the need to escape it, which makes such URIs easier to transcribe, which is an important design goal of URIs (see [RFC3986], section 1.2.2). When the bearer token is a series of words like an XCKD password, this can make manual transcription of a bearer-URI both easy and reliable.¶
When using absolute bearer-URIs, the sensitive information is in a part of the URI that the generic syntax of URIs already treats as sensitive, which makes it more likely that even software that doesn't recognizes these new URI schemes would handle the sensitive part accordingly.¶
It avoids the confusion when new URIs are embedded in bearer-URIs. Different implementations might presume different semantics or implementation details which, for something that is central to security, can easily lead to serious security issues. Thus, if another URI scheme can be embedded with a bearer token, a new bearer-URI scheme will be created with precise semantics.¶