Briefing · Article · source · published · Boston Identity
OAuth's resource indicators RFC says servers should bind tokens to a resource, but requires it of neither side
RFC 8707, published in February 2020 by Brian Campbell, John Bradley and Hannes Tschofenig, adds a resource parameter that tells an OAuth authorization server where a token will be used, so the server can limit the token to that place. Both halves stay optional in the text. The security section is blunter about bearer tokens with several audiences: any one of those resources can use the token at the others.
RFC Editor · Brian Campbell, John Bradley, Hannes Tschofenig · February 1, 2020 · read
What's happening
Finding3RFC 8707 gives an OAuth client a resource parameter for naming where it will use a token, and makes that step mandatory for neither client nor server.
RFC 8707 gives an OAuth client a resource parameter for naming where it will use a token, and makes the step mandatory for neither side. A client MAY send the parameter, and the authorization server SHOULD then limit the audience of the access tokens it issues to the resources named. If the client leaves it out, the server may process the request with no specific resource or with a predefined default, or it may reject the request with an invalid_target error. The authors' motivation notes that scope is sometimes overloaded to carry a resource's location, while other scope values say only what kind of access is wanted.
flag a problem with BI-FIND-2020-0005
A bearer token with several audiences can be used by any one of those resources to access any of the others, the RFC's security section warns.
The RFC's security section warns that a bearer token with several audiences "can be used by any one of those resources to access any of the others." It encourages a single resource value per token request, says tokens with several audiences need a high degree of trust between the parties, and tells multi-tenant servers to put the tenant in the resource URI so a token issued for one tenant fails at another. Where the resource value is an abstract identifier rather than a network address, the client has to check out of band that every endpoint it sends tokens to is the intended audience.
flag a problem with BI-FIND-2020-0006
A token limited to one resource is refused when that resource replays it elsewhere; a bearer token naming two audiences works for either resource at the other.
Drawn from RFC 8707, Sections 2 and 3Source dated February 1, 2020Passage: Security and privacy considerations
Swipe for the full figure →
In the authorization-code case, a client asking for a subset of its grant gets an access token for the subset, but any refresh token keeps the full grant.
At the token endpoint the parameter works for all grant types, and the RFC reads a request with several scopes and several resources as asking for "the cartesian product of all the scopes at all the target services." Which resources the server accepts is "at its sole discretion", and the text says that, where possible, it should downscope each access token to what that resource can process and needs to know, a lowercase should that is not one of the RFC's formal requirement keywords. In the authorization-code case, a client asking for a subset of the original grant gets an access token for the subset, while any refresh token returned stays bound to the full original grant.
flag a problem with BI-FIND-2020-0007
Section by section
4showing 4 of 4
[1]Why a client must say where a token will be used
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Standards
Why a client must say where a token will be used
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Campbell, Bradley and Tschofenig write that years of OAuth deployment showed a need, at authorization servers serving many different resources, for the client to say where it will use a token. Knowing the resource lets the server build the token for it, for example by encrypting it to that resource, and restrict its audience. Scope is sometimes overloaded to carry that location, and other scope values carry only the type of access. The RFC offers a standard alternative to the proprietary parameters some deployments already use.
technical artifactfrom published text
[2]The resource parameter and invalid_target
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Standards
The resource parameter and invalid_target
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Section 2 defines the resource parameter as an absolute URI that MUST NOT include a fragment and SHOULD NOT include a query, and a client can repeat it to name several resources. The authorization server SHOULD restrict tokens to the resources named, which a JWT carries in its aud claim and an introspection response can also report. A server may accept a request without the parameter or reject it with invalid_target. Clients SHOULD use the most specific URI they can, normally the API's base URI.
technical artifactfrom published text
[3]Resource on the token request, refresh and downscoping
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Standards
Resource on the token request, refresh and downscoping
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
The same parameter works at the token endpoint for every grant type. The server alone decides which resources it will accept, and for code and refresh grants it may hold them to the original grant or a subset. A request for several scopes at several resources asks for every scope at every resource, and the RFC says the server should cut each token down to what its resource needs.
technical artifactfrom published text
[4]Security and privacy considerations
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Standards
Security and privacy considerations
Brian Campbell, Ping Identity · John Bradley, Yubico · Hannes Tschofenig, Arm Limited
Audience restriction stops a resource that receives a token from replaying it at another one. Multi-tenant servers should put the tenant in the resource URI, and the RFC encourages a single resource value per request because a bearer token with several audiences lets each of those resources reach the others. When the resource is an abstract identifier, the client is responsible for checking out of band where its tokens go. On privacy, the parameter may let the authorization server track behaviour in finer detail when introspection is not used.
technical artifactfrom published text