Rail Governance

OAuth 2.0 and FAPI Implementation for Bank API Security

FAPI 2.0 hardens OAuth with PAR, PKCE and bound tokens.

· 9 min read
Cover illustration for “OAuth 2.0 and FAPI Implementation for Bank API Security”
Banking API Infrastructure · November 10, 2026 · 9 min read · 2,118 words

Bank API security needs more than permission to call an endpoint. OAuth 2.0 supplies the delegation framework, but FAPI 2.0 tightens it for financial risk. As AI agents begin executing banking transactions, that stronger authorization layer, combined with transaction policy and immutable audit records, makes automation possible without surrendering institutional control.

Why OAuth 2.0 alone was never adequate for financial-grade API access

OAuth 2.0 solved a specific problem well. It let users delegate access without giving another application their passwords. Banking later placed higher trust demands on that framework, because access could expose account balances, transaction histories, identity credentials, or payment instructions. The mismatch was that OAuth’s flexible base specification did not impose every safeguard financial APIs needed.

That flexibility leaves several distinct attack surfaces. Authorization parameters traveling through browser URLs can be altered, retained in browser history, or leaked through referrer headers. Authorization codes can be intercepted or injected into another session, while a stolen bearer token can be presented by whoever possesses it. A resource server cannot tell the legitimate holder from an attacker who uses the same credential.

The IETF addressed these risks through the OAuth 2.0 Security Best Current Practice document, RFC 9700. Yet safeguards lead to the same behavior across participants only when everyone has to use them. Financial ecosystems need a shared profile that can be enforced, with protections that everyone follows.

What FAPI 2.0 is and what distinguishes it from its predecessor

FAPI 2.0 supplies that tighter profile without replacing OAuth. The OpenID Foundation’s FAPI Working Group developed it for APIs where access has direct financial or legal consequences, aligned with RFC 9700. The foundation published the Security Profile and companion Attacker Model as final specifications on 22 February 2025. The Security Profile sets out the requirements, while the Attacker Model describes the threats used to test those requirements.

The second generation’s main change is subtraction. FAPI 1.0 offered multiple paths involving hybrid flows, ID tokens, signed request objects, and signed authorization responses, making implementations complex and interoperability uneven. FAPI 2.0 narrows those choices and does not require signed request objects by default. Researchers at the University of Stuttgart formally analyzed the profile against its stated security goals.

The wider family separates additional capabilities from that core. Message Signing adds non-repudiation, while Grant Management gives clients an API for querying and revoking consent grants. This separation makes it possible to understand the mandatory protections first, without confusing them with every capability an institution might need.

How PAR removes authorization parameters from the browser entirely

Pushed Authorization Requests, or PAR, protect the request from this exposure. In a conventional browser-based flow, scopes, redirect URIs, state, and payment amounts can travel as URL query parameters. That puts sensitive values within reach of browser extensions, history, referrer headers, and proxies that may truncate long URLs. Why expose those values to the browser when the client can submit them directly?

PAR is defined in RFC 9126. Before it redirects the user, the client sends the authorization parameters to the authorization server through a back-channel POST request. The server returns a short-lived request_uri reference for the browser to transport. The server also authenticates the client at this stage, so an unrecognized client can be rejected before user interaction begins.

Every new authorization starts with a synchronous PAR call, so an unavailable endpoint prevents new authorizations from starting. The endpoint therefore needs plans to keep it available, along with rate limiting and horizontal scaling like those at the token endpoint. Its storage must also survive node restarts for the reference’s lifetime.

How PKCE closes the authorization code interception attack

PAR protects the request going into the authorization flow. The authorization code coming back still passes through the browser, where interception remains possible. Proof Key for Code Exchange, or PKCE, binds redemption of that code to the client that initiated the request. Possession of the code alone is not enough.

Before authorization, the client creates a cryptographic secret called the code verifier and submits its hash, the code challenge, through PAR. At the token endpoint, it presents both the returned code and the original verifier. The server checks that the verifier produces the submitted challenge. FAPI 2.0 requires S256 exclusively, an encoded SHA-256 hash that replaces the earlier plain method.

An attacker who intercepts the code lacks the verifier needed to redeem it. PKCE is mandatory for every authorization code flow. Together, PAR and PKCE protect the request and code exchange, leaving the resulting access token as the next credential to secure.

Diagram: How PAR and PKCE Secure the Authorization Flow End-to-End. Visualizes: Show the two-phase protection that PAR and PKCE provide across the browser-based authorization flow.

How sender-constrained tokens prevent stolen credentials from being replayed

Anyone who holds a bearer token can use it for access. If it escapes through a proxy log or compromised microservice, an attacker can present it just as the legitimate client would. FAPI 2.0 instead requires sender-constrained tokens using DPoP, a cryptographic proof mechanism, or mutual TLS binding. The token becomes unusable without the associated private key.

DPoP makes that relationship explicit at each API call. The client generates a public/private key pair, and the authorization server binds the issued token to the public key through a JSON Web Key Thumbprint claim. For each call, the client creates a short-lived proof JWT signed with its private key. The resource server verifies that the proof matches the token’s bound key.

Mutual TLS achieves the same goal through certificate binding. It is operationally heavier behind modern API gateways and CDNs, but both approaches serve the profile’s token-protection requirement. Client authentication is separately restricted to private_key_jwt or mTLS.

These controls also depend on reliable clocks. DPoP proofs and client assertions use time claims, and drift of more than roughly a minute can resemble random authentication failures. NTP discipline is therefore part of operating the protection.

How JARM and the Message Signing profile add non-repudiation for high-stakes transactions

The base Security Profile protects the authorization request and access token, but its authorization response still arrives as plain parameters. An institution may also need signed evidence of that response for a later dispute or examination. The separate Message Signing profile addresses this need.

The OpenID Foundation finalized that profile on 25 September 2025. It requires JWT Secured Authorization Response Mode, or JARM, which replaces the plain response with a signed, optionally encrypted JWT. Its claims identify the issuing authorization server, the intended client, and the expiration. These help prevent issuer mix-ups, replay to another client, and use of the response after it expires.

JARM is not mandatory in the base Security Profile. For an agent initiating payments, the question becomes not just whether access was valid, but how the institution can prove the authority behind it. A signed response provides a machine-verifiable artifact for that inquiry, rather than relying solely on an application’s account of events.

Why OAuth scopes are necessary but not sufficient when AI agents execute real banking transactions

Even strong proof of authority has a boundary. An agent with a valid, sender-constrained token and payment initiation scope has permission to call the payment endpoint. That does not establish whether a particular payment to a particular supplier, from a particular account, is permitted now. The distinction is between technical access and business authority.

Scopes usually express permissions such as “may initiate payments.” They do not substitute for conditions such as “may pay Supplier X up to $Y only if invoice Z is verified.” The resource server must check those conditions against live state when it carries out the action. Otherwise, broad permission to call an endpoint can give an agent more authority over transactions than the user meant to grant.

This is a separation of responsibilities in FAPI 2.0: the profile governs the authorization layer, while the institution’s policy engine governs the transaction itself. That boundary becomes especially important when a model can infer intent or extrapolate from prior behavior. Deterministic policy keeps the committed action within explicit permission when an agent interprets it.

How the OAuth On-Behalf-Of pattern and token exchange preserve dual identity through agentic call chains

Transaction policy also needs an intelligible chain of authority. When an agent calls several downstream APIs using one broad, long-lived token, records may identify the user but lose the agent, or identify the client but lose the user. Neither account fully explains the delegation. Who gave the authority, and which actor used it?

The OAuth On-Behalf-Of pattern preserves both identities through token exchange. At runtime, the agent exchanges the user’s access token at the token endpoint for a new token whose audience is the downstream API. The resulting token preserves the user’s identity while identifying the agent as the acting client. Each downstream request can therefore expose both the originating user and the intermediary acting for that user.

Sender constraints must extend through this chain as well. Applying DPoP or mTLS to exchanged tokens keeps an intercepted intermediate token unusable without the associated private key. The authorization record can then preserve both delegation and proof of possession, instead of requiring an examiner to infer the relationship between disconnected credentials.

Why immutable audit trails at the API layer are the governance requirement regulators and examiners will inspect

The revised interagency SR 26-2 and OCC Bulletin 2026-13, issued April 17, 2026 by the Federal Reserve, OCC, and FDIC, explicitly place generative AI and agentic AI outside the guidance’s scope. They describe those models as novel and rapidly evolving. That exclusion is not a prescribed agentic control framework. Institutions must put their own risk management and governance practices in place for these models.

The practical burden is evidentiary as well as technical. After an agent acts, the institution needs to substantiate who authorized it, how the action was produced, and which constraints applied. Immutable access logs, with metrics and traces per client, belong at the API layer. Without records of who called an API and what data left, it is harder to spot or trace exfiltration.

FAPI 2.0 supports this evidence but does not replace logging. PAR protects the submitted request, sender constraints bind token use to a client’s key, and JARM can add a signed authorization response. These mechanisms need to be connected to the action record. Their distinctive contribution is cryptographic evidence supporting that record.

Where FAPI 2.0 adoption stands globally and what the US regulatory picture means for institutions building now

Global open banking adoption includes both mandates and formal references to FAPI. Those categories are not interchangeable, nor does adoption of FAPI necessarily establish a FAPI 2.0 mandate. The profile is used in ecosystems that include UK Open Banking, Brazil’s Open Finance, and Australia’s Consumer Data Right. What institutions must do depends on the framework that applies in their market.

The US position remains less settled. Many institutions use the FDX API, at version 6.4 as of its Spring 2025 release, for the data model and look to OAuth 2.0 with FAPI 2.0 for security. These remain voluntary industry standards. The CFPB’s personal financial data rights rule, issued October 2024 under Section 1033 of Dodd-Frank, was under reconsideration as of August 2025, leaving scope and dates unsettled.

The engineering response need not depend on that uncertainty. Consent-based access, scoped data, no credential sharing, and a documented, secured interface provide a foundation across regulatory outcomes. Compliance means meeting the specification, while certification means that the OpenID Foundation has formally recognized it through an audit. Certification covers only the authorization server within the bank’s API surface, so the bank still has to build resource endpoints correctly and keep monitoring them.

Why FAPI 2.0 is the right security architecture for AI agents executing real banking transactions — not just for open banking compliance

Agentic banking inherits open banking’s attacks and adds another risk. Token replay, code interception, and scope manipulation are still threats, and an autonomous agent may act on instructions it infers instead of those it has been explicitly authorized to follow. Higher-frequency, lower-latency operation makes a reusable stolen credential especially dangerous. Protecting access and constraining the resulting action must therefore work together.

FAPI 2.0 provides the authorization foundation for that separation. PAR and PKCE protect the exchange, sender constraints protect token use, and strong client authentication establishes which application is participating. Dual-identity token chains can keep delegation intact through downstream calls, while signed responses and immutable audit trails help with later reviews. Transaction policy supplies the decision those mechanisms cannot make about a specific payment.

An institution can keep control while still using useful automation. It requires keeping permission, execution, and evidence connected, so that an agent’s valid credential never becomes a substitute for sanctioned intent. A bank that implements FAPI 2.0 properly and joins it to those governance layers has built more than an open banking compliance measure. It has authorization infrastructure that makes agentic banking both possible and governable.

Sources

  1. FAPI 2.0 Explained: Financial-Grade API Security Patterns for - Zuplo
  2. What is FAPI 2.0?

More in Banking API Infrastructure