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/.
Try Local Setup
This document provides you with instructions on how to configure and try out WSO2 Open Banking in your local environment.
The scripts for the below local setup in the Quick Start Guide are configured for a Linux and MySQL/MSSQL environment. Notice that WSO2 Open Banking solution is applicable to Windows/Linux and MySQL/MSSQL and Oracle environments.
Prerequisites
- Download OpenJDK 8 in all the nodes of the setup.
In the environment variables, update the
JAVA_HOME
andPATH
variables. For instance, you can do this on a Mac/Linux server by adding the following to the~/.bashrc file:
export JAVA_HOME="<JDK_LOCATION>" export PATH=$PATH:$JAVA_HOME/bin
Download and unzip the following files:
- wso2-obiam-2.0.0.zip (WSO2 Open Banking Identity and Access Management Module)
wso2-obam-2.0.0.zip (WSO2 Open Banking API Management Module)
WSO2 Updates Manager (WUM) is deprecated and will be unavailable from July 2021 onwards. WSO2 Updates is the new tool to include the solution and security improvements that are released by WSO2 Open Banking, on top of a released version. For more information, see WSO2 Updates.
Setup a database server using MySQL 5.7, Microsoft SQL Server 2016 or, Oracle 12c.
Setting up the databases and starting the servers
In order to start the servers, configure the databases in both the Identity and Access Management (IAM) and the API Manager (APIM) servers according to the open banking specification, as follows:
Open the
<WSO2_OB_IAM_HOME>/repository/resources/finance/scripts/
file and configure the following:startup.properties
Specify the hostnames for the API Management and Identity and Access Management servers.
# Specify the hostname you want to configure APIM_HOSTNAME=localhost IAM_HOSTNAME=localhost
Configure the databases related properties.
Database Property Description DB_TYPE
Type of the database you installed
DB_USER
Database user DB_PASS
Password set for the database connection DB_HOST
Name of the database server DB_DRIVER
Configure
DB_DRIVER
according to the database installed:- Mysql JDBC Driver = com.mysql.jdbc.Driver
- MSSQL JDBC Driver = com.microsoft.sqlserver.jdbc.SQLServerDriver
- Oracle JDBC Driver = oracle.jdbc.driver.OracleDriver
- PostgreSQL JDBC Driver = org.postgresql.DriverIf you are using a MS SQL, Oracle, or a PostgreSQL database, see the following topics and configure the databases.
Run the
<WSO2_OB_IAM_HOME>/repository/resources/finance/scripts/
file according to your specification:configure-iam.sh
If you're setting up Open Banking for Berlin and using Oracle or PostgreSQL databases, update the data type of the given field:
Go to the
<WSO2_OB_APIM_HOME>/repository/resources/finance/scripts
directory and configure the database properties in thestartup.properties
file, similar to Step 1.Run the
<WSO2_OB_APIM_HOME>/repository/resources/finance/scripts/configure-am.sh
file.If you are setting up WSO2 Open Banking for Berlin:
WSO2 Open Banking contains a mock back end. To configure the mock back end for Berlin specification:
Open the
deployment.toml
files:<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
<WSO2_OB_APIM_HOME>/repository/conf/deployment.toml
Update the mock back end URL as follows:
[open_banking] sharable_accounts_retrieve_endpoint ="https://localhost:9443/api/openbanking/backend-berlin/services/v130/accounts/shareable" payable_accounts_retrieve_endpoint = "https://localhost:9443/api/openbanking/backend-berlin/services/v130/accounts/payable"
You have configured databases in step 1. By running the
configure.sh
files, you set the database credentials with reference to the configuration files.If you are setting up WSO2 Open Banking for Australia:
According to Consumer Data Standards , an access token must expire between 2 minutes to 10 minutes after issuing it. To configure the validity period of the access token in seconds, add the given configurations to the
<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file.[oauth.token_validation] user_access_token_validity = 120
To enable Request-URI validation during the account retrieval process; validate the account ID against the account ID in the consent, open the
<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file and set the following property to true:[open_banking.account_id_validation_on_retrieval] enable = true
You are now ready to start the servers. In the command line, navigate to the
<WSO2_OB_IAM_HOME>/bin
directory, and run the following command to start the Identity and Access Management server:./wso2server.sh
Run the following command from the
<WSO2_OB_APIM_HOME>/bin
directory to start the API Manager server:./wso2server.sh
Configuring consumer authentication
If you're setting up WSO2 Open Banking for Australia:
By default, WSO2 Open Banking comes with basic authentication configured. For CX guideline aligned experience, you can configure Identifier-first authentication paired with a secondary identity provider. In this section, we configure SMS OTP as the secondary identity provider.
Configuring users and roles
Configuring APIs
You can configure APIs through the API Publisher by signing in as a user whose role includes
Internal/publisher.
Follow the steps given below:
If you are setting up WSO2 Open Banking UK:
If you are using WSO2 Open Banking API Manager Level 2.0.0.134 or above with WSO2 Open Banking Identity Server Level 2.0.0.144 or above, follow these steps:
- Open the
<WSO2_OB_APIM_HOME>/repository/resources/api_templates/velocity_template.xml
file. - Find the
<handler class="com.wso2.finance.open.banking.common.identity.validation.SignatureAlgorithmValidatorHandler"/>
tag. Replace the above handler with the following:
<handler class="com.wso2.finance.open.banking.gateway.validation.SignatureAlgorithmValidatorHandler"/>
- Restart the API Manager server.
Sign in to the API Publisher Portal (
https://localhost:9443/publisher
) with the credentials formark@gold.com
.In the APIs tab, select CREATE NEW API > I Have an Existing REST API.
- Set the Input Type to OpenAPI File.
- Click BROWSE FILE TO UPLOAD and select the Swagger definition (.yaml file) from the
<WSO2_OB_APIM_HOME>/repository/resources/finance/apis/
directory based on your specification and version of the API. - Click Next.
- Set the endpoint according to your API. For more details, see the table below.
- Set the business plan to Unlimited : Allows unlimited requests unless you want to limit the requests.
- Click Create to create the API.
- Once you get the message that the API is successfully updated, go to Runtime Configurations using the left menu panel.
- Click the edit button under Request > Message Mediation.
- Now, select the Custom Policy option.
- Upload the relevant in-sequence file and click SELECT. For more details, see the table below.
- Scroll down and click SAVE.
- Now, go to Properties using the left menu panel.
- Click Add New Property.
- Add the API Properties according to your API and click the Add button. For more details, see the table below.
For example: - Click SAVE.
- Go back to Overview using the left menu panel.
- Click PUBLISH.
- The published API is available in the Developer Portal at
https://localhost:9443/devportal.
Summarized information for configuring APIs
Configuring a consent management application
A consent management application is configured in order to manage consents granted to an application.
- Go to the Identity and Access Management Console at
https://localhost:9446/carbon.
- On the Main tab, click Home > Identity > Service Providers > Add.
- By default, the mode is set to Manual Configuration. Leave it as it is.
- Enter consentmgt as the Service Provider’s name.
- Click Register.
- Click Inbound Authentication configuration > OAuth/OpenID Connect configuration > Configure.
Set the values for the following parameters and keep the default value for the other parameters.
Parameter Value OAuth Version 2.0 Allowed Grant Type code
Callback URL regexp=(https://localhost:9446/consentmgt|https://localhost:9446/consentmgt)
The first and second URLs are respectively; redirect and logout URLs.
Regex-based consumer URLs are supported when defining the callback URL. This enables you to configure multiple callback URLs for one application by entering a regex pattern as the value for the callback URL field.
You must have the prefix regexp= before your regex pattern. To define a normal URL, you can specify the callback URL without this prefix.
Click Add.
The OAuth client key/client ID and OAuth client secret are generated. Those are used in Configuring consent management jaggery application.
Open the <
WSO2_OB_IAM_HOME>
/repository/deployment/server/jaggeryapps/consentmgt/configs/
file. Modify the following parameters:conf.json
Parameter Description apimHost
Hostname of the API Management server applicationId
OAuth Client Key generated in the above step authCredential Base64 encoded CLIENT_ID:CLIENT_SECRET in the given format. redirectUrl
logoutUrl
DeployedSpecification Possible values are UK, BERLIN, AU, and STET. By default, the value is set to UK. { "app" : "consentmgt", "applicationType" : "oauth2", "tenantDomain": "carbon.super", "apimHost":"http://localhost", "apimNioPort":"8280", "apimHttpPort":"9763", "kmHost" : "https://localhost", "kmPort" : "9446", "kmTokenAPI" : "oauth2/token", "kmAuthorizeAPI" : "oauth2/authorize", "applicationId":"<CLIENT_ID>", "authCredential":"<BASE64ENCODED CLIENT CREDENTIALS>", "redirectUrl":"https://localhost:9446/consentmgt", "logoutUrl": "https://localhost:9446/consentmgt", "tokenApiName" : "token", "tokenApiVersion" : "", "authorizeApiName" : "authorize", "authorizeApiVersion" : "", "pagination" : { "limit" : 11, "actualLimit" : 10, "offset": 0 }, "DeployedSpecification" : "AU" }
Try out the Customer Care Portal at
https://localhost:9446/ccportal.
Sign in to the Customer Care Portal with the credentials for ann@gold.com Internal/CustomerCareOfficer.
Try out the consent revocation apps in WSO2 Open Banking.
What's Next
Now that you have created the APIs that allow you to initiate payments and access account information, let's try out the flows in WSO2 Open Banking: