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.| attribute key | attribute value |
|---|---|
| fapi2 | ms-authreq |
Service Configuration
Configure your service as follows to make it comply with FAPI2 MS Auth Req.| Property | Description |
|---|---|
| Supported Grant Types | Include AUTHORIZATION_CODE. |
| Supported Response Types | Include CODE. |
| Supported Service Profiles | Include FAPI. |
| iss Response Parameter | Select Included. |
| Token Endpoint URI | Set your authorization server’s token endpoint URI. |
| Supported Client Authentication Methods | Select PRIVATE_KEY_JWT. |
| nbf Claim | Select Required. |
| Audience Validation | Select Perform. |
| Access Token Signature Algorithm | NOTE: This configuration is only required if “JWT Access Token” is used.Select PS256, ES256 or EdDSA. |
| Supported Scopes | Include a **FAPI2 MS Auth Req **scope. |
| JWK Set | NOTE: This configuration is only required if “JWK Set” is used.Set a JWK set containing required JWKs (e.g. JWT access token sign key). |
| JWK Set Endpoint URI | NOTE: This configuration is only required if “JWK Set Endpoint URI” is used.Set a URI that starts with https. The URI needs to point to a JWK set containing required JWKs (e.g. JWT access token sign key). |
Client Configuration
Configure your client as follows to make it comply with FAPI2 MS Auth Req.| Property | Description |
|---|---|
| Client Type | Select CONFIDENTIAL. |
| Grant Types | Include AUTHORIZATION_CODE. |
| Response Types | Include CODE. |
| Redirect URIs | Create at least one redirect URI. |
| Client Authentication Method | Select PRIVATE_KEY_JWT. |
| Assertion Signature Algorithm | Select PS256, ES256 or EdDSA. |
| ID Token Signature Algorithm | Note: This configuration is only required if ID tokens are issued and signed.Select an encryption algorithm other than NONE. |
| ID Token Encryption Algorithm | Note: This configuration is only required if ID tokens are issued and encrypted.Select an encryption algorithm other than RSA1_5. |
| JWK Set Content | NOTE: This configuration is only required if “JWK Set Content” is used.Set a JWK set containing required JWKs (e.g. client assertion sign key). |
| JWK Set URI | NOTE: This configuration is only required if “JWK Set URI” is used.Set a URI that starts with https. The URI needs to point to a JWK set containing required JWKs (e.g. client assertion sign key). |
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.)