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/.
PSD2 Data Reporting
There are certain standards and requirements that you need to adhere to when you offer open banking services as a PSD2 compliant organization. The Account Servicing Payment Service Providers (ASPSPs) are required to make their statistics available to respective national authorities and open banking authorities to monitor compliance with PSD2/RTS. In order to satisfy this, the WSO2 Open Banking solution offers data reporting feature.
The Data Reporting feature gathers and monitors data in regard to the APIs invoked through the WSO2 Open Banking solution. This observes the following aspects.
- Performance and availability
Understand and monitor the availability and performance of the supported APIs. - Adoption
Identify the effectiveness, which ASPSPs are being engaged more by TPPs as a part of their ongoing activity. - Data volumetrics
The efficacy of the open banking standards as a part of ongoing standards management activity.
The WSO2 Open Banking Business Intelligence(OBBI) captures the data through WSO2 Open Banking API Manager (WSO2 OB APIM) and WSO2 Open Banking Identity and Access Management (WSO2 OB IAM). It processes and summarizes the data in a way that ASPSPs can generate their own reports and summaries.
Data Reporting captures the data in the following flows :
API invocation data from the AISP and PISP flows
Authentication data through the Strong Customer Authentication flow
Authorization data using the Authorization flow
Application registration data through the TPP onboarding process
WSO2 Open Banking captures the application registration data only during the Dynamic Client Registration process.
Configuring Data Reporting
The following sections explain how to configure Data Reporting:
Enabling Data Reporting
Follow the steps below to enable Data Reporting.
- Open
<WSO2_OB_APIM_HOME>/repository/conf/deployment.toml
and<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
files. - Under the
[open_banking.bi_server.data_publishing]
property set theenable
parameter to true to enable the feature. - Update the
server_url
parameter with the hostname of your WSO2 OB BI server .
[open_banking.bi_server.data_publishing] enable = true server_url = "{tcp://ANALYTICS_HOSTNAME:7612}"
To stop publishing sandbox environment data:
You can stop publishing sandbox environment data by adding the following tag to the deployment.toml
files.
This is available only as a WSO2 Update and is effective from July 05, 2021 (07-05-2021). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.
- Add the
sandbox_enable
tag under[open_banking.bi_server.data_publishing]
and set it tofalse
.
[open_banking.bi_server.data_publishing] sandbox_enable = false
Configuring Open Banking Business Intelligence
Configuring databases
The following databases store raw and summarized data. Make sure they are available in your database servers.
openbank_ob_reporting_statsdb
openbank_ob_reporting_summarizeddb
- Configuring datasources
- Modify the
OB_REPORTING_DB
andOB_REPORTING_SUMMARIZED_DB
datasources in<WSO2_OB_BI_HOME>/conf/worker/deployment.yaml
file. - Update
jdbcUrl
,username
,password
anddriverClassName
in the datasource entries with your database configurations. A sample is given below:
- 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 - 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 # Use below for oracle database # connectionTestQuery: SELECT 1 FROM DUAL validationTimeout: 30000 isAutoCommit: false
- Modify the
Data Reporting v3.1.2
Follow the steps below to update to Data Reporting v3.1.2:
- To capture data from the
/token
endpoint, configure the Synapse Token API in WSO2 API Manager.- Open the
<WSO2_OB_APIM_HOME>/repository/deployment/server/synapse-configs/default/api/_TokenAPI_.xml
file. Add the following property under the
<inSequence>
tag:<property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/>
Add the
APIInvocationLatencyStatsHandler
andReportingDataHandler
handlers and place them in the given order under the<handlers>
tag:<handler class="com.wso2.finance.open.banking.management.information.reporting.data.publisher.APIInvocationLatencyStatsHandler"/> <handler class="org.wso2.carbon.apimgt.gateway.handlers.ext.APIManagerCacheExtensionHandler"/> <handler class="org.wso2.carbon.apimgt.gateway.handlers.common.SynapsePropertiesHandler"/> <handler class="com.wso2.finance.open.banking.management.information.reporting.data.publisher.ReportingDataHandler"/>
- Open the
- To capture PSU’s online banking and mobile banking data, update the Adaptive Authentication script as follows:
- Open the
<WSO2_OB_APIM_HOME>/repository/conf/finance/common.auth.script.js
file. Add the following variable at the beginning of the file. Set its value according to the flow you want to capture data.
Possible values are: Online Banking, Mobile Banking
var psuChannel = 'Online Banking';
Add
psuChannel
as a parameter to thereportingData
function as given below. Make sure to update all thereportingData
function invocations in the script.reportingData(context, "AuthenticationAttempted", false, psuChannel);
- Open the
Data Reporting v3.1.5
This is available only as a WUM update and is effective from February 01, 2021 (02-01-2021). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.
Follow the steps below to update to Data Reporting v3.1.5:
- Open the
<WSO2_OB_APIM_HOME>/repository/conf/deployment.toml
file. Under the
[open_banking.bi_server.data_publishing]
tag, add thedata_reporting_version = "3.1.5"
configuration to enable Data Reporting v3.1.5.[open_banking.bi_server.data_publishing] data_reporting_version = "3.1.5"
- Open the
<WSO2_OB_IAM_HOME>/repository/conf/deployment.toml
file and repeat the above step. Copy and replace the Siddhi scripts related to Data Reporting v3.1.5 as follows:
Copy from Copy to <WSO2_OB_BI_HOME>/resources/finance/siddhi-files/uk/mi-reporting/3.1.5/
<WSO2_OB_BI_HOME>/deployment/siddhi-files/
- When upgrading from Data Reporting v3.1.2 to v3.1.5:
- Go to the
<WSO2_OB_BI_HOME>/resources/finance/dbscripts/uk/mi-reporting/migration-mi-3.1.2_to_3.1.5/ob_stats_db
directory. - Run the relevant database script against the
OB_REPORTING_DB
database.
- Go to the
Changes in databases:
With v3.1.5 the database tables are updated as follows: