This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Dynamic Client Registration v0.1
Before you begin:
Deploy the Dynamic Client Registration (DCR) API v0.1.
CDR-registered software products of the Accredited Data Recipient (ADR) can be registered with one or more Data Holders. Thereby, the ADR can obtain client credentials and use it to retrieve consumer data. The Dynamic Client Registration (DCR) endpoint is capable of dynamically registering the ADRs with the Data Holders when the client sends a registration request with its metadata. This results in a registration response that includes a client identifier and the client metadata values registered for the client.
This document explains how to utilize DCR with WSO2 Open Banking.
Configuring dynamic client registration
Follow the steps below to configure the DCR API v0.1 in WSO2 Open Banking.
Uploading certificate to the client trust store
Upload the OB root and issuer certificates found in the below-mentioned locations to the client trust store of both WSO2 Open Banking API Management (WSO2_OB_APIM)
and Identity and Access Management (WSO2_OB_IAM)
modules.
In sandbox environment, upload certificates from OB_Sandbox_Certs.zip.
The client trust stores are located in the following locations:
<WSO2_OB_APIM_HOME>/repository/resources/security/client-truststore.jks
<WSO2_OB_IAM_HOME>/repository/resources/security/client-truststore.jks
Use the following commands to add the certificate to the client trust store:
keytool -import -alias obroot -file <OB_ROOT_CERT> -keystore client-truststore.jks -storepass wso2carbon
keytool -import -alias obissuer -file <OB_ISSUING_CERT> -keystore client-truststore.jks -storepass wso2carbon
Configuring deployment.toml
Follow the steps below to configure the DCR API v0.1 in WSO2 Open Banking.
- Configuring the WSO2 Open Banking Identity and Access Management module:
- Open the
<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file. To display the DCR endpoint in OpenID Connect Discovery (
https://<WSO2_OB_IAM_HOST>:8243/.well-known/openid-configuration
), update the value of theoauth2_dcr_url
property:[oauth.endpoints] oauth2_dcr_url = "${carbon.protocol}://<WSO2_OB_APIM_HOST>:8243/open-banking/0.1/register"
For Consumer Data Right of Australia, it is recommended only to sign the ID token with
SHA256withPS.
Therefore, open the <WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file and configure as follows:[oauth.oidc] id_token.signature_algorithm = "SHA256withPS"
- Open the
- Configuring the WSO2 Open Banking API Management module:
- Open the
<WSO2_OB_APIM_HOME>/repository/conf/deployment.toml
file. The following property is to validate the policy, client, terms of service, logo URIs. To validate these, set this to
true
.[open_banking.dcr] uri_validation.enable = false
The following property is to validate the hostnames of policy, client, terms of service, logo URIs against the hostname of redirect URIs. To validate these, set this to
true
.[open_banking.dcr] hostname_validation.enable = false
The following property is to use
SoftwareID
in SSA as the name of the application.[open_banking.dcr] software_id_as_application_name.enable = true
Make sure to keep the
software_id_as_application_name.enable
property always set totrue
.Add the following configurations to validate the JTI claims in the JWT and the SSA in a DCR request:
This is only available as a WSO2 Update from WSO2 Open Banking API Manager Level 2.0.0.85 and WSO2 Open Banking Identity Server Level 2.0.0.93 onwards. For more information on updating WSO2 Open Banking, see Updating WSO2 Products.
[open_banking.dcr] request_jti_validation.enable = true ssa_jti_validation.enable = true jti_cache_expiry_time = 60
- Open the
To reflect the configuration changes, restart the servers with the API Management and Identity and Access Management modules.
Registering an application
If your application has one or more Callback URLs that exceed the default sizes, increase the column sizes of the CALLBACK_URL
columns.
The Callback URLs are stored in the database as follows:
Database | Table | Column | Default Size |
---|---|---|---|
openbank_apimgtdb | AM_APPLICATION | CALLBACK_URL | varchar 512 |
openbank_apimgtdb | IDN_OAUTH_CONSUMER_APPS | CALLBACK_URL | varchar 1024 |
The API allows the ADR to request the Data Holder to register a new client. The process is as follows:
The ADR sends a registration request,
This is a POST request including a Software Statement Assertion (SSA) as a claim in the payload. If you want to change the request object, use the signing certificate and the private keys attached here for testing purposes:
Note that the signature of the SSA is not currently validated due to the unavailability of the SSA verification JWKS URI of the Australian Competition and Consumer Commission (ACCC).
- When invoking this API, use the transport certificates available here.
The automated DCR process is carried out by calling a synapse API in the gateway.
An example request sent to the DCR registration endpoint is shown below:
curl -X POST \https://<WSO2_OB_APIM_HOST>:8243/open-banking/0.1/register \ -H "accept: application/json" \ -H "Content-Type: application/jwt" \ -H "x-v: 0.1" \ --cert <TRANSPOR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ms5Zjk5RHdTWWc1UTl6SmxYbllWQWZjMEJXNFZSYVBTREt4eUlQSWN5X3VDZFBBZjZHSm8zcHQxWHZyMU9uZUwySzFEVllTZGpfTENaQUE5ZzJPd2NNOGo5QjNxWEg3QUNvOF9fTjltVVV3TUI3eWFrUkdxMnAwV1VkTTllUGRyaHFwdmZJTHBDbnZwUGg1THNSZlhiZlNnXzJKOEpvcEFqNU5YZElCTGhSNV9FUzN5bC1JWXpHMklzZ2dSV3l1eHZPcFNkRVZVUmhSMkNuUnd2blRuYXpueWVvZWJVdkFrQkZKbVBEZXc3eGE2VVpiYU9ELU1JWjg4eEtnaFREaDhDUlJibFVzX3FhTFFPcEdleGFGd0prcHJVWUt1eGVaek9FdyJ9.JptM-xWqFpBAo_pZN-PtzAeizEJyeWFWdOunuPBNppCcePgJ9mnEg5WnAwwmIxsXcSUAM1axL25hVAtYid8GOSdWq8DKG0fQunRIwRw5KuHcniEhgFODwmHiVFwQYzW5IPjDCVZdbaaekCxtKI_7WSwzFBQOdXHjBXQLMOtleGMguhZJft2lk-VOdkNkalicqrBD3E0YT__xUFVnnL-nAkPrW8VpuL7jBA51AXsJTdXkWOkcySy2Sr1Yx3I--JlumQylJ9qGCX1qkvMpzYo7Vq7z4aXqteh4NsWgCAgiuT4QO048ahdAKeos2FaRfwDcb8s9HqcpmGGYi7z4Vo7HqA
The payload contains an SSA. Given below is a decoded SSA.
{ "alg": "PS256", "kid": "b8facf2ff39444f781e0be5db4b14f16", "typ": "JWT" } { "iss": "cdr-register", "iat": 1571808167, "exp": 2147483646, "jti": "3bc205a1ebc943fbb624b14fcb241196", "org_id": "3B0B0A7B-3E7B-4A2C-9497-E357A71D07C8", "org_name": "Mock Company Inc.", "client_name": "Mock Software", "client_description": "A mock software product for testing SSA", "client_uri": "https://www.mockcompany.com.au", "redirect_uris": [ "https://www.google.com/redirects/redirect1", "https://www.google.com/redirects/redirect2" ], "logo_uri": "https://www.mockcompany.com.au/logos/logo1.png", "tos_uri": "https://www.mockcompany.com.au/tos.html", "policy_uri": "https://www.mockcompany.com.au/policy.html", "jwks_uri": "https://keystore.openbankingtest.org.uk/0015800001HQQrZAAX/9b5usDpbNtmxDcTzs7GzKp.jwks", "revocation_uri": "https://gist.githubusercontent.com/imesh94/3172e2e45757cda08ec2727f90b72ced/raw/ff0d3eabe4cddce47eec0228f592175223dd92b2/wso2-au-dcr-demo.jwks", "software_id": "740C368F-ECF9-4D29-A2EA-0514A66B0CDN", "software_roles": "data-recipient-software-product", "scope": "bank:accounts.basic:read bank:accounts.detail:read bank:transactions:read bank:payees:read bank:regular_payments:read common:customer.basic:read common:customer.detail:read cdr:registration" } <signature>
- The Data Holder validates the SSA based as specified in the Consumer Data Right (CDR) Dynamic Client Registration specification.
The Data Holder registers the client application using the metadata sent in the SSA.
If client creation is successful, the Data Holder responds with a JSON payload that describes the client that was created. The ADR can then use the client to access resources on the Data Holder's resource server.
If client creation is unsuccessful, the Data Holder responds with an error payload.
A sample response is given below:
{ "client_id":"7aKJwMhgaI2unIuEhgnGwpgkSTca", "client_id_issued_at":1600421709, "redirect_uris":[ "https://www.google.com/redirects/redirect1", "https://www.google.com/redirects/redirect2" ], "grant_types":[ "authorization_code", "refresh_token", "urn:ietf:params:oauth:grant-type:jwt-bearer" ], "application_type":"web", "id_token_signed_response_alg":"PS256", "token_endpoint_auth_signing_alg":"PS256", "request_object_signing_alg":"PS256", "scope":"bank:accounts.basic:read bank:accounts.detail:read bank:transactions:read bank:payees:read bank:regular_payments:read common:customer.basic:read common:customer.detail:read cdr:registration", "software_id":"740C368F-ECF9-4D29-A2EA-0514A66B0CDN", "client_name":"Mock Software", "client_description":"A mock software product for testing SSA", "client_uri":"https://www.mockcompany.com.au", "org_id":"3B0B0A7B-3E7B-4A2C-9497-E357A71D07C8", "org_name":"Mock Company Inc.", "logo_uri":"https://www.mockcompany.com.au/logos/logo1.png", "tos_uri":"https://www.mockcompany.com.au/tos.html", "policy_uri":"https://www.mockcompany.com.au/policy.html", "jwks_uri":"https://keystore.openbankingtest.org.uk/0015800001HQQrZAAX/9b5usDpbNtmxDcTzs7GzKp.jwks", "revocation_uri":"https://gist.githubusercontent.com/imesh94/3172e2e45757cda08ec2727f90b72ced/raw/ff0d3eabe4cddce47eec0228f592175223dd92b2/wso2-au-dcr-demo.jwks", "software_roles":"data-recipient-software-product", "token_endpoint_auth_method":"private_key_jwt" }
Once you register the application, enable ID token encryption as follows:
- Log in to the Management Console of WSO2 Open Banking Identity and Access Management at
https://<WSO2_OB_IAM_HOST>:9446/carbon.
Navigate to Service Provider → Lists on the left pane menu.
- Select Service Provider → Inbound Authentication Configuration and expand OAuth/OpenID Connect Configuration. Then, click Configure.
Click Enable ID Token Encryption to enable id token encryption.
Once you enable id_token encryption, two select boxes will be visible to choose your preferred encryption algorithm and encryption method.
Encryption Algorithm: Asymmetric encryption algorithm that is used to encrypt the Content Encryption Key (CEK), using the public key of the service provider.
Encryption Method: Symmetric encryption algorithm that is used to encrypt the JWT claims set using the CEK.
- Log in to the Management Console of WSO2 Open Banking Identity and Access Management at
Generate a Client Credentials grant access token for the application using the following command:
curl -X POST \ https://<WSO2_OB_APIM_HOST>:8243/token \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/x-www-form-urlencoded' \ --cert <TRANSPORT_PUBLIC_KEY_FILE_PATH> --key <TRANSPORT_PRIVATE_KEY_FILE_PATH> \ -d 'grant_type=client_credentials&scope=openid bank:accounts.basic:read bank:transactions:read common:customer.detail:read&client_assertion=<CLIENT_ASSERTION_JWT>&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer&redirect_uri=<APPLICATION_CALLBACK_URL>'
Retrieving an application
The API allows the ADR to retrieve the details for a client that has already been registered. The request consists of one path parameter named ClientId
that the ADR wants to retrieve details for. When invoking this API, use the transport certificates available here.
- If the request is successful and the identifier (
ClientId
) matches the client to whom the Client Credentials grant access token was issued, the Data Holder returns details of the requested client. - If the
ClientId
is unknown, the Data Holder responds with anUnauthorized
status code.
You can find the sample request and response below:
Updating an application
The API allows the ADR to request the Data Holder to modify one or more attributes related to an existing client. The ADR submits ClientId
as a path parameter and a JWS payload that describes the characteristics of the client to be modified. This must include all the claims, including the ones that will not be modified. When invoking this API, use the transport certificates available here.
- If the client is successfully modified, the Data Holder responds with a JSON payload.
If the
ClientId
is unknown, the Data Holder responds with anUnauthorized
status code.If client modification is unsuccessful, the Data Holder responds with an error payload.
You can find the sample request and response below:
Deleting an application
The API allows the ADR to request the Data Holder to delete an existing client. The request consists of one path parameter namely ClientId
of the ADR, which should be deleted. When invoking this API, use the transport certificates available here.
- If the request is successful and the
ClientId
matches the client to whom the Client Credentials grant access token was issued, the Data Holder must delete the client and invalidate long-lived access tokens that were issued to the client. - If the
ClientId
is unknown, the Data Holder responds with an Unauthorized status code.
You can find the sample request and response below: