fapi-2-baseline | June 2022 | |
Fett | 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.¶
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 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 requirements for confidential Clients to securely obtain OAuth tokens from Authorization Servers and securely use those tokens to access REST APIs at Resource Servers.¶
For the purpose of this document, the terms defined in [RFC6749], [RFC6750], [RFC7636], [OIDC] and ISO29100 apply.¶
API - Application Programming Interface¶
FAPI - Financial-grade API¶
HTTP - Hyper Text Transfer Protocol¶
REST - Representational State Transfer¶
TLS - Transport Layer Security¶
DNS - Domain Name System¶
DNSSEC - Domain Name System Security Extensions¶
CAA - Certificate Authority Authorization¶
URI - Uniform Resource Identifier¶
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 [attackermodel].¶
We are not currently aware of any mechanisms that would allow public clients to be secured to the same degree and hence their use is not within the scope of this specification.¶
TLS connections shall be protected against network attackers. To this end, 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.¶
when using TLS 1.2, follow the recommendations for Secure Use of Transport Layer Security in [RFC7525].¶
should use DNSSEC to protect against DNS spoofing attacks that can lead to the issuance of rogue domain-validated TLS certificates.¶
shall perform a TLS server certificate check, as per [RFC6125].¶
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.¶
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.¶
when using TLS 1.2, shall only use cipher suites allowed in [RFC7525]¶
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 Authorization Server Issuer Identification [RFC9207]¶
Clients¶
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 send access tokens in the HTTP header as in Section 2.1 of OAuth 2.0 Bearer Token Usage [RFC6750]¶
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 issuer identifier value shall be sent as a string not as an item in an array.¶
shall support refresh tokens and their rotation.¶
if using MTLS client authentication or MTLS sender-constrained access tokens, shall support
the mtls_endpoint_aliases
metadata defined in [RFC8705]¶
if using DPoP, shall support the server provided nonce mechanism (as defined in section 8 of [I-D.ietf-oauth-dpop]).¶
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 authorization represented by the access token is sufficient for the requested resource access and otherwise return errors as in section 3.1 of [RFC6750]¶
shall support and verify sender-constrained access tokens using one of the following methods:¶
DPoP as described in [I-D.ietf-oauth-dpop]¶
Authorization Servers, Clients, and Resource Servers when creating or processing JWTs shall¶
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 |
- | 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 |
potentially encrypted ID Tokens | encryption not required | ID Tokens only exchanged in back channel |
nbf & exp claims in request object |
request_uri has lifetime under 300 seconds | Prevents pre-generation of requests. |
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, Ralph Bragg and Lukasz Jaromin 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.¶