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 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 Key Manager(WSO2 OB KM). 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/finance/open-banking.xml
and<WSO2_OB_KM_HOME>/repository/conf/finance/open-banking.xml
files. - Under the
<DataPublishing>
sub-element set the <Enabled>
parameter to true to enable the feature. - Replace the
<WSO2_OB_BI_HOST>
placeholder with the hostname of your WSO2 OB BI server and configure the other parameters accordingly.
<BIServer> <DataPublishing> <!-- Include all configurations related to Data publishing --> <!-- Enable data publishing in WSO2 Open Banking--> <Enabled>true</Enabled> <!-- Server URL of the remote BI server used to collect statistics. Must be specified in protocol://hostname:port/ format. --> <ServerURL>{tcp://<WSO2_OB_BI_HOST>:7612}</ServerURL> <!-- Administrator username to login to the BI server for data publishing. --> <Username>admin@wso2.com@carbon.super</Username> <!-- Administrator password to login to the BI server for data publishing. --> <Password>wso2123</Password> </DataPublishing> </BIServer>
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
This is available only as a WUM update and is effective from June 10, 2020 (06-10-2020). For more information on updating WSO2 Open Banking, see Updating WSO2 Products.
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.mtls.validator.handler.GatewayClientAuthenticationHandler"/> <handler class="com.wso2.finance.open.banking.common.identity.validation.SignatureAlgorithmValidatorHandler"/> <handler class="com.wso2.finance.open.banking.mtls.validator.handler.MTLSValidationHandler"/> <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
Changes in databases:
With the v3.1.2 the database tables are updated as follows:
Data Reporting API
If you're using a customised consent authentication web application, you may use the Data Reporting API to publish events from the application. Invoke the Data Reporting API in all the relevant places to publish the PSU and authorisation data to the reporting databases.
In the following scenarios, events are captured using the consent authorisation web app:
- The user visiting the consent page
- After the user authorising/denying the consent
For sample requests, see Data Reporting API.