fapi-2-baseline | July 2021 | |
Fett | Standards Track | [Page] |
The Financial-grade API (FAPI) 2.0 Baseline profile is an API security profile based on the OAuth 2.0 Authorization Framework [RFC6749].¶
Financial-grade API (FAPI) 2.0 is an API security profile based on the OAuth 2.0 Authorization Framework [RFC6749] and related specifications suitable for protecting APIs in high-value scenarios. While the security profile was initially developed with a focus on financial applications, it is designed to be universally applicable for protecting APIs exposing high-value and sensitive (personal and other) data, for example, in e-health and e-government applications.¶
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 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.¶
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.¶
OIDF FAPI is an API security profile based on the OAuth 2.0 Authorization Framework [RFC6749]. This Baseline Profile aims to reach the security goals laid out in the [Attacker Model].¶
To protect against network attackers, clients, authorization servers, and resource servers shall only offer TLS protected endpoints and shall establish connections to other servers using TLS. TLS connections shall be set up to use TLS version 1.2 or later and follow [RFC7525].¶
Endpoints for the use by web browsers shall use methods to ensure that connections cannot be downgraded using TLS Stripping attacks. A preloaded [preload] HTTP Strict Transport Security policy [RFC6797] can be used for this purpose. Some top-level domains, like .bank and .insurance, have set such a policy and therefore protect all second-level domains below them.¶
For a comprehensive protection against network attackers, all endpoints should additionally use DNSSEC to protect against DNS spoofing attacks that can lead to the issuance of rogue domain-validated TLS certificates. Note: Even if an endpoint uses only organization validated (OV) or extended validation (EV) TLS certificates, rogue domain-validated certificates can be used to impersonate the endpoints and conduct man-in-the-middle attacks. CAA records [RFC8659] can help to mitigate this risk.¶
In the following, a profile of the following technologies is defined:¶
Proof Key for Code Exchange by OAuth Public Clients (PKCE) [RFC7636]¶
OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens (MTLS) [RFC8705]¶
OAuth 2.0 Demonstrating Proof-of-Possession at the Application Layer (DPoP) [I-D.ietf-oauth-dpop]¶
OAuth 2.0 Pushed Authorization Requests (PAR) [I-D.ietf-oauth-par]¶
OAuth 2.0 Rich Authorization Requests (RAR) [I-D.ietf-oauth-rar]¶
OAuth 2.0 Authorization Server Issuer Identifier in Authorization Response [I-D.ietf-oauth-iss-auth-resp]¶
OpenID Connect Core 1.0 incorporating errata set 1 [OpenID]¶
Clients¶
shall use the authorization code grant described in [RFC6749]¶
shall use pushed authorization requests according to [I-D.ietf-oauth-par]¶
shall support sender-constrained access tokens using one of the following methods:¶
DPoP as described in [I-D.ietf-oauth-dpop]¶
shall support client authentication using one of the following methods:¶
shall use PKCE [RFC7636] with S256
as the code challenge method¶
shall send access tokens in the HTTP header as in Section 2.1 of OAuth 2.0 Bearer Token Usage [RFC6750]¶
shall check the iss
parameter in the authorization response according to
[I-D.ietf-oauth-iss-auth-resp] to prevent Mix-Up attacks¶
shall not expose open redirectors (see section 4.10 of [I-D.ietf-oauth-security-topics])¶
if using private_key_jwt
, shall use the Authorization Server's issuer identifier
value (as defined in [RFC8414]) in the aud
claim sent in client authentication assertions.¶
The FAPI 2.0 endpoints are OAuth 2.0 protected resource endpoints that return protected information for the resource owner associated with the submitted access token.¶
Resource servers with the FAPI endpoints¶
shall accept access tokens in the HTTP header as in Section 2.1 of OAuth 2.0 Bearer Token Usage [RFC6750]¶
shall not accept access tokens in the query parameters stated in Section 2.3 of OAuth 2.0 Bearer Token Usage [RFC6750]¶
shall verify the validity, integrity, expiration and revocation status of access tokens¶
shall verify that the scope (incl. authorization_details
) of the access
token authorizes the access to the resource it is representing¶
shall support and verify sender-constrained access tokens using one of the following methods:¶
DPoP as described in [I-D.ietf-oauth-dpop]¶
shall identify the associated entity to the access token¶
shall only return the resource identified by the combination of the entity implicit in the access and the granted scope and otherwise return errors as in section 3.1 of [RFC6750]¶
Authorization Servers, Clients, and Resource Servers shall adhere to [RFC8725] when creating or processing JWTs. In particular,¶
RSA keys shall have a minimum length of 2048 bits.¶
Elliptic curve keys shall have a minimum length of 160 bits.¶
Credentials not intended for handling by end-users (e.g., access tokens, refresh tokens, authorization codes, etc.) shall be created with at least 128 bits of entropy such that an attacker correctly guessing the value is computationally infeasible. Cf. Section 10.10 of [RFC6749].¶
FAPI 1.0 Read/Write | FAPI 2.0 | Reasons |
---|---|---|
JAR, JARM | PAR | integrity protection and compatibility improvements for authorization requests; only code in response |
- | RAR | support complex and structured information about authorizations |
- | shall adhere to Security BCP | |
s_hash
|
- | state integrity is protected by PAR; protection provided by state is now provided by PKCE |
pre-registered redirect URIs | redirect URIs in PAR | pre-registration is not required with client authentication and PAR |
response types code id_token or code
|
response type code
|
improve security: no ID token in front-channel; not needed |
ID Token as detached signature | - | ID token does not need to serve as a detached signature |
signed and encrypted ID Tokens | signing and encryption not required | ID Tokens only exchanged in back channel |
exp claim in request object |
- | ? |
x-fapi-* headers |
- | Removed pending further discussion |
MTLS for sender-constrained access tokens | MTLS or DPoP |
We would like to thank Takahiko Kawasaki, Filip Skokan, Dave Tonge, Nat Sakimura, Stuart Low, Dima Postnikov, Torsten Lodderstedt, Joseph Heenan, Travis Spencer, Brian Campbell and Ralph Bragg for their valuable feedback and contributions that helped to evolve this specification.¶
Copyright (c) 2021 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.¶