Consent Management 2.0 with Consent as a Service (CaaS)
Via consent as a service, SIX offers the Service User to hold the Service Provider token in a token store operated by SIX in accordance with the specifications of the participation agreement (CaaS). The participant’s use of CaaS causes the participant and its customer to be authenticated by SIX for each service call request. After successful authentication, SIX forwards the service call request with the provider token to the Service Provider on behalf of the participant.
CaaS thus enables the participant to make the service calls that are intended and to be authenticated in accordance with the Participation Contract via the bLink platform without having to store the provider token in its infrastructure in accordance with the specifications of the Participation Contract.
Similar to what is defined in Consent Management 2.0, Consent Management 2.0 with CaaS has some deviations from the original OAuth 2.0 flow:
- OAuth Client-Secret is not supported in the consent management flow: the Client is authenticated by bLink by a client certificate.
- The Auth Server of the Service Provider authenticates the Client by means of the "X-CorAPI-Client-ID" header. See Custom Headers
- Token endpoints of Service Providers are not accessible to Clients.
- The Service User will work with the so-called CaaS-Permission instead of the Service Provider Access-Token
Goals for Consent Management 2.0 with CaaS
Consent Management 2.0 with CaaS was defined with the following goals:
- User can start the consent flow from the Client side.
- Implement standard OAuth 2.0 flow.
- Improve security, resilience, and error handling.
- Provide secure Provider Token storage to Clients.
Assumptions
Service Provider's Authorization Server supports transaction signing of consent using a 2nd factor, similar to signing of new creditors.
User Journey
From a very high level, the user journey for CaaS is similar to what the normal Consent Flow 2.0 does, but with the difference that the Service Provider will redirect the client to CaaS so that CaaS can use the authorization code to retrieve the OAuth tokens, and the Service User will never gain access to the tokens.
- User-Agent is logged in to the Service User Application and chooses to connect to a specific Service Provider
- User-Agent is redirected to the Service Provider Authentication UI
- once authenticated, the User-Agent is redirected to the Consent-Page
- once the consent has been signed, the User-Agent is redirected to CaaS (with the OAuth authorization code)
- once CaaS has retrieved the access_token, the User-Agent is redirected back to the Service User Application
CaaS-Permission
With CaaS, the Service User will not be able to gain access to the Provider Token. The system will instead use the CaaS-Permission which will be known to the Service User. A CaaS-Permission is a CaaS-internal construct which is used to look up the correct Provider Token.
After the Permission has been activated successfully, it can be used during business calls, where CaaS will inject the correct Provider-Token for each API-invocation separately. For the Service Provider, this process is transparent, and it looks as if the Service User has provided the correct Token on each API-call.
The CaaS-Permission has its own lifecycle, but it is heavily dependent on the Provider Token:
-
After initial Setup, the Permission has status
received
: -
As soon as the End-User lands on the redirect-endpoint during the oauth-flow (see below), CaaS attempts to retrieve the Provider Token using the provided authorization-code and state.
- If this succeeds, the status changes to
valid
. The permission can now be used to invoke the business-apis - otherwise, the permission will expire immediately and a new permission has to be created
- If this succeeds, the status changes to
-
If the Provider Access-Token expires:
- CaaS will attempt to refresh it in the background during the next business API call, and in case it is successful, the permission will remain in status
valid
. In case it fails for some technical reason (anything else thaninvalid_grant
), the API-call will fail, but the permission will remain in statusvalid
, and the API-call can be attempted again which will trigger another refresh-attempt. - if the refresh fails for a business-reason, the Permission will change to status
expired
permanently, and API-Calls with this permission will therefore fail permanently. In this case, a new Permission has to be initiated and the end-user will have to go through the consent-flow again. There are two possibilities why it could fail:- Provider Token has been revoked on Provider side, or
- There has not been any activity with the Provider Access-Token for longer than the validity of the Refresh Token
- CaaS will attempt to refresh it in the background during the next business API call, and in case it is successful, the permission will remain in status
-
The Service User can also explicitly revoke a permission by calling the DELETE endpoint (see Permission Revocation). In this case, the status will change to
revoked
permanently.
There is one extra case where the Permission can transition to the status revoked_by_psu
. This happens if the same User-ID is used for the same Provider-ID. See also userId
-explanation for Step B in the Flow.
Detailed Consent Management 2.0 with CaaS Flow
The Consent Flow with CaaS consists of two parts: the consent 2.0 OAuth flow starting at the Service User (steps 1 to 31) and a new flow between the Service User and CaaS (steps A to E).
Preparation Steps
- The user logs into Client.
- Client creates a session.
- User navigates to consent page.
- Client retrieves a list of active Service Providers from bLink API directory using
GET /directory/providers?status=ACTIVE
. An example of this request is presented as follows:GET /api/bankingservices/b-link/platform/v2/directory/providers?status=ACTIVE
host: api.six-group.com - The user selects the Provider and approves it.
- Client retrieves information about the chosen Service Provider from bLink API directory using
GET /directory/providers/<providerID>
. An example of this request is presented as follows:GET /api/bankingservices/b-link/platform/v2/directory/providers/99999
host: api.six-group.com