Plain OAuth 2.0 leaves too many choices open for APIs that move money, health records or identity data, and most real OAuth weaknesses live in those choices. The FAPI 2.0 Security Profile from the OpenID Foundation removes them: it fixes the flow, the client authentication methods, the token binding, the algorithms and several numeric limits, and it was published as a Final specification on 22 February 2025 together with the FAPI 2.0 Attacker Model. This guide turns the profile into implementation work for each role (authorisation server, client and resource server), explains the decisions you still have to make, such as mTLS or DPoP, and covers testing, certification, migration from FAPI 1.0 and monitoring. It is written for identity architects, API platform engineers and security reviewers who already know the material in the OAuth 2.1, GNAP and FAPI Guide, which compares FAPI with OAuth 2.1 and GNAP at overview level. Specification statuses on this page were checked on the OpenID Foundation site on 27 October 2026.
Key takeaways
- FAPI 2.0 is a profile, not a new protocol. It is OAuth 2.0 plus PAR, PKCE, the
issresponse parameter and sender-constrained tokens, with options removed and limits set, so most work is configuration and enforcement rather than new code. - Every role has duties. The authorisation server enforces PAR, PKCE S256, 60-second single-use codes and token binding; the client checks
issand uses only authoritative metadata; the resource server refuses tokens in query strings and verifies the sender constraint on every call. - Two real decisions remain. Choose mTLS or DPoP for sender-constrained tokens, and mTLS or
private_key_jwtfor client authentication; the rest is largely fixed by the profile. - Message Signing is a separate, optional layer. FAPI 2.0 Message Signing (Final, September 2025) adds signed requests, signed responses and signed introspection when you need non-repudiation, for example for payment initiation.
- Test against the conformance suite, not your own reading. The profile itself recommends certified implementations, and the OpenID Foundation's free conformance tests cover both authorisation servers and clients.
What FAPI 2.0 is and the document set
FAPI began as the Financial-grade API work for open banking and is now used for open data, open finance and identity schemes. The FAPI working group's specifications page says FAPI has been adopted by "many ecosystems in many countries" and lists implementer resources for Australia's Consumer Data Right, Brazil Open Finance, EU PSD2, UK Open Banking and FDX in the USA and Canada. The working group recommends that new ecosystems adopt FAPI 2.0 and that existing FAPI 1.0 ecosystems plan a transition. Adoption and timelines differ by ecosystem: Australia's Data Standards Body InfoSec community group, for example, was still assessing the gap between the Consumer Data Right profile and FAPI 2.0 in April 2025, without a recorded decision. Always read your own ecosystem's profile, which may add rules on top of the base profile, such as pre-registered redirect URIs.
| Document | Status (OpenID Foundation, checked 27 October 2026) | What it is for |
|---|---|---|
| FAPI 2.0 Security Profile | Final, 22 February 2025 | The mandatory baseline: flows, client authentication, token binding, cryptography, TLS |
| FAPI 2.0 Attacker Model | Final, 22 February 2025 | Security goals and attacker capabilities the profile is proven against |
| FAPI 2.0 Message Signing | Final, 25 September 2025 | Optional signed requests (JAR), responses (JARM) and introspection for non-repudiation |
| FAPI 2.0 HTTP Signatures | Draft | Signing of resource requests and responses; do not build on draft details |
| FAPI CIBA Profile | Implementer's Draft 1 | Decoupled flows where the user approves on another device |
| Grant Management for OAuth 2.0 | Implementer's Draft 1 | Querying, updating and revoking long-lived grants |
| FAPI 1.0 Baseline and Advanced | Final | The previous generation, still in use in several ecosystems |
Using the attacker model for threat modelling
The FAPI 2.0 Attacker Model sets three goals (authorisation, authentication and session integrity) and the attackers the profile withstands, from the web attacker (A1) and a malicious authorisation server in the ecosystem (A1a) to readers of authorisation requests (A3a) and of resource requests in places such as TLS-intercepting proxy logs (A5); the overview guide tabulates them. Use the model as your scope statement: for each FAPI rule someone proposes to relax, ask which attacker it answered. Note what it excludes: compromised browsers or operating systems, remote code execution on servers, misconfigured databases, credentials leaked by human error and implementation bugs all need your own controls.
Authorisation server requirements
The authorisation server carries most of the profile. The table lists the normative requirements in section 5.3.2 of the Security Profile with the values you will configure and test.
| Area | Requirement | Value or detail |
|---|---|---|
| Discovery | Publish metadata per OpenID Connect Discovery and RFC 8414 | Advertise pushed_authorization_request_endpoint, require_pushed_authorization_requests, DPoP algorithms or mTLS aliases |
| Clients | Confidential clients only; reject the resource owner password credentials grant | No public clients, no grant_type=password |
| Client authentication | mTLS (RFC 8705) or private_key_jwt | Client assertion aud must be the issuer identifier as a string, not an array |
| Flow | response_type=code only | No implicit or hybrid responses, no ID tokens in the front channel |
| PAR (RFC 9126) | Require it, reject authorisation requests without it, authenticate the client at the PAR endpoint | request_uri expires_in below 600 seconds; redirect_uri required in the pushed request |
| PKCE (RFC 7636) | Required | S256 only |
| Authorisation codes | Single use, reject reuse | Maximum lifetime 60 seconds |
| Mix-up defence | Return iss in the authorisation response (RFC 9207) | Issuer identifier exactly as in metadata |
| Redirects | No open redirectors; no http redirect URIs except native app loopback | Do not use HTTP 307 for requests carrying credentials; use 303 |
| Access tokens | Sender-constrained only, via mTLS or DPoP | With DPoP, support authorisation code binding (dpop_jkt); server nonces optional |
| Refresh tokens | Do not rotate except in extraordinary circumstances | Tokens are already bound to a key, and rotation causes availability failures |
| Clock skew | Accept iat and nbf up to 10 seconds in the future | Reject values more than 60 seconds in the future |
| OpenID Connect | If supported, accept nonce values up to 64 characters | If the user identifier is returned in the token response, OpenID Connect must be supported |
| Privileges | Should restrict token privileges to the minimum | Use RAR (RFC 9396) when scope cannot express the grant |
Two notes in the specification often trip up implementers: state is not FAPI's CSRF defence (PKCE is), and the request_uri lifetime must allow for handoff between devices, which can exceed 30 seconds. See the OAuth Pushed Authorization Requests and JAR Guide for PAR endpoint design and the OAuth Rich Authorization Requests (RAR) Guide for fine-grained grants.
Client requirements
Client-side failures are less visible than server ones, because the server cannot see whether a client checked a value. Section 5.3.3 of the profile requires the client to:
- Use PAR and send only two parameters to the authorisation endpoint:
client_idandrequest_uri. Everything else, including scope, RAR details and the PKCE challenge, travels in the authenticated back-channel POST. - Generate a fresh PKCE challenge for every request: with
S256, bound to both the client and the user agent, so a code captured from one browser cannot be redeemed in another session. - Check
isson every response: this is the mix-up defence when the client talks to more than one authorisation server. - Trust only authoritative metadata: obtain the issuer URL from an authoritative source over a secure channel, use only endpoints from the metadata document, and confirm that the metadata
issuermatches the expected issuer. - Support refresh token rotation anyway: servers should not rotate, but clients must handle it if a server does.
- Handle binding mechanics: with mTLS, use
mtls_endpoint_aliaseswhen the server publishes them; with DPoP, support server-provided nonces (theDPoP-Nonceheader anduse_dpop_nonceerror in RFC 9449). - Protect initiation: start a flow only with the user's consent and protect the initiating endpoint against CSRF; request the least privilege needed.
Resource server requirements
- Header only: accept tokens in the
Authorizationheader (RFC 6750 section 2.1, or the DPoP scheme in RFC 9449 section 7.1) and never in query parameters, which leak into logs and browser history. - Full validation: verify validity, integrity, expiry and revocation status, then whether the token's authorisation covers the request, returning RFC 6750 errors when it does not.
- Verify the binding on every call: for mTLS, compare the certificate thumbprint in the token or introspection response with the presented client certificate; for DPoP, check the proof's
htm,htu,iat,jtiandath, and reject a DPoP-bound token presented with the Bearer scheme. - Plan for proof replay: section 6.2 of the profile notes that an A5 attacker can obtain and replay DPoP proofs. Mitigate with short-lived server nonces,
jtireplay caches, Message Signing, or mTLS instead.
The DPoP Guide and the mTLS Guide cover the binding mechanics in depth.
Cryptography, keys and transport
| Control | FAPI 2.0 requirement | Practical note |
|---|---|---|
| TLS version | TLS 1.2 or later, following BCP 195 | Adopt new BCP 195 versions within 12 months; non-browser endpoints allow only BCP 195 cipher suites |
| Certificate checks | Server certificate check per RFC 9525 | DNSSEC should be used; CAA records help against rogue certificates |
| Browser endpoints | Prevent TLS stripping (HSTS) | No CORS on the authorisation endpoint |
| JWT algorithms | PS256, ES256 or EdDSA with Ed25519; never none | Note that RS256 is not on the list; follow RFC 8725 JWT best practice |
| Key sizes | RSA at least 2048 bits; elliptic curve at least 224 bits | Applies to client and server keys |
| Token and code entropy | At least 128 bits for non-user credentials | Covers codes, tokens and request_uri values |
| Key distribution | jwks_uri served over TLS only; avoid x5u and jku | Avoid duplicate kid values; verifiers also match kty, use, alg |
Section 6.8 adds key compromise advice: automate key rotation through jwks_uri, use single-purpose keys, weigh stateful against stateless tokens (a stolen signing key can mint valid stateless tokens) and record which credentials are linked so related ones can be revoked together. See the JSON Web Key Sets and Signing Key Rotation Guide.
Where identity fits: client credentials as non-human identities
Every FAPI client is a confidential client holding a private key, either the mTLS certificate key or the private_key_jwt signing key, plus DPoP keys where used. Manage them as non-human identities: a named owner per client, keys in an HSM or secrets manager, rotation through the JWKS endpoint and a revocation path tested before go-live. Section 6.3 of the profile also recommends separate DPoP keys or mTLS certificates per authorisation server, which limits the Cuckoo's Token attack where a malicious server injects a stolen token. See the JWT Client Authentication Guide and the Machine Identity, PKI and Certificate Lifecycle Guide.
Decisions: mTLS or DPoP, and private_key_jwt or mTLS
| Factor | mTLS (RFC 8705) | DPoP (RFC 9449) |
|---|---|---|
| Layer | Transport: binding to the TLS client certificate | Application: a signed proof JWT on every request |
| Infrastructure | PKI, certificate issuance and a trust list; the profile says mTLS ecosystems should provide the CA trust list | Keys only; no client certificates |
| Gateways and proxies | Harder where TLS terminates before the server | Survives TLS termination because the proof is in the header |
| Replay of captured requests (A5) | Strong: a logged token is useless without the TLS key | Proofs can be replayed within their window; needs nonces or jti caches |
- Choose mTLS when: your ecosystem already runs a PKI (many open banking schemes do), clients are server-side, and TLS terminates at a point you control. It can then serve as both client authentication and token binding.
- Choose DPoP when: you have layered gateways or CDNs, no ecosystem PKI, or clients you cannot issue certificates to. Budget for nonce handling and replay caches.
- Choose
private_key_jwtfor client authentication when: you use DPoP, or want client authentication independent of transport; setaudto the issuer string and keep assertion lifetimes short. - Small versus large: a single server with a few partner clients can support one combination only; large ecosystems must decide centrally so every server and client interoperates.
Adding FAPI 2.0 Message Signing
The base profile gives integrity in transit; Message Signing adds evidence. Its stated goal is that a party cannot later convincingly deny having signed a message such as a payment request, so signatures are stored with the payload and metadata. It defines three methods, each testable on its own:
- Signed authorisation requests: a JAR request object (RFC 9101) sent to the PAR endpoint, with
audcontaining the issuer,nbfno more than 60 minutes in the past,expno more than 60 minutes afternbf, andtypofoauth-authz-req+jwt. - Signed authorisation responses: JARM with
response_mode=jwt. The specification notes these carry OAuth artefacts such as the code, so they add integrity but limited non-repudiation value. - Signed introspection responses: JWT introspection responses per RFC 9701, which let a resource server keep proof of what the authorisation server asserted.
Adopt it where a scheme rulebook or dispute process needs proof of who authorised what, and apply minimisation and access control to stored signed messages, which may contain personal data. It does not sign resource requests.
Migrating from FAPI 1.0 Advanced
| FAPI 1.0 Advanced | FAPI 2.0 Security Profile | Migration work |
|---|---|---|
| JAR request objects | PAR | Add the PAR endpoint and switch clients to request_uri |
| JARM or hybrid responses | Code-only responses, no ID token in the front channel | Retire hybrid flow handling |
s_hash | PKCE S256 | Add PKCE to every client |
| Pre-registered redirect URIs | redirect_uri sent in PAR | Ecosystems may still require registration |
| mTLS-only token binding | mTLS or DPoP | Optional: offer DPoP for clients without certificates |
x-fapi-* headers in the profile | Moved to a separate advice document | Keep using them if your ecosystem requires them |
How to implement: a phased rollout
- Baseline and scope: list every server, client and resource server in scope, the applicable ecosystem profile and the rules you already meet.
- Decide the options: sender constraint, client authentication and algorithm set.
- Harden the server in report mode first: enable PAR and PKCE alongside existing flows, log every request that would fail FAPI rules (no PAR, plain PKCE, long-lived codes, bearer tokens), and share the list with client owners.
- Migrate clients in rings: internal test clients, then one partner, then the rest. Run each client through the OpenID Foundation conformance suite before production.
- Enforce at the resource servers: turn on sender-constraint checks per API, starting with the highest-value endpoints, and reject tokens in query strings.
- Switch enforcement on at the server: set
require_pushed_authorization_requests, reject non-PAR requests, cut code lifetime to 60 seconds and stop issuing bearer tokens. - Roll back safely: keep enforcement switches per client, not global, so one failing partner can be returned to the old policy for a fixed period while it fixes its client. Never roll back by re-enabling bearer tokens for everyone.
- Certify and keep testing: run conformance tests in CI against each release, and self-certify where your ecosystem requires it.
Conformance testing and certification
The OpenID Foundation runs a free, open conformance suite. Implementers run the tests themselves and submit results through self-certification, after which an implementation may use the "OpenID Certified" mark; fees are set in a separate schedule. Final conformance tests exist for the FAPI 2.0 Security Profile and Message Signing, for both authorisation servers and clients, and the tests support DPoP. Section 6.6 of the profile recommends certified implementations. Certification proves conformance at test time, not your deployment configuration or key management.
Detection and measurement
- Log at the authorisation server: PAR requests and rejections, reused or expired codes, PKCE failures, client assertion failures (wrong
aud, staleiat), DPoP proof failures anduse_dpop_noncechallenges. - Log at the resource server: binding failures (wrong certificate thumbprint, missing or invalid proof, Bearer scheme on a DPoP token), replayed
jtivalues and tokens offered in query strings. - Alert on: a reused authorisation code (a sign of interception), repeated binding failures for one client, and tokens presented from a different client certificate than the one they were issued to (possible token theft, ATT&CK T1528 Steal Application Access Token and T1550.001 Application Access Token).
| Metric | Target | Why it matters |
|---|---|---|
| Share of authorisation requests arriving through PAR | 100% after enforcement | Front-channel parameters are the A3a attack surface |
| Share of access tokens issued sender-constrained | 100% | Bearer tokens defeat the profile's main protection |
| Clients passing the conformance suite on the current release | All in-scope clients | Catches regressions in client checks the server cannot see |
| Resource server binding-check failures per day | Low and stable; investigate spikes | Spikes mean misconfigured clients or token replay |
| Signing keys rotated within policy | 100% | Section 6.8 recommends automated rotation |
Framework mapping
| FAPI 2.0 control | NIST SP 800-53 Rev 5 | NIST CSF 2.0 | ISO/IEC 27001:2022 Annex A |
|---|---|---|---|
Client authentication with mTLS or private_key_jwt | IA-9 Service Identification and Authentication, IA-5 Authenticator Management | PR.AA-03 | A.8.5 Secure authentication |
| Sender-constrained tokens, single-use codes, PKCE | SC-23 Session Authenticity | PR.AA-03 | A.8.5 Secure authentication |
| TLS 1.2+, BCP 195, HSTS | SC-8 Transmission Confidentiality and Integrity | PR.DS-02 | A.8.24 Use of cryptography |
| Algorithm and key size rules | SC-13 Cryptographic Protection | PR.DS-02 | A.8.24 Use of cryptography |
| Least-privilege tokens, RAR | AC-6 Least Privilege | PR.AA-05 | A.5.15 Access control |
Against MITRE ATT&CK, sender-constrained tokens reduce the value of T1528 Steal Application Access Token and T1550.001 Application Access Token, and TLS with certificate checks addresses T1557 Adversary-in-the-Middle.
Common failure patterns
- PAR offered but not required: the server advertises PAR yet still accepts front-channel requests, so the A3a protection only exists for well-behaved clients. Set
require_pushed_authorization_requestsand reject the rest. - Binding issued but never checked: the server issues DPoP or mTLS-bound tokens but a resource server or gateway still accepts them as bearer tokens. Test each API with a stolen-token scenario before calling it FAPI.
- Trusting a forwarded certificate header: a gateway passes the client certificate in an HTTP header that external callers can also set, so the mTLS binding can be forged. Strip the header at the edge.
- Rotating refresh tokens by default: a common OAuth habit that FAPI 2.0 tells servers to avoid, because network failures then lock clients out of long-lived grants. If you must rotate, allow a time-limited retry.
- Using RS256 because the library defaults to it: the profile allows only PS256, ES256 and EdDSA. Pin algorithms on both sides and reject anything else, including
none. - Enforcing
request_urione-time use at page load: link scanners and retries consume the URI and the user's real attempt fails. Enforce at completion of the authorisation.
Practitioner checklist
- Confirm which ecosystem profile applies and record where it adds to or differs from the base FAPI 2.0 Security Profile.
- Decide mTLS or DPoP for token binding and mTLS or
private_key_jwtfor client authentication, and document the reasons. - Require PAR, PKCE
S256,response_type=code, 60-second single-use codes andrequest_urilifetimes below 600 seconds. - Return
isson every authorisation response and make every client check it. - Issue only sender-constrained access tokens and verify the binding at every resource server and gateway.
- Pin JWT algorithms to PS256, ES256 or EdDSA, with RSA keys of at least 2048 bits, and serve
jwks_uriover TLS only. - Store client and DPoP private keys in an HSM or secrets manager, with a named owner and a tested rotation and revocation path.
- Run the OpenID Foundation conformance suite for servers and clients in CI, and self-certify where required.
- Decide whether you need Message Signing for non-repudiation and plan retention of signed messages.
- Monitor PAR coverage, binding failures, code reuse and key rotation, and alert on code reuse and token presentation from the wrong key.
Standards and references
- OpenID Foundation: FAPI 2.0 Security Profile
- OpenID Foundation: FAPI 2.0 Attacker Model
- OpenID Foundation: FAPI 2.0 Message Signing
- OpenID Foundation: FAPI Working Group Specifications
- IETF: RFC 9126 OAuth 2.0 Pushed Authorization Requests
- IETF: RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
- OpenID Foundation: OpenID Certification
Related NHI Mgmt Group resources: OAuth 2.1, GNAP and FAPI Guide · OAuth 2.0 Security Best Current Practice Guide · DPoP Guide · PSD2/PSD3 Strong Customer Authentication Guide · OIDC CIBA Guide