fapi-2-message-signing | November 2024 | |
Tonge, et al. | Standards Track | [Page] |
The OpenID Foundation (OIDF) promotes, protects and nurtures the OpenID community and technologies. As a non-profit international standardizing body, it is comprised by over 160 participating entities (workgroup participant). The work of preparing implementer drafts and final international standards is carried out through OIDF workgroups in accordance with the OpenID Process. Participants interested in a subject for which a workgroup has been established have the right to be represented in that workgroup. International organizations, governmental and non-governmental, in liaison with OIDF, also take part in the work. OIDF collaborates closely with other standardizing bodies in the related fields.¶
Final drafts adopted by the Workgroup through consensus are circulated publicly for the public review for 60 days and for the OIDF members for voting. Publication as an OIDF Standard requires approval by at least 50% of the members casting a vote. There is a possibility that some of the elements of this document may be the subject to patent rights. OIDF shall not be held responsible for identifying any or all such patent rights.¶
OIDF FAPI 2.0 is an API security profile based on the OAuth 2.0 Authorization Framework [RFC6749]. This Message Signing Profile is part of the FAPI 2.0 family of specifications with a focus on providing interoperable support for non-repudiation across OAuth 2.0 based requests and responses.¶
This document is not an OIDF International Standard. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an International Standard.¶
Recipients of this draft are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.¶
The keywords "shall", "shall not", "should", "should not", "may", and "can" in this document are to be interpreted as described in ISO Directive Part 2 [ISODIR2]. These keywords are not used as dictionary terms such that any occurrence of them shall be interpreted as keywords and are not to be interpreted with their natural language meanings.¶
This document specifies the methods for clients, authorization servers and resource servers to sign and verify messages.¶
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.¶
See Clause 8 for normative references.¶
For the purpose of this document, the terms defined in [RFC6749], [RFC6750], [RFC7636], [OIDC] and [ISO29100] apply.¶
API – Application Programming Interface¶
HTTP – Hyper Text Transfer Protocol¶
JAR – JWT-Secured Authorization Request¶
JARM – JWT Secured Authorization Response Mode¶
JWT – JSON Web Token¶
JSON – JavaScript Object Notation¶
OIDF – OpenID Foundation¶
PAR – Pushed Authorization Requests¶
PKCE – Proof Key for Code Exchange¶
REST – Representational State Transfer¶
TLS – Transport Layer Security¶
URI – Uniform Resource Identifier¶
URL – Uniform Resource Locator¶
OIDF FAPI 2.0 is an API security profile based on the OAuth 2.0 Authorization Framework [RFC6749]. This Message Signing Profile aims to reach the security goals laid out in the Attacker Model [attackermodel] plus the non-repudiation goals listed below.¶
All provisions of the [FAPI2_Security_Profile_ID2] apply to the Message Signing Profile as well, with the extensions described in the following.¶
In addition to the technologies used in the [FAPI2_Security_Profile_ID2], the following standards are used in this profile:¶
We understand that some ecosystems may only desire to implement 1, 2 or 3 of the above 4, it is therefore anticipated that a piece of software will be able to conform to each of the methods separately, i.e. there will be separate conformance testing options for each of the following:¶
Beyond what is captured by the security goals and the attacker model in [attackermodel], parties could try to deny having sent a particular message, for example, a payment request. For this purpose, non-repudiation is needed.¶
In the context of this specification, non-repudiation refers to the assurance that the owner of a signature key pair that was capable of generating an existing signature corresponding to certain data cannot convincingly deny having signed the data ([NIST.SP.800-133]).¶
This is usually achieved by providing application-level signatures that can be stored together with the payload and meaningful metadata of a request or response.¶
The following messages are affected by this specification:¶
To support non-repudiation for NR4, introspection responses can be signed.¶
Clients implementing FAPI2 introspection response signing¶
To support non-repudiation for NR7, signed ID tokens are used.¶
Clients requesting and receiving ID tokens¶
To support non-repudiation for NR5 and NR6, HTTP requests, responses, or both can be signed.¶
Clients sending signed resource requests act in the role of "signer" as defined by [RFC9421]. This signer¶
@method
(the method used in the HTTP request) in the signature;¶
@target-uri
(the full request URI of the HTTP request) in the signature;¶
created
parameter (the signature creation time) in the signature;¶
tag
parameter with a value of fapi-2-request
in the signature;¶
Authorization
header in the signature;¶
DPoP
header in the signature;¶
content-digest
header as defined in
[I-D.ietf-httpbis-digest-headers] in the request, shall include that header in the signature, and should use
content-encoding agnostic digest methods (such as sha-256).¶
Resource servers receiving signed resource requests act in the role of "verifier" as defined by [RFC9421]. This verifier¶
fapi-2-request
in the signature;¶
@method
, @target-uri
, or Authorization
in the signature;¶
created
parameter or have a created
value
that is greater than an acceptable range (1 minute is recommended);¶
DPoP
header is present in the request, shall reject requests that are missing DPoP
in the signature;¶
content-digest
in the signature.¶
NOTE: This specification doesn't specify the exact means by which a resource server can retrieve
the key for the client. The resource server can obtain an identifier for the client either from a
mutual TLS cerficiate or from a JWT access token or from a token introspection response. With a client
identifier and the keyid
in the Signature-Input
field, the resource server can retrieve the key from
a trusted third party or by some other means.¶
Resource servers responding with a signed resource response act in the role of "signer" as defined by [RFC9421]. This signer¶
req
boolean flag defined
in Section 2.4 of [RFC9421];¶
req
boolean flag defined in Section 2.4 of [RFC9421];¶
@status
(the status code of the response) in the signature;¶
created
parameter (the signature creation time) in the signature;¶
tag
parameter with a value of fapi-2-response
in the signature;¶
content-digest
header as defined in [RFC9530]
in the response, and shall include that header in the signature, and should use content-encoding agnostic digest methods (such as sha-256).¶
NOTE: In order to cryptographically link a response to a signed request, it is not sufficient to sign only the request signature value. Instead, the server has to sign all portions of the request relevant to generating the response by using the req feature of the HTTP message signature generation. This specification mandates a minimum coverage, but signers are required to sign anything else relevant to the API being protected, including headers and contents.¶
Clients receiving signed resource responses act in the role of "verifier" as defined by [RFC9421]. This verifier¶
@status
and created
are included in the signature;¶
content-digest
is in the signature; and¶
fapi-2-response
.¶
NOTE: This specification doesn't specify the exact means by which a client can retrieve
the key for the resource server. Together with the identity of the resource server and the
keyid
in the Signature-Input
field, the client can retrieve the key from a trusted third
party or by some other means.¶
NOTE: As noted in Section 2.4 of [RFC9421], the client will need to keep data related to the request in order to verify the response signature.¶
In [I-D.ietf-oauth-jwt-introspection-response], the resource server accessing the introspection endpoint is seen in the role of a client towards the authorization server that is providing the introspection endpoint. A malicious client (that is not a resource server) could attempt to call the introspection endpoint directly, and thus gather information about an access token to which it is not supposed to have access. This may, for example, leak secrets including, if the access token was leaked or stolen, personal information about an end-user.¶
The authorization server therefore must ensure that the resource server is not confused with a regular client that is not supposed to call the introspection endpoint, and that the resource server has the necessary authorization to access the information associated with the access token.¶
It is important to note that while this specification provides mechanisms for non-repudiation for individual messages, it does not provide non-repudiation guarantees for a sequence of messages.¶
This specification provides the technical means to sign messages, however proving that a specific signed response is linked to a specific real world end-user, or that a real world end-user initiated a specific request is outside of the scope of this document.¶
The values signed in a JARM response may be of limited value for non-repudiation as the values are artifacts of the OAuth flow (e.g. code and state) rather than real world values (e.g. account number and amount). However JARM is still useful in providing message integrity to the authorization response.¶
In addition to the privacy considerations detailed in [FAPI2_Security_Profile_ID2] implementers should consider the privacy implications of storing messages for the purpose of non-repudiation.¶
Such messages may well contain personally identifiable information and implementers should evaluate whether such messages need to be stored. If they are stored then adequate access controls must be put in place to protect that data. Such controls should follow data minimisation principles and ensure that there are tamper-proof audit logs.¶
This specification requests registration of the following client metadata definitions in the IANA "OAuth Dynamic Client Registration Metadata" registry established by [RFC7591]:¶
response_modes
¶
This specification was developed by the OpenID FAPI Working Group.¶
We would like to thank Takahiko Kawasaki, Filip Skokan, Nat Sakimura, Dima Postnikov, Brian Campbell, Ralph Bragg, Justin Richer and Lukasz Jaromin for their valuable feedback and contributions that helped to evolve this specification.¶
Copyright (c) 2023 The OpenID Foundation.¶
The OpenID Foundation (OIDF) grants to any Contributor, developer, implementer, or other interested party a non-exclusive, royalty free, worldwide copyright license to reproduce, prepare derivative works from, distribute, perform and display, this Implementers Draft or Final Specification solely for the purposes of (i) developing specifications, and (ii) implementing Implementers Drafts and Final Specifications based on such documents, provided that attribution be made to the OIDF as the source of the material, but that such attribution does not indicate an endorsement by the OIDF.¶
The technology described in this specification was made available from contributions from various sources, including members of the OpenID Foundation and others. Although the OpenID Foundation has taken steps to help ensure that the technology is available for distribution, it takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this specification or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any independent effort to identify any such rights. The OpenID Foundation and the contributors to this specification make no (and hereby expressly disclaim any) warranties (express, implied, or otherwise), including implied warranties of merchantability, non-infringement, fitness for a particular purpose, or title, related to this specification, and the entire risk as to implementing this specification is assumed by the implementer. The OpenID Intellectual Property Rights policy requires contributors to offer a patent promise not to assert certain patent claims against other contributors and against implementers. The OpenID Foundation invites any interested party to bring to its attention any copyrights, patents, patent applications, or other proprietary rights that may cover technology that may be required to practice this specification.¶