PSD2 Data Reporting

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.

Loading

Configuring Data Reporting

The following sections explain how to configure Data Reporting:

Enabling Data Reporting

Follow the steps below to enable Data Reporting. 

  1. Open  <WSO2_OB_APIM_HOME>/repository/conf/deployment.toml and  <WSO2_OB_IAM_HOME>/repository/conf/deployment.toml  files.
  2. Under the [open_banking.bi_server.data_publishing] property set the enable parameter to true to enable the feature. 
  3. 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 to  false
[open_banking.bi_server.data_publishing]
sandbox_enable = false



Configuring Open Banking Business Intelligence

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

  2. Configuring datasources
    • Modify the OB_REPORTING_DB and OB_REPORTING_SUMMARIZED_DB datasources in <WSO2_OB_BI_HOME>/conf/worker/deployment.yaml file.
    • Update  jdbcUrl username password  and  driverClassName  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

Data Reporting v3.1.2 

Follow the steps below to update to Data Reporting v3.1.2:

  1. To capture data from the /token endpoint, configure the Synapse Token API in WSO2 API Manager.
    1. Open the <WSO2_OB_APIM_HOME>/repository/deployment/server/synapse-configs/default/api/_TokenAPI_.xml file.
    2. Add the following property under the <inSequence> tag: 

      <property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/>
    3. Add the APIInvocationLatencyStatsHandler and ReportingDataHandler 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"/>
  2. To capture PSU’s online banking and mobile banking data, update the Adaptive Authentication script as follows:
    1. Open the <WSO2_OB_APIM_HOME>/repository/conf/finance/common.auth.script.js file.
    2. 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';
    3. Add psuChannel as a parameter to the reportingData function as given below. Make sure to update all the reportingData function invocations in the script.

      reportingData(context, "AuthenticationAttempted", false, psuChannel);

Loading



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:

  1. Open the <WSO2_OB_APIM_HOME>/repository/conf/deployment.toml file.
  2. Under the [open_banking.bi_server.data_publishing]  tag, add the data_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"
    
  3. Open the <WSO2_OB_IAM_HOME>/repository/conf/deployment.toml file and repeat the above step.
  4. Copy and replace the Siddhi scripts related to Data Reporting v3.1.5 as follows: 

    Copy fromCopy to
    <WSO2_OB_BI_HOME>/resources/finance/siddhi-files/uk/mi-reporting/3.1.5/ <WSO2_OB_BI_HOME>/deployment/siddhi-files/
  5. 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.

Changes in databases:

With v3.1.5 the database tables are updated as follows: 

  Click here to see what is included in the OB_REPORTING_DB

openbank_ob_reporting_statsdb contains the following tables.

  • API_INVOCATION_RAW_DATA
  • ACCOUNTS_RAW_DATA
  • AUTHORISATION_RAW_DATA
  • APP_REG_RAW_DATA
  • AUTHENTICATION_RAW_DATA
  • FUNDS_CONFIRMATION_RAW_DATA
  • PAYMENTS_RAW_DATA

  • CONSENT_RAW_DATA
  • UK_ADDITIONAL_RAW_DATA
  Click here to see what is included in the OB_REPORTING_SUMMARIZED_DB database

openbank_ob_reporting_summarizeddb  contains the following summarized data tables:  

  • ACCOUNT_REAUTH_DATA
  • API_BASED_DISTINCT_TPPS
  • ENHANCED_PSU_ADOPTION
  • LONG_LIVED_CONSENT_ADOPTION
  • ONE_OFF_CONSENT_ADOPTION
  • PSU_AUTHENTICATION_INTERACTION
  • PAYMENT_REFUNDS