This page is for Authlete 3.0. For 2.x, see FAPI 2.0 Message Signing – Signing Authorization Requests (2.x).
Overview
FAPI 2.0 Message Signing profile is a security profile for Financial-grade APIs that extends FAPI 2.0 Security profile as its foundation. It mainly defines four categories of requirements:- Signing Authorization Requests
- Signing Authorization Responses
- Signing Introspection Responses
- Signing HTTP Messages
FAPI2 MS Auth Req feature is available since Authlete 2.3
Introduction
The below is a diagram that roughly describes Authorization Code Flow in FAPI2 MS Auth Req.
Authorization Code Flow in FAPI2 MS Auth Req
1. Pushed Authorization Request
A client sends a request including a signed request object to the pushed authorization request endpoint of the authorization server to register authorization request parameters. FAPI2 MS Auth Req imposes some requirements on authorization request parameters such as response_type. It also requires the client to be authenticated at the endpoint with mutual TLS authenticationor private_key_jwt. In this document, we use private_key_jwt for client authentication.2. Pushed Authorization Response
If the request is processed successfully, the pushed authorization request endpoint responds with a request_uri.3. Authorization Request
The client sends an authorization request including the request_uri to the authorization endpoint of the authorization server. This is done via the user agent.4. Authorization Response
If the request is processed successfully, the authorization endpoint responds with an authorization code and the user agent redirects to the client’s redirect URI.5. Token Request
The client sends a token request to the token endpoint of the authorization server with the authorization code. FAPI2 MS Auth Req requires the token endpoint to issue access tokens that are **sender-constrained with mutual TLS or **DPoP. In this document, we use DPoP as a sender-constrained access token mechanism. Note that private_key_jwt is also used for client authentication at the token endpoint.6. Token Response
If the request is processed successfully, the token endpoint responds with a sender-constrained access token.7. API Request
The client sends a request to a resource endpoint with the access token along with the proof-of-possession for the access token.Scope Attribute
Similar to what we do for FAPI 2.0 Security Profile, we have introduced a new scope attribute for “FAPI2 MS Auth Req”, which is defined as follows.
From this point forward, a scope associated with this attribute will be referred as a FAPI2 MS Auth Req scope.
Service Configuration
Configure your service as follows to make it comply with FAPI2 MS Auth Req.Client Configuration
Configure your client as follows to make it comply with FAPI2 MS Auth Req.API call test
In this section, we simulate API calls that the authorization server makes against Authlete APIs in the context of Authorization Code Flow in FAPI2 MS Auth Req.1. /pushed_auth_req API
Suppose that a FAPI2 MS Auth Req compliant client sends a valid request to the pushed authorization request endpoint of authorization server in the context of Authorization Code Flow. According to 5.4.2. Requirements for Clients , the request would be like below.- The scope parameter is assigned to “myscope”, which is a FAPI2 MS Auth Req scope.
- The client is authenticated with private_key_jwt.
- The value of the “nbf” claims is no longer than 60 minutes in the past.
- The lifetime of the request object (“exp” - “nbf”) is no longer than 60 minutes after the “nbf” claim.
2. /auth/authorization API
The client sends an authorization request, including the request URI obtained in step 1, to the authorization endpoint of the authorization server. The request appears as below.3. /auth/authorization/issue API
After the authorization server receives a successful response from /auth/authorization API, the end-user authorizes/denies the client in the browser. The authorization result is then conveyed to the authorization server and the authorization server calls Authlete /auth/authorization/issue API with the result. The following is a curl command that simulates a request from the authorization server to Authlete /auth/authorization/issue API.4. /auth/token API
The client sends a token request, including the authorization code obtained in step 3, to the token endpoint of the authorization server. The request would look like as below.- The client has to be authenticated with private key JWT.
- The client has to present a DPoP proof JWT for the authorization server to issue a sender-constrained access token. (DPoP proof JWT must be signed with PS256, ES256 or EdDSA.)