Enabling The Uk Open Banking Specification: A Forgerock Technical Solution Guide
Enabling The Uk Open Banking Specification: A Forgerock Technical Solution Guide
Table of Contents
Three Key Requirements for Open Banking 2
Supporting the Three Requirements and the UK Open Banking Specifications 3
Consent 3
Authorization 3
OAuth 3
OpenID Connect 5
Financial API Specification 8
Two Stage Request 8
Mutual Authentication TLS 9
Authentication 9
Consent 10
Remote Consent Service 10
Onboarding 10
The Directory 10
Certificates 11
Software Statement Assertions and Dynamic Client Registration 11
Json Web Key 13
Mutual Authentication TLS 13
Access 14
Mutual Authentication TLS 14
FAPI 14
Summary 14
Learn More About ForgeRock Open Banking for Your Organization 14
Glossary 15
A ForgeRock Technical Solution Guide 1. Consent: Banks need a way to confirm that a user
The business of banking is undergoing a major shift has granted consent to data being shared which in
with users demand for increased account access turn means they need a way to:
and the sharing of account information. To protect »» Allow users to authorize a third party to access
consumers, regulations have been written to mandate their data.
how financial data can be created, accessed, and
»» Authenticate that the third party is who they
shared.
claim to be.
In this paper, we discuss at a technical level 2. Onboarding: Banks need a way to onboard and
how ForgeRock enables the UK Open Banking verify that third parties are to be trusted with
Specification through the ForgeRock Identity personal account data.
Platform™ and the delivery of both the reference bank 3. Access: Third parties need a way to access user
and the new ForgeRock directory sandbox. account data, and banks need a way to protect that data
This paper primarily focuses on Security Profile and and enforce that it is only accessed with our consent.
the Open Banking Directory.
Throughout this document we have provided links to In essence, these requirements are a means of
ForgeRock documentation for further explanation of establishing both consent and trust. All must be met for
the Open Banking functionality being discussed. any Open Banking (or open API) ecosystem to succeed.
Understanding the Open Banking ecosystem can be
complex. The two diagrams below give a high level view
Three Key Requirements for Open Banking of how the overall UK Open Banking ecosystem works
Open Banking is all about users sharing their banking and the key interactions between all participants.
data through APIs. Of course, the more third-party
access, the higher the risk.
Consent
Supporting the Three Requirements and Consent is a complex concept. Requesting, capturing,
the UK Open Banking Specifications and enforcing that the owner of bank account data
has granted permission to the bank to share that data
The UK has published the Open Banking Read/Write
are pivotal mechanisms. These mechanisms rely on
Specifications. The Specifications define the following
authorization and authentication.
important components that are integral for consent,
onboarding, and access:
»» Account and Transaction API: The endpoints, requests Authorization
and responses for account requests.
OAuth
»» Payment Initiation API: The endpoint requests and OAuth 2.0 is the leading security standard for
responses for payment requests. delegated authorization and UK Open Banking has
»» Security Profile: The security standards that underpin determined it is the right solution for Open Banking.
the APIs. OAuth solves the problem of enabling a user to allow a
third party to act on their behalf.
»» Open Banking Directory: The trust framework for
participants in the Open Banking ecosystem.
»» Authorization Server: the server that issues access presents a problem for Open Banking.
tokens to the client
OpenID Connect Note that as before, the client must be registered with
OpenID Connect (OIDC) is a standard built on top of the authorization server before initiating the flow. We
OAuth for delegated authentication. In OIDC there are will cover this in onboarding later.
three key roles:
Open ID Connect: http://openid.net/specs/openid-
»» Relying Party: the party that is delegating
connect-core-1_0-final.html
authentication to an OpenID provider
ForgeRock Docs: https://backstage.forgerock.com/
»» OpenID Provider: the party responsible for docs/am/6/oidc1-guide/index.html
authentication of the end user
»» End-User: the user themselves
{
“alg”: “RS256”,
“kid”: “GxlIiwianVqsDuushgjE0OTUxOTk”
}
.
{
“aud”: “https://api.alphanbank.com”,
“iss”: “s6BhdRkqt3”,
“response _ type”: “code id _ token”,
“client _ id”: “s6BhdRkqt3”,
“redirect _ uri”: “https://api.mytpp.com/cb”,
“scope”: “openid payments accounts”,
“state”: “af0ifjsldkj”,
“nonce”: “n-0S6 _ WzA2Mj”,
“max _ age”: 86400,
“claims”:
{
“userinfo”:
{
“openbanking _ intent _ id”: {“value”: “urn:alphabank-intent-58923”,
“essential”: true}
},
“id _ token”:
{
“openbanking _ intent _ id”: {“value”: “urn-alphabank-intent-58923”,
“essential”: true},
“acr”: {“essential”: true,
“values”: [“urn:openbanking:psd2:sca”,
“urn:openbanking:psd2:ca”]}}
}
}
}
The important part of the claims parameter is the openbanking_intent_id. This is how we solve the scope problem.
1. Signing: Signing certificates are used to create JWSs to sign JSON Web Token (JWT) payloads during both the onboarding
and authorization processes.
2. Encryption: Encryption certificates are used to encrypt the JWT payloads and for ID token encryption. For example, if you
want to receive an encrypted ID token, the bank will use your encryption certificate to encrypt the JWS.
3. Transport: Mutual TLS is used to encrypt requests and responses between third parties and banks using transport
certificates issued by the directory.
JWT Header
{
“kid”: “e0f8da35-05c4-42a5-96ee-bf48a4924fa2”,
“alg”: “RS256”
}
JWT Claims
{
“org _ jwks _ endpoint”: “TODO”,
“software _ mode”: “TEST”,
“software _ redirect _ uris”: [
“http://example.com/redirect”
],
“org _ status”: “Active”,
“software _ client _ id”: “5b11771fdecdcd0648d063e3”,
“iss”: “ForgeRock”,
“software _ tos _ uri”: “http://example.com/terms.html”,
“software _ client _ description”: “Third Party Description”,
“software _ jwks _ endpoint”: “https://service.directory.integ-ob.
forgerock.financial/directory-services/api/software-statement/5b11771fdecdc
d0648d063e3/application/jwk _ uri”,
“software _ policy _ uri”: “http://example.com/policy.html”,
“software _ id”: “5b11771fdecdcd0648d063e3”,
“org _ contacts”: [],
“ob _ registry _ tos”: “https://directory.integ-ob.forgerock.financial/
tos/”,
“org _ id”: “5b117707decdcd0648d063e2”,
“software _ logo _ uri”: “http://example.com/logo.jpg”,
“software _ jwks _ revoked _ endpoint”: “TODO”,
“software _ roles”: [
“AISP”,
“PISP”
],
“exp”: 1528476229,
“org _ name”: “[email protected]”,
“org _ jwks _ revoked _ endpoint”: “TODO”,
“iat”: 1527871429,
“jti”: “24a4f5f6-e85d-4654-b288-e3eaa132587f”
}
Creating an SSA Using ForgeRock Open Banking Directory for sharing multiple keys is called jwk_uri. A good
Creating an SSA is a necessary step for interacting example of this format is the directory jwk_uri. Like any
with the Open Banking ecosystem. If you would like to application, the directory also publishes its keys as a
create one yourself, you can use the new ForgeRock jwk_uri: https://service.directory.ob.forgerock.financial/
Open Banking Directory to do exactly that: https:// directory-services/api/directory/keys/jwk_uri
directory.ob.forgerock.financial/
Publishing your public keys in a jwk_uri format is
Dynamic Client Registration: required as a third party would need to verify JWTs
https://tools.ietf.org/html/rfc7591 you have signed or use your public keys to encrypt
Registering a TPP: JWTs that can only be read by you. At this time the
https://backstage.forgerock.com/knowledge/ directory manages this on behalf of TPPs.
openbanking/article/a39093356
ForgeRock Docs: Mutual Authentication TLS
https://backstage.forgerock.com/docs/am/6/oauth2- The banks endpoints are protected by MATLS. This
guide/#register-oauth2-client-dynamic
means that if you need to use an API that requires a
certain level of permissions, you will need to make sure
Usually, in order to commence an OAuth or OIDC
you have setup your transport certificate accordingly.
flow, the third party must have a set of credentials.
MATLS is the same mechanism we have chosen to
Typically with OAuth clients, a client ID and a secret
implement for protecting our directory REST API and
is issued to the third party. However, this is one of
JWKMS (JWK Management Service) REST API.
several authentication mechanisms that are available
in the OIDC specification. In our reference bank
Further security checks would be done by the ASPSP
implementation we have chosen the private_key_jwt
when required, using your transport certificate. For
authentication method.
example, when you register your application using an
SSA, the RS would verify that the transport certificate
With private_key_jwt, rather then use an explicit client
matches the SSA claims.
ID and a secret, the key with which you sign your JWT
actually serves as your credential. Upon successful
onboarding with an SSA, the authorization server will
ForgeRock Open Banking Directory: The
link your JWK URI with the new OIDC client. When directory is a key component of the Open
future OIDC requests are received, the authorization Banking ecosystem, however the live directory
server verifies the signature of the JWT matches and requires that the third party registers and
the “subject” claim in your request. works through approval from the Financial
Conduct Authority (FCA), which can take a
Json Web Key number of weeks and presents a significant
Json Web Key (JWK) is the format used in OIDC barrier to entry for third parties who want to
to publish your public keys to a third party. When develop Open Banking services.
publishing your keys as a JWK, the format used
Access
Now we have a secure, standards-based mechanism Learn More About ForgeRock
for authorizing consent and onboarding third parties
to a very high level of assurance. The final piece of the
Open Banking for Your Organization
puzzle is providing a means by which the third parties ForgeRock is the leader in digital identity and trust —
can actually access payment and account APIs. designed to support Open Banking, secure the enterprise,
Typically, this is provided by an API Gateway which will build customer trust and loyalty, and grow business
validate the access token issued in the authorization opportunities and revenue today and well into the future.
request flow.
Contact us to learn more about how ForgeRock can
Gateways have two ways to validate access tokens help your organization support Open Banking.
depending on the token architecture. The specification
is not prescriptive here:
»» Stateful: If stateful access tokens are being used then
the API gateway will need to invoke an endpoint on the
authorization server to validate the token.
www.forgerock.com