Integrate Open Banking Business Intelligence

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/.

Integrate Open Banking Business Intelligence

The WSO2 Open Banking Business Intelligence(WSO2 OB BI) component enables monitoring and recording of API-level usage activity to ensure that the API owners have full awareness of the APIs, applications, and subscriptions. It generates alerts by analyzing the risk involved in transactions and fraudulent activities. It also generates statistics using the data collected from WSO2 Open Banking Key Manager and API Manager. WSO2 Open Banking Business Intelligence contains the following features: 

API Analytics

Provides reports, statistics and graphs on the APIs deployed in WSO2 Open Banking API Manager. Helps Third-party providers (TPP) to monitor how their applications perform while banks can analyze how the bank APIs perform.

Transaction Risk Analysis

Enables analyzing the risk level based on predefined rules and exempt the user from having to provide the second factor.

Fraud Detection

For transaction monitoring mechanisms to detect unauthorized or fraudulent transactions and generate alerts. It also exempts the security requirements of strong customer authentication based on the identified level of risk and recurrence of the payment transaction. 

Data Reporting

The WSO2 Open Banking Business Intelligence captures data published in WSO2 Open Banking API Manager and WSO2 Open Banking Key Manager. Data Reporting is the process of processing and summarizing these data. 

It also supports business Key Performance Indicator (KPI) dashboards with business intelligence and insights on usage trends as well as custom business insights on the account and payment flows. The decision makers of banks can use these statistics to align the business to better suit the customer needs and ultimately increase profits.  The configurable alerting module enables informing the necessary parties of abnormal behavior, e.g., API failures, a sudden increase in the response time of APIs, and a change in the API resource access pattern.

The placement of the WSO2 OB BI component is as follows:

Before you begin

Download Open Banking Business Intelligence and unzip the file, or add it through WUM using the following commands:

  1. Add the wso2-obbi WUM pack.

    wum add wso2-obbi-<version>
  2. Update the wso2-obbi product pack using WUM.

    wum update wso2-obbi-<version>

    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.

    The WSO2 Update tool delivers hotfixes and updates seamlessly on top of products as WSO2 Updates. They include improvements that are released by WSO2. You need to update the product using the relevant script. Go to <WSO2_OB_BI_HOME>/bin and run the WSO2 Update tool:  ./wso2update_linux ./wso2update_darwin ./wso2update_windows.exe
  3. Copy <WSO2_OB_BI_HOME>/resources/finance/scripts/wso2-obbi-conf/deployment.yaml to the <WSO2_OB_BI_HOME>/conf/worker directory and replace the existing deployment.yaml file.

The WSO2 Open Banking Business Intelligence server uses the worker and dashboard profiles for the above-mentioned features. In a production deployment, the worker and dashboard profiles should run in two different JVMs. You need to enable the below ports, in order to publish data to these two nodes.

You can find the configurations for worker and dashboard profiles respectively in the following locations:

  • <WSO2_OB_BI_HOME>/conf/worker/deployment.yaml 

  • <WSO2_OB_BI_HOME>/conf/dashboard/deployment.yaml 

The worker node has a port offset of 1 and it opens the following ports.

HTTPS requests

9444, 8006, 8007

Thrift transport

7612, 7712

The dashboard node has a port offset of 6 and it opens the following port.

HTTPS requests

9449

Configuring databases

The following is a list of database versions that are compatible with the WSO2 API Manager Analytics.

  • MySQL 5.7 

  • MS SQL Server 2016 

  • Oracle 12c

  1. Make sure the following databases are created in your database server, if not create them:  

    If you are setting up WSO2 OB BI and MySQL database in a local environment, 

    • Configure your database details in the <WSO2_OB_BI_HOME>/resources/finance/scripts/startup.properties file.

    • Go to the <WSO2_OB_BI_HOME>/resources/finance/scripts directory and execute the following command: 

      ./configure-bi.sh
    • openbank_apimgt_statsdb 

    • openbank_openbankingdb 

    • openbank_geolocationdb

    • openbank_ob_reporting_statsdb

    • openbank_ob_reporting_summarizeddb

  2. Update the  <WSO2_OB_BI_HOME>/conf/worker/deployment.yaml  file. Modify the datasources below by pointing them to the databases you created in the above step (in the given order). 

    • APIM_ANALYTICS_DB

    • OPEN_BANKING_DB

    • GEO_LOCATION_DATA

    • OB_REPORTING_DB  

    • OB_REPORTING_SUMMARIZED_DBUpdate the datasource entry in the deployment.yaml with your database configurations.

       

      Property

      Description

      Property

      Description

      jdbcUrl

      This is the port to connect to on database server

      The jdbcUrl property expects the JDBC driver connection string. A sample jdbcUrl:

      'jdbc:mysql://localhost:3306/openbank_ob_reporting_summarizeddb?autoReconnect=true&useSSL=false'

      username

      The database user

      password

      Password set for the database connection

      driverClassName

      The JDBC driver name

      Mysql JDBC Driver : com.mysql.jdbc.Driver
      MSSQL JDBC Driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
      Oracle JDBC Driver : oracle.jdbc.driver.OracleDriver

      If you are using Oracle, update the connectionTestQuery in each datasource with the following value.

      connectionTestQuery: SELECT 1 FROM DUAL
      - name: GEO_LOCATION_DATA description: "The data source used for geo location database" jndiConfig: name: jdbc/GEO_LOCATION_DATA definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_geolocationdb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 # Use below for oracle database # connectionTestQuery: SELECT 1 FROM DUAL validationTimeout: 30000 isAutoCommit: false - name: APIM_ANALYTICS_DB description: "The datasource used for APIM statistics aggregated data." jndiConfig: name: jdbc/APIM_ANALYTICS_DB definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_apimgt_statsdb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false - name: OPEN_BANKING_DB description: "The datasource used to store payment consents" jndiConfig: name: jdbc/OPEN_BANKING_DB definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_openbankingdb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 50 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false - name: OB_REPORTING_DB description: The datasource used to store statistics for OB Reporting module jndiConfig: name: jdbc/OB_REPORTING_DB definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_ob_reporting_statsdb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 20 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false - name: OB_REPORTING_SUMMARIZED_DB description: The datasource used to store statistics for OB Reporting module jndiConfig: name: jdbc/OB_REPORTING_SUMMARIZED_DB definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_ob_reporting_summarizeddb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: com.mysql.jdbc.Driver maxPoolSize: 20 idleTimeout: 60000 connectionTestQuery: SELECT 1 validationTimeout: 30000 isAutoCommit: false

      Modify the datasources of OB_REPORTING_DB  in the <WSO2_OB_BI_HOME>/conf/dashboard/deployment.yaml file.                                                          

      Use your database configurations and update the datasource properties as follows: 

      - name: OB_REPORTING_DB description: The datasource used to store statistics for OB Reporting module jndiConfig: name: jdbc/OB_REPORTING_DB definition: type: RDBMS configuration: jdbcUrl: 'jdbc:mysql://localhost:3306/openbank_ob_reporting_statsdb?autoReconnect=true&useSSL=false' username: root password: root driverClassName: 'com.mysql.jdbc.Driver' maxPoolSize: 20 idleTimeout: 60000 connectionTestQuery: SELECT 1 # Use below for oracle database # connectionTestQuery: SELECT 1 FROM DUAL validationTimeout: 30000 isAutoCommit: false
  3. This is available only as a WUM update and is effective from January 08, 2021 (01-08-2021). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.

 

Configuring WSO2 OB BI worker 

Update listenerConfigurations in the <WSO2_OB_BI_HOME>/wso2/worker/conf/transports/netty-transports.yml as follows:

Note that keyStorePass: wso2carbon needs to be changed as keyStorePassword: wso2carbon.

listenerConfigurations: - id: "default" host: "0.0.0.0" port: 9090 messageProcessorId: "MSF4J-CM-PROCESSOR" - id: "https" host: "0.0.0.0" port: 9443 scheme: https keyStoreFile: ${carbon.home}/resources/security/wso2carbon.jks keyStorePassword: wso2carbon certPass: wso2carbon messageProcessorId: "MSF4J-CM-PROCESSOR"

Configuring keystores

In the SSL handshake between the Open Banking API Manager and Open Banking Business Intelligence servers, the client (i.e. Open Banking API Manager) needs to verify the certificate presented by the server (i.e. Open Banking Business Intelligence). For this purpose, the client stores the trusted certificate of the server in the client-truststore.jks keystore.

If you use a custom keystore in Open Banking API Manager and/or Open Banking Business Intelligence, import the public key certificate of Open Banking Business Intelligence into the client-truststore.jks file of the Open Banking API Manager. To export the public key from the server and import it into the client's trust store, follow the steps given in Adding CA-signed certificates to keystores in the Administration Guide.

Enabling data publishing in API Manager

Follow the instructions below to configure the WSO2 Open Banking API Manager to publish statistics. 

  1. Open the <WSO2_OB_APIM_HOME>/repository/conf/api-manager.xml file

  2. Configure the properties under the <Analytics> sub element.

    <Analytics> <!-- Enable Analytics for API Manager --> <Enabled>true</Enabled> <!-- Server URL of the remote StreamProcessor server used to collect statistics. Must be specified in protocol://hostname:port/ format. An event can also be published to multiple Receiver Groups each having 1 or more receivers. Receiver Groups are delimited by curly braces whereas receivers are delimited by commas. Ex - Multiple Receivers within a single group tcp://localhost:7612/,tcp://localhost:7613/,tcp://localhost:7614/ Ex - Multiple Receiver Groups with two receivers each {tcp://localhost:7612/,tcp://localhost:7613},{tcp://localhost:7712/,tcp://localhost:7713/} --> <StreamProcessorServerURL>{tcp://<WSO2_OB_BI_HOST>:7612}</StreamProcessorServerURL> </Analytics>

    Enable alerts:

    If you are using Open Banking Business Intelligence for Analytics, follow the steps below to enable alerts:

    • Open the <WSO2_OB_BI_HOME>/conf/worker/deployment.yaml file.

    • Update the file as follows: 

      analytics.solutions: APIM-alerts.enabled: true APIM-analytics.enabled: true
    • See Managing Alerts for more information.

  3. Save the changes and restart the WSO2 Open Banking API Manager server.