Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add 3.1.2 er

...

Table of Content Zone
locationtop

Enabling Data Reporting

Follow the steps below to enable Data Reporting. 

  1. Open  <WSO2_OB_APIM_HOME>/repository/conf/finance/open-banking.xml and  <WSO2_OB_KM_HOME>/repository/conf/finance/open-banking.xml  files.
  2. Under the <DataPublishing> sub-element set the <Enabled> parameter to true to enable the feature. 
  3. Replace the <WSO2_OB_BI_HOST> placeholder with the hostname of your WSO2 OB BI server and configure the other parameters accordingly.  
Code Block
languagexml
<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

  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:
    Code Block
    languagexml
    - 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 

Info

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:

  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: 

      Code Block
      languagexml
      <property name="api.ut.backendRequestTime" expression="get-property('SYSTEM_TIME')"/>
    3. Add the following handlers the APIInvocationLatencyStatsHandler and ReportingDataHandler handlers and place them in the given order under the <handlers> tag: 

      Code Block
      languagexml
      <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.managementmtls.informationvalidator.reporting.data.publisher.ReportingDataHandler"/>
    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

      Code Block
      languagexml
      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.

      Code Block
      languagexml
      reportingData(context, "AuthenticationAttempted", false, psuChannel);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"/>
  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

      Code Block
      languagexml
      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.

      Code Block
      languagexml
      reportingData(context, "AuthenticationAttempted", false, psuChannel);
Note
titleChanges in databases:

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

Expand
titleClick here to see what is included in the OB_REPORTING_DB

openbank_ob_reporting_statsdb contains the following tables.  

  • API_INVOCATION_RAW_DATA

    Stores data related to API requests. 

    Image Added
  • ACCOUNTS_RAW_DATA 

    Stores data related to the Account flow.

    Image Added
  • AUTHORISATION_RAW_DATA

    Stores data related to user consent authorization.

    Note

    AuthorizationRequired is a field that denotes the user is authenticated but not authorized/rejected.

    Image Added

  • APP_REG_RAW_DATA

    Stores data related to application registration.

    Image Added
  • AUTHENTICATION_RAW_DATA

    Stores user authentication data.

    Note

    AuthenticationRequired is a field that denotes the user is in a status where authentication is required, which means the user hasn’t tried authenticating.

    Image Added

  • FUNDS_CONFIRMATION_RAW_DATA 

    Stores data related to confirmation of funds requests. 

    Image Added
  • PAYMENTS_RAW_DATA

    Stores data related to payments.

    Image Added


  • PAYMENTS_STATUS_DETAILS

    Stores data related to payment statuses.

    Image Added
Expand
titleClick here to see what is included in the OB_REPORTING_SUMMARIZED_DB database

openbank_ob_reporting_summarizeddb contains the following summarized data tables:  

  • AISP_VOLUMES
    Stores summarized details regarding the number of AISP applications registered/deregistered.

    Image Added
  • PISP_VOLUMES
    Stores summarized details regarding the number of PISP applications registered/deregistered.

    Image Added
  • CBPII_VOLUMES
    Stores summarized details regarding the number of CBPII applications registered/deregistered.

    Image Added
  • BACS_INTERNATIONAL
    Stores summarized details of BACS international payments.

    Image Added
  • BACS_REQUEST_STATUS
    Stores summarized status details of the BACS payment requests.

    Image Added
  • FAILED_BACS_REQUESTS
    Stores summarized details of failed BACS requests.

    Image Added
  • CHAPS_INTERNATIONAL
    Stores summarized details of CHAPS international payments.

    Image Added
  • CHAPS_REQUEST_STATUS
    Stores summarized status details of the CHAPS payment requests.

    Image Added
  • FAILED_CHAPS_REQUESTS
    Stores summarized details of failed CHAPS requests.

    Image Added
  • PA_CORE
    Stores summarized details regarding performance and availability for core hours (06:00-00:00).

    Image Added
  • PA_NON_CORE
    Stores  summarized details regarding  performance and availability for non-core hours (00:00-06:00).

    Image Added
  • RESPONSE_OUTLIER
    Stores summarized response details of requests.

    Image Added
  • PAYMENT_INITIATION_DETAILS
    Stores summarized payment initiation details per second.

    Image Added
  • FILE_PAYMENT
    Stores summarized details regarding the number of payments per payment type in (files) file payment requests.

    Image Added
  • DIFFERENT_TPPS
    Stores summarized details regarding the distinct TPP count.

    Image Added
  • AUTHENTICATION_ATTEMPTED
    Stores summarized details regarding the number of attempts to authenticate.

    Image Added
  • AUTHENTICATION_SUCCESSFUL
    Stores summarized details regarding the number of successful PSU authentications.

    Image Added
  • AUTHORISATION_SUMMARY
    Stores summarized counts of authorisation statuses (Authorised/ Rejected).

    Image Added
  • MULTI_AUTH_DETAILS

    Stores the summarized count of Authorised/Rejected statuses in scenarios where multiple authorising is performed.

    Image Added
  • CONFIRMATION_DETAILS

    Stores the summarized count of AuthorisationRequired,Authorised and Rejected statuses.

    Image Added
  • CONSENT_REQ_AUTHENTICATION

    Stores the summarized count of PSU consents that require authentication.

    Image Added
  • STATUS_CODE_SUMMARY
    Stores the summarized number of API calls for a given endpoint per status code per day.

    Image Added
  • PSU_DETAILS
    A raw data table that stores PSU details and is used to identify the PSUs.
    Image Added
  • FIRST_TIME_USERS
    A raw data table that stores details of PSUs that use a PIS service for the first time.

    Image Added
  • ACCOUNT_RAW_DATA_FOR_PCA_BCA
    A summarized raw data table that stores the account IDs to identify the Personal Current Account (PCA) or Bank Customer Account (BCA).

    Image Added
  • FUNDS_RAW_DATA_FOR_PCA_BCA
    A summarized raw data table that stores the account IDs to identify the PCA or BCA.

    Image Added
  • PAYMENT_RAW_DATA_FOR_PCA_BCA
    A summarized raw data table that stores the account IDs to identify the PCA or BCA.

    Image Added



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.

Multiexcerpt
hiddentrue
MultiExcerptNameInvocationFailure

Capturing data during invocation failure scenarios

  1. Go to the <WSO2_OB_APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences directory.
  2. Create an XML file named api_invocation_fail_data_publisher.xml with the following content: 

    xml
  3. Open the <WSO2_OB_APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/_throttle_out_handler_.xml file and add the OBErrorDataPublisher  class under the sequence tag. 

  4. Open the <WSO2_OB_APIM_HOME>/repository/deployment/server/synapse-configs/default/sequences/_auth_failure_handler_.xml file and add the OBErrorDataPublisher  class below the sequence key element as shown below: 

    xml