Skip to main content
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:
  1. Signing Authorization Requests
  2. Signing Authorization Responses
  3. Signing Introspection Responses
  4. Signing HTTP Messages
This article focuses on the requirements for **Signing Authorization Requests **in FAPI 2.0 Message Signing profile and provides instruction on how to configure services and clients to make them comply with the requirements. Hereafter, we will refer this category of requirements as FAPI2 MS Auth Req.
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.fapi2-ms-authreq-diagram 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 value of the “request” parameter is a signed JWT. The payload of the JWT is as follows.
Note details:
  • 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.
After the authorization server receives the request from the client, the authorization server calls Authlete /pushed_auth_req API including the received parameters. The following is a curl command that simulates a request from the authorization server to Authlete /pushed_auth_req API.
A successful response from the API contains a request URI. The response would look like below.

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.
After the authorization server receives the request from the client, the authorization sever calls Authlete /auth/authorization API. The following is a curl command that simulates a request from the authorization server to Authlete /auth/authorization API.
A successful response from the API would be like 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.
A successful response from the API would be like below.

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.
Note details:
  • 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.)
After the token endpoint receives a request from the client, the authorization server calls Authlete /auth/token API. The following is a curl command that simulates a request from the authorization server to Authlete /auth/token API.
A successful response from the API would be like below.

5. /auth/introspection API

After completing all the steps above, the client gets an access token and can access a resource server’s endpoint with the access token like below.
Note that the client needs to present a DPoP proof JWT to the resource server’s endpoint along with the access token. When the resource server receives the request from the client, it calls Authlete /auth/introspection API to verify the access token. The following is a curl command that simulates a request from the resource server to Authlete /auth/introspection API.
A successful response from the API would be like below.